From 004d8143038c205c201a8d36e40446fa2f3d158b Mon Sep 17 00:00:00 2001 From: API Changelog Bot Date: Fri, 24 Apr 2026 19:06:58 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=90=8C=E6=AD=A5=20tab=20team-report?= =?UTF-8?q?=20prefill=203=20=E5=AD=97=E6=AE=B5=20+=20agencyOptions=20?= =?UTF-8?q?=E4=B8=8B=E5=8F=91=20(PR=20#1380)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...fix_order-v2_team-report-prefill-fields.md | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 changelogs/2026-04/24_fix_order-v2_team-report-prefill-fields.md diff --git a/changelogs/2026-04/24_fix_order-v2_team-report-prefill-fields.md b/changelogs/2026-04/24_fix_order-v2_team-report-prefill-fields.md new file mode 100644 index 0000000..eb2a791 --- /dev/null +++ b/changelogs/2026-04/24_fix_order-v2_team-report-prefill-fields.md @@ -0,0 +1,58 @@ +# 同步 tab 团队填报 prefill 修 3 处字段 + 新增按钮组 label 下发 + +**日期**: 2026-04-24 +**PR**: #1380 (dev) +**Issue**: #1377 +**类型**: fix + feat (API 扩字段, 前端零改动即可接入 label) +**服务**: hl-order-service-v2 + +--- + +## 摘要 + +订单详情 → 同步 tab (team-report) → 基础信息卡片, 修 3 个 prefill 问题: + +1. **旅行社编码按钮组显英文 code** → 后端 prefill 返回值新增 `agencyOptions: [{code, name}]`, 前端按钮组 label 走 `name` 显示中文, value 继续走 `code` +2. **「团号」填整串订单号** → 修为短号 (`order_info.group_code`, 订单头显示的 `5448`), 不再是 `HL20260423175303-5448` +3. **「出发市」固定呼和浩特市** → 从 `product_snapshot.itinerary[0].gatherPlace.fullPath` + 最后一天 `dismissalPlace.fullPath` 拆出省/市 + +## 受影响接口 + +| 接口 | 方法 | 变化 | +|---|---|---| +| `GET /admin/team-report/prefill/{orderId}` | GET | `teamId` 改用 `order_info.group_code`; `sourceProvince/sourceCity/destinationProvince/destinationCity` 改从 `itinerary[i].gatherPlace.fullPath` 解析; **新增 `agencyOptions: List<{code, name}>` + `businessTypeOptions: List<{code, name}>` 两个只读字段** | + +## TeamReportFormDTO 新增字段 + +```json +{ + "agencyCode": "hulai", + "teamId": "5448", + "sourceProvince": "内蒙古自治区", + "sourceCity": "呼伦贝尔市", + "destinationProvince": "内蒙古自治区", + "destinationCity": "兴安盟", + + "agencyOptions": [ + {"code": "hulai", "name": "内蒙古呼籁国际旅行社有限公司"}, + {"code": "qianshou", "name": "内蒙古呼籁山河国际旅行社有限公司"}, + {"code": "hulai-wenlu", "name": "内蒙古呼籁文旅投资开发集团有限公司"} + ], + "businessTypeOptions": [ + {"code": 2, "name": "国内游组团"}, + {"code": 6, "name": "入境接待"}, + {"code": 7, "name": "国内接待"} + ] +} +``` + +## 前端改动建议 + +- 旅行社编码按钮组: 原硬编码 `['hulai','qianshou','hulai-wenlu']` → 改用 `agencyOptions`, `label=name` `value=code` +- 业务类型按钮组: 原硬编码 `[2,6,7]` → 改用 `businessTypeOptions` +- 其他字段 (`teamId` / `sourceCity` / `destinationCity` 等) 接口签名不变, 前端只需要展示后端返回值即可, 无需任何改动 + +## 行为不变的地方 + +- `agencyCode` / `businessType` 字段类型与原先一致 (前者 String code, 后者 Integer) +- 保存/提交接口 (`/save`、`/submit`、`/cancel`、`/status`) 无改动