chore: 移出误纳的前端暂存文件(仅提交5934/5936)
这个提交包含在:
父节点
4c683d0358
当前提交
a890c12997
@ -1,70 +0,0 @@
|
||||
---
|
||||
schema: "hl-changelog/v2"
|
||||
ticket: "frontend"
|
||||
title: "确认执行页「车·师傅」多段/已派槽位显示空白:单段分支读 UI 选中态 props 而非执行段数据"
|
||||
consumer: "admin"
|
||||
change_type: "前端缺陷"
|
||||
author: "wx(GIT)"
|
||||
backend_status: "not_required"
|
||||
gateway_status: "not_required"
|
||||
frontend_status: "pending"
|
||||
frontend_owner: "mmg"
|
||||
frontend_ref: ""
|
||||
target_release: ""
|
||||
verified_at: ""
|
||||
status_note: "后端零改动。已用测试服真实 API 核实(订单 26-3698,看板 GET /admin/fleet/board/orders/2086270138171994114):activeAssignments 返回 1 条完整执行段(vehiclePlate=蒙A-H7777 / vehicleModel=丰田汉兰达 / vehicleSeats=7 / driverName=阿拉坦 / driverPhone=135****5019 / startDate=08-17 / endDate=08-19),父层 confirmationAssignments 即取自该数据。根因在前端 Step4Confirm.vue:confirmationSegments.length<=1 时走单段分支,读的是父层 vehicle/driver props(= AssignModal 的 selVehicleObj/selDriverObj,useVehicleDriverPicker 的 UI 当前选中态),用户未做改派选择时为空 → 显示空白。应对单段分支也 fallback 到 confirmationSegments[0](或直接统一走 segments 分支)。"
|
||||
updated_at: "2026-08-12"
|
||||
base: "dev-v3"
|
||||
---
|
||||
|
||||
# 确认执行页「车·师傅」多段/已派槽位显示空白(前端)
|
||||
|
||||
> **页面**:车务管理 → 派单看板 → 订单派车弹窗 → Step4「确认执行」→「车 · 师傅」区
|
||||
> **后端**:本条**零改动**。下面结论来自测试服真实 API(订单 26-3698)。
|
||||
|
||||
---
|
||||
|
||||
## 一、现象
|
||||
|
||||
确认执行页(Step4)「车 · 师傅」区显示空白/不全:车辆「· · 座」、师傅「·」,明明该槽位已派 1 车 3 天。
|
||||
|
||||
## 二、后端已排除(数据完整)
|
||||
|
||||
`GET /admin/fleet/board/orders/2086270138171994114` → `activeAssignments` 返回 **1 条聚合执行段**:
|
||||
|
||||
```json
|
||||
{
|
||||
"vehiclePlate": "蒙A-H7777",
|
||||
"vehicleModel": "丰田汉兰达",
|
||||
"vehicleSeats": 7,
|
||||
"driverName": "阿拉坦",
|
||||
"driverPhone": "135****5019",
|
||||
"serviceDate": null,
|
||||
"startDate": "2026-08-17",
|
||||
"endDate": "2026-08-19"
|
||||
}
|
||||
```
|
||||
|
||||
(单槽位聚合整段,startDate~endDate=3 天。字段完整,非空。)
|
||||
|
||||
## 三、根因(前端)
|
||||
|
||||
`AssignModal.vue` 把 `confirmationAssignments`(= `activeAssignments`)作为 `:assignments` 传给 `Step4Confirm.vue`,同时传 `:vehicle="selVehicleObj"` `:driver="selDriverObj"`。
|
||||
|
||||
`Step4Confirm.vue` 渲染逻辑(`confirmationSegments` computed):
|
||||
|
||||
- **多段分支**(`confirmationSegments.length > 1`):遍历 `confirmationSegments` 正确展示。
|
||||
- **单段分支**(`length <= 1`,当前场景命中):读父层 props `vehicle?.plate / driver?.name` —— 即 `selVehicleObj/selDriverObj`(`useVehicleDriverPicker` 的 **UI 当前选中态**)。用户直接从已派状态进入 Step4 未做改派选择时,这两个对象为 **null** → 显示空白。
|
||||
|
||||
即:单段执行时错误依赖了「本次 UI 是否选中过车辆/司机」,而不是回退到服务端已有的执行段数据。
|
||||
|
||||
## 四、修复建议
|
||||
|
||||
- 单段分支也改为读 `confirmationSegments[0]`(vehiclePlate/vehicleModel/vehicleSeats + driverName/driverPhone),与多段分支同一数据源;
|
||||
- 或直接去掉单段分支,统一走 `confirmationSegments` 遍历(数据已由父层聚合好)。
|
||||
|
||||
## 五、验收
|
||||
|
||||
- [ ] 已派 1 车 3 天的槽位进 Step4,「车·师傅」显示 蒙A-H7777 · 丰田汉兰达 · 7座 / 阿拉坦 · 135****5019
|
||||
- [ ] 未做任何改派选择时也能正确回显(不再依赖 UI 选中态)
|
||||
- [ ] 多段接续(同一槽位不同天不同车/司机)仍按段展示不受影响
|
||||
正在加载...
x
在新工单中引用
屏蔽一个用户