From e71b15036f4e30dd71431a95807985c1e32d5923 Mon Sep 17 00:00:00 2001 From: "pikachu1995@126.com" Date: Thu, 12 Nov 2026 09:48:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(order):=20=E4=BF=AE=E5=A4=8D=E5=B7=B2?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81=E4=B8=8B?= =?UTF-8?q?=E7=9A=84=E6=8A=95=E8=AF=89=E5=92=8C=E5=94=AE=E5=90=8E=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 投诉页面增加订单取消状态校验,已取消订单禁止发起投诉并自动返回 - 订单详情页售后入口增加取消状态判断,取消订单不展示售后按钮 - 退款价格展示增加已支付状态校验,避免未支付订单显示退款信息 - 新增 resolveRefundPrice 函数,全额退款时回退使用 flowPrice 计算 - 重构联系方式区域布局,分离电话号码与图标并优化样式 --- pages/order/complain/complain.vue | 4 ++++ pages/order/orderDetail.vue | 37 +++++++++++++++++++++++++++---- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/pages/order/complain/complain.vue b/pages/order/complain/complain.vue index 32248e2..ab0b314 100644 --- a/pages/order/complain/complain.vue +++ b/pages/order/complain/complain.vue @@ -159,6 +159,10 @@ function loadData(orderSn: string) { order.value = result.order orderGoodsList.value = result.orderItems if (store.state.isShowToast) uni.hideLoading() + if (result?.order?.orderStatus === 'CANCELLED') { + uni.showToast({ title: '订单已取消,无法发起投诉', icon: 'none' }) + setTimeout(() => { uni.navigateBack() }, 1500) + } }) } diff --git a/pages/order/orderDetail.vue b/pages/order/orderDetail.vue index 6fdb1e8..b24df14 100644 --- a/pages/order/orderDetail.vue +++ b/pages/order/orderDetail.vue @@ -80,9 +80,14 @@ 自提点地址: {{ order.storeAddressPath }} - + 联系方式: - {{ order.storeAddressMobile }} + + {{ order.storeAddressMobile }} + + + + @@ -118,8 +123,8 @@ ¥{{unitPrice(sku.goodsPrice) }} - - {{refundPriceList(sku.isRefund)}} ({{unitPrice(sku.refundPrice, "¥") }}) + + {{refundPriceList(sku.isRefund)}} ({{unitPrice(resolveRefundPrice(sku), "¥") }}) @@ -550,6 +555,16 @@ function refundPriceList(status: string) { } } +function resolveRefundPrice(sku: any) { + if (sku?.refundPrice && Number(sku.refundPrice) > 0) { + return sku.refundPrice + } + if (sku?.isRefund === 'ALL_REFUND' && sku?.flowPrice) { + return sku.flowPrice + } + return sku?.refundPrice || 0 +} + function handleCallPhone() { if (order.value.storeAddressMobile) { callPhone(order.value.storeAddressMobile) @@ -644,6 +659,7 @@ function isGiftItem(sku: any) { } function canShowSkuAfterSale(sku: any) { + if (order.value?.orderStatus === 'CANCELLED') return false if (isGiftItem(sku)) return false if (isECouponOrder.value) return false if (!order.value?.sn || Number(order.value.flowPrice) === 0) return false @@ -968,6 +984,19 @@ page, flex:10; } + .contact-phone-value { + display: flex; + flex-direction: row; + align-items: center; + + .phone-icon-wrap { + margin-left: 12rpx; + display: inline-flex; + align-items: center; + justify-content: center; + } + } + .order-sn-value { display: flex; flex-direction: row;