From 90713c1dfffbbae2fc7b87f3ded1ff64e192929c Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 18 Dec 2025 09:39:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=B7=B7=E6=89=B9=E5=8A=A0=E6=96=99?= =?UTF-8?q?=E6=89=AB=E7=A0=81=E5=85=A8=E5=B1=80=E6=90=9C=E7=B4=A2=EF=BC=8C?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=B7=BB=E5=8A=A0=E8=BD=A6=E9=97=B4=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E4=BB=BB=E6=84=8F=E5=B7=A5=E6=AE=B5=E7=9A=84=E6=9D=BF?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/handover_form.vue | 65 ++++++++++++++++++------------ 1 file changed, 40 insertions(+), 25 deletions(-) diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue index b5664a6b..1df7de81 100644 --- a/src/views/wpm_bx/handover_form.vue +++ b/src/views/wpm_bx/handover_form.vue @@ -986,31 +986,46 @@ export default { that.form.handoverb[indexs].handoverbw.push(obj1); } }else{//handoverb里没有有这个物料批次 - that.materialOptions.forEach((item) => { - if(item.id == res[0].wm){ - if(that.type==50){ - that.form.new_batch = item.batch+'-G'; - } - let params = {material: item.material,type: that.type}; - that.$API.wpm.handover.mgroups.req(params).then((res1) => { - that.mgroupOptions = res1; - }) - let obj2 = {}; - obj2.wm = item.id; - obj2.batch = item.batch; - if(item.material_.process_name){ - obj2.process = item.material_.process_name; - } - obj2.count_cando = item.count_canhandover; - obj2.handoverbw = []; - obj2.count = 1; - let obj3 = {}; - obj3.wpr = res[0].id; - obj3.number = res[0].number; - obj2.handoverbw.push(obj3); - that.form.handoverb.push(obj2); - } - }) + if(that.new_wm==''){ + that.materialOptions.forEach((item) => { + if(item.id == res[0].wm){ + if(that.type==50){ + that.form.new_batch = item.batch+'-G'; + } + let params = {material: item.material,type: that.type}; + that.$API.wpm.handover.mgroups.req(params).then((res1) => { + that.mgroupOptions = res1; + }) + let obj2 = {}; + obj2.wm = item.id; + obj2.batch = item.batch; + if(item.material_.process_name){ + obj2.process = item.material_.process_name; + } + obj2.count_cando = item.count_canhandover; + obj2.handoverbw = []; + obj2.count = 1; + let obj3 = {}; + obj3.wpr = res[0].id; + obj3.number = res[0].number; + obj2.handoverbw.push(obj3); + that.form.handoverb.push(obj2); + } + }) + }else{ + console.log('res[0]',res[0]) + let obj2 = {}; + obj2.wm = res[0].wm; + obj2.batch = res[0].wm_batch; + obj2.process = res[0].process_name; + obj2.handoverbw = []; + obj2.count = 1; + let obj3 = {}; + obj3.wpr = res[0].id; + obj3.number = res[0].number; + obj2.handoverbw.push(obj3); + that.form.handoverb.push(obj2); + } } }else{ that.$message.error("该批次不存在")