From 1e0af7d96c3f518030f437caa233056f9817587e Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 7 May 2025 10:57:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=8E=BB=E7=BA=A4=E8=BD=A6=E9=97=B4inm?= =?UTF-8?q?=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/index.vue | 4 +- src/views/wpm_bx/inm.vue | 110 ++++++++++++++++++------------------- 2 files changed, 55 insertions(+), 59 deletions(-) diff --git a/src/views/wpm_bx/index.vue b/src/views/wpm_bx/index.vue index 9187f42b..aae3f612 100644 --- a/src/views/wpm_bx/index.vue +++ b/src/views/wpm_bx/index.vue @@ -35,7 +35,9 @@ + :mgroupName="mgroupName" + :process = "mgroupProcess" + :deptId="mgroupDept"> diff --git a/src/views/wpm_bx/inm.vue b/src/views/wpm_bx/inm.vue index cd8fb954..b6cb73ab 100644 --- a/src/views/wpm_bx/inm.vue +++ b/src/views/wpm_bx/inm.vue @@ -228,16 +228,6 @@ - - - - - - - - 保存 - - { - if (res.length < 1) { - that.$message.error("获取工段错误"); - return; - } - that.mgroupId = res[0].id; - that.$TOOL.data.set('bx_deptID',res[0].belong_dept); - that.process = res[0].process; - that.params.mgroupx = res[0].id; - that.params.belong_dept = res[0].belong_dept; - that.apiObj = that.$API.wpm.wmaterial.list; - that.$refs.table.refresh(); - }); + that.$API.cm.labeltemplate.list.req({process:that.process,page:0}).then((res) => { + that.templateList = res; + }) }, handleWatch(row) { let that = this; @@ -480,6 +468,14 @@ export default { //打印物料标签 printMaterial(row,type){ let that = this; + let str =[] + if(that.templateList.length==1){ + str = that.templateList[0].commands; + }else if(that.templateList.length>1){ + + }else{ + + } if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){ if(type=='wm'){ that.apiObjPrint.req({tid:row.id}).then((res) => { @@ -503,26 +499,24 @@ export default { }); }) }else{ - // let code = 'wpr#'+row.id; let code = row.number; - let str = [ - "SIZE 70 mm,100 mm", - "GAP 7 mm,7 mm", - "CLS", - "REFERENCE 0,0", - 'QRCODE 30,400,H,5,A,0,"' +code +'"', - "WINTEXT 240,550,28,90,0,0,Simhei," + row.number, - "PRINT 1", - ]; - let obj = {}; - obj.printer_commands = str; - obj.printer_name = that.printer_name; - that.$API.wpm.prints.req(obj).then((response) => { - that.$message.success("打印成功"); - }); + let str = [ + "SIZE 70 mm,100 mm", + "GAP 7 mm,7 mm", + "CLS", + "REFERENCE 0,0", + 'QRCODE 30,400,H,5,A,0,"' +code +'"', + "WINTEXT 240,550,28,90,0,0,Simhei," + row.number, + "PRINT 1", + ]; + let obj = {}; + obj.printer_commands = str; + obj.printer_name = that.printer_name; + that.$API.wpm.prints.req(obj).then((response) => { + that.$message.success("打印成功"); + }); } }else{ - that.printSetting(); } }, inmCheck(row){