diff --git a/src/views/wpm_gx/inm.vue b/src/views/wpm_gx/inm.vue index 14368946..0f002568 100644 --- a/src/views/wpm_gx/inm.vue +++ b/src/views/wpm_gx/inm.vue @@ -93,7 +93,7 @@ fixed="right" align="center" width="120" - v-if="mgroupName!=='size'&&mgroupName!=='facade'" + > @@ -208,6 +209,7 @@ export default { process:'', materialType: "wm", visibleDrawer: false, + printer_name:localStorage.getItem("printer_name") }; }, mounted() { @@ -312,6 +314,32 @@ export default { this.dialog.save = false; this.$refs.table.refresh(); }, + //打印物料标签 + printMaterial(row){ + let that = this; + that.$API.cm.labelmat.fromWm.req({tid:row.id}).then((res) => { + console.log(res) + let code = res.code_label; + let str = [ + "SIZE 40 mm,70 mm", + "GAP 7 mm,7 mm", + "CLS", + "REFERENCE 0,0", + 'QRCODE 30,400,H,5,A,0,"' +code +'"', + "WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name, + "WINTEXT 240,550,28,90,0,0,Simhei," + res.batch, + ]; + if(res.notok_sign!==null){ + str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,) + } + str.push("PRINT 1",) + let obj = {}; + obj.printer_commands = str; + obj.printer_name = that.printer_name; + this.$API.wpm.prints.req(obj).then((response) => {}); + }) + + }, }, };