From 7712a7b800d98f01633462dca88cf771ad4f2095 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Tue, 14 Oct 2025 14:47:23 +0800 Subject: [PATCH] =?UTF-8?q?2025-10-14=20=E5=BA=93=E5=AD=98=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E8=A1=A5=E6=89=93=20=E5=A2=9E=E5=8A=A0=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/wms.js | 2 + src/views/modules/print/rePrintPoPart.vue | 303 ++++++++++++++++++---- 2 files changed, 261 insertions(+), 44 deletions(-) diff --git a/src/api/wms/wms.js b/src/api/wms/wms.js index e19b154..9687fe0 100644 --- a/src/api/wms/wms.js +++ b/src/api/wms/wms.js @@ -8,3 +8,5 @@ export const getPoPartLabelData = data => createAPI(`wmsPrint/getPoPartLabelData export const deletePoPartLabelData = data => createAPI(`wmsPrint/deletePoPartLabelData`,'POST',data) export const getKuCunLabelData = data => createAPI(`wmsPrint/getKuCunLabelData`,'POST',data) +// 更新库存标签属性 +export const updateInventoryStockAttribute = data => createAPI(`wmsPrint/updateInventoryStockAttribute`,'POST',data) diff --git a/src/views/modules/print/rePrintPoPart.vue b/src/views/modules/print/rePrintPoPart.vue index b79dc6b..4f2be18 100644 --- a/src/views/modules/print/rePrintPoPart.vue +++ b/src/views/modules/print/rePrintPoPart.vue @@ -44,6 +44,7 @@ 查询 打印 + 属性变动 @@ -57,7 +58,7 @@ style="width: 100%;"> + + + + + + + + + + + + + + + + + + 保存 + 关闭 + + + @@ -127,7 +150,7 @@ import {getCRollInfoList} from '@/api/crollinfo/crollinfo.js' import {rollPrint} from '@/api/finishedProductWarehouse/rollPrint.js' -import {getInboundQcResultData, getKuCunLabelData} from '../../../api/wms/wms' +import {getInboundQcResultData, getKuCunLabelData, updateInventoryStockAttribute} from '../../../api/wms/wms' import {kuCunLabelPrint} from '../clodopLabel/kuCunLabel' export default { @@ -160,7 +183,7 @@ export default { headerAlign: "center", align: "center", columnLabel: "BU", - columnWidth: '70', + columnWidth: '60', columnHidden: false, columnImage: false, columnSortable: false, @@ -176,7 +199,7 @@ export default { tableName: "库存标签表", columnProp: "rollNo", headerAlign: "center", - align: "center", + align: "left", columnLabel: "标签条码", columnWidth: '110', columnHidden: false, @@ -189,13 +212,31 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '680Table1WarehouseId', + serialNumber: '680Table1QtyOnHand', + tableId: "680Table1", + tableName: "库存标签表", + columnProp: "qtyOnHand", + headerAlign: "center", + align: "right", + columnLabel: "标签数量", + columnWidth: '100', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: this.functionId, + serialNumber: '680Table1Status', tableId: "680Table1", tableName: "库存标签表", - columnProp: "warehouseId", + columnProp: "status", headerAlign: "center", align: "left", - columnLabel: "仓库编码", + columnLabel: "标签状态", columnWidth: '100', columnHidden: false, columnImage: false, @@ -207,13 +248,49 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '680Table1LocationId', + serialNumber: '680Table1PartNo', tableId: "680Table1", tableName: "库存标签表", - columnProp: "locationId", + columnProp: "partNo", headerAlign: "center", align: "left", - columnLabel: "库位编码", + columnLabel: "物料编码", + columnWidth: '120', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: this.functionId, + serialNumber: '680Table1PartDescription', + tableId: "680Table1", + tableName: "库存标签表", + columnProp: "partDescription", + headerAlign: "center", + align: "left", + columnLabel: "物料名称", + columnWidth: '250', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: this.functionId, + serialNumber: '680Table1Spec', + tableId: "680Table1", + tableName: "库存标签表", + columnProp: "spec", + headerAlign: "center", + align: "left", + columnLabel: "规格型号", columnWidth: '100', columnHidden: false, columnImage: false, @@ -225,13 +302,31 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '680Table1QtyOnHand', + serialNumber: '680Table1UmName', tableId: "680Table1", tableName: "库存标签表", - columnProp: "qtyOnHand", + columnProp: "umName", headerAlign: "center", - align: "right", - columnLabel: "标签数量", + align: "left", + columnLabel: "单位", + columnWidth: '100', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: this.functionId, + serialNumber: '680Table1LabelType', + tableId: "680Table1", + tableName: "库存标签表", + columnProp: "labelType", + headerAlign: "center", + align: "left", + columnLabel: "标签类型", columnWidth: '100', columnHidden: false, columnImage: false, @@ -261,14 +356,14 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '680Table1PartNo', + serialNumber: '680Table1ParentRollType', tableId: "680Table1", tableName: "库存标签表", - columnProp: "partNo", + columnProp: "parentRollType", headerAlign: "center", align: "left", - columnLabel: "物料编码", - columnWidth: '120', + columnLabel: "上级标签类型", + columnWidth: '100', columnHidden: false, columnImage: false, columnSortable: false, @@ -279,14 +374,14 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '680Table1PartDescription', + serialNumber: '680Table1WarehouseName', tableId: "680Table1", tableName: "库存标签表", - columnProp: "partDescription", + columnProp: "warehouseName", headerAlign: "center", align: "left", - columnLabel: "物料名称", - columnWidth: '240', + columnLabel: "仓库", + columnWidth: '120', columnHidden: false, columnImage: false, columnSortable: false, @@ -297,14 +392,14 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '680Table1PartDescEn', + serialNumber: '680Table1LocationName', tableId: "680Table1", tableName: "库存标签表", - columnProp: "partDescEn", + columnProp: "locationName", headerAlign: "center", align: "left", - columnLabel: "英文物料名称", - columnWidth: '200', + columnLabel: "库位", + columnWidth: '120', columnHidden: false, columnImage: false, columnSortable: false, @@ -315,14 +410,14 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '680Table1Status', + serialNumber: '680Table1FirstInDate', tableId: "680Table1", tableName: "库存标签表", - columnProp: "status", + columnProp: "firstInDate", headerAlign: "center", - align: "left", - columnLabel: "标签状态", - columnWidth: '80', + align: "center", + columnLabel: "入库日期", + columnWidth: '130', columnHidden: false, columnImage: false, columnSortable: false, @@ -333,14 +428,50 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '680Table1LabelType', + serialNumber: '680Table1ManufactureDate', tableId: "680Table1", tableName: "库存标签表", - columnProp: "labelType", + columnProp: "manufactureDate", + headerAlign: "center", + align: "center", + columnLabel: "生产日期", + columnWidth: '130', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: this.functionId, + serialNumber: '680Table1ExpiredDate', + tableId: "680Table1", + tableName: "库存标签表", + columnProp: "expiredDate", + headerAlign: "center", + align: "center", + columnLabel: "有效期", + columnWidth: '130', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: this.functionId, + serialNumber: '680Table1Orderref0', + tableId: "680Table1", + tableName: "库存标签表", + columnProp: "orderref0", headerAlign: "center", align: "left", - columnLabel: "标签类型", - columnWidth: '80', + columnLabel: "来源单据类型", + columnWidth: '100', columnHidden: false, columnImage: false, columnSortable: false, @@ -354,10 +485,10 @@ export default { serialNumber: '680Table1OrderRef1', tableId: "680Table1", tableName: "库存标签表", - columnProp: "orderRef1", + columnProp: "orderref1", headerAlign: "center", align: "left", - columnLabel: "关联单号", + columnLabel: "来源单据号", columnWidth: '100', columnHidden: false, columnImage: false, @@ -372,11 +503,11 @@ export default { serialNumber: '680Table1OrderRef2', tableId: "680Table1", tableName: "库存标签表", - columnProp: "orderRef2", + columnProp: "orderref2", headerAlign: "center", align: "right", - columnLabel: "关联单行号", - columnWidth: '80', + columnLabel: "来源单据行号", + columnWidth: '100', columnHidden: false, columnImage: false, columnSortable: false, @@ -387,13 +518,13 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '680Table1ManufactureDate', + serialNumber: '680Table1BatchNo', tableId: "680Table1", tableName: "库存标签表", - columnProp: "manufactureDate", + columnProp: "batchNo", headerAlign: "center", - align: "center", - columnLabel: "生产日期", + align: "left", + columnLabel: "合约号码", columnWidth: '120', columnHidden: false, columnImage: false, @@ -402,6 +533,42 @@ export default { status: true, fixed: false }, + { + userId: this.$store.state.user.name, + functionId: this.functionId, + serialNumber: '680Table1Wdr', + tableId: "680Table1", + tableName: "库存标签表", + columnProp: "wdr", + headerAlign: "center", + align: "center", + columnLabel: "批次号", + columnWidth: '100', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: this.functionId, + serialNumber: '680Table1Remark', + tableId: "680Table1", + tableName: "库存标签表", + columnProp: "remark", + headerAlign: "center", + align: "left", + columnLabel: "备注说明", + columnWidth: '200', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, ], addModelData:{ type:'A', @@ -409,6 +576,12 @@ export default { dataList: [], addModelFlag: false, dataListLoading: false, + // 属性变动相关 + attributeChangeDialogVisible: false, + attributeChangeForm: { + batchNo: '', + remark: '' + }, selectionDataList:[], } }, @@ -475,6 +648,48 @@ export default { printLabel(){ kuCunLabelPrint(this.selectionDataList,"A") }, + + // 打开属性变动对话框 + openAttributeChangeDialog() { + if(this.selectionDataList.length === 0){ + this.$message.warning('请先勾选要变动属性的标签!'); + return false; + } + // 重置表单 + this.attributeChangeForm = { + batchNo: '', + remark: '' + }; + this.attributeChangeDialogVisible = true; + }, + + // 保存属性变动 + async saveAttributeChange() { + // 构建更新数据列表 + const updateList = this.selectionDataList.map(item => { + return { + site: item.site, + buNo: item.buNo, + rollNo: item.rollNo, + batchNo: this.attributeChangeForm.batchNo, + remark: this.attributeChangeForm.remark + }; + }); + + try { + const {data} = await updateInventoryStockAttribute(updateList); + if(data && data.code === 0){ + this.$message.success('属性变动成功'); + this.attributeChangeDialogVisible = false; + // 刷新数据 + this.getMainData(); + } else { + this.$message.error(data.msg || '属性变动失败'); + } + } catch (error) { + this.$message.error(error.msg || '属性变动失败,请重试'); + } + }, }, created() {