refactor(cost-center): 精简成本中心,人工成本以 SKU 配置为唯一真源

- 删除「成本项目」「成本版本」「成本预览」三个 Tab:成本项只有 3 条系统内置,版本金额只是快照挂载点
- 新增只读「发单价格」面板,仅在接单平台来源显示,改价仍走接单模板后同步
- 成本预览改为弹窗,从成本异常行和订单详情「查成本」进入;人工单显示 SKU 配置成本并禁止生成快照
- 成本异常新增按原因聚合摘要接口,列表支持 reason/since 筛选,默认只看近 24 小时
- 迁移 111:把 sys_manual_service 的历史 ¥88 全局版本清零;预估同步与成本缺失判定排除 manual_actual
This commit is contained in:
yml2213
2026-10-24 16:07:25 +08:00
parent 9f2206430f
commit 956ef5d695
16 changed files with 904 additions and 1124 deletions
@@ -6,6 +6,7 @@ import type {
CostCenterOverview,
CostException,
CostExceptionListResult,
CostExceptionSummary,
CostItem,
CostItemListResult,
CostPreview,
@@ -213,6 +214,10 @@ export function fetchAdminCostExceptions(params?: Record<string, unknown>) {
return apiGet<CostExceptionListResult>('/api/v1/admin/cost-center/exceptions', params)
}
export function fetchAdminCostExceptionSummary(params?: Record<string, unknown>) {
return apiGet<CostExceptionSummary>('/api/v1/admin/cost-center/exceptions/summary', params)
}
export function resolveAdminCostException(exceptionId: number, payload: Record<string, unknown>) {
return apiPatch<{ exception: CostException }>(
`/api/v1/admin/cost-center/exceptions/${exceptionId}`,