fujian_water_biz_doc/docs/evidence/bugfix/2026-07-14-counter-charge-then-topup-continuation.md

2.3 KiB
Raw Blame History

柜台收费缴费后连续预存修复验证

根因

单客户账单收费成功后,页面保留收讫展示行,并将其标记为 displayChargeState: 'settled';同时已缴账单仍保留在 selectedChargeRows 中。

noArrearsTopupMode 要求不存在 settled 展示行,因此收费按钮持续禁用,用户无法在缴清账单后立即继续办理预存。保留的选中行还会让上一次账单金额继续参与金额计算。

修复

  • 单客户普通账单收费成功后,将收讫行标记为只读 history 展示。
  • 保留 payState: 1payStateName: '收讫'displayChargeType: 'bill',确保账单不可重复选择且详情链路不变。
  • 收费成功后清空 selectedChargeRows,由现有金额同步逻辑清空上一次实收金额。
  • 页面无待缴账单且仅存在历史展示行时,自动进入 noArrearsTopupMode,后续提交调用预存接口。
  • 集收号收费成功后的 settled 展示和选中状态保持原样,未改变其批量收费约束。

TDD 证据

RED

node --test tests/operatingCharges/counterChargingPersistentTopup.test.mjs

结果:退出码 19 个测试中 7 个通过、2 个失败。失败分别证明单客户收费成功后未切换为历史展示,以及已缴账单未从选中数据中清除。

GREEN

node --test tests/operatingCharges/counterChargingPersistentTopup.test.mjs

结果:退出码 09/9 通过。

回归验证

柜台收费既有测试

pnpm test:counter-charging

结果:退出码 04/4 通过。

组合测试

node --test tests/operatingCharges/counterChargingPersistentTopup.test.mjs tests/operatingCharges/counterChargingInventory.test.mjs

结果:退出码 013/13 通过。

前端构建

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 测试提交:188ba232
  • 连续预存修复提交:3c5d6545
  • 验证日期2026-07-14

约束

按用户要求,未运行 vue-tscpnpm ts:check 或任何会调用 vue-tsc 的命令。