diff --git a/apps/admin-web/src/pages/OrdersPage.tsx b/apps/admin-web/src/pages/OrdersPage.tsx index 8a4d545..4a5ed7b 100644 --- a/apps/admin-web/src/pages/OrdersPage.tsx +++ b/apps/admin-web/src/pages/OrdersPage.tsx @@ -10,21 +10,11 @@ import { Table, Tag, Typography, + message, } from 'antd'; import type { ColumnsType } from 'antd/es/table'; import { request, type AdminOrderRow, type Paginated } from '../lib/api'; - -const STATUS_LABELS: Record = { - PENDING_PAY: '待付款', - PENDING_SHIP: '待发货', - OUT_WAREHOUSE: '已出库', - SHIPPING: '配送中', - PENDING_RECEIVE: '待收货', - COMPLETED: '已完成', - CANCELLED: '已取消', - REFUNDING: '退款中', - REFUNDED: '已退款', -}; +import { ORDER_STATUS_LABELS } from '../lib/constants'; type OrderDetail = AdminOrderRow & { receiverAddress?: string; @@ -93,7 +83,7 @@ export default function OrdersPage() { title: '状态', dataIndex: 'status', width: 100, - render: (s) => {STATUS_LABELS[s] || s}, + render: (s) => {ORDER_STATUS_LABELS[s] || s}, }, { title: '配送', @@ -140,7 +130,7 @@ export default function OrdersPage() { - ({ value, label }))} /> @@ -171,12 +161,37 @@ export default function OrdersPage() { }} /> - setDrawerOpen(false)}> + setDrawerOpen(false)} + extra={detail && ( + + 调试改状态 +