From c99e2c8d1b0427c9e7f89dfff1f618f0ba1b6d4c Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 17 Jan 2025 09:12:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BA=A4=E6=8E=A5=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=9B=B4=E6=94=B9=E6=89=B9=E6=AC=A1=E5=8F=B7?= =?UTF-8?q?=EF=BC=8C=E4=BB=A5=E5=8F=8A=E8=A7=A3=E5=86=B3=E6=89=AB=E7=A0=81?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/handover_form.vue | 38 ++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue index fbd2b890..f631311a 100644 --- a/src/views/wpm_bx/handover_form.vue +++ b/src/views/wpm_bx/handover_form.vue @@ -113,6 +113,16 @@ + + + + + + + + + + @@ -182,7 +192,7 @@ v-model="listItem.count" controls-position="right" :min="0" - step="1" + :step="1" :max="listItem.count_cando" :disabled="mode==='show'" :step-strictly="true" @@ -258,6 +268,7 @@ export default { recive_user: null, recive_mgroup: null, handoverb:[], + new_batch:'' }, rules: { batch: [ @@ -321,6 +332,7 @@ export default { bwVisible:false, scanVisible:false, isSaveing: false, + change_batch:false, setFiltersVisible: false, }; }, @@ -364,7 +376,6 @@ export default { }, showbw(index){ this.bwIndex = index; - console.log('this.form.handoverb[index].handoverbw',this.form.handoverb[index].handoverbw); this.bwVisible = true; }, bwVisibleClose(){ @@ -390,6 +401,10 @@ export default { } }) that.getCkUserList();//废品库接收人 + }else if(that.type==30){ + this.getUserList3(); + }else{ + this.getUserList2(); } }); }, @@ -563,6 +578,9 @@ export default { }else{ this.getUserList2(); } + if(data.new_batch!==''&&data.new_batch!==undefined&&data.new_batch!==null){ + this.change_batch = true; + } }, //设置过滤项 setFilters(filters) { @@ -592,20 +610,21 @@ export default { //handoverb里有这个物料批次 if(arr.length>0){ //判断是否有wpr,若无将wpr放进去 - if(arr[0].handoverbw&&arr[0].handoverbw.length>0){ + if(that.form.handoverb[0].handoverbw&&that.form.handoverb[0].handoverbw.length>0){ let arr1 = []; - arr1 = arr[0].handoverbw.filter((item1) => { - item1.wpr = item1.id; + arr1 = that.form.handoverb[0].handoverbw.filter((item1) => { + return item1.wpr == res.id; }) if(arr1.length>0){ that.$message.error("该物料已存在"); + // console.log('0',that.form); }else{ let obj1 = {}; obj1.wpr = res.id; obj1.number = res.number; that.form.handoverb[indexs].count+=1; that.form.handoverb[indexs].handoverbw.push(obj1); - console.log('1',that.form); + // console.log('1',that.form); } }else{ that.form.handoverb[indexs].handoverbw = []; @@ -614,11 +633,10 @@ export default { obj1.number = res.number; that.form.handoverb[indexs].count=1; that.form.handoverb[indexs].handoverbw.push(obj1); - console.log('2',that.form); + // console.log('2',that.form); } }else{//handoverb里没有有这个物料批次 that.materialOptions.forEach((item) => { - console.log('item.id',item.id); if(item.id == res.wm){ let obj2 = {}; obj2.wm = item.id; @@ -631,7 +649,7 @@ export default { obj3.number = res.number; obj2.handoverbw.push(obj3); that.form.handoverb.push(obj2); - console.log('3',that.form); + // console.log('3',that.form); } }) } @@ -653,7 +671,7 @@ export default { obj.count_cando = item.count; obj.count = item.count; that.form.handoverb.push(obj); - console.log('4',that.form); + // console.log('4',that.form); } }) }