feat(platform): add mileage reconciliation conclusion
This commit is contained in:
@@ -968,6 +968,56 @@ export function Mileage({
|
||||
onClick: () => exportMileage()
|
||||
}
|
||||
];
|
||||
const mileageReconciliationConclusionItems = [
|
||||
{
|
||||
label: '区间总里程',
|
||||
value: `${formatKm(summary.totalMileageKm)} km`,
|
||||
detail: `${summary.vehicleCount.toLocaleString()} 辆车,${mileageRangeText}。`,
|
||||
action: '复制摘要',
|
||||
color: 'blue' as const,
|
||||
disabled: false,
|
||||
onClick: () => copyStatisticsSummary()
|
||||
},
|
||||
{
|
||||
label: '闭合状态',
|
||||
value: closureStatus,
|
||||
detail: closureActionText,
|
||||
action: '发布审计',
|
||||
color: closureStatusColor,
|
||||
disabled: false,
|
||||
onClick: () => copyPublishAudit()
|
||||
},
|
||||
{
|
||||
label: '异常记录',
|
||||
value: `${anomalyRows.length.toLocaleString()} 条`,
|
||||
detail: anomalyRows[0]
|
||||
? `${anomalyRows[0].plate || anomalyRows[0].vin} / ${anomalyRows[0].date}`
|
||||
: '当前明细没有异常标记。',
|
||||
action: '复制决策',
|
||||
color: anomalyRows.length > 0 ? 'orange' as const : 'green' as const,
|
||||
disabled: false,
|
||||
onClick: () => copyMileageDecision()
|
||||
},
|
||||
{
|
||||
label: '下一步',
|
||||
value: mileageDeliveryState,
|
||||
detail: mileageDeliveryState === '可交付' ? '可以进入客户交付、BI复核或导出。' : '先补齐闭合、覆盖、异常或在线影响证据。',
|
||||
action: '查看证据',
|
||||
color: mileageDeliveryColor,
|
||||
disabled: !currentVehicleKeyword || (!onOpenHistory && !onOpenRaw),
|
||||
onClick: () => {
|
||||
if (currentVehicleKeyword && onOpenHistory) {
|
||||
onOpenHistory({ keyword: currentVehicleKeyword, protocol: currentProtocol, dateFrom: filters.dateFrom ?? '', dateTo: filters.dateTo ?? '' });
|
||||
return;
|
||||
}
|
||||
if (currentVehicleKeyword && onOpenRaw) {
|
||||
onOpenRaw({ keyword: currentVehicleKeyword, protocol: currentProtocol, dateFrom: filters.dateFrom ?? '', dateTo: filters.dateTo ?? '', includeFields: 'true' });
|
||||
return;
|
||||
}
|
||||
copyMileageDeliveryPackage();
|
||||
}
|
||||
}
|
||||
];
|
||||
const mileageDeliveryNavigation = [
|
||||
{
|
||||
title: '确认统计口径',
|
||||
@@ -1533,6 +1583,34 @@ export function Mileage({
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
<section className="vp-mileage-reconciliation-conclusion" aria-label="里程对账结论">
|
||||
<div className="vp-mileage-reconciliation-conclusion-summary">
|
||||
<Space wrap>
|
||||
<Tag color="blue">里程对账结论</Tag>
|
||||
<Tag color={mileageDeliveryColor}>{mileageDeliveryState}</Tag>
|
||||
</Space>
|
||||
<Typography.Title heading={5} style={{ margin: 0 }}>
|
||||
先回答客户这段时间跑了多少、闭合是否通过、异常是否需要复核,再进入轨迹、历史和导出。
|
||||
</Typography.Title>
|
||||
</div>
|
||||
<div className="vp-mileage-reconciliation-conclusion-grid">
|
||||
{mileageReconciliationConclusionItems.map((item) => (
|
||||
<button
|
||||
key={item.label}
|
||||
type="button"
|
||||
className="vp-mileage-reconciliation-conclusion-item"
|
||||
disabled={item.disabled}
|
||||
onClick={item.onClick}
|
||||
aria-label={`里程对账结论 ${item.label} ${item.value} ${item.action}`}
|
||||
>
|
||||
<Tag color={item.color}>{item.label}</Tag>
|
||||
<strong>{item.value}</strong>
|
||||
<span>{item.detail}</span>
|
||||
<em>{item.action}</em>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
<section className="vp-mileage-reconciliation-desk" aria-label="客户里程对账台">
|
||||
<div className="vp-mileage-reconciliation-summary">
|
||||
<Space wrap>
|
||||
|
||||
Reference in New Issue
Block a user