diff --git a/frontend/admin/src/pages/order/orderCenter/components/DetailOrderInfo.vue b/frontend/admin/src/pages/order/orderCenter/components/DetailOrderInfo.vue index ecd82c4db..9d738dd5b 100644 --- a/frontend/admin/src/pages/order/orderCenter/components/DetailOrderInfo.vue +++ b/frontend/admin/src/pages/order/orderCenter/components/DetailOrderInfo.vue @@ -315,7 +315,7 @@ function buildAddress(addr) { display: flex; margin-top: 16px; font-size: 13px; - color: #666666; + color: var(--prev-color-text-primary); &:nth-child(3n + 1) { padding-right: 20px; diff --git a/frontend/admin/src/pages/order/orderCenter/detail.vue b/frontend/admin/src/pages/order/orderCenter/detail.vue index ce422d2a1..9d276b59f 100644 --- a/frontend/admin/src/pages/order/orderCenter/detail.vue +++ b/frontend/admin/src/pages/order/orderCenter/detail.vue @@ -14,8 +14,10 @@
  • 订单状态
    - {{ getStatusLabel(detailData.status_code) }} - + {{ + getStatusLabel(detailData.status_code) + }} + {{ detailData.is_all_refund ? '退款中' : '部分退款中' }}
    @@ -116,14 +118,31 @@ function getStatusLabel(code) { const map = { pending_payment: '待支付', processing: '待处理', + pending_review: '待评价', completed: '已完成', canceled: '已取消', + after_sale: '售后中', refunding: '退款中', refunded: '已退款', }; return map[code] || code || '--'; } +/* 与列表 getStatusClass 同口径 */ +function getStatusClass(code) { + const map = { + pending_payment: 'warning', + processing: 'primary', + pending_review: 'success', + completed: 'success', + canceled: 'danger', + after_sale: 'warning', + refunding: 'warning', + refunded: 'info', + }; + return map[code] || 'info'; +} + function formatDate(date) { const d = new Date(date); return `${d.getFullYear()}/${(d.getMonth() + 1).toString().padStart(2, '0')}/${d @@ -199,8 +218,9 @@ defineExpose({ loadDetail }); padding: 0; .item { - flex: none; - width: 200px; + flex: 1 1 auto; + min-width: 0; + padding-right: 16px; font-size: 14px; line-height: 14px; color: var(--prev-color-text-regular); @@ -209,7 +229,7 @@ defineExpose({ loadDetail }); margin-bottom: 12px; font-size: 13px; line-height: 13px; - color: #666666; + color: var(--prev-color-text-primary); } .value1 { diff --git a/frontend/admin/src/pages/order/orderCenter/index.vue b/frontend/admin/src/pages/order/orderCenter/index.vue index cd6d277ff..adeb68f41 100644 --- a/frontend/admin/src/pages/order/orderCenter/index.vue +++ b/frontend/admin/src/pages/order/orderCenter/index.vue @@ -268,7 +268,13 @@ - + @@ -638,4 +644,9 @@ onMounted(() => { margin: 0; padding: 0 20px; } + +/* 详情抽屉 body 左右归零(全局 variables.scss 为 20px 35px),与实物/网盘订单详情抽屉一致 */ +:deep(.order-detail-drawer .el-drawer__body) { + padding: 20px 0 !important; +} diff --git a/frontend/admin/src/pages/plugin/normal/normalOrder.js b/frontend/admin/src/pages/plugin/normal/normalOrder.js index 6ec2d87dd..206258177 100644 --- a/frontend/admin/src/pages/plugin/normal/normalOrder.js +++ b/frontend/admin/src/pages/plugin/normal/normalOrder.js @@ -183,3 +183,42 @@ export function saveOrderIntegral(data) { export function getOrderExpress(orderNo) { return request.get('normal/order/express/' + orderNo); } + +/** + * 订单业务状态:与订单列表 OrderTable 的 getBusinessStatus 同口径, + * 供详情弹窗等场景复用(列表/详情状态展示保持一致) + */ +export function getOrderBusinessStatus(row = {}) { + if (row.is_del === 1) { + return { code: 'deleted', text: '已删除', type: 'danger' }; + } + if (row.status_code === 'pending_payment') { + return { code: 'pending_payment', text: '待支付', type: 'warning' }; + } + if (row.status_code === 'canceled') { + return { code: 'canceled', text: '已取消', type: 'danger' }; + } + if (row.status_code === 'after_sale' || row.status_code === 'refunding') { + return { code: 'after_sale', text: '退换/售后', type: 'info' }; + } + if (row.status_code === 'refunded') { + return { code: 'refunded', text: '已退款', type: 'info' }; + } + if (row.status_code === 'processing') { + // 到店自提订单显示待到店;其余按发货进度拆分待发货/待收货 + if (row.extra_info?.delivery_type === 'pickup') { + return { code: 'pending_pickup', text: '待到店', type: 'warning' }; + } + if (!row.delivery_time || row.delivery_time === 0) { + return { code: 'pending_shipped', text: '待发货', type: 'danger' }; + } + return { code: 'pending_receive', text: '待收货', type: 'primary' }; + } + if (row.status_code === 'pending_review') { + return { code: 'pending_review', text: '待评价', type: 'success' }; + } + if (row.status_code === 'completed') { + return { code: 'completed', text: '已完成', type: 'success' }; + } + return { code: row.status_code, text: row.status_code || '未知', type: 'info' }; +} diff --git a/frontend/admin/src/pages/plugin/normal/order/Detail.vue b/frontend/admin/src/pages/plugin/normal/order/Detail.vue index 705455ce8..d0c4c101a 100644 --- a/frontend/admin/src/pages/plugin/normal/order/Detail.vue +++ b/frontend/admin/src/pages/plugin/normal/order/Detail.vue @@ -14,8 +14,8 @@
  • 订单状态
    - {{ detailData.status_text || '--' }} - + {{ businessStatus.text }} + {{ detailData.is_all_refund ? '退款中' : '部分退款中' }}
    @@ -449,7 +449,7 @@ import { useRoute } from 'vue-router'; import { ElMessage } from 'element-plus'; import orderIcon from '@/assets/images/order_icon.png'; import request from '@/libs/request'; -import { getOrderExpress } from '../normalOrder'; +import { getOrderExpress, getOrderBusinessStatus } from '../normalOrder'; defineOptions({ name: 'normalOrderDetail' }); @@ -471,6 +471,9 @@ const orderItems = computed(() => { return detailData.value.order_items || detailData.value.cartInfo || []; }); +/** 订单状态与列表同口径(待发货/待收货/待到店等业务状态) */ +const businessStatus = computed(() => getOrderBusinessStatus(detailData.value || {})); + /** 售后进度数据(后端注入到 detail.extend.after_sale) */ const afterSaleInfo = computed(() => { if (!detailData.value) return null; @@ -658,14 +661,17 @@ defineExpose({ loadDetail }); .list { display: flex; + flex-wrap: wrap; + row-gap: 16px; margin-top: 20px; overflow: hidden; list-style: none; padding: 0; .item { - flex: none; - width: 200px; + flex: 1 1 auto; + min-width: 0; + padding-right: 16px; font-size: 14px; line-height: 14px; color: var(--prev-color-text-regular); diff --git a/frontend/admin/src/pages/plugin/normal/order/components/OrderTable.vue b/frontend/admin/src/pages/plugin/normal/order/components/OrderTable.vue index a9bd96b76..862a64b53 100644 --- a/frontend/admin/src/pages/plugin/normal/order/components/OrderTable.vue +++ b/frontend/admin/src/pages/plugin/normal/order/components/OrderTable.vue @@ -106,7 +106,6 @@ {{ getRowStatusLabel(scope.row) }} -
    部分退款中
    @@ -643,12 +642,6 @@ defineExpose({ selectedIds, page }); font-weight: bold; } -.trip { - color: #ed4014; - font-size: 12px; - margin-top: 2px; -} - :deep(.el-dropdown-link) { cursor: pointer; color: var(--prev-color-primary); diff --git a/frontend/admin/src/pages/plugin/virtual/order/Detail.vue b/frontend/admin/src/pages/plugin/virtual/order/Detail.vue index 3f7818739..c6c8454ed 100644 --- a/frontend/admin/src/pages/plugin/virtual/order/Detail.vue +++ b/frontend/admin/src/pages/plugin/virtual/order/Detail.vue @@ -6,329 +6,324 @@
    - - - +
  • +
  • +
    订单金额
    +
    ¥{{ orderInfo.total_price || '0.00' }}
    +
  • +
  • +
    实际退款
    +
    ¥{{ orderInfo.refunded_price || '0.00' }}
    +
  • +
  • +
    支付方式
    +
    {{ orderInfo.pay_type_name || orderInfo.pay_type || '--' }}
    +
  • +
  • +
    支付时间
    +
    {{ fmt(orderInfo.pay_time) }}
    +
  • +
  • +
    业务状态
    +
    + + {{ orderInfo.business_status.text }} + + -- +
    +
  • + + - - - - -
    -
    商品信息
    - - -