From e3ff980ba353c77eca59f831f9e68d9a1ee1302e Mon Sep 17 00:00:00 2001 From: qiezi <15576055375@163.com> Date: Tue, 15 Apr 2025 14:57:47 +0800 Subject: [PATCH] 20250415 --- src/views/modules/board/partInventory.vue | 40 ++++++++++++++++++----- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/src/views/modules/board/partInventory.vue b/src/views/modules/board/partInventory.vue index 9541760..93313d6 100644 --- a/src/views/modules/board/partInventory.vue +++ b/src/views/modules/board/partInventory.vue @@ -130,7 +130,7 @@ export default { columnProp: "locationId", headerAlign: "center", align: "left", - columnLabel: "仓库", + columnLabel: "库位", columnHidden: false, columnImage: false, columnSortable: true, @@ -145,7 +145,7 @@ export default { serialNumber: '153Table1', tableId: "153Table1", tableName: "物料库存信息表", - columnProp: "batch", + columnProp: "batchNo", headerAlign: "center", align: "left", columnLabel: "批号", @@ -220,7 +220,7 @@ export default { columnProp: "freezeFlag", headerAlign: "center", align: "left", - columnLabel: "入库日期", + columnLabel: "冻结", columnHidden: false, columnImage: false, columnSortable: true, @@ -443,7 +443,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 140 }, { userId: this.$store.state.user.name, @@ -461,7 +461,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 140 }, ], } @@ -494,11 +494,36 @@ export default { }, fields(){ + let json = "{" + this.columnList.forEach((item, index) => { + if (index === this.columnList.length - 1) { + json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + } else { + json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + "," + } + }) + json += "}" + let s = eval("(" + json + ")") + return s }, }, created() { + }, + computed:{ + columnList(){ + if (this.queryParams.summaryType === 2){ + return this.columns.filter(item=> item.columnProp !== 'batchNo') + } + if (this.queryParams.summaryType === 1){ + return this.columns.filter(item=> item.columnProp !== 'batchNo' && item.columnProp !== 'locationId'); + } + if (this.queryParams.summaryType === 0){ + return this.columns.filter(item=> item.columnProp !== 'batchNo' && item.columnProp !== 'locationId' && item.columnProp !== 'warehouseId'); + } + return this.columns + } }, watch:{ queryLoading(newVal,oldVal){ @@ -507,7 +532,7 @@ export default { this.queryLoading = false; },30000) } - } + }, } } @@ -651,8 +676,7 @@ export default {