feat(platform): add customer report cadence
This commit is contained in:
@@ -1044,6 +1044,44 @@ export function History({
|
||||
onClick: () => copyScheduledHistoryReportPlan()
|
||||
}
|
||||
];
|
||||
const customerReportCadenceItems = [
|
||||
{
|
||||
title: '每日运营复盘',
|
||||
value: `${locations.total.toLocaleString()} 位置`,
|
||||
detail: '每天交付位置历史、轨迹覆盖、里程统计和质量提示,便于运营早会复盘。',
|
||||
action: '日报导出',
|
||||
color: locations.total > 0 ? 'green' as const : 'orange' as const,
|
||||
disabled: locations.items.length === 0,
|
||||
onClick: () => exportLocations()
|
||||
},
|
||||
{
|
||||
title: '每周客户对账',
|
||||
value: '周报计划',
|
||||
detail: '沉淀固定车辆范围、时间窗和交付物,按周给客户对账和复核。',
|
||||
action: '周报计划',
|
||||
color: 'blue' as const,
|
||||
disabled: false,
|
||||
onClick: () => copyScheduledHistoryReportPlan()
|
||||
},
|
||||
{
|
||||
title: '临时问题解释',
|
||||
value: deliveryState,
|
||||
detail: '遇到定位、里程或断链质疑时,复制交付说明并附上证据链接。',
|
||||
action: '复制说明',
|
||||
color: deliveryStateColor,
|
||||
disabled: false,
|
||||
onClick: () => copyDeliveryPackage()
|
||||
},
|
||||
{
|
||||
title: '字段模板复用',
|
||||
value: selectedFieldCount > 0 ? `${selectedFieldCount.toLocaleString()} 字段` : '待配置',
|
||||
detail: '复用字段裁剪模板,减少 CSV 体积并保证客户拿到稳定字段。',
|
||||
action: '字段配置',
|
||||
color: selectedFieldCount > 0 || rawFieldRows.length > 0 ? 'green' as const : 'orange' as const,
|
||||
disabled: false,
|
||||
onClick: () => openQueryTab('fields')
|
||||
}
|
||||
];
|
||||
const customerHistoryQuestions = [
|
||||
{
|
||||
question: '这辆车这段时间在哪里?',
|
||||
@@ -1532,6 +1570,40 @@ export function History({
|
||||
</div>
|
||||
</Card>
|
||||
) : null}
|
||||
{mode === 'query' ? (
|
||||
<Card bordered title="客户报表交付节奏" style={{ marginTop: 16 }}>
|
||||
<div className="vp-history-report-cadence">
|
||||
<div className="vp-history-report-cadence-summary">
|
||||
<Space wrap>
|
||||
<Tag color="blue">报表节奏</Tag>
|
||||
<Tag color={deliveryStateColor}>{deliveryState}</Tag>
|
||||
<Tag color={currentVehicleKeyword ? 'green' : 'grey'}>{currentVehicleKeyword ? '单车交付' : '批量交付'}</Tag>
|
||||
</Space>
|
||||
<Typography.Title heading={5} style={{ margin: 0 }}>参考 Fleetio、Samsara、Geotab 的报表能力,把导出从一次性下载升级为可复用的交付节奏。</Typography.Title>
|
||||
<Typography.Text type="secondary">
|
||||
日报用于运营复盘,周报用于客户对账,临时导出用于问题解释,字段模板用于稳定复用。
|
||||
</Typography.Text>
|
||||
</div>
|
||||
<div className="vp-history-report-cadence-grid">
|
||||
{customerReportCadenceItems.map((item) => (
|
||||
<button
|
||||
key={item.title}
|
||||
type="button"
|
||||
className="vp-history-report-cadence-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>
|
||||
) : null}
|
||||
{mode === 'query' ? (
|
||||
<Card bordered title="客户历史问题" style={{ marginTop: 16 }}>
|
||||
<div className="vp-history-question-board">
|
||||
|
||||
Reference in New Issue
Block a user