From dd709fc12cfd83fd9f3f486dc4ebe5507e223612 Mon Sep 17 00:00:00 2001 From: yml2213 Date: Wed, 9 Sep 2026 19:38:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(distribution-admin):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=88=86=E9=94=80=E6=94=B6=E5=8F=B7=E7=AE=A1=E7=90=86=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E5=88=97=E5=AE=BD=E4=B8=8E=E4=B8=AD=E6=96=87=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E8=A1=A5=E5=85=A8=E5=B7=B2=E7=BB=93=E5=8D=95=E8=B4=A7?= =?UTF-8?q?=E6=9E=B6=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- distribution-admin/src/pages/Orders.tsx | 64 ++++++++++++++++++------- 1 file changed, 46 insertions(+), 18 deletions(-) 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) => (