problem description
The display in thepicture is that I expect the result to be repeated several times. I want to ask what the problem is, is it caused by repeated processing of computational attributes? This happens by accident, and most of the operations are normal
the environmental background of the problems and what methods you have tried
related codes
/ / Please paste the code text below (do not replace the code with pictures)
//
showCommissionData: function () {
this.priceSetDetail.forEach((item)=>{
this.productPrices.forEach((item1)=>{
if(item.PRODUCTID == item1.PRODUCTID){
if(item.PRICEIDS){
item.PRICEIDS.push(item1);
}else{
item.PRICEIDS = [];
item.PRICEIDS.push(item1);
}
}
})
});
//
this.priceSetDetail.forEach((item)=>{
this.discounts.forEach((item1)=>{
item1.RATE = (item1.RATE * 1).toFixed(2);
if(item.PRODUCTID == item1.PRODUCTID){
if(item.DISCOUNTS){
item.DISCOUNTS.push(item1);
}else{
item.DISCOUNTS = [];
item.DISCOUNTS.push(item1);
}
}
})
});
//
this.priceSetDetail.forEach((item)=>{
this.surcharges.forEach((item1)=>{
if(item.PRODUCTID == item1.PRODUCTID){
if(item.SURCHARGES){
item.SURCHARGES.push(item1);
}else{
item.SURCHARGES = [];
item.SURCHARGES.push(item1);
}
}
})
});
if(this.priceSetDetail){
this.priceSetDetail=_.filter(this.priceSetDetail,function(item){
return item.DISCOUNTS && item.PRICEIDS && item.SURCHARGES;
})
}
return this.priceSetDetail.slice(this.page.size*(this.page.current-1),this.page.size*this.page.current);
},
},