fix: 对齐原型UI差异、修复所有下钻维度、统一弹窗详情表格
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

- 部门Tab:移除多余section header,标签改为总运营车辆/出勤/闲置,
  表格移除日均里程列,按业务负责人改为按业务员,所有行加点击下钻
- 部门下钻增加department维度,后端/list接口新增department过滤参数
- 区域Tab:总资产下钻移除错误的category:Operating,库存改为Inventory,
  补全source:region和title,图表高度h-72改h-64
- 客户Tab:4.5T/冷链点击增加isColdChain区分,移动端合计badge加下钻,
  所有点击补全title
- 筛选面板:移除区域和客户的"完成筛选"按钮
- 所有manager下钻补全title字段
- 弹窗统一使用14列完整详情表格(月/部门/负责人/品牌/车型/归属/客户/
  车牌/状态/提车时间/到期时间/区域/离到期/签约公司),移除source条件
- 表格加whitespace-nowrap和w-max,移动端水平滚动不换行

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-03-28 19:33:44 +08:00
parent f6a4884ad1
commit 93a6c7df1c
3 changed files with 484 additions and 709 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -35,6 +35,7 @@ export async function fetchVehicleList(params: {
customer?: string;
isColdChain?: string;
isTrailer?: string;
department?: string;
}): Promise<VehicleListItem[]> {
const query = new URLSearchParams();
if (params.batch) query.set('batch', params.batch);
@@ -47,6 +48,7 @@ export async function fetchVehicleList(params: {
if (params.customer) query.set('customer', params.customer);
if (params.isColdChain) query.set('isColdChain', params.isColdChain);
if (params.isTrailer) query.set('isTrailer', params.isTrailer);
if (params.department) query.set('department', params.department);
return fetchJson<VehicleListItem[]>(`${BASE}/list?${query.toString()}`);
}

View File

@@ -857,7 +857,7 @@ const VEHICLE_TYPE_FILTERS: Record<string, (v: Vehicle) => boolean> = {
// GET /api/vehicles/list — flat list with optional filters
app.get('/list', async (c) => {
const vehicles = await getVehicles();
const { batch, model, location, status, category, vehicleType, manager, customer, isColdChain, isTrailer } = c.req.query();
const { batch, model, location, status, category, vehicleType, manager, customer, isColdChain, isTrailer, department } = c.req.query();
let filtered = vehicles;
if (vehicleType) {
@@ -902,6 +902,9 @@ app.get('/list', async (c) => {
if (customer) {
filtered = filtered.filter((v) => customer === '未分配客户' ? !v.customerName : v.customerName === customer);
}
if (department) {
filtered = filtered.filter((v) => v.departmentName === department);
}
if (isColdChain !== undefined) {
const wantCold = isColdChain === 'true';
filtered = filtered.filter((v) => wantCold ? v.model.includes('冷链') : !v.model.includes('冷链'));