diff --git a/src/views/wpm_bx/handover_form2.vue b/src/views/wpm_bx/handover_form2.vue index 0be633cb..09927861 100644 --- a/src/views/wpm_bx/handover_form2.vue +++ b/src/views/wpm_bx/handover_form2.vue @@ -33,9 +33,9 @@ 选择物料: { - if(item.number== number){ - if(item.disabled){ - that.$message.error("该物料已被分配"); - that.form.handoverb[index].wpr = ''; - }else{ + // console.log('number',number.split(" ")); + let arrs = number.split(" "); + that.form.handoverb[index].wm_in = ""; + if(arrs.length>1){ + that.form.handoverb[index].wpr = ''; + that.wprOptions.forEach(item=>{ + if(arrs.indexOf(item.number) > -1&&!item.disabled){ item.disabled = true; let obj = {}; obj.number = item.number; obj.wpr = item.id; that.form.handoverb[index].handoverbw.push(obj); that.form.handoverb[index].count = that.form.handoverb[index].handoverbw.length; - that.form.handoverb[index].wpr = ''; } - } - }) + }) + }else{ + //放入对应的行中的handoverb中,并且在列表中disabled + that.wprOptions.forEach(item=>{ + if(item.number== number){ + if(item.disabled){ + that.$message.error("该物料已被分配"); + that.form.handoverb[index].wpr = ''; + }else{ + item.disabled = true; + let obj = {}; + obj.number = item.number; + obj.wpr = item.id; + that.form.handoverb[index].handoverbw.push(obj); + that.form.handoverb[index].count = that.form.handoverb[index].handoverbw.length; + that.form.handoverb[index].wpr = ''; + } + } + }) + } this.$refs.codeInput.focus(); }, deleteWpr(index1,index2,wpr){ @@ -240,6 +258,7 @@ export default { batchAdd(){ let that = this; let obj = { }; + obj.wm_in = ""; obj.wm = that.batchOrign.id; obj.batch = that.batchOrign.batch+"-"+that.addBactchNum; that.addBactchNum++; @@ -327,6 +346,7 @@ export default { height: 30px; line-height: 30px; margin-right: 20px; + margin-top: 5px; } .circleCloseFilled{ position: absolute; diff --git a/src/views/wpm_bx/mlogbw_check_table.vue b/src/views/wpm_bx/mlogbw_check_table.vue index bd3fef8b..f812e307 100644 --- a/src/views/wpm_bx/mlogbw_check_table.vue +++ b/src/views/wpm_bx/mlogbw_check_table.vue @@ -639,7 +639,7 @@ export default { let judge = false; try { judge = eval(str); - row[index][item.defect_name] = judge; + that.mlogbwlist[editIndex][item.defect_name] = judge; }catch (error) { console.error('error',error); }