diff --git a/src/views/wpm_gx/inm_record.vue b/src/views/wpm_gx/inm_record.vue index ab7520f8..43164ae6 100644 --- a/src/views/wpm_gx/inm_record.vue +++ b/src/views/wpm_gx/inm_record.vue @@ -264,6 +264,11 @@ show-overflow-tooltip > + + + - + @@ -336,6 +341,7 @@ export default { userOptions: [],//部门执行人 deptOptions: [], mgroupOptions: [], + printer_name:localStorage.getItem("printer_name") }; }, mounted() { @@ -465,9 +471,34 @@ export default { }); }, submitOut() {}, + //打印 handlePrint(){ this.printVisible = true; - },//打印 + }, + //打印物料标签 + printMaterial(row){ + let that = this; + that.$API.cm.labelmat.fromMioitem.req({tid:row.id}).then((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) => {}); + }) + }, //本地更新数据 handleSaveSuccess() { this.$refs.tables.refresh();