修复虚拟订单逻辑

This commit is contained in:
huangdeliang 2021-02-03 18:55:52 +08:00
parent 8effa650d8
commit d3c93b0aef
2 changed files with 6 additions and 6 deletions
stdiet-ui/src
components/OrderDrawer
views/custom/customer

@ -130,14 +130,14 @@ export default {
this.orderList = res.rows.reduce((arr, cur) => {
const tarOrder = arr.find((ord) => ord.startTime === cur.startTime);
if (tarOrder) {
const firstObj = JSON.parse(JSON.stringify(tarOrder));
tarOrder.children = [
{ ...firstObj, orderType: "main" },
{ ...cur, orderType: "main" },
];
if (!tarOrder.children) {
const firstObj = JSON.parse(JSON.stringify(tarOrder));
tarOrder.children = [{ ...firstObj, orderType: "main" }];
}
tarOrder.amount += cur.amount;
tarOrder.orderId += cur.orderId;
tarOrder.orderType = "virtual";
tarOrder.children.push({ ...cur, orderType: "main" });
} else {
cur.orderType = "main";
arr.push(cur);

@ -111,7 +111,7 @@
label="创建时间"
align="center"
prop="createTime"
width="160"
width="166"
/>
<el-table-column
label="进粉时间"