From 76926c3a1003d7aa8ea49075c7e22006f28263c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Fri, 22 Aug 2025 13:19:22 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E6=89=AB=E7=A0=81=E5=90=8E?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E6=8F=92=E5=85=A5=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- klp-ui/src/views/wms/print/index.vue | 27 +++----- .../src/views/wms/stockIo/panels/detail.vue | 63 ++++++++++++------- scaner/src/main/java/org/example/Main.java | 60 +++++++++++------- .../main/java/org/example/ScanDataUtil.java | 3 +- 4 files changed, 90 insertions(+), 63 deletions(-) diff --git a/klp-ui/src/views/wms/print/index.vue b/klp-ui/src/views/wms/print/index.vue index d3ad88fc..c35df02b 100644 --- a/klp-ui/src/views/wms/print/index.vue +++ b/klp-ui/src/views/wms/print/index.vue @@ -62,10 +62,10 @@ - - + + + placeholder="请选择原材料" @change="onItemChange($event, idx)" /> @@ -135,7 +135,10 @@ export default { warehouseId: b.warehouseId, itemType: b.itemType, itemId: b.itemId, - batchNo: b.batchNo + batchNo: b.batchNo, + quantity: b.count, + unit: b.unit, + recordType: 1, }), count: b.count || 1, textTpl: b.text || '' @@ -143,19 +146,8 @@ export default { } }, methods: { - onItemChange(item) { - // 选中后构造条码数据并插入 - console.log(item); - const itemType = this.itemType; - const name = (itemType == 'semi' || itemType == 'product') ? item.productName : item.rawMaterialName; - const code = (itemType == 'semi' || itemType == 'product') ? item.productCode : item.rawMaterialCode; - const itemId = (itemType == 'semi' || itemType == 'product') ? item.productId : item.rawMaterialId; - const o = { - code: encodeURIComponent(`${itemType}__${itemId || ''}`), - count: 1, - textTpl: `${name}[${code}]` - } - this.drawerBarcodeData.push(o); + onItemChange(item, idx) { + this.drawerBarcodeData[idx].unit = item.unit; }, fetchMaster() { listStockIo({ pageSize: 9999, pageNum: 1 }).then(res => { @@ -182,6 +174,7 @@ export default { itemId: undefined, batchNo: 'auto', count: 0, + unit: '', text: '默认文字', } diff --git a/klp-ui/src/views/wms/stockIo/panels/detail.vue b/klp-ui/src/views/wms/stockIo/panels/detail.vue index 4289cc4e..62911052 100644 --- a/klp-ui/src/views/wms/stockIo/panels/detail.vue +++ b/klp-ui/src/views/wms/stockIo/panels/detail.vue @@ -19,6 +19,41 @@
+ + + + + + + + + + + + + + + + + + @@ -90,7 +125,7 @@ - +