From acf701bf6aebbe93642eb16e32c7572fa912867f Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 28 Jul 2025 11:37:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=8E=BB=E7=BA=A4=E8=8B=A5=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E7=89=A9=E6=96=99=E6=A3=80=E6=B5=8B=E6=97=B6=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=B8=A6=E7=9A=84=E6=A3=80=E6=B5=8B=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E6=AD=A4=E6=97=B6=E9=9C=80=E8=A6=81=E6=A0=B9=E6=8D=AE=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E7=89=A9=E6=96=99=E6=9F=A5=E8=AF=A2=E5=85=B6=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E7=9A=84=E6=A3=80=E6=B5=8B=E8=A1=A8=EF=BC=88=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E4=B8=AD=E6=8A=95=E4=BA=A7=E5=90=8E=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E6=96=B0=E5=B7=A5=E5=BA=8F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/mlogbw_check.vue | 70 +++++++++++++++++-------------- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/src/views/wpm_bx/mlogbw_check.vue b/src/views/wpm_bx/mlogbw_check.vue index 4b81d2ef..efde9617 100644 --- a/src/views/wpm_bx/mlogbw_check.vue +++ b/src/views/wpm_bx/mlogbw_check.vue @@ -580,7 +580,11 @@ export default { if(that.mode == 'outs'&&qct!==''&&qct!==null){//输出 that.getdefects(); }else{ - that.getList(); + that.$API.qm.qct.getQct.req({ material: that.material_out,type:'out',tag:'process' }).then((res) => { + console.log(res) + that.testdefectss(res); + }) + // that.getList(); } that.visible = true; setTimeout(() => { @@ -677,41 +681,45 @@ export default { if(that.qct!==''){ that.$API.qm.qct.item.req(that.qct).then((res) => { that.qct_defects = []; - res.qct_defects.forEach((item) => { - that.addTemplate[item.defect_name] = false; - let obj = Object.assign({}, item); - obj.canEdit = that.processType=='20'?false:true; - that.qct_defects.push(obj); - }) - that.qct_defects_origin = that.qct_defects; - that.qct_testitems = []; - res.qct_testitems.forEach((item2) => { - if(item2.testitem_type!=='20'){ - let obj2 = Object.assign({}, item2); - obj2.value = ''; - obj2.canEdit = that.processType=='20'?false:true; - - obj2.addto_wpr = item2.addto_wpr; - if(item2.testitem_field_type=='input-number'||item2.testitem_field_type=='input-int'){ - obj2.value = null; - that.addTemplate[item2.testitem_name] = null; - } - if(item2.testitem_field_type=='select-text'||item2.testitem_field_type=='selects-text'){ - let str = obj2.testitem_choices.replace(/'/g, '"'); - let arr = JSON.parse(str); - obj2.testitem_choices = arr; - that.addTemplate[item2.testitem_name] = null; - } - that.qct_testitems.push(obj2); - } - }) - that.qct_testitems_origin = that.qct_testitems; - that.getList(); + that.testdefectss(res); }) }else{ that.getList(); } }, + testdefectss(res){ + let that = this; + res.qct_defects.forEach((item) => { + that.addTemplate[item.defect_name] = false; + let obj = Object.assign({}, item); + obj.canEdit = that.processType=='20'?false:true; + that.qct_defects.push(obj); + }) + that.qct_defects_origin = that.qct_defects; + that.qct_testitems = []; + res.qct_testitems.forEach((item2) => { + if(item2.testitem_type!=='20'){ + let obj2 = Object.assign({}, item2); + obj2.value = ''; + obj2.canEdit = that.processType=='20'?false:true; + + obj2.addto_wpr = item2.addto_wpr; + if(item2.testitem_field_type=='input-number'||item2.testitem_field_type=='input-int'){ + obj2.value = null; + that.addTemplate[item2.testitem_name] = null; + } + if(item2.testitem_field_type=='select-text'||item2.testitem_field_type=='selects-text'){ + let str = obj2.testitem_choices.replace(/'/g, '"'); + let arr = JSON.parse(str); + obj2.testitem_choices = arr; + that.addTemplate[item2.testitem_name] = null; + } + that.qct_testitems.push(obj2); + } + }) + that.qct_testitems_origin = that.qct_testitems; + that.getList(); + }, getOptions(){ let that = this; that.$API.wpm.wpr.list.req({wm:that.wm,page:0,query:"{id,number}"}).then((res) => {