diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue index 1df7de81..86181b02 100644 --- a/src/views/wpm_bx/handover_form.vue +++ b/src/views/wpm_bx/handover_form.vue @@ -160,7 +160,7 @@ - + - + { + console.log('that.type',that.type,'that.mtype',that.mtype) + if(that.type==20||that.type==50||(that.type==10&&that.mtype==30)||(that.mtype==30&&that.new_wm!=='')){ + that.form.recive_mgroup = that.mgroupId; + } + }) // type=10 正常交接 物料都可交接,接收工段有限制 // type=20 返工交接 不合格品交接,接收工段为该工艺流程中的工段 // type=30 物料检验 合格品交接,检验部接收 @@ -755,9 +759,6 @@ export default { let that = this; that.$refs.dialogForm.validate(async (valid) => { if (valid) { - if(that.mtype==30){ - that.form.recive_mgroup = that.form.send_mgroup; - } that.form.mtype=that.mtype; if(that.route_code=='shangpaipingmo'){ that.form.handoverb.forEach(item=>{ @@ -771,7 +772,7 @@ export default { }) } //合批、分批、报废,这三个交接操作直接创建并提交 - if(that.mtype==20||that.mtype==30||that.type==40){ + if(that.mtype==20||(that.mtype==30&&that.type==50&&that.new_wm!=='')||(that.mtype==30&&that.type==10)||that.type==40){ that.$API.wpm.handover.createsubmit.req(that.form).then((res) => { that.isSaveing = false; that.$emit("success"); diff --git a/src/views/wpm_bx/handover_form2.vue b/src/views/wpm_bx/handover_form2.vue index ca2cd6cf..2082c0a3 100644 --- a/src/views/wpm_bx/handover_form2.vue +++ b/src/views/wpm_bx/handover_form2.vue @@ -30,14 +30,16 @@ - 选择物料: + 选择物料: 数量:{{ listItem.count }} - +
{{ item2.number }} @@ -63,6 +65,11 @@ {{ item3 }}
+ + + + + @@ -141,6 +148,7 @@ export default { trigger: "blur", }, }, + route_code:"", batchOrign:{}, wprOptions: [], materialOptions: [], @@ -152,6 +160,9 @@ export default { }, mounted() { let that = this; + let paths = that.$route.path; + let arr = paths.split("/"); + that.route_code = arr[2]; that.form.type = that.type; that.form.handle_date = that.form.send_date = that.$TOOL.dateFormat2(new Date()); that.form.send_mgroup = that.form.recive_mgroup = that.mgroupId; @@ -162,6 +173,9 @@ export default { getWpr(id){ let that = this; that.$API.wpm.wpr.list.req({page:0,wm:id}).then((res) => { + res.forEach(item=>{ + item.checked = false; + }) that.wprOptions = res; }); }, @@ -295,6 +309,21 @@ export default { } that.form.handoverb.splice(index,1); }, + handleChange(index){ + let that = this; + that.form.handoverb[index].handoverbw = []; + let trueCount = this.wprOptions.filter(item => item.checked === true).length; + that.form.handoverb[index].count =trueCount; + this.wprOptions.forEach(item=>{ + if(item.checked){ + let obj = {}; + obj.number = item.number; + obj.wpr = item.id; + item.disabled = true; + that.form.handoverb[index].handoverbw.push(obj); + } + }) + }, //提交 submit() { let that = this; diff --git a/src/views/wpm_bx/inmIn.vue b/src/views/wpm_bx/inmIn.vue index b6e305be..6687a209 100644 --- a/src/views/wpm_bx/inmIn.vue +++ b/src/views/wpm_bx/inmIn.vue @@ -93,7 +93,7 @@ min-width="150" >