diff --git a/src/views/wpm_gx/mlogb_check.vue b/src/views/wpm_gx/mlogb_check.vue index ab885b18..155ce09a 100644 --- a/src/views/wpm_gx/mlogb_check.vue +++ b/src/views/wpm_gx/mlogb_check.vue @@ -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;