diff --git a/src/views/wpm_bx/handover_form2.vue b/src/views/wpm_bx/handover_form2.vue index 993d710e..d6d2c92b 100644 --- a/src/views/wpm_bx/handover_form2.vue +++ b/src/views/wpm_bx/handover_form2.vue @@ -209,8 +209,8 @@ export default { }, formWminChange(index,number){ let that = this; - // console.log('number',number.split(" ")); let arrs = number.split(" "); + let barchArrs = []; that.form.handoverb[index].wm_in = ""; if(arrs.length>1){ that.form.handoverb[index].wpr = ''; @@ -221,12 +221,17 @@ export default { 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; } }) }) - + //如果arrs里有不是这个批次的wpr,提示错误 + let diff = arrs.filter(item => !barchArrs.includes(item)); + if(diff.length>0){ + that.$confirm("物料"+diff.join(",")+"不在该批次中", "提示", {type: "warning",}).then(() => {}); + } }else{ //放入对应的行中的handoverb中,并且在列表中disabled that.wprOptions.forEach(item=>{