This commit is contained in:
2026-01-27 09:27:46 +08:00
parent 78ec95c313
commit 279a99afbe
10 changed files with 187 additions and 359 deletions

View File

@@ -161,7 +161,7 @@
/>
<!-- 添加或修改仓库信息对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-dialog :title="title" v-model="open" width="500px">
<el-form ref="warehouseinfoRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="大库编码" prop="parentWarehouseCode">
<el-input v-model="form.parentWarehouseCode" placeholder="请输入大库编码" />

View File

@@ -50,7 +50,7 @@
</el-form-item>
</el-col>
</el-row>
<el-table v-loading="loading" ref="billTableRef" :data="billList" highlight-current-row @row-click="tableBillRowClick" :row-class-name="tableBillRowClassName" @row-dblclick="billClick"
<el-table v-loading="loading" ref="billTableRef" :data="billList" highlight-current-row @row-click="(row) => tableInfoRowClick(row, billTableRef)" :row-class-name="tableBillRowClassName" @row-dblclick="billClick"
@current-change="uploadSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="单据号" align="center" prop="billNo" width="180" />
@@ -128,7 +128,7 @@
<el-button type="primary" plain icon="Delete" @click="handleOneClickStockDel">一键删除</el-button>
</el-col>
</el-row>
<el-table v-loading="detailLoading" show-overflow-tooltip border :data="stockList"
<el-table v-loading="detailLoading" ref="infoTableRef" highlight-current-row @row-click="(row) => tableInfoRowClick(row, infoTableRef)" show-overflow-tooltip border :data="stockList"
@selection-change="printSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" type="index" width="70" />
@@ -1128,9 +1128,11 @@ const delData = (row) => {
// 单击单据
const billTableRef = ref(null);
const tableBillRowClick = (row, event, column) => {
billTableRef.value.setCurrentRow(row)
}
// 单击列表的颜色
const infoTableRef = ref(null);
// const tableInfoRowClick = (row, ref) => {
// ref.setCurrentRow(row)
// }
//双击单据,查询明细
const billDoubleClickObj = ref({});

View File

@@ -50,6 +50,9 @@
</el-row>
<el-table v-loading="loading" :data="outboundList" @selection-change="printSelectionChange" border
ref="infoTableRef"
highlight-current-row
@row-click="(row) => tableInfoRowClick(row, infoTableRef)"
show-overflow-tooltip>
<el-table-column type="selection" width="55" align="center" />
@@ -100,7 +103,7 @@
<printBill :billAllObj="printList" />
</div>
<!-- 添加或修改库存单据主对话框 -->
<el-dialog :title="title" v-model="open" append-to-body width="70%">
<el-dialog :title="title" v-model="open" width="70%" :z-index="4" :close-on-click-modal="false" :draggable="true">
<el-form ref="stockRef" :model="storeData" :rules="rules">
<el-row :gutter="20">
<el-col :span="6">
@@ -240,30 +243,11 @@ import { addOutbound } from "@/api/wisdom/outbound"
const { proxy } = getCurrentInstance();
const outboundList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const total = ref(0);
const title = ref("");
const planList = ref([]); //从供应计划中添加列表
const storeTypeList = ref([]); //出库类型下拉数据
const wzTypeList = ref([]); //施工队下拉数据
const personList = ref([]); //理货员下拉数据
const orderNum = ref("") //搜索条件:订单号
const showContent = ref(false); // 控制打印内容是否显示
const dateStr = ref("") //打印单据生成的日期
const printList = ref([]) //要打印的数据列表
const kwOptions = ref([]); //库位下拉
const borrowTime = ref([])
const data = reactive({
form: {},
storeData: {
ckType: "JLCK"
}, //借料数据
@@ -294,8 +278,6 @@ const data = reactive({
printViewInfo: {
id: "printMe", //打印区域的唯一的id属性
popTitle: '入库信息打印',
beforeOpenCallback() {
showContent.value = false;
}, // 开始打印之前的callback
@@ -308,13 +290,12 @@ const data = reactive({
}
});
const { queryParams, storeData, rules, form, printViewInfo, outQueryParams } = toRefs(data);
const { queryParams, storeData, rules, printViewInfo, outQueryParams } = toRefs(data);
const statusList = ref([
{ value: 1, label: '未还料', elTagType: "danger", elTagClass: null },
{ value: 2, label: '已还料', elTagType: "primary", elTagClass: null }
])
const dictTagData = () => {
return statusList.value.map(item => ({
...item,
@@ -323,6 +304,10 @@ const dictTagData = () => {
}
/** 查询库存单据主列表 */
const outboundList = ref([]);
const infoTableRef = ref(null);
const loading = ref(true);
const total = ref(0);
function getList() {
loading.value = true;
listStock({ ...queryParams.value, bizType: '2' }).then(response => {
@@ -333,23 +318,8 @@ function getList() {
}
getList();
// 取消按钮
function cancel() {
open.value = false;
reset();
}
// 表单重置
function reset() {
planList.value = []
storeData.value = {
ckType: "JLCK"
}
orderNum.value = ""
proxy.resetForm("stockRef");
}
/** 搜索按钮操作 */
const borrowTime = ref([])
function handleQuery() {
if (borrowTime.value && borrowTime.value.length > 0) {
queryParams.value.startDate = borrowTime.value[0]
@@ -369,56 +339,44 @@ function resetQuery() {
handleQuery();
}
//出库 多选框选中数据
function handleSelectionChange(selection) {
ids.value = selection.map(info => info.id)
}
//打印单据 多选框选中数据
function printSelectionChange(selection) {
printList.value = selection
queryParams.value.ids = selection.map(item => item.id)
// console.log(queryParams.value.ids)
}
//打印单据
function handlePrint() {
if (printList.value.length == 0) {
proxy.$modal.msgError("请勾选数据");
return
}
const date = new Date();
const year = date.getFullYear();
const month = date.getMonth() + 1; // 月份从0开始需要加1
const day = date.getDate();
const hour = date.getHours();
const minute = date.getMinutes();
const second = date.getSeconds();
dateStr.value = year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second
showContent.value = true
//获取出库类型下拉数据
const storeTypeList = ref([]); //出库类型下拉数据
const getOutTypeList = () => {
listOuttype({ pageNum: 1, pageSize: 50 }).then(response => {
storeTypeList.value = response.rows
})
}
getOutTypeList()
// 获取施工队下拉数据
const wzTypeList = ref([]); //施工队下拉数据
const getConstructionList = () => {
listConstruction({ pageNum: 1, pageSize: 50 }).then(response => {
wzTypeList.value = response.rows
})
}
getConstructionList()
// 获取理货员下拉数据
const personList = ref([]); //理货员下拉数据
const getPersonList = () => {
personListDict().then(response => {
personList.value = response.data
})
}
getPersonList()
/** 新增按钮操作 */
const open = ref(false);
const title = ref("");
function handleAdd() {
reset();
open.value = true;
title.value = "添加借料单据";
//获取出库类型下拉数据
listOuttype({ pageNum: 1, pageSize: 50 }).then(response => {
storeTypeList.value = response.rows
})
//获取施工队下拉数据
listConstruction({ pageNum: 1, pageSize: 50 }).then(response => {
wzTypeList.value = response.rows
})
//理货员下拉数据
personListDict().then(response => {
personList.value = response.data
})
}
//查询库存中数据 搜索
const planList = ref([]); //从供应计划中添加列表
function searchPlan() {
if (!outQueryParams.value.xmNo && !outQueryParams.value.wlNo && !outQueryParams.value.sapNo) {
proxy.$modal.msgWarning("查询条件不能为空");
@@ -435,15 +393,17 @@ function searchPlan() {
planList.value = response.rows
}
})
}
//出库 多选框选中数据
const ids = ref([]);
function handleSelectionChange(selection) {
ids.value = selection.map(info => info.id)
}
/** 借料出库 提交按钮 */
function submitForm() {
proxy.$refs["stockRef"].validate(valid => {
if (valid) {
if (ids.value.length == 0) {
proxy.$modal.msgError("请勾选数据");
@@ -476,6 +436,46 @@ function submitForm() {
});
}
// 取消按钮
function cancel() {
open.value = false;
reset();
}
// 表单重置
function reset() {
planList.value = []
storeData.value = {
ckType: "JLCK"
}
proxy.resetForm("stockRef");
}
//打印单据 多选框选中数据
const printList = ref([]) //要打印的数据列表
function printSelectionChange(selection) {
printList.value = selection
}
//打印单据
const dateStr = ref("") //打印单据生成的日期
const showContent = ref(false); // 控制打印内容是否显示
function handlePrint() {
if (printList.value.length == 0) {
proxy.$modal.msgError("请勾选数据");
return
}
const date = new Date();
const year = date.getFullYear();
const month = date.getMonth() + 1; // 月份从0开始需要加1
const day = date.getDate();
const hour = date.getHours();
const minute = date.getMinutes();
const second = date.getSeconds();
dateStr.value = year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second
showContent.value = true
}
const returnId = ref([])
const returnData = ref({})
const returnOpen = ref(false)
@@ -525,60 +525,12 @@ function warehouseFun() {
})
}
warehouseFun()
//库位字典
function pcodeList(value) {
console.log(value)
getKwAllList(value[1]).then(response => {
kwOptions.value = response.data
returnData.value.pcode = ""
})
}
</script>
<style scoped lang="scss">
.el-table .warning-row {
--el-table-tr-bg-color: var(--el-color-warning-light-9);
}
.el-table .success-row {
--el-table-tr-bg-color: var(--el-color-success-light-9);
}
.titleBox {
text-align: center;
margin-bottom: 20px;
}
.printMeBox {
div {
line-height: 30px;
}
}
.topBox {
display: flex;
flex-wrap: wrap;
}
.topEveryBox {
width: 50%;
}
.tableBox {
margin-top: 10px;
}
.oneLineBox {
display: flex;
}
.everyBox {
width: 25%;
}
.bottomBox {
margin-top: 10px;
}
</style>

View File

@@ -28,13 +28,13 @@
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="Search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table v-loading="loading" :data="recordList" border show-overflow-tooltip>
<el-table v-loading="loading" :data="recordList" ref="infoTableRef" highlight-current-row @row-click="(row) => tableInfoRowClick(row, infoTableRef)" border show-overflow-tooltip>
<el-table-column label="物料描述" align="center" prop="wlMs" />
<el-table-column label="供应商" align="center" prop="gysMc" />
<el-table-column label="项目编号" align="center" prop="xmNo" />
@@ -71,226 +71,71 @@
@pagination="getList"
/>
<!-- 添加或修改移库记录对话框 -->
<!-- :visible.sync="open" -->
<el-dialog :title="title" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="关联的库存单据ID" prop="rkId">
<el-input v-model="form.rkId" placeholder="请输入关联的库存单据ID" />
</el-form-item>
<el-form-item label="实物ID" prop="entityId">
<el-input v-model="form.entityId" placeholder="请输入实物ID" />
</el-form-item>
<el-form-item label="原仓库" prop="fromCangku">
<el-input v-model="form.fromCangku" placeholder="请输入原仓库" />
</el-form-item>
<el-form-item label="原库位码" prop="fromPcode">
<el-input v-model="form.fromPcode" placeholder="请输入原库位码" />
</el-form-item>
<el-form-item label="原托盘码" prop="fromTrayCode">
<el-input v-model="form.fromTrayCode" placeholder="请输入原托盘码" />
</el-form-item>
<el-form-item label="目标仓库" prop="toCangku">
<el-input v-model="form.toCangku" placeholder="请输入目标仓库" />
</el-form-item>
<el-form-item label="目标库位码" prop="toPcode">
<el-input v-model="form.toPcode" placeholder="请输入目标库位码" />
</el-form-item>
<el-form-item label="目标托盘码" prop="toTrayCode">
<el-input v-model="form.toTrayCode" placeholder="请输入目标托盘码" />
</el-form-item>
<el-form-item label="移库原因" prop="moveReason">
<el-input v-model="form.moveReason" placeholder="请输入移库原因" />
</el-form-item>
<el-form-item label="操作人" prop="movedBy">
<el-input v-model="form.movedBy" placeholder="请输入操作人" />
</el-form-item>
<el-form-item label="操作时间" prop="movedAt">
<el-input v-model="form.movedAt" placeholder="请输入操作时间" />
</el-form-item>
<el-form-item label="逻辑删除标志" prop="isDelete">
<el-input v-model="form.isDelete" placeholder="请输入逻辑删除标志" />
</el-form-item>
</el-form>
<!-- slot="footer" -->
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
<script setup name="Move">
import { listRecord, delMove } from "@/api/wisdom/move";
import {warehouseDict} from "@/api/information/warehouseinfo"; //所属仓库
export default {
name: "move",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 移库记录表格数据
recordList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
fromCangku: null,
toCangku: null,
xmNo:null
},
warehouseList:[], //所属仓库下拉数据
// 表单参数
form: {},
// 表单校验
rules: {
rkId: [
{ required: true, message: "关联的库存单据ID不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
this.warehouseFun()
},
methods: {
//所属仓库
warehouseFun(){
//所属仓库下拉数据
warehouseDict().then(response=>{
this.warehouseList = response.data
})
},
/** 查询移库记录列表 */
getList() {
this.loading = true;
listRecord(this.queryParams).then(response => {
this.recordList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
rkId: null,
entityId: null,
fromCangku: null,
fromPcode: null,
fromTrayCode: null,
toCangku: null,
toPcode: null,
toTrayCode: null,
moveReason: null,
movedBy: null,
movedAt: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
isDelete: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加移库记录";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getRecord(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改移库记录";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateRecord(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addRecord(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除移库记录编号为"' + ids + '"的数据项?').then(function() {
return delRecord(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// this.download('system/record/export', {
// ...this.queryParams
// }, `record_${new Date().getTime()}.xlsx`)
},
delData(row){
this.$modal.confirm('确定撤销该条移库记录吗?').then(function() {
return delMove(row.id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
}
};
// 显示搜索条件
const showSearch = ref(true);
// 所属仓库下拉数据
const warehouseList = ref([]);
const warehouseFun = () =>{
//所属仓库下拉数据
warehouseDict().then(response=>{
warehouseList.value = response.data
})
}
warehouseFun()
/** 查询移库记录列表 */
// 遮罩层
const loading = ref(true);
// 查询参数
const queryParams = ref({
pageNum: 1,
pageSize: 10,
fromCangku: null,
toCangku: null,
xmNo:null
});
// 总条数
const total = ref(0);
// 表格引用
const infoTableRef = ref(null);
// 移库记录表格数据
const recordList = ref([]);
const getList = () => {
loading.value = true;
listRecord(queryParams.value).then(response => {
recordList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
getList();
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
const resetQuery = () => {
proxy.resetForm("queryForm");
handleQuery();
}
const delData = (row) => {
proxy.$modal.confirm('确定撤销该条移库记录吗?').then(function() {
return delMove(row.id);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
</script>

View File

@@ -87,6 +87,9 @@
:data="billList"
:row-class-name="tableBillRowClassName"
@row-dblclick="billClick"
ref="billTableRef"
highlight-current-row
@row-click="(row) => tableInfoRowClick(row, billTableRef)"
>
<el-table-column
label="单据号"
@@ -221,6 +224,9 @@
border
:data="outboundList"
@selection-change="selectionChange"
ref="infoTableRef"
highlight-current-row
@row-click="(row) => tableInfoRowClick(row, infoTableRef)"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
@@ -1256,6 +1262,13 @@ const delData = (row) => {
});
}
// 单击列表的颜色
const billTableRef = ref(null);
const infoTableRef = ref(null);
// const tableInfoRowClick = (row, ref) => {
// ref.setCurrentRow(row)
// }
// 双击主单据查询明细
const billDoubleClickObj = ref({});
const detailLoading = ref(false);

View File

@@ -102,7 +102,10 @@
</el-row>
<el-table v-loading="loading" :data="stockList" show-overflow-tooltip border
:row-class-name="tableBillRowClassName">
:row-class-name="tableBillRowClassName"
ref="infoTableRef"
highlight-current-row
@row-click="(row) => tableInfoRowClick(row, infoTableRef)">
<el-table-column label="序号" align="center" type="index" width="70" />
<el-table-column label="操作类型" align="center" prop="bizType" width="100">
<template #default="scope">
@@ -310,6 +313,8 @@ materialFun()
//出、入库类型下拉数据
rklxList()
const infoTableRef = ref(null);
// 显示预出库的状态
const tableBillRowClassName = ({ row, rowIndex }) => {
console.log('row===>',row);

View File

@@ -74,7 +74,7 @@
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="outboundList" @selection-change="printSelectionChange" border show-overflow-tooltip>
<el-table v-loading="loading" :data="outboundList" ref="infoTableRef" highlight-current-row @row-click="(row) => tableInfoRowClick(row, infoTableRef)" @selection-change="printSelectionChange" border show-overflow-tooltip>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="单据号" align="center" prop="billNo" width="180"/>
<el-table-column label="订单编号" align="center" prop="sapNo" width="150"/>
@@ -252,6 +252,7 @@
const loading = ref(true);
const outboundList = ref([]);
const infoTableRef = ref(null);
const total = ref(0);
/** 查询库存单据主列表 */
function getList() {

View File

@@ -106,6 +106,9 @@
</el-row>
<el-table v-loading="loading" :data="stockList" show-overflow-tooltip show-summary :summary-method="getSummaries"
ref="infoTableRef"
highlight-current-row
@row-click="(row) => tableInfoRowClick(row, infoTableRef)"
border>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" type="index" width="70" />
@@ -393,6 +396,7 @@ const { queryParams, rules } = toRefs(data);
/** 查询库存单据主列表 */
const stockList = ref([]);
const infoTableRef = ref(null);
const total = ref(0);
const loading = ref(true);
function getList() {