From 2f2928fcb0f785a3d7903298cfe57d7836f5e5c9 Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 10 Feb 2026 13:51:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=97=A5=E5=BF=97=E7=89=A9=E6=96=99?= =?UTF-8?q?=E6=A0=B9=E6=8D=AEroute=E7=9A=84material=5Fin=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_gx/f_mlogs_form.vue | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/src/views/wpm_gx/f_mlogs_form.vue b/src/views/wpm_gx/f_mlogs_form.vue index 82774240..09018bde 100644 --- a/src/views/wpm_gx/f_mlogs_form.vue +++ b/src/views/wpm_gx/f_mlogs_form.vue @@ -450,15 +450,18 @@ export default { that.getRoute(); that.gettestitem(); that.form.fmlog = that.fmlog; - // that.form.handle_date = that.$TOOL.dateFormat2(new Date()); that.form.work_start_time = that.$TOOL.dateFormat(new Date()); + if(that.is_fix){ + that.getMaterial(); + } }, methods: { changeRoute(){ let that = this; that.routeOptions.forEach(item=>{ if(item.id==that.form.route){ - console.log('item',item) + that.material_in = item.material_in; + that.getMaterial(); that.getdefects(item.id,item.material_in,item.material_out); } }) @@ -511,9 +514,7 @@ export default { }, getdefects(route,material_in,material_out){ let that = this; - console.log('getdefects') if(that.is_fix&&that.materialFix!==null&&that.materialFix!==''){ - console.log('that.materialFix',that.materialFix) that.$API.qm.qct.getQct.req({material: that.materialFix,tag:'process'}).then((res) => { res.qct_defects.forEach((item) => { that.defectform[item.defect_name] = 0; @@ -530,10 +531,7 @@ export default { } }) }else{ - console.log('route',route) if(route!==null){ - console.log('material_in',material_in) - console.log('material_out',material_out) that.$API.qm.qct.getQct.req({material:material_in,tag:'process'}).then((res) => { res.qct_defects.forEach((item) => { that.defectinform[item.defect_name] = 0; @@ -591,6 +589,7 @@ export default { that.$API.mtm.route.item.req(that.route).then(res=>{ that.material_in = res.material_in; that.material_out = that.form.material_out = res.material_out; + that.getMaterial(); if(that.mlogId){ that.getMlogObj(); } @@ -637,8 +636,9 @@ export default { }else{ params.tag = 'todo'; params.state = 10;//合格 - params.material = that.material_in; + params.material = that.material_in!==''?that.material_in:''; } + console.log('that.material_in:',that.material_in); that.$API.wpm.wmaterial.list.req(params).then((res) => { that.materialOptions = res; if(that.codeText!==''){ @@ -679,19 +679,13 @@ export default { let id = codeText.split('#')[1]; that.$API.cm.labelmat.item.req(id).then((res) => { that.codeBatch = res.batch; - that.getMaterial(); - }).catch((err) => { - that.getMaterial(); - }) - }else{ - that.getMaterial(); + }).catch((err) => {}) } return this; }, getMlogObj(){ let that = this; this.$API.wpm.mlog.item.req(that.mlogId).then((res) => { - console.log("this.$API.wpm.mlog.item", res); that.mlogindefect = res.mlogindefect; that.mlogdefect = res.mlogdefect; that.getdefects(that.route,that.material_in,that.material_out); @@ -703,7 +697,6 @@ export default { }, handleUsersChange(){ this.form.handle_user = this.form.handle_users.length>0?this.form.handle_users[0]:null; - console.log('handleUsersChange',this.form.handle_users) }, countUseChange(){ let that = this; @@ -726,7 +719,6 @@ export default { }) that.form.count_real = that.form.count_use - that.form.count_pn_jgqbl; that.form.count_ok = that.form.count_real - that.form.count_notok; - }, //表单提交方法 submit() { @@ -752,7 +744,6 @@ export default { mlogindefect.push(objin); } }) - that.form.qct = that.qct; that.form.mlogdefect = mlogdefect; that.form.mlogindefect = mlogindefect;