From 8dd2323197f44e228101942eb001eaf3388fe4a4 Mon Sep 17 00:00:00 2001 From: API Changelog Bot Date: Mon, 4 May 2026 10:13:22 +0800 Subject: [PATCH] =?UTF-8?q?frontend:=20=E5=90=88=E5=90=8C=E6=96=B9?= =?UTF-8?q?=E6=A1=88=E8=A1=A8=E5=8D=95=20=E7=AE=A1=E8=BE=96=E6=B3=95?= =?UTF-8?q?=E9=99=A2=20=E2=86=92=20=E4=BB=B2=E8=A3=81=E5=A7=94=E5=91=98?= =?UTF-8?q?=E4=BC=9A=20(#1638=20=E9=85=8D=E5=A5=97=E9=80=9A=E7=9F=A5=20@mm?= =?UTF-8?q?g)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ..._contract_scheme_tribunal_replace_court.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 changelogs/2026-05/04_frontend_contract_scheme_tribunal_replace_court.md diff --git a/changelogs/2026-05/04_frontend_contract_scheme_tribunal_replace_court.md b/changelogs/2026-05/04_frontend_contract_scheme_tribunal_replace_court.md new file mode 100644 index 0000000..f2ce748 --- /dev/null +++ b/changelogs/2026-05/04_frontend_contract_scheme_tribunal_replace_court.md @@ -0,0 +1,99 @@ +--- +date: 2026-05-04 +type: frontend +module: contract-scheme +priority: high +backend_pr: "#1638" +notify: ["@mmg"] +status: pending +--- + +# 合同方案表单: 管辖法院 → 仲裁委员会(请前端改) + +## 背景 + +12301 合同 `dispute` 段: +- `disputeResolution=1` 诉讼 → 用 **管辖法院** (litigationCourt) +- `disputeResolution=2` 仲裁 → 用 **仲裁委员会** (tribunalName) + +后端 PR #1638 已让两个字段都从 nacos `contract.platform.agencies[].litigationCourt / tribunalName` 兜底(默认"海拉尔区人民法院" / "呼伦贝尔仲裁委员会"),**前端不填也能正常生成合同**。 + +## 问题(前端目前的状态) + +`/contract/scheme` 编辑弹窗里只有一个**管辖法院**输入框(截图中红框): +``` +管辖法院 [海拉尔区人民法院] 8 / 100 +``` + +用户要求: +1. **去掉"管辖法院"输入框**(走 nacos 兜底,不让运营每次填) +2. **新增"仲裁委员会"输入框**(仅 `disputeResolution=2 仲裁` 时显示,可选;不填走 nacos 兜底) + +## 改动清单 + +### 1. 编辑/新建合同方案弹窗 + +| 字段 | 当前 | 目标 | +|------|------|------| +| 管辖法院输入框 (绑 `litigationCourt`) | 始终显示 | **删除** | +| 仲裁委员会输入框 (绑 `tribunalName`) | 不存在 | **新增**,仅当 `disputeResolution === 2` 显示 | + +```vue + + + + + + + + + +``` + +### 2. 提交逻辑 + +- 提交时仍带 `tribunalName` 和 `litigationCourt` 两个字段(后端 VO 都接收) +- `litigationCourt` 前端无输入入口 → 提交时**始终传 null**(让后端走 nacos 兜底) +- `tribunalName` 用户没填 → 传 null(后端走 nacos 兜底) + +### 3. 列表展示(如有显示这两列) + +- "管辖法院" 列 → 删掉或改成只展示,从 `agencyInfo` 里读 +- "仲裁委员会" 列 → 直接读 `tribunalName`,空值显示 "-"(后端运行时合同会用 nacos 默认) + +## 后端不需要改 + +后端字段名、API 行为、合同 PDF 渲染**全部不变**。前端只动表单 UI + 提交时填啥。 + +## 接口示例 + +**POST /admin/contract-scheme** 和 **PUT /admin/contract-scheme/{id}** + +```json +{ + "schemeName": "全国旅游监管平台", + "platform": "12301", + "disputeResolution": 2, + "tribunalName": "呼伦贝尔仲裁委员会", // ← 仅仲裁时填,可空 + "litigationCourt": null, // ← 永远 null,让 nacos 兜底 + "...其他字段不变" +} +``` + +## 测试 + +- [ ] 选"诉讼" → 不显示"仲裁委员会"输入框 +- [ ] 选"仲裁" → 显示"仲裁委员会"输入框(可空) +- [ ] 仲裁时不填 tribunalName 提交 → 保存成功,生成合同 PDF 显示"呼伦贝尔仲裁委员会" +- [ ] 仲裁时填"内蒙古仲裁委员会"提交 → 保存成功,生成合同 PDF 显示自定义值 + +@mmg 麻烦尽快改一下,截图里的"管辖法院"直接删掉换成仲裁委员会即可。