feat: order-export,generation,status
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m45s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m45s
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
# Change: 新增资产业务状态和世代编号字段
|
||||
|
||||
## Why
|
||||
|
||||
后端已在 IoT 卡和设备的资产详情接口中新增 `asset_status`(业务状态)和 `generation`(资产世代编号)字段,前端需要展示这些字段供运营人员查看。
|
||||
|
||||
## What Changes
|
||||
|
||||
- 资产信息详情新增 `asset_status` 和 `asset_status_name` 字段,展示业务状态(1:在库, 2:已销售, 3:已换货, 4:已停用)
|
||||
- 资产信息详情新增 `generation` 字段,展示资产世代编号(初始值1,每次换货转新后+1)
|
||||
- 相关格式化函数更新以支持新字段
|
||||
|
||||
## Impact
|
||||
|
||||
- Affected specs:
|
||||
- `asset-information`
|
||||
- Affected code:
|
||||
- `src/views/asset-management/asset-information/types.ts` - AssetInfo 接口
|
||||
- `src/views/asset-management/asset-information/components/BasicInfoCard.vue` - 详情展示
|
||||
- `src/views/asset-management/asset-information/composables/useAssetFormatters.ts` - 格式化函数
|
||||
@@ -0,0 +1,34 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Asset Status and Generation Display
|
||||
|
||||
The admin frontend SHALL display `asset_status`, `asset_status_name`, and `generation` fields in the asset information detail page for both IoT cards and devices.
|
||||
|
||||
#### Scenario: Display IoT card asset status and generation
|
||||
|
||||
- **GIVEN** 用户打开 IoT 卡资产信息详情页
|
||||
- **WHEN** 后端返回 `asset_status`、`asset_status_name` 和 `generation` 字段
|
||||
- **THEN** 页面 MUST display the asset status with appropriate tag type
|
||||
- **AND** 页面 MUST display the generation number
|
||||
|
||||
#### Scenario: Display device asset status and generation
|
||||
|
||||
- **GIVEN** 用户打开设备资产信息详情页
|
||||
- **WHEN** 后端返回 `asset_status`、`asset_status_name` 和 `generation` 字段
|
||||
- **THEN** 页面 MUST display the asset status with appropriate tag type
|
||||
- **AND** 页面 MUST display the generation number
|
||||
|
||||
### Requirement: Asset Status Formatting
|
||||
|
||||
The admin frontend SHALL format asset status values with appropriate labels and tag types.
|
||||
|
||||
#### Scenario: Map asset status to display name
|
||||
|
||||
- **GIVEN** `asset_status` value is 1
|
||||
- **THEN** display name MUST be "在库"
|
||||
- **WHEN** `asset_status` value is 2
|
||||
- **THEN** display name MUST be "已销售"
|
||||
- **WHEN** `asset_status` value is 3
|
||||
- **THEN** display name MUST be "已换货"
|
||||
- **WHEN** `asset_status` value is 4
|
||||
- **THEN** display name MUST be "已停用"
|
||||
@@ -0,0 +1,28 @@
|
||||
## 1. Proposal Review
|
||||
|
||||
- [ ] 1.1 确认 `asset_status` 字段含义:1:在库, 2:已销售, 3:已换货, 4:已停用
|
||||
- [ ] 1.2 确认 `generation` 字段含义:资产世代编号,初始值1,每次换货转新后+1
|
||||
|
||||
## 2. Type Updates
|
||||
|
||||
- [ ] 2.1 在 `AssetInfo` 接口中添加 `asset_status?: number`
|
||||
- [ ] 2.2 在 `AssetInfo` 接口中添加 `asset_status_name?: string`
|
||||
- [ ] 2.3 在 `AssetInfo` 接口中添加 `generation?: number`
|
||||
|
||||
## 3. Formatter Functions
|
||||
|
||||
- [ ] 3.1 在 `useAssetFormatters` 中添加 `getAssetStatusName` 函数(如果不存在)
|
||||
- [ ] 3.2 在 `useAssetFormatters` 中添加 `getAssetStatusType` 函数(如果不存在)
|
||||
|
||||
## 4. BasicInfoCard Component
|
||||
|
||||
- [ ] 4.1 在卡信息区域添加「业务状态」展示行
|
||||
- [ ] 4.2 在卡信息区域添加「资产世代」展示行
|
||||
- [ ] 4.3 在设备信息区域添加「业务状态」展示行
|
||||
- [ ] 4.4 在设备信息区域添加「资产世代」展示行
|
||||
|
||||
## 5. Verification
|
||||
|
||||
- [ ] 5.1 验证 IoT 卡详情页正确显示业务状态和世代编号
|
||||
- [ ] 5.2 验证设备详情页正确显示业务状态和世代编号
|
||||
- [ ] 5.3 验证格式化函数正确处理各状态值
|
||||
Reference in New Issue
Block a user