fix:禅道453
This commit is contained in:
parent
3618c553d3
commit
f17c5f3606
|
|
@ -251,5 +251,14 @@ export default {
|
||||||
`${config.API_URL}/inm/mioitemw/${id}/`);
|
`${config.API_URL}/inm/mioitemw/${id}/`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
cquery: {
|
||||||
|
name: "查询",
|
||||||
|
req: async function(data){
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/inm/mioitemw/cquery/`,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
@ -672,11 +672,33 @@ export default {
|
||||||
params.label_template_name = '排一次棒打印模板';
|
params.label_template_name = '排一次棒打印模板';
|
||||||
that.printFun(params);
|
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'){
|
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.extra_data={orimaterial:row.material_ofrom_name,count:row.count};
|
||||||
params.label_template_name = '脱模测量前工序打印模板';
|
params.label_template_name = '脱模测量前工序打印模板';
|
||||||
that.printFun(params);
|
that.printFun(params);
|
||||||
|
}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{
|
} else{
|
||||||
let numbers = ['','','','','','','','','','','','','',''];
|
let numbers = ['','','','','','','','','','','','','',''];
|
||||||
let numberList = [];
|
let numberList = [];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue