统一个人测算入参与重启脚本进程识别

This commit is contained in:
wkc
2026-04-10 15:04:56 +08:00
parent f001047d0c
commit fa0b446699
46 changed files with 903 additions and 87 deletions

View File

@@ -0,0 +1,110 @@
# Personal Pricing Collateral Optional Frontend Implementation Plan
> **For agentic workers:** REQUIRED: Use superpowers:executing-plans to implement this plan in this repository. Do not use subagents. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** 让个人利率定价新增流程中的“抵质押类型”改为非必填,企业流程保持不变。
**Architecture:** 维持现有个人新增弹窗的数据结构、字段名称和提交报文不变,只移除前端表单对 `collType` 的必填限制。通过前端源码断言测试和页面联调共同验证“字段可空提交”的行为,避免扩大到企业流程或后端接口。
**Tech Stack:** Vue 2、Element UI、npm、Node.js 断言脚本
---
### Task 1: 固化个人新增流程“抵质押类型非必填”的前端测试
**Files:**
- Modify: `ruoyi-ui/tests/personal-create-input-params.test.js`
- Inspect: `ruoyi-ui/src/views/loanPricing/workflow/components/PersonalCreateDialog.vue`
- [ ] **Step 1: 核对当前个人新增弹窗中的 `collType` 规则**
Run: `sed -n '150,220p' ruoyi-ui/src/views/loanPricing/workflow/components/PersonalCreateDialog.vue`
Expected: 能看到 `rules.collType` 里仍有 `required: true`
- [ ] **Step 2: 先写失败断言**
`ruoyi-ui/tests/personal-create-input-params.test.js` 中增加断言,明确个人新增弹窗不应再包含:
```js
required: true, message: "请选择抵质押类型"
```
- [ ] **Step 3: 运行测试确认红灯**
Run: `npm --prefix ruoyi-ui run test:personal-create-input-params`
Expected: FAIL提示个人新增弹窗仍将抵质押类型设为必填。
### Task 2: 移除个人新增弹窗中 `collType` 的必填限制
**Files:**
- Modify: `ruoyi-ui/src/views/loanPricing/workflow/components/PersonalCreateDialog.vue`
- [ ] **Step 1: 删除 `collType` 的必填校验**
把:
```js
collType: [
{required: true, message: "请选择抵质押类型", trigger: "change"}
]
```
移除,使个人表单规则中不再声明 `collType` 为必填。
- [ ] **Step 2: 保持其它字段与提交逻辑不变**
确认以下内容不改动:
```js
collType: undefined,
collThirdParty: false
```
以及提交时的:
```js
collThirdParty: this.form.collThirdParty ? '1' : '0'
```
- [ ] **Step 3: 重新运行测试确认转绿**
Run: `npm --prefix ruoyi-ui run test:personal-create-input-params`
Expected: PASS输出包含 `personal create input params assertions passed`
### Task 3: 页面联调并补实施记录
**Files:**
- Create: `docs/implementation-reports/2026-04-10-personal-pricing-collateral-optional-frontend.md`
- [ ] **Step 1: 启动前端页面**
Run: `npm --prefix ruoyi-ui run dev`
Expected: 前端本地开发服务启动成功,可访问新增个人利率定价流程页面。
- [ ] **Step 2: 浏览器确认页面行为**
联调确认:
- 个人新增弹窗“抵质押类型”字段可为空
- 不选择“抵质押类型”时其余必填项填完整仍可点击提交
- 企业新增弹窗规则不受影响
- [ ] **Step 3: 停止本次测试启动的前端进程**
Run: `ps -ef | rg 'vue-cli-service serve|npm --prefix ruoyi-ui run dev'`
Expected: 仅停止本次联调启动的前端进程。
- [ ] **Step 4: 编写实施记录**
实施记录至少包含:
```markdown
- 本次仅调整个人利率定价新增流程
- 个人新增弹窗已移除抵质押类型必填校验
- 企业新增流程未改动
- 已执行前端断言测试与页面联调验证
```
- [ ] **Step 5: 核对实施记录保存路径**
Run: `ls docs/implementation-reports/2026-04-10-personal-pricing-collateral-optional-frontend.md`
Expected: 文件位于仓库 `docs/implementation-reports` 目录。