From 55a431ddd58d48b8a34982475932884dd2cfdfd0 Mon Sep 17 00:00:00 2001 From: "pikachu1995@126.com" Date: Mon, 26 Oct 2026 17:01:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(order):=20=E5=8C=BA=E5=88=86=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=93=8D=E4=BD=9C=E6=8C=89=E9=92=AE=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E3=80=81=E5=BE=85=E6=94=AF=E4=BB=98=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=80=80=E6=AC=BE=E6=A0=87=E7=AD=BE=E3=80=81=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=94=AE=E5=90=8E/=E6=8A=95=E8=AF=89?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=E3=80=81=E4=BF=AE=E5=A4=8D=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8=E8=A2=AB=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E6=A0=B7=E5=BC=8F=E5=8E=8B=E7=BC=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/pages/home/orderCenter/MyOrder.vue | 161 ++--- .../pages/home/orderCenter/OrderDetail.vue | 577 ++++++++++-------- 2 files changed, 359 insertions(+), 379 deletions(-) diff --git a/buyer/src/pages/home/orderCenter/MyOrder.vue b/buyer/src/pages/home/orderCenter/MyOrder.vue index eadb9befd..d0e1a319a 100644 --- a/buyer/src/pages/home/orderCenter/MyOrder.vue +++ b/buyer/src/pages/home/orderCenter/MyOrder.vue @@ -40,7 +40,11 @@
{{ order.createTime }}订单号 {{ order.sn }}{{ order.storeName }}
-
{{ order.isAfterSale ? filterAfterSaleStatus(order.serviceStatus) : filterOrderStatus(order.orderStatus) }}
+
+ + {{ order.isAfterSale ? filterAfterSaleStatus(order.serviceStatus) : filterOrderStatus(order.orderStatus) }} + +
@@ -64,12 +68,10 @@
{{ goods.name }}
共{{ goods.num }}件
- {{ refundPriceList(goods.isRefund) }} - + {{ refundPriceList(goods.isRefund) }}
-
{{ $filters.unitPrice(order.flowPrice, "¥") }}
@@ -77,14 +79,14 @@
@@ -120,7 +122,11 @@
{{ order.createTime }}订单号 {{ order.sn }}{{ order.storeName }}
-
{{ order.isAfterSale ? filterAfterSaleStatus(order.serviceStatus) : filterOrderStatus(order.orderStatus) }}
+
+ + {{ order.isAfterSale ? filterAfterSaleStatus(order.serviceStatus) : filterOrderStatus(order.orderStatus) }} + +
@@ -144,12 +150,10 @@
{{ goods.name }}
共{{ goods.num }}件
- {{ refundPriceList(goods.isRefund) }} - + {{ refundPriceList(goods.isRefund) }}
-
{{ $filters.unitPrice(order.flowPrice, "¥") }}
@@ -157,30 +161,20 @@
- - -
- - - - -
- -
@@ -233,8 +227,6 @@ const changeWay = ref(['全部', '待付款', '待发货', '待收货/使用']); const activeOrderTab = ref(0); const total = ref(0); // 数据总数 const spinShow = ref(false); // 加载状态 -const afterSaleModal = ref(false); // 选择售后商品模态框 -const afterSaleArr = ref([]); // 售后商品列表 const cancelAvail = ref(false); // 取消订单modal控制 const cancelReason = ref([]); // 取消订单原因 @@ -312,27 +304,6 @@ function received (sn) { // 确认收货 function goPay (sn) { // 去支付 router.push({path: '/payment', query: {orderType: 'ORDER', sn}}); } -function applyAfterSale (goodsItem) { // 申请售后 - let arr = [] - goodsItem.forEach(e => { - if (e.afterSaleStatus === 'NOT_APPLIED'|| e.afterSaleStatus === 'PART_AFTER_SALE') { - arr.push(e) - } - }); - if (arr.length === 1) { - router.push({name: 'ApplyAfterSale', query: {sn: arr[0].sn}}) - } else { - afterSaleArr.value = arr; - afterSaleModal.value = true - } -} -// 申请售后 -function afterSaleSelect (item) { - router.push({name: 'ApplyAfterSale', query: {sn: item.sn}}) -} -function complain (sn, goodsIndex) { // 投诉 - router.push({name: 'Complain', query: {sn, index: goodsIndex}}) -} function delOrder (sn) { // 删除订单 Modal.confirm({ title: '删除订单', @@ -420,11 +391,16 @@ function filterAfterSaleStatus (status) { const ob = afterSaleStatusList.filter(e => e.status === status); return ob && ob[0] ? ob[0].name : status } -function canAfterSale (order) { - if (order.isAfterSale || order.orderType === 'E_COUPON' || !order.groupAfterSaleStatus) { - return false +function statusTagType (status) { // 订单/售后状态对应标签类型 + const map = { + UNPAID: 'warning', WAIT_PAY: 'warning', PAID: 'warning', + UNDELIVERED: 'warning', PARTS_DELIVERED: 'warning', DELIVERED: 'warning', + WAIT_SHIP: 'warning', WAIT_USE: 'warning', TAKE: 'warning', STAY_PICKED_UP: 'warning', + APPLY: 'warning', APPLYING: 'warning', + COMPLETED: 'success', COMPLETE: 'success', + CANCELLED: 'info', CANCEL: 'info' } - return order.groupAfterSaleStatus.includes('NOT_APPLIED') || order.groupAfterSaleStatus.includes('PART_AFTER_SALE') + return map[status] || 'info' } function paymentLabel (order) { const map = { @@ -436,11 +412,14 @@ function paymentLabel (order) { if (order.paymentMethod && map[order.paymentMethod]) { return map[order.paymentMethod] } - if (order.payStatus === 'UNPAID' || order.orderStatus === 'UNPAID') { + if (isUnpaid(order)) { return '待支付' } return '' } +function isUnpaid (order) { + return order.payStatus === 'UNPAID' || order.orderStatus === 'UNPAID' +} watch(() => route.query.tag, () => { if (props.homePage || route.name !== 'MyOrder') return; @@ -529,7 +508,7 @@ onMounted(() => { align-items: center; min-width: 0; font-size: 14px; - color: #171A26; + color: #333; line-height: 1.5; span { @@ -630,37 +609,6 @@ onMounted(() => { margin-top: 6px; } - .refund-tag { - padding: 0 6px; - border-radius: 4px; - background: #fff7e8; - color: #ff9900; - font-size: 14px; - line-height: 22px; - } - - .sub-btn { - height: 28px; - margin-top: 8px; - padding: 0 10px; - border: 1px solid #ddd; - border-radius: 4px; - background: #fff; - color: #666; - font-size: 14px; - line-height: 26px; - cursor: pointer; - - &:hover { - border-color: $theme_color; - color: $theme_color; - } - } - - .goods-extra .sub-btn { - margin-top: 0; - } - .col-amount, .col-ops { text-align: center; @@ -685,38 +633,9 @@ onMounted(() => { flex-direction: column; align-items: center; gap: 8px; - } - .op-btn { - min-width: 96px; - height: 32px; - padding: 0 12px; - border: 1px solid $theme_color; - border-radius: 4px; - background: #fff; - color: #171A26; - font-family: inherit; - font-size: 14px; - line-height: 30px; - cursor: pointer; - - &:hover { - background: #fff5f4; - } - } - - .text-link { - border: none; - background: none; - padding: 0; - color: #171A26; - font-family: inherit; - font-size: 14px; - line-height: 22px; - cursor: pointer; - - &:hover { - color: $theme_color; + :deep(.el-button + .el-button) { + margin-left: 0; } } } diff --git a/buyer/src/pages/home/orderCenter/OrderDetail.vue b/buyer/src/pages/home/orderCenter/OrderDetail.vue index 77e8230d8..9276a99ad 100644 --- a/buyer/src/pages/home/orderCenter/OrderDetail.vue +++ b/buyer/src/pages/home/orderCenter/OrderDetail.vue @@ -1,10 +1,10 @@