fix:禅道453
This commit is contained in:
parent
3618c553d3
commit
f17c5f3606
|
|
@ -251,5 +251,14 @@ export default {
|
|||
`${config.API_URL}/inm/mioitemw/${id}/`);
|
||||
}
|
||||
},
|
||||
cquery: {
|
||||
name: "查询",
|
||||
req: async function(data){
|
||||
return await http.post(
|
||||
`${config.API_URL}/inm/mioitemw/cquery/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
@ -672,12 +672,34 @@ export default {
|
|||
params.label_template_name = '排一次棒打印模板';
|
||||
that.printFun(params);
|
||||
})
|
||||
}else if(that.route_code=='qingxi'||that.route_code=='kunbang'||that.route_code=='ladansi'||that.route_code=='yicifusi'||that.route_code=='paiercibang'||
|
||||
}else if(that.route_code=='qingxi'||that.route_code=='kunbang'||that.route_code=='yicifusi'||that.route_code=='paiercibang'||
|
||||
that.route_code=='ercifusi'||that.route_code=='qiesi'||that.route_code=='paiban'||that.route_code=='zhuangmo'||that.route_code=='zlybcl'){
|
||||
params.extra_data={orimaterial:row.material_ofrom_name,count:row.count};
|
||||
params.label_template_name = '脱模测量前工序打印模板';
|
||||
that.printFun(params);
|
||||
}else{
|
||||
}else if(that.route_code=='ladansi'){
|
||||
this.$API.inm.mioitemw.cquery.req({querys:[[{field:'number',compare:"", value:row.number_from}]]}).then((res) => {
|
||||
let ave = 0,sum = 0,cnt = 0;
|
||||
let targetNames = ['管壁厚上1','管壁厚上2','管壁厚下1','管壁厚下2'];
|
||||
res.results.forEach(item=>{
|
||||
if(item.ftest!=null&&item.ftest!==''){
|
||||
if(item.ftest.ftestitems&&item.ftest.ftestitems.length>0){
|
||||
item.ftest.ftestitems.forEach(it=>{
|
||||
if(targetNames.indexOf(it.testitem_name)>-1 && it.test_val_json!==null && it.test_val_json!==''&&it.test_val_json!==undefined){
|
||||
sum += Number(it.test_val_json);
|
||||
cnt++;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
ave = cnt>0 ? sum/cnt : 0;
|
||||
console.log('ave',ave);
|
||||
params.extra_data={orimaterial:row.material_ofrom_name,count:row.count,ave:ave};
|
||||
params.label_template_name = '拉单丝打印模板';
|
||||
that.printFun(params);
|
||||
})
|
||||
} else{
|
||||
let numbers = ['','','','','','','','','','','','','',''];
|
||||
let numberList = [];
|
||||
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
|
||||
|
|
@ -787,7 +809,7 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
|||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue