修改气血数据

This commit is contained in:
huangdeliang
2021-03-30 13:45:33 +08:00
parent 8f94c50d22
commit 20466936ce
2 changed files with 130 additions and 75 deletions

View File

@ -180,16 +180,20 @@ export default {
cur.type = "main";
arr.push(cur);
}
if (idx === res.rows.length - 1 && arr.children) {
if (idx === res.rows.length - 1) {
arr.forEach((obj) => {
obj.amount = arr.children.reduce((a, c) => {
return a + c.afterSaleCommissOrder === 0 ? c.amount : 0;
}, 0);
console.log({ obj });
if (obj.children) {
obj.amount = obj.children.reduce(
(a, c) => a + (c.afterSaleCommissOrder === 0 ? c.amount : 0),
0
);
}
});
}
return arr;
}, []);
// console.log(this.orderList);
console.log(this.orderList);
this.loading = false;
});
},