fix:玻纤一次排棒批次以及单个打印修改
This commit is contained in:
parent
3472d39894
commit
c54942ea58
|
@ -671,14 +671,27 @@ export default {
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}else{
|
}else if(that.route_code=='paiyicibang'){
|
||||||
if(that.route_code=='paiyicibang'){
|
that.$API.mtm.route.list.req({material_out:row.material,page:0}).then((res) => {
|
||||||
params.extra_data={orimaterial:row.material_ofrom_name};
|
let namearr = row.material_name.split('排一次棒');
|
||||||
|
let extra_data = res[0].params_json;
|
||||||
|
extra_data.batch = row.batch;
|
||||||
|
extra_data.material_name=namearr[0];
|
||||||
|
extra_data.orimaterial=row.material_ofrom_name;
|
||||||
|
params.extra_data = extra_data;
|
||||||
params.label_template_name = '排一次棒打印模板';
|
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{
|
}else{
|
||||||
params.extra_data={orimaterial:row.material_ofrom_name,count:row.count};
|
params.extra_data={orimaterial:row.material_ofrom_name,count:row.count};
|
||||||
params.label_template_name = '其他工序打印模板';
|
params.label_template_name = '其他工序打印模板';
|
||||||
}
|
|
||||||
that.apiObjPrint.req(params).then((res) => {
|
that.apiObjPrint.req(params).then((res) => {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.printer_commands = res.commands;
|
obj.printer_commands = res.commands;
|
||||||
|
@ -691,6 +704,25 @@ export default {
|
||||||
}else if(type=='wpr'){
|
}else if(type=='wpr'){
|
||||||
let params = {};
|
let params = {};
|
||||||
let name = row.material_name.split('|')[0];
|
let name = row.material_name.split('|')[0];
|
||||||
|
if(that.route_code=='paiyicibang'){
|
||||||
|
that.$API.mtm.route.list.req({material_out:row.material,page:0}).then((res) => {
|
||||||
|
console.log('排一次棒单件打印res',res);
|
||||||
|
let data = res[0].params_json;
|
||||||
|
data.number = row.number;
|
||||||
|
data.name=name;
|
||||||
|
data.ofrom_name=that.ofrom_name;
|
||||||
|
params.data = data;
|
||||||
|
params.label_template_name = '排一次棒单件打印模板';
|
||||||
|
that.$API.cm.labeltemplate.commands.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{
|
||||||
if(that.route_code=='paiban'||that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||
|
if(that.route_code=='paiban'||that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||
|
||||||
that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'||that.route_code=='banduangunyuanhoudama'||that.route_code=='banduangunyuantuihuo'
|
that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'||that.route_code=='banduangunyuanhoudama'||that.route_code=='banduangunyuantuihuo'
|
||||||
){
|
){
|
||||||
|
@ -731,6 +763,7 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
that.$message.warning("请先设置打印机");
|
that.$message.warning("请先设置打印机");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue