fix: 库存总数包含异动车辆,总计行改为累加计算
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

- getStats 的 inventory 统计包含 Inventory + Abnormal
- 总计行所有列改为从各车型数据累加,不再使用 SUMMARY

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-03-26 15:11:12 +08:00
parent d3c85a62e6
commit e4ffd027be
2 changed files with 10 additions and 10 deletions

View File

@@ -320,9 +320,9 @@ function getStats(list: Vehicle[], weeklyIds?: WeeklyTruckIds) {
const strIds = list.map((v) => String(v.id));
return {
total: list.length,
inventory: list.filter((v) => v.status === 'Inventory').length,
inventory: list.filter((v) => v.status === 'Inventory' || v.status === 'Abnormal').length,
inventoryRegions: getRegionCounts(
list.filter((v) => v.status === 'Inventory'),
list.filter((v) => v.status === 'Inventory' || v.status === 'Abnormal'),
REGIONS,
),
pending: list.filter((v) => v.status === 'Pending').length,