Files
loan-pricing/doc/implementation-report-2026-04-30-history-contract-radio-label.md

28 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 历史贷款合同单选异常文本修复实施记录
## 问题
- 历史贷款合同选择弹窗的选择列出现 `{ "cus...` 这类异常文本。
- 原因是 `el-radio` 使用整行对象 `scope.row` 作为 `label`Element UI 会把对象值渲染到单选文案区域。
## 修改
- `HistoryContractSelector.vue` 将单选绑定值从整行对象调整为 `selectedContractKey`
- 新增 `contractRadioValue(row, index)` 生成稳定单选值,优先使用历史贷款合同号。
- 保留 `selectedContract` 单独保存选中行对象,提交时仍向父组件返回完整合同记录。
- 隐藏单选组件内部 label 文案,选择列只展示单选圆点,不展示对象文本。
- `business-type-history-rate.test.js` 增加断言,禁止再出现 `:label="scope.row"`
## 验证
- 已执行并通过:
- `zsh -lic 'nvm use 14.21.3 >/dev/null && npm --prefix ruoyi-ui run test:business-type-history-rate'`
- 已启动后端和前端后使用 in-app browser 真实页面验证:
- 打开 `http://localhost:8080/index`
- 新增个人客户,选择业务种类 `存量转贷`
- 历史贷款合同选择弹窗正常展示客户内码、历史贷款合同号、历史贷款利率等字段。
- 选择列文本为空,不再出现 `{ "cus...` 或行对象 JSON 文本。
- 验证结果:`hasObjectText=false`
- 验证结束后已关闭测试弹窗。
- 验证结束后已停止本次启动的前端和后端进程,并确认 `8080``63310` 端口无监听。