From 178befbc644f1dd3f9c9a9eff8a5f41092fb76f2 Mon Sep 17 00:00:00 2001 From: guoshuang Date: Tue, 6 Aug 2024 14:33:02 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=A0=87=E8=AF=86=E5=8D=A1=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/plan/workorder/index.vue | 4 +- src/views/plan/workorder/printID.vue | 135 +++++++++++++++------------ 2 files changed, 77 insertions(+), 62 deletions(-) diff --git a/src/views/plan/workorder/index.vue b/src/views/plan/workorder/index.vue index 4d4defe..7b140cb 100644 --- a/src/views/plan/workorder/index.vue +++ b/src/views/plan/workorder/index.vue @@ -1987,8 +1987,10 @@ export default { /**打印标识卡弹出框**/ printIdCard() { - this.$refs.printID.printDialogVisible = true; this.$refs.printID.init("20021221552"); + this.$refs.printID.showPrint(); + this.$refs.printID.printDialogVisible = true; + }, //标识卡选择确认 printIdFunc(obj) { diff --git a/src/views/plan/workorder/printID.vue b/src/views/plan/workorder/printID.vue index 1832859..3abe6e6 100644 --- a/src/views/plan/workorder/printID.vue +++ b/src/views/plan/workorder/printID.vue @@ -1,15 +1,9 @@ + From 7fe067ed37a12a6b3ac954a500dc547abe35f293 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Tue, 6 Aug 2024 17:20:01 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=A0=87=E8=AF=86=E5=8D=A1=E6=89=93?= =?UTF-8?q?=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 7b140cb..c1abe9a 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 3abe6e6..cd0f695 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 f93ae87..234985d 100644 --- a/src/views/wms/product/index.vue +++ b/src/views/wms/product/index.vue @@ -384,6 +384,11 @@ style="width: 320px" /> + + + + + - - - From b6d96f5544b6b71cd0d742cc0ede4dfd62c446a5 Mon Sep 17 00:00:00 2001 From: guoshuang Date: Tue, 6 Aug 2024 17:53:43 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A1=A5=E6=89=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/plan/workorder.js | 5 +---- src/views/plan/workorder/printID.vue | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/api/plan/workorder.js b/src/api/plan/workorder.js index 298c59c..f3c2697 100644 --- a/src/api/plan/workorder.js +++ b/src/api/plan/workorder.js @@ -181,10 +181,7 @@ export function getProdLineList() { params: {} }); } -export function getIdCardList(workorderCode){ - const data={ - workorderCode - } +export function getIdCardList(data){ return request({ url:'/plan/pro/workorder/getIdCardList', method:'post', diff --git a/src/views/plan/workorder/printID.vue b/src/views/plan/workorder/printID.vue index cd0f695..4f83b05 100644 --- a/src/views/plan/workorder/printID.vue +++ b/src/views/plan/workorder/printID.vue @@ -1,6 +1,15 @@