diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue index 709cfb1a..a39a5a1b 100644 --- a/src/views/wpm_bx/handover_form.vue +++ b/src/views/wpm_bx/handover_form.vue @@ -434,8 +434,14 @@ export default { that.totalCount = totalCount; }, showbw(index){ - this.bwIndex = index; - this.bwVisible = true; + let that = this; + that.bwIndex = index; + if(that.form.handoverb[index].handoverbw&&that.form.handoverb[index].handoverbw.length>0){ + that.bwVisible = true; + }else{ + that.$message.warning("正在加载,请稍后..."); + that.bwVisible = true; + } }, bwVisibleClose(){ this.bwVisible = false; @@ -600,13 +606,21 @@ export default { }, //显示 open(mode = "add",data,mtype) { - this.mode = mode; - this.mtype = mtype; + let that = this; + that.mode = mode; + that.mtype = mtype; if(mtype==30){ - this.change_batch = true; + that.change_batch = true; } - this.form.handoverb = data?data:[]; - this.visible = true; + that.form.handoverb = data?data:[]; + if(data.length>0){ + that.totalCount = 0; + data.forEach((item,index)=>{ + that.totalCount += Number(item.count); + that.getWprList(item.wm,index); + }) + } + that.visible = true; return this; }, clearSelect(){ @@ -657,7 +671,7 @@ export default { getWprList(id,index){ let that = this; let handoverbw = []; - that.$API.wpm.wpr.list.req({wm:id,page:0,can_use:'yes'}).then((res) => { + that.$API.wpm.wpr.list.req({wm:id,page:0,can_use:'yes',query:'{id,number}'}).then((res) => { res.forEach(wpritem=>{ let obj = {}; obj.wpr = wpritem.id;