feat: 新增代理流水资产标识
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 7m11s

This commit is contained in:
sexygoat
2026-05-29 15:44:53 +08:00
parent f62a8d98a4
commit ad56b82944
6 changed files with 256 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
# Change: Add asset links to main wallet transactions
## Why
The agent fund overview detail drawer shows main wallet transaction records, but users cannot identify or navigate to the related asset for deductions tied to asset activity. The backend now returns `asset_identifier` from `GET /api/admin/shops/{shop_id}/main-wallet/transactions`, so the UI should expose it.
## What Changes
- Add an "资产标识" column to the "预充值钱包流水" table inside the agent fund overview commission detail drawer.
- Read and type the new `asset_identifier` response field from main wallet transaction rows.
- Render non-empty asset identifiers as clickable links that navigate to the asset information page for that identifier.
- Render empty asset identifiers as `-` and do not make them clickable.
## Impact
- Affected specs: `commission-management`
- Affected code:
- `src/types/api/commission.ts`
- `src/views/commission-management/agent-fund-overview/index.vue`
- Asset information route query handling is reused via `RoutesAlias.AssetInformation` and `identifier` search behavior.

View File

@@ -0,0 +1,25 @@
## ADDED Requirements
### Requirement: Main Wallet Transaction Asset Identifier Link
The agent fund overview commission detail drawer SHALL display the `asset_identifier` returned by `GET /api/admin/shops/{shop_id}/main-wallet/transactions` in the "预充值钱包流水" table as "资产标识" and allow users to navigate from that value to the asset information page.
#### Scenario: Display asset identifier in main wallet transactions
- **WHEN** a user opens an agent's commission detail drawer
- **AND** selects the "预充值钱包流水" tab
- **AND** a transaction row contains a non-empty `asset_identifier`
- **THEN** the table displays that value in a column labeled "资产标识"
- **AND** the value is visually presented as a clickable link
#### Scenario: Navigate to asset information from asset identifier
- **WHEN** a user clicks a non-empty "资产标识" value in the "预充值钱包流水" table
- **THEN** the system navigates to the asset information page
- **AND** the asset information page searches or loads using the clicked asset identifier
#### Scenario: Empty asset identifier is not clickable
- **WHEN** a main wallet transaction row has no `asset_identifier`
- **THEN** the "资产标识" column displays `-`
- **AND** no navigation action is available for that cell

View File

@@ -0,0 +1,13 @@
## 1. Implementation
- [x] 1.1 Add optional `asset_identifier` to `MainWalletTransactionItem`.
- [x] 1.2 Add an "资产标识" column to the agent fund overview detail drawer's "预充值钱包流水" table.
- [x] 1.3 Render `asset_identifier` as a clickable link when present and `-` when absent.
- [x] 1.4 Navigate clicks to the asset information page using the clicked asset identifier as the search query.
- [x] 1.5 Ensure the click does not trigger unrelated row/table interactions.
## 2. Verification
- [x] 2.1 Verify the changed Vue file with lint or equivalent available project checks.
- [ ] 2.2 Manually verify rows with `asset_identifier` display and navigate correctly.
- [ ] 2.3 Manually verify rows without `asset_identifier` display `-` and are not clickable.