From a2e849640f9bc34143f8b39e62ca2c03207dcbc5 Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 22 Dec 2025 13:11:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=88=86=E6=89=B9=E6=97=B6=E4=B8=8D?= =?UTF-8?q?=E6=98=AF=E6=9C=AC=E6=89=B9=E6=AC=A1=E7=9A=84=E6=9D=BF=E6=AE=B5?= =?UTF-8?q?=E6=A0=87=E8=AE=B0=E5=87=BA=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/handover_form2.vue | 36 ++++++++++++++++++----------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/views/wpm_bx/handover_form2.vue b/src/views/wpm_bx/handover_form2.vue index 2082c0a3..c294bd57 100644 --- a/src/views/wpm_bx/handover_form2.vue +++ b/src/views/wpm_bx/handover_form2.vue @@ -57,13 +57,18 @@ -
- {{ item2.number }} - +
+
+ {{ item2.number }} + +
+
+ {{ item2.number }} +
-
+ @@ -232,25 +237,27 @@ export default { if(arrs.length>1){ that.form.handoverb[index].wpr = ''; arrs.forEach(arr=>{ - that.wprOptions.forEach(item=>{ + let obj = {}; + obj.number = arr; + let options = that.wprOptions.filter(item=>{return item.number.indexOf(arr) > -1&&!item.disabled}); + if(options.length>0){ + obj.wpr = options[0].id; + barchArrs.push(arr); + } + that.form.handoverb[index].handoverbw.push(obj); + that.wprOptions.forEach(item=>{ if(item.number.indexOf(arr) > -1&&!item.disabled){ item.disabled = true; - let obj = {}; - obj.number = item.number; - obj.wpr = item.id; - barchArrs.push(arr); - that.form.handoverb[index].handoverbw.push(obj); - that.form.handoverb[index].count = that.form.handoverb[index].handoverbw.length; } }) + }) + that.form.handoverb[index].count = barchArrs.length; //如果arrs里有不是这个批次的wpr,提示错误 let diff = arrs.filter(item => !barchArrs.includes(item)); that.diff = diff; - console.log('diff',diff) if(diff.length>0){ that.$message.warning("物料"+diff.join(",")+"不在该批次中"); - // that.$confirm("物料"+diff.join(",")+"不在该批次中", "提示", {type: "warning",}).then(() => {}); } }else{ //放入对应的行中的handoverb中,并且在列表中disabled @@ -332,6 +339,7 @@ export default { let total = 0; if(this.form.handoverb.length>0){ this.form.handoverb.forEach(item=>{ + item.handoverbw = item.handoverbw.filter(item=>{ return item.wpr&&item.wpr!==''&&item.wpr!==null&&item.wpr!==undefined}) total += item.count; }) }