From 7fe067ed37a12a6b3ac954a500dc547abe35f293 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Tue, 6 Aug 2024 17:20:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E8=AF=86=E5=8D=A1=E6=89=93=E5=8D=B02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/plan/workorder/index.vue | 15 +++++++++++---- src/views/plan/workorder/printID.vue | 20 ++++++++++---------- src/views/wms/product/index.vue | 20 +++++++++----------- 3 files changed, 30 insertions(+), 25 deletions(-) diff --git a/src/views/plan/workorder/index.vue b/src/views/plan/workorder/index.vue index 7b140cb1..c1abe9ad 100644 --- a/src/views/plan/workorder/index.vue +++ b/src/views/plan/workorder/index.vue @@ -1838,7 +1838,7 @@ export default { this.$modal.msgError("还未派发请到工单变更进行调整!"); return; } - + this.batchLoading = true; const workOrdercode = this.codes[0]; @@ -1987,10 +1987,17 @@ export default { /**打印标识卡弹出框**/ printIdCard() { - this.$refs.printID.init("20021221552"); - this.$refs.printID.showPrint(); + + //var statusesArray = this.statuses; + //for (var i = 0; i < statusesArray.length; i++) { + // if (statusesArray[i] != 'w0') {//已经下达的不允许操作 + // this.$modal.msgError("工单只有未派发和已派发才可变更!"); + // return + // } + //} + + this.$refs.printID.init(this.selectWork.workorderCode); this.$refs.printID.printDialogVisible = true; - }, //标识卡选择确认 printIdFunc(obj) { diff --git a/src/views/plan/workorder/printID.vue b/src/views/plan/workorder/printID.vue index 3abe6e6b..cd0f695d 100644 --- a/src/views/plan/workorder/printID.vue +++ b/src/views/plan/workorder/printID.vue @@ -16,11 +16,11 @@ -
产品名称: {{ printData.factory }}

-
批次号: {{ printData.factory }}

-
生产日期: {{ printData.factory }}

-
板次: {{ printData.factory }}

-
数量: {{ printData.factory }}
+
产品名称: {{ item.productName }}

+
批次号: {{ item.batchCode }}

+
生产日期: {{ item.productDateStr }}

+
板次: {{ item.PalletNo }}

+
数量: {{ item.batchQuantity }}
@@ -89,12 +89,13 @@ export default { created() { }, mounted() { - //this.showPrint(); + }, methods: { init(workorderCode){ this.workorderCode = workorderCode; + this.showPrint(); }, // 打印预览-浏览器打印 @@ -115,13 +116,12 @@ export default { }, // 打印预览-点击打印预览按钮 async showPrint() { - console.log('执行了打印预览'); - let response = await getIdCardList(this.workorderCode,this.idCardNum); - this.printData.idCardList = response.idCards; + let response = await getIdCardList(this.workorderCode); + this.printData.idCardList = response; this.$nextTick(() => { this.printData.idCardList.forEach((item, index) => { const canvas = document.getElementById('qrcode-' + index); - QRCode.toCanvas(canvas, item, { width: 350,margin:1 }, function (error) { + QRCode.toCanvas(canvas, item.palletCode, { width: 350,margin:1 }, function (error) { if (error) console.error(error); console.log('success!'); }); diff --git a/src/views/wms/product/index.vue b/src/views/wms/product/index.vue index f93ae874..234985d8 100644 --- a/src/views/wms/product/index.vue +++ b/src/views/wms/product/index.vue @@ -384,6 +384,11 @@ style="width: 320px" /> + + + + + - - -