feat:代理现金余额不足100元展示、店铺业务员选择展示与筛选
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m34s

This commit is contained in:
luo
2026-07-20 12:17:02 +08:00
parent ca338dd345
commit e95dc8e4f5
12 changed files with 334 additions and 49 deletions

View File

@@ -8,9 +8,8 @@
- 在代理资金概况中展示现金余额、冻结金额和基于后端 `low_balance_warning` 的“现金余额不足100元”红色状态。
- 复用 `GET /api/admin/shops/fund-summary`,读取 `balance``frozen_balance``cash_available``low_balance_warning` 字段,金额统一按分转元展示。
- 复用通知列表与通知目标解析接口,实现低余额通知跳转到对应店铺资金页。
- 明确前端不得自行计算 100 元阈值,也不得展示阈值输入框。
- 不包含公共站内通知中心页面的实现改造。
- 不包含任何公共站内通知相关功能的实现改造。
## Impact
@@ -18,7 +17,6 @@
- Affected code:
- `src/types/api/commission.ts`
- `src/views/commission-management/agent-fund-overview/index.vue`
- 顶部通知抽屉相关通知跳转逻辑
- Out of scope:
- 公共站内通知中心页面的开发或改造
- 顶部通知抽屉、站内通知中心及其他公共站内通知功能的开发或改造
- 任意余额预警阈值配置能力

View File

@@ -36,25 +36,12 @@ The frontend SHALL read the low-balance display state exclusively from the `GET
- **THEN** 前端 MUST 读取 `balance``frozen_balance``cash_available``low_balance_warning`
- **AND** `low_balance_warning` MUST be the only source of truth for whether the warning is shown
### Requirement: Low Balance Notification Target Navigation
### Requirement: Public Notification Features Are Out Of Scope
The system SHALL allow users to navigate from low-balance notifications in the top notification drawer to the corresponding shop's fund overview page by reusing the notification list and notification target resolution APIs. Unauthorized targets SHALL follow the shared error-page behavior.
This change SHALL NOT add or modify top notification drawer, notification center, or any other public in-app notification feature.
#### Scenario: Navigate from low balance notification to shop fund overview
- **GIVEN** 用户在顶部通知抽屉中看到低余额通知
- **WHEN** 用户点击该通知
- **THEN** 前端 MUST 复用 `GET /api/admin/notifications/{id}/target` 解析跳转目标
- **AND** 系统 MUST 导航到对应店铺的资金页
#### Scenario: Handle unauthorized notification target
- **GIVEN** 用户点击低余额通知
- **WHEN** 通知目标页无权限访问或目标不可访问
- **THEN** 系统 MUST 按统一错误页处理
#### Scenario: Public notification center is out of scope
#### Scenario: Deliver low balance overview without notification changes
- **WHEN** 本次变更落地
- **THEN** 公共站内通知中心页面 MUST NOT be required for this change to be considered complete
- **AND** 顶部通知抽屉跳转能力仍 MUST be supported
- **THEN** 代理资金概况的低余额展示 MUST be available
- **AND** 顶部通知抽屉、站内通知中心及其他公共站内通知功能 MUST NOT be changed by this proposal

View File

@@ -1,22 +1,15 @@
## 1. API Contract
- [ ] 1.1 更新代理资金概况相关数据模型,补充 `balance``frozen_balance``cash_available``low_balance_warning` 字段读取。
- [ ] 1.2 复用 `GET /api/admin/notifications``GET /api/admin/notifications/{id}/target` 的既有通知接口,不新增站内通知中心专用接口。
- [x] 1.1 更新代理资金概况相关数据模型,补充 `balance``frozen_balance``cash_available``low_balance_warning` 字段读取。
## 2. Agent Fund Overview UI
- [ ] 2.1 在代理资金概况中展示现金余额、冻结金额,并统一按分转元格式化。
- [ ] 2.2 当 `low_balance_warning=true` 时展示“现金余额不足100元”红色状态。
- [ ] 2.3 不展示阈值输入框,不把信用额度计入预警文案,也不由前端自行计算余额阈值。
- [x] 2.1 在代理资金概况中展示现金余额、冻结金额,并统一按分转元格式化。
- [x] 2.2 当 `low_balance_warning=true` 时展示“现金余额不足100元”红色状态。
- [x] 2.3 不展示阈值输入框,不把信用额度计入预警文案,也不由前端自行计算余额阈值。
## 3. Notification Navigation
## 3. Verification
- [ ] 3.1 在顶部通知抽屉中支持低余额通知跳转到对应店铺资金页
- [ ] 3.2 当用户无目标页面权限或目标不可访问时,按统一错误页处理
- [ ] 3.3 明确公共站内通知中心页面不在本次实现范围内。
## 4. Verification
- [ ] 4.1 验证现金可用余额高于、等于、低于100元三种情况下的状态展示正确且仅由 `low_balance_warning` 控制。
- [ ] 4.2 验证通知跳转到对应店铺资金页成功,无权限时进入统一错误处理。
- [ ] 4.3 运行相关前端校验,并执行 `openspec validate update-agent-fund-low-balance-warning --strict`
- [ ] 3.1 验证现金可用余额高于、等于、低于100元三种情况下的状态展示正确且仅由 `low_balance_warning` 控制
- [x] 3.2 验证本次改动未引入公共站内通知相关功能
- [x] 3.3 运行相关前端校验,并执行 `openspec validate update-agent-fund-low-balance-warning --strict`