diff --git a/stdiet-ui/src/components/OrderDrawer/index.vue b/stdiet-ui/src/components/OrderDrawer/index.vue index ce68a8b57..1bb84e301 100644 --- a/stdiet-ui/src/components/OrderDrawer/index.vue +++ b/stdiet-ui/src/components/OrderDrawer/index.vue @@ -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); diff --git a/stdiet-ui/src/views/custom/customer/index.vue b/stdiet-ui/src/views/custom/customer/index.vue index 7b39ab1d1..164cec493 100644 --- a/stdiet-ui/src/views/custom/customer/index.vue +++ b/stdiet-ui/src/views/custom/customer/index.vue @@ -111,7 +111,7 @@ label="创建时间" align="center" prop="createTime" - width="160" + width="166" />