feat: 退款充值换货列表提交人与审批摘要
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 7m20s

This commit is contained in:
luo
2026-07-22 18:37:41 +08:00
parent 7d3352038a
commit d5fd8ac564
20 changed files with 420 additions and 19 deletions

View File

@@ -0,0 +1,51 @@
## ADDED Requirements
### Requirement: Agent Recharge List Approval Summary Contract
The `GET /api/admin/agent-recharges` list-item contract SHALL support `submitter_name`, `approval_source`, `approval_status`, `approval_status_name`, `current_approver_summary`, `processing_status`, and `processing_status_name`.
#### Scenario: Receive agent recharge approval summary fields
- **GIVEN** 后台代理充值列表接口返回充值记录
- **WHEN** 前端解析列表响应
- **THEN** 代理充值列表项类型 MUST preserve all approval and processing summary fields
- **AND** 页面 MUST NOT request an individual approval-detail API to populate the row
### Requirement: Agent Recharge List Approval And Processing Display
The agent recharge list SHALL display `提交人`, `审批状态`, `当前审批人摘要`, and `业务处理状态` as distinct columns based on backend summary fields.
#### Scenario: Display recharge with no approval source
- **GIVEN** 代理充值记录的 `approval_source=none`
- **WHEN** 页面渲染代理充值列表行
- **THEN** `审批状态` MUST display `-`
- **AND** `当前审批人摘要` MUST display `-`
#### Scenario: Display legacy recharge approval read-only
- **GIVEN** 代理充值记录的 `approval_source=legacy`
- **WHEN** 页面渲染代理充值列表行
- **THEN** `审批状态` MUST display `历史审批`
- **AND** 页面 MUST NOT add an approval operation button for that historical approval
#### Scenario: Display WeCom recharge approval summary
- **GIVEN** 代理充值记录的 `approval_source=wecom`
- **WHEN** 页面渲染代理充值列表行
- **THEN** `审批状态` MUST display backend `approval_status_name`
- **AND** `当前审批人摘要` MUST display backend `current_approver_summary`
- **AND** `业务处理状态` MUST independently display backend `processing_status_name`
#### Scenario: View long recharge approver summary
- **GIVEN** 代理充值记录的 `current_approver_summary` exceeds its table cell width
- **WHEN** 页面渲染当前审批人摘要列
- **THEN** 摘要 MUST be visually truncated in the cell
- **AND** 用户 MUST be able to view the complete backend text on hover
#### Scenario: Paginate recharges without per-row approval requests
- **WHEN** 用户切换代理充值列表页码或刷新列表
- **THEN** 页面 MUST use the agent recharge list API response for approval summaries
- **AND** 页面 MUST NOT issue approval-detail requests per recharge row

View File

@@ -0,0 +1,51 @@
## ADDED Requirements
### Requirement: Exchange List Approval Summary Contract
The `GET /api/admin/exchanges` list-item contract SHALL support `submitter_name`, `approval_source`, `approval_status`, `approval_status_name`, `current_approver_summary`, `processing_status`, and `processing_status_name`.
#### Scenario: Receive exchange approval summary fields
- **GIVEN** 后台换货列表接口返回换货记录
- **WHEN** 前端解析列表响应
- **THEN** 换货列表项类型 MUST preserve all approval and processing summary fields
- **AND** 页面 MUST NOT request an individual approval-detail API to populate the row
### Requirement: Exchange List Approval And Processing Display
The exchange management list SHALL display `提交人`, `审批状态`, `当前审批人摘要`, and `业务处理状态` as distinct columns based on backend summary fields.
#### Scenario: Display exchange with no approval source
- **GIVEN** 换货记录的 `approval_source=none`
- **WHEN** 页面渲染换货列表行
- **THEN** `审批状态` MUST display `-`
- **AND** `当前审批人摘要` MUST display `-`
#### Scenario: Display legacy exchange approval read-only
- **GIVEN** 换货记录的 `approval_source=legacy`
- **WHEN** 页面渲染换货列表行
- **THEN** `审批状态` MUST display `历史审批`
- **AND** 页面 MUST NOT add an approval operation button for that historical approval
#### Scenario: Display WeCom exchange approval summary
- **GIVEN** 换货记录的 `approval_source=wecom`
- **WHEN** 页面渲染换货列表行
- **THEN** `审批状态` MUST display backend `approval_status_name`
- **AND** `当前审批人摘要` MUST display backend `current_approver_summary`
- **AND** `业务处理状态` MUST independently display backend `processing_status_name`
#### Scenario: View long exchange approver summary
- **GIVEN** 换货记录的 `current_approver_summary` exceeds its table cell width
- **WHEN** 页面渲染当前审批人摘要列
- **THEN** 摘要 MUST be visually truncated in the cell
- **AND** 用户 MUST be able to view the complete backend text on hover
#### Scenario: Paginate exchanges without per-row approval requests
- **WHEN** 用户切换换货列表页码或刷新列表
- **THEN** 页面 MUST use the exchange list API response for approval summaries
- **AND** 页面 MUST NOT issue approval-detail requests per exchange row

View File

@@ -0,0 +1,51 @@
## ADDED Requirements
### Requirement: Refund List Approval Summary Contract
The `GET /api/admin/refunds` list-item contract SHALL support `submitter_name`, `approval_source`, `approval_status`, `approval_status_name`, `current_approver_summary`, `processing_status`, and `processing_status_name`.
#### Scenario: Receive refund approval summary fields
- **GIVEN** 后台退款列表接口返回退款记录
- **WHEN** 前端解析列表响应
- **THEN** 退款列表项类型 MUST preserve all approval and processing summary fields
- **AND** 页面 MUST NOT request an individual approval-detail API to populate the row
### Requirement: Refund List Approval And Processing Display
The refund management list SHALL display `提交人`, `审批状态`, `当前审批人摘要`, and `业务处理状态` as distinct columns based on backend summary fields.
#### Scenario: Display refund with no approval source
- **GIVEN** 退款记录的 `approval_source=none`
- **WHEN** 页面渲染退款列表行
- **THEN** `审批状态` MUST display `-`
- **AND** `当前审批人摘要` MUST display `-`
#### Scenario: Display legacy refund approval read-only
- **GIVEN** 退款记录的 `approval_source=legacy`
- **WHEN** 页面渲染退款列表行
- **THEN** `审批状态` MUST display `历史审批`
- **AND** 页面 MUST NOT add an approval operation button for that historical approval
#### Scenario: Display WeCom refund approval summary
- **GIVEN** 退款记录的 `approval_source=wecom`
- **WHEN** 页面渲染退款列表行
- **THEN** `审批状态` MUST display backend `approval_status_name`
- **AND** `当前审批人摘要` MUST display backend `current_approver_summary`
- **AND** `业务处理状态` MUST independently display backend `processing_status_name`
#### Scenario: View long refund approver summary
- **GIVEN** 退款记录的 `current_approver_summary` exceeds its table cell width
- **WHEN** 页面渲染当前审批人摘要列
- **THEN** 摘要 MUST be visually truncated in the cell
- **AND** 用户 MUST be able to view the complete backend text on hover
#### Scenario: Paginate refunds without per-row approval requests
- **WHEN** 用户切换退款列表页码或刷新列表
- **THEN** 页面 MUST use the refund list API response for approval summaries
- **AND** 页面 MUST NOT issue approval-detail requests per refund row