feat(fulfillment): 绑定状态标签增加颜色区分
- 待扫码金色、待确认角色紫色、已绑定绿色、绑定失败红色 - 详情绑定状态同步使用颜色标签 - 补充 CK 全自动化计划执行顺序
This commit is contained in:
@@ -67,6 +67,16 @@ const BINDING_STATUS_LABELS: Record<string, string> = {
|
||||
failed: '绑定失败',
|
||||
};
|
||||
|
||||
const BINDING_STATUS_COLORS: Record<string, string> = {
|
||||
not_started: 'default',
|
||||
preparing: 'processing',
|
||||
qr_pending: 'gold',
|
||||
waiting_bind: 'orange',
|
||||
role_ready: 'purple',
|
||||
bound: 'green',
|
||||
failed: 'red',
|
||||
};
|
||||
|
||||
const EXCHANGE_STATUS_LABELS: Record<string, string> = {
|
||||
not_started: '未开始',
|
||||
eligible: '可兑换',
|
||||
@@ -197,6 +207,10 @@ function bindingStatusLabel(value: string) {
|
||||
return BINDING_STATUS_LABELS[value] || '未知状态';
|
||||
}
|
||||
|
||||
function bindingStatusColor(value: string) {
|
||||
return BINDING_STATUS_COLORS[value] || 'default';
|
||||
}
|
||||
|
||||
function exchangeStatusLabel(value: string) {
|
||||
return EXCHANGE_STATUS_LABELS[value] || '未知状态';
|
||||
}
|
||||
@@ -1296,7 +1310,9 @@ export default function PlatformFulfillmentPage() {
|
||||
width: 180,
|
||||
render: (_, task) => (
|
||||
<Space direction="vertical" size={2}>
|
||||
<Tag>{bindingStatusLabel(task.bindingStatus)}</Tag>
|
||||
<Tag color={bindingStatusColor(task.bindingStatus)}>
|
||||
{bindingStatusLabel(task.bindingStatus)}
|
||||
</Tag>
|
||||
<Text>{task.bindTask?.roleName || (task.bindTask?.bindPhase === 'role_ready' ? '角色待确认' : '-')}</Text>
|
||||
{task.bindingStatus === 'bound' ? (
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>
|
||||
@@ -1726,7 +1742,11 @@ export default function PlatformFulfillmentPage() {
|
||||
<Descriptions.Item label="订单金额">{money(selected.orderAmountFen)}</Descriptions.Item>
|
||||
<Descriptions.Item label="所需积分">{selected.requiredPoints ?? '-'}</Descriptions.Item>
|
||||
<Descriptions.Item label="执行状态">{statusLabel(selected.executionStatus)}</Descriptions.Item>
|
||||
<Descriptions.Item label="绑定状态">{bindingStatusLabel(selected.bindingStatus)}</Descriptions.Item>
|
||||
<Descriptions.Item label="绑定状态">
|
||||
<Tag color={bindingStatusColor(selected.bindingStatus)}>
|
||||
{bindingStatusLabel(selected.bindingStatus)}
|
||||
</Tag>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="外部协作单" span={2}>
|
||||
{selected.collabOrder
|
||||
? `${selected.collabOrder.orderNo} · ${collabStatusLabel(selected.collabOrder.status)}`
|
||||
|
||||
Reference in New Issue
Block a user