fix:输出物料检验为空白数据时提示报错的修改

This commit is contained in:
shijing 2025-09-01 10:40:12 +08:00
parent 9b43129147
commit 0443ee42e9
1 changed files with 9 additions and 10 deletions

View File

@ -568,19 +568,18 @@ export default {
obj_form.count_notok = that.count_json_wx.count_n_not;
sum = obj_form.count_ok + obj_form.count_notok;
}
// if(that.count_json_wx.count_ok_s!==null){
// }
}else{
that.qct_defects.forEach(item => {
if(item.defect_okcate==30){
that.form.count_notok += that.defectform[item.defect_name] ;
if(that.defectform[item.defect_name]!==null){
if(item.defect_okcate==30){
that.form.count_notok += that.defectform[item.defect_name] ;
}
let obj = {};
obj.defect = item.defect;
obj.count = that.defectform[item.defect_name];
obj.mlogb = that.mlogbItem.id;
this.form.mlogbdefect.push(obj);
}
let obj = {};
obj.defect = item.defect;
obj.count = that.defectform[item.defect_name];
obj.mlogb = that.mlogbItem.id;
this.form.mlogbdefect.push(obj);
})
that.form.count_ok = that.form.count_real -that.form.count_notok;
sum = that.form.count_ok + that.form.count_notok;