Commit Graph

63 Commits

Author SHA1 Message Date
kkfluous
9f3b134007 fix: 筛选面板改为fixed定位,桌面端右侧浮动不受容器限制
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 所有筛选面板统一fixed定位,不依赖父容器overflow
- 移动端: 上下留白居中,可滚动
- 桌面端: 右侧浮动,max-h-[80vh]可滚动,确认按钮始终可见

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:58:32 +08:00
kkfluous
c20ac11ed7 fix: 筛选面板桌面端改为向上展开,加滚动防止底部遮挡
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 桌面端sm:top-full改为sm:bottom-full,面板从按钮上方弹出
- 加max-h和overflow-auto,内容过多时可滚动
- 移动端保持固定居中

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:57:31 +08:00
kkfluous
fd0b94175d fix: 客户运营统计业务负责人按部门编号排序
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
部门顺序:业务一部→二部→三部→五部→六部→公务车,
与部门Tab排序一致,负责人按deptData顺序排列。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:54:54 +08:00
kkfluous
66ea340a73 feat: 业务负责人下拉按部门分组显示
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 部门Tab和客户Tab的业务负责人下拉用optgroup按部门分组
- 顺序:部门名称作为组标题,组内显示该部门的负责人列表
- 部门排序与部门Tab一致(业务一部→二部→...→公务车)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:52:35 +08:00
kkfluous
258def4fdd feat: 库存筛选"车型名称"改为二级选择"车型→批次"
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 新增车型下拉(4.5T普货/冷链/18T/49T/挂车/其他)
- 批次下拉根据所选车型联动过滤,显示该车型下的具体型号
- 切换车型时自动清空批次选择
- 筛选标签栏对应更新:车型/批次

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:51:01 +08:00
kkfluous
96219d95b6 fix: 所有"业务员"改为"业务负责人"
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:49:01 +08:00
kkfluous
9d0b305218 feat: 出勤率数据源切换为tab_truck_remote_sync_realtime_info
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- dept-stats和/list的attendance过滤改为查询realtime表的day_mileage
- day_mileage>0为出勤,=0为闲置
- 移除旧的ln_vehicle_day_mileage依赖
- 前端恢复出勤率/出勤/闲置的数据显示和下钻功能

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:48:10 +08:00
kkfluous
cae508a70a fix: 一级菜单仅客户名称用模糊搜索,其他改回select下拉
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 库存-车型名称、客户-业务负责人改回原生select
- 仅区域筛选和客户筛选的"客户名称"保留SearchSelect模糊搜索
- 弹窗内车牌搜索保留SearchSelect(二级页面)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:44:19 +08:00
kkfluous
8863039869 fix: 筛选面板删除X关闭按钮,底部加确认按钮点击后关闭
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 库存/区域/客户三个筛选面板移除X图标
- 底部增加"确认"按钮,点击后关闭面板
- 移除背景遮罩点击关闭,只能通过确认按钮关闭

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:41:10 +08:00
kkfluous
e85792a237 feat: 自定义SearchSelect组件,支持下拉+模糊搜索+iOS兼容
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 新增SearchSelect组件:输入框可打字模糊过滤,下拉列表点击选择
- 客户名称、业务负责人、车型名称、车牌号码使用SearchSelect
- 短选项列表(区域/城市/品牌/部门/业务员)保持原生select
- 点击外部自动关闭下拉,已选中项高亮,无匹配显示提示
- iOS Safari完全兼容(不依赖datalist)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:38:15 +08:00
kkfluous
28dcab771f fix: 所有筛选统一为select下拉,修复iOS不支持datalist
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 客户名称、业务负责人、车型名称、车牌号码全部从input+datalist
  改为select下拉,iOS Safari完全兼容
- 弹窗快速搜索也改为select
- 所有过滤逻辑统一为精确匹配(select值)
- 样式统一:所有筛选控件使用相同的select样式

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:33:53 +08:00
kkfluous
f4cf5d1cb6 fix: useMemo移到early return之前,修复hooks顺序错误
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
React要求hooks在每次渲染中顺序一致,不能在条件return之后调用。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:30:07 +08:00
kkfluous
454b2f0913 perf: useMemo优化所有派生数据,解决页面操作卡顿
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 所有filter/unique/grouped派生数据包裹useMemo,避免每次渲染重算
- 库存筛选、客户筛选、区域筛选、弹窗筛选的派生列表全部memoize
- 饼图数据提取为customerPieData useMemo,不再inline IIFE
- 水印文本memoize,仅lastUpdate变化时重算
- 预计减少每次交互的JS执行时间80%+

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:27:39 +08:00
kkfluous
4e859423ee fix: 库存/区域/客户统计卡片加min-h-[420px]防止筛选后高度缩减
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
筛选后列表数据减少导致卡片高度缩小,筛选面板显示不全。
给三个统计卡片加最小高度,确保筛选面板始终有足够空间。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:21:06 +08:00
kkfluous
0aac364069 fix: 修复区域筛选面板多余closing tag导致的编译错误
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:18:34 +08:00
kkfluous
5a5d9b509b fix: 筛选面板移动端改为固定居中显示,避免被遮挡
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
库存/区域/客户三个筛选面板在移动端从absolute改为fixed居中,
桌面端保持原有absolute popover样式。移动端增加关闭按钮。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:17:37 +08:00
kkfluous
d56011ab8b fix: 移动端型号badge(资产/库存/运营)增加点击下钻
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:12:20 +08:00
kkfluous
2626bf2aa7 fix: 库存统计口径统一包含Inventory+Abnormal
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
inventory-stats端点只过滤status=Inventory,但/list的category=Inventory
包含Inventory+Abnormal,导致统计数和下钻列表不一致。统一为两者都包含。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:11:48 +08:00
kkfluous
1b34049196 fix: 库存区域下钻增加category:Inventory,与统计值一致
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
点击型号的库存区域数字(浙/粤/京/新/其)缺少Inventory过滤,
导致显示全部车辆而非仅库存。桌面端和移动端都已修复。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:09:34 +08:00
kkfluous
0e21c3157d fix: 弹窗所在地"其他"显示为"对接中"
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 22:55:01 +08:00
kkfluous
0eb4485af4 fix: 库存批次改为车型名称、区域待交车数量始终显示
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 库存统计:移除批次筛选(原显示contractNo),batch字段改为model
- 区域Tab:待交车和库存数量即使为0也显示数字,移除|| ''和if守卫
- 桌面端和移动端的pendingCount/inventory全部始终显示

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 22:49:57 +08:00
kkfluous
24b66f68b5 fix: 出勤率/出勤/闲置显示为-(数据接入中),移动端隐藏标题
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 部门Tab顶部汇总、桌面表格、移动端卡片的出勤率/出勤/闲置
  全部显示为"-",移除点击下钻(数据未就绪)
- 移动端隐藏"羚牛氢能车辆资产"标题

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 20:28:25 +08:00
kkfluous
ba6f595591 fix: 总运营卡片增加挂靠数量显示(挂X)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 20:22:25 +08:00
kkfluous
8472f22f1e fix: 出勤率改为当天计算(当天出勤数/总运营数)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
之前用近30天activeDays/totalDays计算,现改为:
当天里程>0的车辆数 / 部门总运营车辆数 × 100%

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 20:17:09 +08:00
kkfluous
8727dc36ab fix: 部门出勤/闲置下钻改为基于当日里程区分
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 后端/list新增attendance参数(active/idle),查询当日里程表区分
  出勤(mileage>0)和闲置(mileage=0),仅对Operating车辆生效
- 前端部门Tab出勤/闲置点击改用attendance:'active'/'idle'替代
  原来错误的category:'Operating'/'Inventory'
- 修复department='公务车'过滤:匹配departmentName为null的车辆
- 前端API层新增attendance参数传递

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 20:01:58 +08:00
kkfluous
29d295fceb fix: 总库存下钻改用category=Inventory,包含在库+异动状态
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
之前用status=Inventory只匹配在库,现改用category=Inventory
匹配Inventory+Abnormal,与统计口径一致。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 19:53:57 +08:00
kkfluous
cab26a207a fix: 部门统计未分配部门改为显示"公务车",排序放最后
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 19:51:21 +08:00
kkfluous
3e3546f6ac fix: 恢复弹窗条件表格、筛选改为下拉+搜索混合、删除月列
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 恢复弹窗条件判断:customer源用13列详情表格(删除月列),
  其他源用简洁表格(车牌/品牌/车型/所在地)
- 保留w-max和whitespace-nowrap修复移动端水平滚动
- 筛选控件:枚举值少的用select下拉(区域/城市/品牌/部门/
  车型/批次/业务员),名称类用input+datalist支持模糊搜索
  (客户名称/业务负责人/车牌/库存车型)
- 客户详情表格删除"月"列(原显示contractNo,无实际意义)
- 恢复模糊匹配:车牌搜索和客户/负责人筛选用includes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 19:49:40 +08:00
kkfluous
93a6c7df1c 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>
2026-03-28 19:33:44 +08:00
kkfluous
f6a4884ad1 fix: category=Inventory包含Abnormal状态,与统计口径一致
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:49:06 +08:00
kkfluous
e7ef773bc8 fix: 新增下钻支持、移动端库存区域下钻加category:Inventory
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:46:57 +08:00
kkfluous
b779e6b29c fix: 顶部卡片加点击下钻,部门移动端改为总资产/运营中/闲置中
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:40:59 +08:00
kkfluous
02ead246d2 fix: 移动端部门卡片改为总运营/出勤/闲置三列布局
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:39:45 +08:00
kkfluous
e38484d384 fix: 客户展开详情改为业务经理卡片,移动端资产汇总适配原型
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:38:45 +08:00
kkfluous
f3fbb7116c fix: 移动端区域车型下钻改用vehicleType参数
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:32:35 +08:00
kkfluous
dd01671d9e fix: 区域运营移动端数据、下钻支持城市/车型、网页标题
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 移动端区域运营改用regionData真实数据(去掉Math.floor模拟)
- 区域/城市/车型行数字全部支持点击下钻
- 后端/list支持按车型大类过滤(如4.5T含普货+冷链)
- 网页标题改为"羚牛氢能车辆资产"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:28:46 +08:00
kkfluous
d9568f767a feat: 添加全屏水印(羚牛氢能-时间戳)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:19:03 +08:00
kkfluous
2ba25427de feat: tab导航、recharts图表、库存统计、出勤率里程、区域城市下钻、数据一致性修复
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 新增tab导航(总览/按部门/按区域/按客户)+ 移动端底部导航
- 新增recharts柱状图(区域分布)和饼图(客户分布)
- 新增库存统计模块(按区域/按车型,筛选面板)
- 对接ln_vehicle_day_mileage表实现出勤率和日均里程
- 区域运营支持区域→城市→车型三级下钻
- 修复ownership取字段错误(改用truck_rent_status)
- 修复部门统计闲置定义(当日无行驶里程)
- 修复区域图表"其他"重复问题(后端Top N合并)
- 修复城市名空值降级(resolveCity取province)
- 修复下钻数据不一致(统一category/vehicleType参数)
- 扩展/list端点支持大区过滤和未分配匹配
- 所有筛选改为searchable datalist

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:09:18 +08:00
kkfluous
709e6d4238 feat: add tab navigation, recharts charts, adapt to latest prototype
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 17:06:42 +08:00
kkfluous
1ced9ac1ea feat: convert all filters to searchable dropdowns with datalist
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 16:44:26 +08:00
kkfluous
629451c13d feat: add inventory statistics section, adapt to latest prototype
- Add GET /api/vehicles/inventory-stats endpoint that groups inventory vehicles by macro-region, city, brand, type, model, and batch
- Add RegionalInventoryStats type and fetchInventoryStats API function
- Add full inventory statistics section with region/model tabs, filters, desktop table, and mobile views
- Add modal filters (plate number, model, brand, location search) to vehicle detail modal
- Update modal header to support title field for contextual naming

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 16:24:39 +08:00
kkfluous
d6ac1044fe fix: replace modal with prototype version, extend /list API fields
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 15:28:12 +08:00
kkfluous
752208da02 fix: replace 3 operations sections with exact prototype code
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 15:09:19 +08:00
kkfluous
df1ab64c97 fix: match prototype UI 1:1 for dept/region/customer sections
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 19:36:41 +08:00
kkfluous
f051e3f5aa feat: add customer operations statistics section
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 18:27:40 +08:00
kkfluous
17f2222e52 feat: add region operations statistics section
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 18:24:54 +08:00
kkfluous
4cac404f49 feat: add department operations statistics section
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 18:22:00 +08:00
kkfluous
b4fdbd14a7 feat: add state, data loading, and helpers for 3 new modules
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 18:18:20 +08:00
kkfluous
01a64431dc feat: add frontend types and API client for dept/region/customer stats
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 18:15:07 +08:00
kkfluous
73d5afde5c feat: add dept/region/customer stats APIs and extend /list filters
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 18:13:44 +08:00