diff --git a/distribution-admin/src/pages/Orders.tsx b/distribution-admin/src/pages/Orders.tsx index f7e87e5..9ca39b0 100644 --- a/distribution-admin/src/pages/Orders.tsx +++ b/distribution-admin/src/pages/Orders.tsx @@ -80,8 +80,12 @@ const REVIEW_STATUS_LABELS: Record = { const LISTING_STATUS_LABELS: Record = { published: { label: '上架在售', color: 'green' }, + rented: { label: '出租中', color: 'cyan' }, + completed: { label: '已结单/售出', color: 'blue' }, offline: { label: '已下架', color: 'default' }, closed: { label: '已关闭', color: 'error' }, + abnormal: { label: '异常冻结', color: 'error' }, + sealed: { label: '已封存', color: 'magenta' }, draft: { label: '草稿', color: 'warning' }, } @@ -537,6 +541,7 @@ export default function Orders({ kind }: { kind: 'all' | 'sold' | 'receive' }) { rowKey="listing_id" loading={recvLoading} dataSource={receivedListings} + scroll={{ x: 1200 }} pagination={{ current: recvPage, pageSize, @@ -548,26 +553,43 @@ export default function Orders({ kind }: { kind: 'all' | 'sold' | 'receive' }) { { title: '商品编号', dataIndex: 'listing_no', - width: 140, + width: 170, render: (v: string) => ( - - {v} - +
+ + {v} + +
), }, { title: '账号标题与游戏', dataIndex: 'title', - minWidth: 220, + width: 260, render: (_: unknown, row: ReceivedListing) => (
- + {row.title || '无标题'} - + {formatGameName(row.game_name)} {row.server_region && {row.server_region}} - {row.login_platform && {row.login_platform}} + {row.login_platform && {row.login_platform}} {row.rank_level && {row.rank_level}}
@@ -576,12 +598,12 @@ export default function Orders({ kind }: { kind: 'all' | 'sold' | 'receive' }) { { title: '上传卖家', dataIndex: 'owner_phone', - width: 150, + width: 140, render: (_: unknown, row: ReceivedListing) => (
-
{row.owner_nickname || '匿名卖家'}
- - {row.owner_phone || '-'} +
{row.owner_nickname || '匿名卖家'}
+ + {maskPhone(row.owner_phone)}
), @@ -591,10 +613,10 @@ export default function Orders({ kind }: { kind: 'all' | 'sold' | 'receive' }) { width: 140, render: (_: unknown, row: ReceivedListing) => (
- + {formatMoney(row.price_cent)} -
+
押金: {formatMoney(row.deposit_amount_cent)}
@@ -610,7 +632,7 @@ export default function Orders({ kind }: { kind: 'all' | 'sold' | 'receive' }) {
{conf.label} {row.review_reason && ( - + {row.review_reason} )} @@ -621,7 +643,7 @@ export default function Orders({ kind }: { kind: 'all' | 'sold' | 'receive' }) { { title: '货架状态', dataIndex: 'status', - width: 110, + width: 120, render: (v: string) => { const conf = LISTING_STATUS_LABELS[v] || { label: v, color: 'default' } return {conf.label} @@ -631,17 +653,23 @@ export default function Orders({ kind }: { kind: 'all' | 'sold' | 'receive' }) { title: '上传时间', dataIndex: 'created_at', width: 160, - render: (v: string) => {v}, + render: (v: string) => ( + + {v ? new Date(v).toLocaleString('zh-CN', { hour12: false }) : '-'} + + ), }, { title: '操作', - width: 110, + width: 90, + fixed: 'right' as const, render: (_: unknown, row: ReceivedListing) => (