feat(platform): add mileage delivery navigation
This commit is contained in:
@@ -898,6 +898,44 @@ export function Mileage({
|
||||
onClick: () => exportMileage()
|
||||
}
|
||||
];
|
||||
const mileageDeliveryNavigation = [
|
||||
{
|
||||
title: '确认统计口径',
|
||||
value: `${formatKm(summary.totalMileageKm)} km`,
|
||||
detail: `范围 ${mileageRangeText},闭合状态 ${closureStatus},发布判断 ${publishAuditConclusion}。`,
|
||||
action: '复制统计摘要',
|
||||
color: publishAuditColor,
|
||||
disabled: false,
|
||||
onClick: () => copyStatisticsSummary()
|
||||
},
|
||||
{
|
||||
title: '回放里程轨迹',
|
||||
value: currentVehicleKeyword || '请选择车辆',
|
||||
detail: '用同一车辆和时间窗回看位置、速度、停驶和里程断点。',
|
||||
action: '轨迹复核',
|
||||
color: currentVehicleKeyword ? 'blue' as const : 'grey' as const,
|
||||
disabled: !currentVehicleKeyword || !onOpenHistory,
|
||||
onClick: () => onOpenHistory?.({ keyword: currentVehicleKeyword, protocol: currentProtocol, dateFrom: filters.dateFrom ?? '', dateTo: filters.dateTo ?? '' })
|
||||
},
|
||||
{
|
||||
title: '导出明细证据',
|
||||
value: `${rows.length.toLocaleString()} 条当前页`,
|
||||
detail: `覆盖 ${formatPercent(pageCoverageRate)},用于客户复盘、BI核对和运营日报附件。`,
|
||||
action: '导出CSV',
|
||||
color: rows.length > 0 ? 'blue' as const : 'grey' as const,
|
||||
disabled: rows.length === 0,
|
||||
onClick: () => exportMileage()
|
||||
},
|
||||
{
|
||||
title: '发送交付结论',
|
||||
value: mileageDeliveryState,
|
||||
detail: mileageDeliveryState === '可交付' ? '复制交付包后可直接发给客户或BI使用。' : '交付前需要补齐闭合、异常、覆盖或在线影响说明。',
|
||||
action: '复制交付包',
|
||||
color: mileageDeliveryColor,
|
||||
disabled: false,
|
||||
onClick: () => copyMileageDeliveryPackage()
|
||||
}
|
||||
];
|
||||
|
||||
const loadSummary = (values: Record<string, string> = filters) => {
|
||||
setSummaryLoading(true);
|
||||
@@ -1331,6 +1369,38 @@ export function Mileage({
|
||||
))}
|
||||
</div>
|
||||
</Card>
|
||||
<Card bordered title="客户里程交付导航" style={{ marginTop: 16 }}>
|
||||
<div className="vp-mileage-delivery-nav">
|
||||
<div className="vp-mileage-delivery-nav-summary">
|
||||
<Space wrap>
|
||||
<Tag color={mileageDeliveryColor}>{mileageDeliveryState}</Tag>
|
||||
<Tag color={publishAuditColor}>{publishAuditConclusion}</Tag>
|
||||
<Tag color={closureStatusColor}>{closureStatus}</Tag>
|
||||
</Space>
|
||||
<Typography.Title heading={5} style={{ margin: 0 }}>把统计结果变成客户可交付的里程说明</Typography.Title>
|
||||
<Typography.Text type="secondary">
|
||||
把里程统计变成客户能看懂的交付路径:先确认口径,再回放轨迹,最后导出明细和结论。
|
||||
</Typography.Text>
|
||||
</div>
|
||||
<div className="vp-mileage-delivery-nav-grid">
|
||||
{mileageDeliveryNavigation.map((item) => (
|
||||
<button
|
||||
key={item.title}
|
||||
type="button"
|
||||
className="vp-mileage-delivery-nav-item"
|
||||
disabled={item.disabled}
|
||||
onClick={item.onClick}
|
||||
aria-label={`客户里程交付导航 ${item.title} ${item.action}`}
|
||||
>
|
||||
<Tag color={item.color}>{item.title}</Tag>
|
||||
<strong>{item.value}</strong>
|
||||
<span>{item.detail}</span>
|
||||
<em>{item.action}</em>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
<Card bordered title="客户里程问题" style={{ marginTop: 16 }}>
|
||||
<div className="vp-mileage-question-grid">
|
||||
{mileageCustomerQuestions.map((item) => (
|
||||
|
||||
Reference in New Issue
Block a user