From 840a82b87f0def0a39c3d6fce91e0418a0b4c038 Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 17 Mar 2025 10:25:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=85=89=E8=8A=AF=E6=97=A5=E5=BF=97mlogb?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E7=89=A9=E6=96=99=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E6=96=B0=E5=A2=9E=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_gx/mlogb_form.vue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/views/wpm_gx/mlogb_form.vue b/src/views/wpm_gx/mlogb_form.vue index cab5a509..b9ee7fe2 100644 --- a/src/views/wpm_gx/mlogb_form.vue +++ b/src/views/wpm_gx/mlogb_form.vue @@ -135,6 +135,7 @@ export default { }, ], }, + codeBatch:"", options: [], materialOptions: [], visible: false, @@ -143,8 +144,19 @@ export default { }; }, mounted() { + let that = this; + if(that.codeText!==''){ + let id = data.split('#')[1]; + this.$API.cm.labelmat.item.req(id).then((res) => { + that.codeBatch = res.batch; + this.getMaterial(); + }).catch((err) => { + that.getMaterial(); + }) + }else{ + that.getMaterial(); + } this.getMtask(); - this.getMaterial(); }, methods: { open() { @@ -174,9 +186,7 @@ export default { }).then((res) => { that.materialOptions = res; res.forEach(item => { - console.log('item',item); - console.log('codeText',that.codeText); - if(item.batch==that.codeText){ + if(item.batch==that.codeBatch){ that.form.wm_in = item.id; that.form.count_use = item.count_cando; }