diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue index a7224b5d..db96c0f7 100644 --- a/src/views/wpm_bx/handover_form.vue +++ b/src/views/wpm_bx/handover_form.vue @@ -96,7 +96,7 @@ controls-position="right" :min="0" :step="1" - :max="listItem.count_canhandover" + :max="Number(listItem.count_canhandover)" :disabled="mode==='show'||listItem.tracking==20" :step-strictly="true" style="width: 100%" @@ -110,15 +110,23 @@ - + -
- {{ item2.number }} - 删除 -
+ + +
@@ -343,6 +351,7 @@ export default { is_hidde:true, }, wm_in:"", + route_code: "", materials:[], totalCount: 0, deptID:'', @@ -369,6 +378,8 @@ export default { that.form.mtype=30; that.change_batch = true; } + let arr = that.$route.path.split("/"); + that.route_code = arr[2]; let materialObj = that.$TOOL.data.get("MATERIAL_OBJECT"); that.materialObj = materialObj; that.form.handle_date =that.form.send_date =this.$TOOL.dateFormat2(new Date()); @@ -641,12 +652,18 @@ export default { res.forEach(wpritem=>{ let obj = {}; obj.wpr = wpritem.id; + obj.checked = true; obj.number = wpritem.number; handoverbw.push(obj); }) that.form.handoverb[index].handoverbw = handoverbw; }) }, + handleChange(index){ + let trueCount = this.form.handoverb[index].handoverbw.filter(item => item.checked === true).length; + this.form.handoverb[index].count = trueCount; + this.countChange(); + }, countChange(){ let that = this; let totalCount = 0; @@ -677,6 +694,17 @@ export default { that.form.recive_mgroup = that.form.send_mgroup; } that.form.mtype=that.mtype; + if(that.route_code=='shangpaipingmo'){ + that.form.handoverb.forEach(item=>{ + let handoverbw = []; + item.handoverbw.forEach(item1=>{ + if(item1.checked){ + handoverbw.push(item1); + } + }) + item.handoverbw = handoverbw; + }) + } //合批、分批、报废,这三个交接操作直接创建并提交 if(that.mtype==20||that.mtype==30||that.type==40){ that.$API.wpm.handover.createsubmit.req(that.form).then((res) => {