From d3c93b0aefedae68d273269e74b0646c597bc36d Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Wed, 3 Feb 2021 18:55:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=99=9A=E6=8B=9F=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stdiet-ui/src/components/OrderDrawer/index.vue | 10 +++++----- stdiet-ui/src/views/custom/customer/index.vue | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) 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" />