让凭证数组与套餐作废任务进入可联调状态
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 7m52s

Constraint: 后端订单套餐作废接口使用 /api/admin/order-package-invalidate-tasks,上传
  purpose 只能使用 attachment。
  Rejected: 继续提交逗号拼接凭证字符串 | 新提交路径必须使用 string[],历史字符串只做读取归一化。
  Confidence: high
  Scope-risk: broad
  Directive: 新增订单套餐作废权限时需同时配置菜单 URL 与
  order_package_invalidate_task:create/detail 按钮权限。
  Tested: bun run build;development 真实后端联调上传、创建、列表、详情通过;复机接口未触发。
  Not-tested: 未逐一手工覆盖所有历史凭证数据、全部角色权限组合和所有文件扩展名预览
This commit is contained in:
2026-06-23 09:50:12 +08:00
parent ebf9739f06
commit 0c3065f970
71 changed files with 4264 additions and 240 deletions

View File

@@ -8,7 +8,7 @@
- 退款详情中直接展示退款凭证图片,点击图片后可放大预览。
- 创建退款申请的订单号搜索/选择请求必须增加 `payment_status: 2` 条件。
- 退款管理凭证上传支持多张图片,并将所有上传后的文件 key 以英文逗号拼接后放入 `refund_voucher_key` 参数。
- 退款管理凭证上传支持多张图片,并按 ADR-0001 将所有上传后的文件 key 以 `string[]` 放入 `refund_voucher_key` 参数。
## Impact
@@ -17,4 +17,4 @@
- Refund detail voucher display and image preview behavior
- Create refund request order selector query params
- Refund management voucher upload component and submit payload
- Breaking changes: Refund voucher payload field for this flow remains `refund_voucher_key` and supports one or more uploaded image keys separated by English commas.
- Breaking changes: Refund voucher payload field for this flow remains `refund_voucher_key`, but new submissions use `string[]`. Legacy single-key strings and comma-separated strings are read-only compatibility inputs for display normalization.

View File

@@ -75,7 +75,7 @@ The system SHALL allow the requested refund amount in create refund application
### Requirement: Refund Management Multi Image Voucher Upload
The system SHALL allow multiple refund voucher images in any browser-recognized image format to be uploaded in refund management and SHALL submit all uploaded file keys in the `refund_voucher_key` parameter as a comma-separated string.
The system SHALL allow multiple refund voucher images in any browser-recognized image format to be uploaded in refund management and SHALL submit all uploaded file keys in the `refund_voucher_key` parameter as a `string[]`. The earlier comma-separated-string submission convention is superseded by ADR-0001; legacy single-key strings and comma-separated strings are only normalized when reading existing records for display.
#### Scenario: Submit multiple uploaded voucher images
@@ -83,9 +83,9 @@ The system SHALL allow multiple refund voucher images in any browser-recognized
- **AND** 用户上传了多张退款凭证图片
- **WHEN** 每张图片上传成功并返回文件 key
- **AND** 用户提交表单
- **THEN** 系统 MUST join the uploaded file keys with English commas
- **AND** 系统 MUST put the joined string into `refund_voucher_key`
- **AND** `refund_voucher_key` MUST look like `attachments/a.jpg,attachments/b.jpg` when multiple files exist
- **THEN** 系统 MUST put the uploaded file keys into `refund_voucher_key` as a `string[]`
- **AND** `refund_voucher_key` MUST look like `["attachments/a.jpg", "attachments/b.jpg"]` when multiple files exist
- **AND** 系统 MUST NOT submit a comma-separated voucher string for new records
#### Scenario: Upload any image format refund voucher without frontend size limit
@@ -99,7 +99,7 @@ The system SHALL allow multiple refund voucher images in any browser-recognized
- **GIVEN** 用户正在退款管理中创建或提交退款相关记录
- **AND** 用户只上传了一张退款凭证图片
- **WHEN** 用户提交表单
- **THEN** 系统 MUST put that single file key into `refund_voucher_key` without a trailing comma
- **THEN** 系统 MUST put that single file key into `refund_voucher_key` as a one-item `string[]`
#### Scenario: Block submission without required voucher image

View File

@@ -4,7 +4,7 @@
- [x] 1.2 Add click-to-preview/enlarge behavior for refund detail voucher images.
- [x] 1.3 Add `payment_status: 2` to the order number search/select request used by create refund application.
- [x] 1.4 Update refund management voucher upload to allow multiple image uploads.
- [x] 1.5 Submit uploaded voucher file keys joined by English commas in `refund_voucher_key`.
- [x] 1.5 Submit uploaded voucher file keys as `string[]` in `refund_voucher_key`; do not submit comma-separated strings for new records.
- [x] 1.6 Validate that at least one voucher image is uploaded before submission when voucher is required.
- [x] 1.7 Verify refund detail display, order selector filtering, and multi-image payload behavior.
- [x] 1.8 Allow requested refund amount `0` while blocking negative and over-actual amounts.