diff --git a/changelogs/2026-03/2026-03-20_todo_display_fix.md b/changelogs/2026-03/2026-03-20_todo_display_fix.md new file mode 100644 index 0000000..8819820 --- /dev/null +++ b/changelogs/2026-03/2026-03-20_todo_display_fix.md @@ -0,0 +1,46 @@ +# 待办事项显示修正:使用 todoLabel 而非 todoType + +> **类型**: fix +> **日期**: 2026-03-20 +> **涉及页面**: 管理端 - 订单详情页 - 待办事项区域 + +--- + +## 问题 + +待办事项区域显示了英文编码(如 `INSURANCE`、`CONTRACT`、`ARRANGE_ROOM`),应该显示中文标签。 + +## 原因 + +前端使用了 `todoType` 字段(英文编码)来展示,应该使用 `todoLabel` 字段(中文标签)。 + +## 修正方式 + +订单详情接口 `todos` 数组中每个待办对象包含以下字段: + +| 字段 | 类型 | 用途 | 示例 | +|------|------|------|------| +| todoType | String | 编码(用于逻辑判断,**不要用于显示**) | `INSURANCE` | +| todoLabel | String | 中文标签(**用于页面展示**) | `待配置保险` | +| status | String | 状态编码 | `PENDING` / `COMPLETED` | +| sequence | Integer | 排序序号 | 1, 2, 3, 4, 5 | + +### todoType → todoLabel 对照表 + +| todoType | todoLabel | +|----------|-----------| +| INSURANCE | 待配置保险 | +| CONTRACT | 待签订合同 | +| ARRANGE_ROOM | 待安排住宿 | +| ARRANGE_VEHICLE | 待安排车辆 | +| CONFIRM_CHECKLIST | 待确认清单 | +| PROCESS_REFUND | 紧急:需退款处理 | + +### 前端改动 + +将待办事项显示的字段从 `todo.todoType` 改为 `todo.todoLabel`: + +```diff +- {{ todo.todoType }} ++ {{ todo.todoLabel }} +```