diff --git a/src/views/wpm_gx/mlogb_check.vue b/src/views/wpm_gx/mlogb_check.vue index d21466be..70b605ac 100644 --- a/src/views/wpm_gx/mlogb_check.vue +++ b/src/views/wpm_gx/mlogb_check.vue @@ -2,7 +2,7 @@ @@ -13,7 +13,7 @@ :model="form" :rules="rules" label-position="right" - label-width="100px" + label-width="110px" style="padding: 0 10px" > @@ -108,7 +108,7 @@ - + @@ -178,13 +178,13 @@ + {{form.test_user_name}} @@ -295,6 +295,7 @@ export default { count_notok: 0, mlogbdefect:[], mlogbindefect:[], + test_user_name:"" }, //验证规则 rules: { @@ -341,7 +342,7 @@ export default { count_ok_s:null, count_ok_not:null, count_ok_rate:null, - count_canInm:true, + need_inout:true, count_n_ok:null, count_n_not:null, }, @@ -389,6 +390,8 @@ export default { }) that.form.batch = data.batch; if(data.mlogbdefect.length>0){ + that.form.test_user_name = data.test_user_name; + console.log('data.mlogbdefect有数据',data.mlogbdefect); data.mlogbdefect.forEach((item2) => { that.defectform[item2.defect_name] = Number(item2.count); }) @@ -400,7 +403,7 @@ export default { if(that.mgroupMtype==20){ if(data.count_json_wx.ok_num&&data.count_json_wx.ok_num!==null){ that.count_json_wx = data.count_json_wx; - that.count_json_wx.count_canInm = true; + // that.count_json_wx.need_inout = data.need_inout; if(data.count_json_wx.ok_num!==null){ that.form.count_ok = data.count_json_wx.ok_num; that.form.count_notok = data.count_json_wx.notok_num; @@ -420,7 +423,7 @@ export default { if(that.mlogbItem.qct!==null){ that.$API.qm.qct.item.req(that.mlogbItem.qct).then((res) => { res.qct_defects.forEach((item) => { - that.defectform[item.defect_name] = 0; + that.defectform[item.defect_name] = that.defectform[item.defect_name]?that.defectform[item.defect_name]:0; }) that.max_defect_rate =Number(res.max_defect_rate); that.qct_defects=res.qct_defects; @@ -474,7 +477,7 @@ export default { that.form.count_notok = that.count_json_wx.notok_num-that.count_json_wx.count_n_ok; }else{ that.form.count_notok = that.count_json_wx.count_n_not; - ok_n = that.count_json_wx.notok_num-that.count_json_wx.count_n_not; + let ok_n = that.count_json_wx.notok_num-that.count_json_wx.count_n_not; that.form.count_ok = that.count_json_wx.ok_num + ok_n; } }, @@ -499,9 +502,11 @@ export default { let obj_form = {}; if(that.mgroupMtype==20){ obj_form.count_json_wx = that.count_json_wx; + obj_form.need_inout = that.count_json_wx.need_inout; if(that.canWrite){ obj_form.count_ok = that.count_json_wx.ok_num; obj_form.count_notok = that.count_json_wx.notok_num; + obj_form.need_inout = that.count_json_wx.need_inout; }else{ that.qct_defects.forEach(item => { if(item.defect_name=='其他'){