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 @@