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: 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