feat(order-service): 支持自定义订单状态节点文案
This commit is contained in:
@@ -51,12 +51,12 @@ const STATUS_STEP_INDEX: Record<string, number> = {
|
||||
accepted: 3,
|
||||
problem: 2,
|
||||
}
|
||||
const STATUS_STEP_ITEMS = [
|
||||
{ title: '提交资料' },
|
||||
{ title: '客服安排' },
|
||||
{ title: '订单处理' },
|
||||
{ title: '交付完成' },
|
||||
]
|
||||
const DEFAULT_STATUS_STEPS: OrderServiceItem['statusSteps'] = {
|
||||
submitted: { title: '提交资料', description: '' },
|
||||
scheduled: { title: '客服安排', description: '' },
|
||||
processing: { title: '订单处理', description: '' },
|
||||
completed: { title: '交付完成', description: '' },
|
||||
}
|
||||
const STATUS_TAG_COLORS: Record<string, string> = {
|
||||
pending_material: 'orange',
|
||||
unassigned: 'blue',
|
||||
@@ -399,6 +399,7 @@ function OrderServiceStatusCard({ item }: { item: OrderServiceItem }) {
|
||||
].filter((row): row is { label: string; value: string } => Boolean(row?.value))
|
||||
const acceptanceImageUrls = item.acceptanceImageUrls || []
|
||||
const showSteps = item.state !== 'cancelled'
|
||||
const statusSteps = item.statusSteps || DEFAULT_STATUS_STEPS
|
||||
|
||||
return (
|
||||
<Card size="small" className="collect-link-status-card">
|
||||
@@ -412,7 +413,24 @@ function OrderServiceStatusCard({ item }: { item: OrderServiceItem }) {
|
||||
<Steps
|
||||
className="collect-link-status-steps"
|
||||
current={currentStep}
|
||||
items={STATUS_STEP_ITEMS}
|
||||
items={[
|
||||
{
|
||||
title: statusSteps.submitted.title,
|
||||
description: statusSteps.submitted.description || undefined,
|
||||
},
|
||||
{
|
||||
title: statusSteps.scheduled.title,
|
||||
description: statusSteps.scheduled.description || undefined,
|
||||
},
|
||||
{
|
||||
title: statusSteps.processing.title,
|
||||
description: statusSteps.processing.description || undefined,
|
||||
},
|
||||
{
|
||||
title: statusSteps.completed.title,
|
||||
description: statusSteps.completed.description || undefined,
|
||||
},
|
||||
]}
|
||||
responsive
|
||||
size="small"
|
||||
status={
|
||||
|
||||
Reference in New Issue
Block a user