fix:玻纤勾选后点击“合批”后获取wpr列表展示

This commit is contained in:
shijing 2025-12-01 14:33:21 +08:00
parent 973d3485ed
commit 97c7172306
1 changed files with 22 additions and 8 deletions

View File

@ -434,8 +434,14 @@ export default {
that.totalCount = totalCount; that.totalCount = totalCount;
}, },
showbw(index){ showbw(index){
this.bwIndex = index; let that = this;
this.bwVisible = true; 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(){ bwVisibleClose(){
this.bwVisible = false; this.bwVisible = false;
@ -600,13 +606,21 @@ export default {
}, },
// //
open(mode = "add",data,mtype) { open(mode = "add",data,mtype) {
this.mode = mode; let that = this;
this.mtype = mtype; that.mode = mode;
that.mtype = mtype;
if(mtype==30){ if(mtype==30){
this.change_batch = true; that.change_batch = true;
} }
this.form.handoverb = data?data:[]; that.form.handoverb = data?data:[];
this.visible = true; 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; return this;
}, },
clearSelect(){ clearSelect(){
@ -657,7 +671,7 @@ export default {
getWprList(id,index){ getWprList(id,index){
let that = this; let that = this;
let handoverbw = []; 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=>{ res.forEach(wpritem=>{
let obj = {}; let obj = {};
obj.wpr = wpritem.id; obj.wpr = wpritem.id;