diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue index 9291f587..84f437c4 100644 --- a/src/views/wpm_gx/handover_form.vue +++ b/src/views/wpm_gx/handover_form.vue @@ -161,7 +161,7 @@ - + @@ -171,7 +171,7 @@ - + @@ -327,6 +327,7 @@ export default { fileList:[], userList: [], userList2: [], + handoverbIds:[], mgroupOptions: [], materialOptions: [], addShow: false, @@ -519,24 +520,28 @@ export default { this.visible = true; return this; }, + //选中物料批次后,放入handoverb materialChange0(){ let that = this; - that.form.handoverb = []; + // that.form.handoverb = []; + // that.handoverbIds = []; that.totalCount = 0; that.selectObjs.forEach(item=>{ - let obj = {}; - obj.wm = item.id; - obj.state = item.state; - obj.batch = item.batch; - obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')'; - obj.count = item.count_canhandover; - obj.defect = item.defect; - obj.defect_name = item.defect_name; - obj.count_cando = item.count_canhandover; - obj.material = item.material; - that.totalCount += Number(obj.count); - that.form.handoverb.push(obj); - that.getResaveMgroups(obj.material); + if(that.handoverbIds.indexOf(item.id)==-1){ + let obj = {}; + obj.wm = item.id; + obj.state = item.state; + obj.batch = item.batch; + obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')'; + obj.count = item.count_canhandover; + obj.defect = item.defect; + obj.defect_name = item.defect_name; + obj.count_cando = item.count_canhandover; + obj.material = item.material; + that.totalCount += Number(obj.count); + that.form.handoverb.push(obj); + that.getResaveMgroups(obj.material); + } }) }, countChange(){