From c7084f4c34299de2be4b6ed1dee69974c905b4fa Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Wed, 12 Mar 2025 10:44:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E9=80=80=E8=8F=9C=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=BB=A3=E5=AE=A2=E4=B8=8B?= =?UTF-8?q?=E5=8D=95=E6=B8=85=E7=A9=BA=E5=90=8E=E6=97=A0=E6=B3=95=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E6=B7=BB=E5=8A=A0=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/carts.ts | 1 - src/views/order/index/components/detail.vue | 85 ++++++-- .../order/index/components/return-cart.vue | 195 ++++++++++++++++++ src/views/order/index/order_goods_util.js | 2 +- 4 files changed, 266 insertions(+), 17 deletions(-) create mode 100644 src/views/order/index/components/return-cart.vue diff --git a/src/store/modules/carts.ts b/src/store/modules/carts.ts index bf9b07e..d50d317 100644 --- a/src/store/modules/carts.ts +++ b/src/store/modules/carts.ts @@ -356,7 +356,6 @@ export const useCartsStore = defineStore("carts", () => { originAmount: 0 } vipUser.value = {} - table_code.value = '' } // 寻找套餐商品sku diff --git a/src/views/order/index/components/detail.vue b/src/views/order/index/components/detail.vue index 989b16d..6e75899 100644 --- a/src/views/order/index/components/detail.vue +++ b/src/views/order/index/components/detail.vue @@ -110,7 +110,18 @@ @@ -141,20 +152,35 @@ - + + + + + @@ -173,18 +199,19 @@ +
退款
+ +
+ + 退菜 +
+ + + + + \ No newline at end of file diff --git a/src/views/order/index/order_goods_util.js b/src/views/order/index/order_goods_util.js index a3651b2..5d78fe1 100644 --- a/src/views/order/index/order_goods_util.js +++ b/src/views/order/index/order_goods_util.js @@ -13,7 +13,7 @@ export function returnPackFee(arr) { } export function canTuicai(orderInfo, item) { - return true; + return orderInfo.status == "unpaid" && item.num - item.returnNum > 0; } export function canTuiKuan(orderInfo, item) { return (orderInfo.status != "refund" && orderInfo.status != "unpaid") || item.status != "refund";