fujian_water_biz_doc/docs/evidence/bugfix/2026-07-14-counter-topup-detail.md

75 lines
2.2 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.

# 柜台收费预存款详情修复验证
## 根因
柜台收费页面的预存款展示行使用支付记录 ID但“详情”按钮统一调用账单详情接口 `/business/charge/get`。支付记录 ID 被误作账单 ID 后,接口无法返回对应预存业务数据,账单详情弹窗中的字段全部显示为 `--`
## 修复
-`displayChargeType` 分流普通账单与预存款详情。
- 预存款不再调用账单详情接口,改用专用弹窗展示客户、支付和余额快照。
- 历史预存记录保留 `lastDeposit``deposit`、预存金额、收费时间和收费方式。
- 刚办理成功的预存优先使用重新查询到的持久化记录;查询未恢复记录时使用成功响应降级展示。
- 普通账单继续使用原 `/business/charge/get` 详情链路。
- 金额或余额为 `0` 时显示 `0.00`,仅空值显示 `--`
## TDD 证据
### RED
命令:
```bash
node --test tests/operatingCharges/counterChargingPersistentTopup.test.mjs
```
结果:退出码 `1`,共 7 个测试,原有 4 个通过,新增 3 个失败。失败分别证明缺少预存款详情分流、专用字段与余额映射、零值格式化。
### GREEN
命令:
```bash
node --test tests/operatingCharges/counterChargingPersistentTopup.test.mjs
```
结果:退出码 `0`7/7 通过。
## 回归验证
### 柜台收费既有测试
```bash
pnpm test:counter-charging
```
结果:退出码 `0`4/4 通过。
### 组合测试
```bash
node --test tests/operatingCharges/counterChargingPersistentTopup.test.mjs tests/operatingCharges/counterChargingInventory.test.mjs
```
结果:退出码 `0`11/11 通过。
### 前端构建
```bash
NODE_OPTIONS=--max-old-space-size=8192 pnpm build:dev
```
结果:退出码 `0`,输出 `Build successful. Please see dist directory`。构建过程中存在项目既有的 SVG symbolId 和 Rollup 注释警告,但未导致构建失败。
## 代码基线
- 前端分支:`fix/counter-topup-detail`
- RED 测试提交:`2aeecaa8`
- 余额快照提交:`83142c72`
- 专用详情实现提交:`c6941001`
- 验证日期2026-07-14
## 约束
按用户要求,未运行 `vue-tsc``pnpm ts:check` 或任何会调用 `vue-tsc` 的命令。