feat(fulfillment): 自动核销任务展示并搜索核销码

This commit is contained in:
yml2213
2026-11-06 10:47:45 +08:00
parent 398eafa911
commit eef4cc1673
7 changed files with 188 additions and 5 deletions
@@ -315,6 +315,31 @@ export default function VoucherConsumePolicyPanel() {
width: 170,
render: (value: string) => value || '-',
},
{
title: '核销码',
dataIndex: 'voucher_codes',
width: 210,
render: (values: string[] | null | undefined) => {
const codes = Array.isArray(values)
? values.map((value) => String(value || '').trim()).filter(Boolean)
: []
if (codes.length === 0) {
return '-'
}
return (
<Space direction="vertical" size={2}>
{codes.slice(0, 3).map((code) => (
<Typography.Text key={code} copyable={{ text: code }} ellipsis>
{code}
</Typography.Text>
))}
{codes.length > 3 ? (
<Typography.Text type="secondary">另有 {codes.length - 3} 个</Typography.Text>
) : null}
</Space>
)
},
},
{
title: '计划时间',
dataIndex: 'due_at',
@@ -415,7 +440,7 @@ export default function VoucherConsumePolicyPanel() {
<Input.Search
allowClear
prefix={<SearchOutlined />}
placeholder="任务号 / 订单号 / 平台单号"
placeholder="任务号 / 订单号 / 平台单号 / 核销码"
value={keywordDraft}
onChange={(event) => {
const value = event.target.value
@@ -492,7 +517,7 @@ export default function VoucherConsumePolicyPanel() {
setPageSize(nextPageSize)
},
})}
scroll={{ x: 1200 }}
scroll={{ x: 1420 }}
/>
</Space>
)