feat:自动补货/手动采购逻辑修改:批量获取-》打包-》获取Token列表
This commit is contained in:
@@ -13,6 +13,7 @@ export interface TokenColumnHandlers {
|
||||
onCopyVoucher: (record: RockTokenItem) => void
|
||||
onPreviewVoucher: (record: RockTokenItem) => void
|
||||
onEditUid: (state: UidEditState) => void
|
||||
onViewRawData: (record: RockTokenItem) => void
|
||||
onResetToken: (id: number) => void
|
||||
onReleaseToken: (id: number) => void
|
||||
onUpdateRemark: (id: number, remark: string, status?: string) => void
|
||||
@@ -24,6 +25,7 @@ export function buildTokenColumns({
|
||||
onCopyVoucher,
|
||||
onPreviewVoucher,
|
||||
onEditUid,
|
||||
onViewRawData,
|
||||
onResetToken,
|
||||
onReleaseToken,
|
||||
onUpdateRemark,
|
||||
@@ -31,7 +33,7 @@ export function buildTokenColumns({
|
||||
}: TokenColumnHandlers): ColumnsType<RockTokenItem> {
|
||||
return [
|
||||
{
|
||||
title: '0666 编号 / 提取码',
|
||||
title: '0666 编号 / 兑换码',
|
||||
dataIndex: 'upstream_token_id',
|
||||
width: 250,
|
||||
render: (_, record) => (
|
||||
@@ -53,6 +55,32 @@ export function buildTokenColumns({
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '包ID / 提取码',
|
||||
width: 230,
|
||||
render: (_, record) => (
|
||||
<Space direction="vertical" size={2}>
|
||||
<div style={{ fontSize: 12, color: '#334155' }}>
|
||||
<span style={{ color: '#94a3b8' }}>包ID: </span>
|
||||
{record.package_id ? `#${record.package_id}` : '-'}
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
<span style={{ color: '#94a3b8', fontSize: 12 }}>提取码:</span>
|
||||
<Text
|
||||
copyable={record.token ? { text: record.token } : false}
|
||||
style={{ fontSize: 12, fontFamily: 'monospace', fontWeight: 600 }}
|
||||
>
|
||||
{record.token || '-'}
|
||||
</Text>
|
||||
</div>
|
||||
{record.source === 'package' ? (
|
||||
<Tag color="purple" style={{ margin: 0, width: 'fit-content', fontSize: 10 }}>
|
||||
打包导入
|
||||
</Tag>
|
||||
) : null}
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '规格与适用范围',
|
||||
dataIndex: 'color',
|
||||
@@ -338,6 +366,18 @@ export function buildTokenColumns({
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '原始数据',
|
||||
width: 100,
|
||||
render: (_, record) =>
|
||||
record.raw_data ? (
|
||||
<Button size="small" onClick={() => onViewRawData(record)}>
|
||||
查看
|
||||
</Button>
|
||||
) : (
|
||||
<Text type="secondary">-</Text>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
|
||||
Reference in New Issue
Block a user