fix:光芯车间库存物料标签打印
This commit is contained in:
parent
25dd54a189
commit
1ff6a6f4b3
|
@ -280,6 +280,7 @@ export default {
|
|||
visibleDrawer: false,
|
||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||
wmId:'',
|
||||
printer_name:localStorage.getItem("printer_name"),
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -423,12 +424,22 @@ export default {
|
|||
//打印物料标签
|
||||
printMaterial(row){
|
||||
let that = this;
|
||||
that.wmId = row.id;
|
||||
that.wmtype = row.material_.type;
|
||||
that.dialog.print_m = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.printmaterial.open();
|
||||
})
|
||||
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
|
||||
let params = {};
|
||||
params.tid = row.id;
|
||||
params.extra_data={count:row.count};
|
||||
params.label_template_name = '工段物料打印模板';
|
||||
that.apiObjPrint.req(params).then((res) => {
|
||||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
}else{
|
||||
that.$message.warning("请先设置打印机");
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -274,6 +274,7 @@ export default {
|
|||
visibleDrawer: false,
|
||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||
wmId:'',
|
||||
printer_name:localStorage.getItem("printer_name"),
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -422,12 +423,22 @@ export default {
|
|||
//打印物料标签
|
||||
printMaterial(row){
|
||||
let that = this;
|
||||
that.wmId = row.id;
|
||||
that.wmtype = row.material_.type;
|
||||
that.dialog.print_m = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.printmaterial.open();
|
||||
})
|
||||
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
|
||||
let params = {};
|
||||
params.tid = row.id;
|
||||
params.extra_data={count:row.count};
|
||||
params.label_template_name = '工段物料打印模板';
|
||||
that.apiObjPrint.req(params).then((res) => {
|
||||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
}else{
|
||||
that.$message.warning("请先设置打印机");
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue