fix:光芯车间库存物料标签打印
This commit is contained in:
parent
25dd54a189
commit
1ff6a6f4b3
|
|
@ -280,6 +280,7 @@ export default {
|
||||||
visibleDrawer: false,
|
visibleDrawer: false,
|
||||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||||
wmId:'',
|
wmId:'',
|
||||||
|
printer_name:localStorage.getItem("printer_name"),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -423,12 +424,22 @@ export default {
|
||||||
//打印物料标签
|
//打印物料标签
|
||||||
printMaterial(row){
|
printMaterial(row){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.wmId = row.id;
|
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
|
||||||
that.wmtype = row.material_.type;
|
let params = {};
|
||||||
that.dialog.print_m = true;
|
params.tid = row.id;
|
||||||
this.$nextTick(() => {
|
params.extra_data={count:row.count};
|
||||||
this.$refs.printmaterial.open();
|
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,
|
visibleDrawer: false,
|
||||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||||
wmId:'',
|
wmId:'',
|
||||||
|
printer_name:localStorage.getItem("printer_name"),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -422,12 +423,22 @@ export default {
|
||||||
//打印物料标签
|
//打印物料标签
|
||||||
printMaterial(row){
|
printMaterial(row){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.wmId = row.id;
|
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
|
||||||
that.wmtype = row.material_.type;
|
let params = {};
|
||||||
that.dialog.print_m = true;
|
params.tid = row.id;
|
||||||
this.$nextTick(() => {
|
params.extra_data={count:row.count};
|
||||||
this.$refs.printmaterial.open();
|
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