feat(trade): WeChat confirm-receive component + admin status log columns

Open weappOrderConfirm in mini-user so users confirm in-app instead of
service notice; verify via get_order before completing. Show operator/remark
on admin order status timeline.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-29 16:48:44 +08:00
parent 05dffbfa15
commit 1a0afb6d39
14 changed files with 505 additions and 32 deletions
+39 -5
View File
@@ -24,6 +24,7 @@ import {
DELIVERY_PROVIDER_LABELS,
ORDER_STATUS_COLORS,
ORDER_STATUS_LABELS,
ORDER_STATUS_OPERATOR_LABELS,
fmtTime,
} from '../lib/constants';
import { FULFILLMENT_HOLD_REASON_LABELS } from '@dukang/shared-types';
@@ -102,7 +103,13 @@ type OrderDetail = AdminOrderRow & {
listUnitPrice?: number;
items?: AdminOrderItem[];
payment?: Record<string, unknown> | null;
statusLogs?: Array<{ fromStatus: string | null; toStatus: string; createdAt: string }>;
statusLogs?: Array<{
fromStatus: string | null;
toStatus: string;
operator?: string | null;
remark?: string | null;
createdAt: string;
}>;
benefitCoupons?: Array<Record<string, unknown>>;
redeemSummary?: OrderRedeemSummary | null;
redeemRecords?: OrderRedeemRecord[];
@@ -765,13 +772,40 @@ export default function OrdersPage() {
<Typography.Title level={5} style={{ marginTop: 16 }}></Typography.Title>
<Table
size="small"
rowKey="createdAt"
rowKey={(_, i) => String(i)}
pagination={false}
dataSource={detail.statusLogs}
columns={[
{ title: '从', dataIndex: 'fromStatus', render: (v) => v || '—' },
{ title: '', dataIndex: 'toStatus', render: (v) => ORDER_STATUS_LABELS[v] || v },
{ title: '时间', dataIndex: 'createdAt', render: (v) => new Date(v).toLocaleString('zh-CN') },
{
title: '',
dataIndex: 'fromStatus',
width: 100,
render: (v) => (v ? ORDER_STATUS_LABELS[v] || v : '—'),
},
{
title: '到',
dataIndex: 'toStatus',
width: 100,
render: (v) => ORDER_STATUS_LABELS[v] || v,
},
{
title: '操作人',
dataIndex: 'operator',
width: 120,
render: (v) => ORDER_STATUS_OPERATOR_LABELS[v] || v || '—',
},
{
title: '备注',
dataIndex: 'remark',
ellipsis: true,
render: (v) => v || '—',
},
{
title: '时间',
dataIndex: 'createdAt',
width: 170,
render: (v) => new Date(v).toLocaleString('zh-CN'),
},
]}
/>
</>