feat:车间库存物料标签打印
This commit is contained in:
parent
d07ff31f76
commit
bd873b3b32
|
@ -93,7 +93,7 @@
|
|||
fixed="right"
|
||||
align="center"
|
||||
width="120"
|
||||
v-if="mgroupName!=='size'&&mgroupName!=='facade'"
|
||||
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
|
@ -101,16 +101,17 @@
|
|||
@click="table_Check(scope.row)"
|
||||
v-auth="'ftestwork.create'"
|
||||
type="primary"
|
||||
v-if="scope.row.notok_sign_name == null"
|
||||
v-if="mgroupName!=='size'&&mgroupName!=='facade'&&scope.row.notok_sign_name == null"
|
||||
>检验
|
||||
</el-button>
|
||||
<el-button
|
||||
link size="small"
|
||||
type="warning"
|
||||
@click="tableCheckList(scope.row)"
|
||||
v-if="scope.row.notok_sign_name == null"
|
||||
v-if="mgroupName!=='size'&&mgroupName!=='facade'&&scope.row.notok_sign_name == null"
|
||||
>检验记录
|
||||
</el-button>
|
||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
@ -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) => {});
|
||||
})
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue