feat: 卡/设备是否有生效套餐
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m19s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m19s
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# Change: 更新批量号段分配数量提示与格式化展示
|
||||
|
||||
## Why
|
||||
|
||||
IoT 卡管理中的“批量分配”和“批量回收”已经支持按号段范围提交,但当前在输入起止 ICCID 后不会提示本次将覆盖多少张卡,运营人员仍需手动换算,容易误判批量范围。
|
||||
|
||||
同时,现有“批量设置套餐系列绑定”和“批量设置设备套餐系列绑定”虽然已经展示派生数量提示,但大范围操作时直接显示原始整数,可读性不足。需要将这些数量统一为带千分号的展示格式。
|
||||
|
||||
## What Changes
|
||||
|
||||
- 为 IoT 卡管理中的“批量分配”对话框新增号段范围派生数量提示,文案与现有系列绑定场景保持一致。
|
||||
- 为 IoT 卡管理中的“批量回收”对话框新增号段范围派生数量提示,文案与现有系列绑定场景保持一致。
|
||||
- 将以下批量 range 提示中的数量统一为千分号格式展示,例如 `1,000`:
|
||||
- IoT 卡“批量分配”
|
||||
- IoT 卡“批量回收”
|
||||
- IoT 卡“批量设置套餐系列绑定”
|
||||
- 设备“批量设置设备套餐系列绑定”
|
||||
- 不调整后端接口、请求参数或返回结构,仅补充前端展示与交互约束。
|
||||
|
||||
## Impact
|
||||
|
||||
- Affected specs:
|
||||
- `iot-card-management`
|
||||
- `iot-card-series-binding`
|
||||
- `device-series-binding`
|
||||
- Affected code:
|
||||
- `src/views/asset-management/iot-card-management/index.vue`
|
||||
- `src/views/asset-management/device-list/index.vue`
|
||||
- Related changes:
|
||||
- `update-asset-carrier-status-and-range-allocation-hints`
|
||||
- `update-batch-series-binding-contract`
|
||||
@@ -0,0 +1,16 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Device Batch Series Binding Range Allocation Hint Formatting
|
||||
|
||||
The device batch series binding dialog SHALL render its derived device-range allocation-count hint using decimal thousands separators.
|
||||
|
||||
The displayed count MUST continue to map to the same accepted numeric range as `virtual_no_end - virtual_no_start + 1`.
|
||||
|
||||
#### Scenario: Format device batch series binding range count with thousands separators
|
||||
|
||||
- **GIVEN** 用户打开“批量设置设备套餐系列绑定”对话框
|
||||
- **AND** 用户选择 `selection_type="range"`
|
||||
- **WHEN** 用户输入一个有效设备号范围,且派生数量为 `1000`
|
||||
- **THEN** 对话框 MUST 显示 `共分配1,000台设备`
|
||||
- **AND** 对话框 MUST NOT 显示未分组的 `共分配1000台设备`
|
||||
- **AND** 当任一端点变化时,格式化后的数量 MUST 立即更新
|
||||
@@ -0,0 +1,53 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: IoT Card Batch Allocation Range Allocation Hint
|
||||
|
||||
The IoT card batch allocation dialog SHALL provide a derived allocation-count hint for ICCID range selection.
|
||||
|
||||
The hint MUST appear immediately below the `iccid_start` and `iccid_end` inputs when `selection_type="range"`.
|
||||
|
||||
The count MUST be computed with exact integer arithmetic as `iccid_end - iccid_start + 1` so that long ICCID values do not lose precision.
|
||||
|
||||
When displayed, the count MUST use decimal thousands separators, for example `1,000`.
|
||||
|
||||
#### Scenario: Show allocation count for a valid ICCID range in batch allocation
|
||||
|
||||
- **GIVEN** 用户打开“批量分配”对话框
|
||||
- **AND** 用户选择 `selection_type="range"`
|
||||
- **WHEN** 用户输入有效的 `iccid_start` 和 `iccid_end`,且计算结果为正整数
|
||||
- **THEN** 对话框 MUST 显示 `共分配xxx张卡`
|
||||
- **AND** `xxx` MUST 等于 `iccid_end - iccid_start + 1`
|
||||
- **AND** 当数量大于等于 `1000` 时,`xxx` MUST 使用千分号格式展示
|
||||
- **AND** 当任一端点变化时,提示 MUST 立即更新
|
||||
|
||||
#### Scenario: Hide allocation count for incomplete or invalid ICCID ranges in batch allocation
|
||||
|
||||
- **GIVEN** 用户选择 `selection_type="range"`
|
||||
- **WHEN** 任一起止 ICCID 为空、无法按整数计算,或计算结果小于 `1`
|
||||
- **THEN** 对话框 MUST NOT 显示误导性的数量提示
|
||||
|
||||
### Requirement: IoT Card Batch Recall Range Allocation Hint
|
||||
|
||||
The IoT card batch recall dialog SHALL provide a derived allocation-count hint for ICCID range selection.
|
||||
|
||||
The hint MUST appear immediately below the `iccid_start` and `iccid_end` inputs when `selection_type="range"`.
|
||||
|
||||
The count MUST be computed with exact integer arithmetic as `iccid_end - iccid_start + 1` so that long ICCID values do not lose precision.
|
||||
|
||||
When displayed, the count MUST use decimal thousands separators, for example `1,000`.
|
||||
|
||||
#### Scenario: Show allocation count for a valid ICCID range in batch recall
|
||||
|
||||
- **GIVEN** 用户打开“批量回收”对话框
|
||||
- **AND** 用户选择 `selection_type="range"`
|
||||
- **WHEN** 用户输入有效的 `iccid_start` 和 `iccid_end`,且计算结果为正整数
|
||||
- **THEN** 对话框 MUST 显示 `共分配xxx张卡`
|
||||
- **AND** `xxx` MUST 等于 `iccid_end - iccid_start + 1`
|
||||
- **AND** 当数量大于等于 `1000` 时,`xxx` MUST 使用千分号格式展示
|
||||
- **AND** 当任一端点变化时,提示 MUST 立即更新
|
||||
|
||||
#### Scenario: Hide allocation count for incomplete or invalid ICCID ranges in batch recall
|
||||
|
||||
- **GIVEN** 用户选择 `selection_type="range"`
|
||||
- **WHEN** 任一起止 ICCID 为空、无法按整数计算,或计算结果小于 `1`
|
||||
- **THEN** 对话框 MUST NOT 显示误导性的数量提示
|
||||
@@ -0,0 +1,16 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: IoT Card Batch Series Binding Range Allocation Hint Formatting
|
||||
|
||||
The IoT card batch series binding dialog SHALL render its derived ICCID range allocation-count hint using decimal thousands separators.
|
||||
|
||||
The displayed count MUST continue to be derived from exact integer arithmetic as `iccid_end - iccid_start + 1`.
|
||||
|
||||
#### Scenario: Format batch series binding range count with thousands separators
|
||||
|
||||
- **GIVEN** 用户打开“批量设置套餐系列绑定”对话框
|
||||
- **AND** 用户选择 `selection_type="range"`
|
||||
- **WHEN** 用户输入一个有效 ICCID 范围,且派生数量为 `1000`
|
||||
- **THEN** 对话框 MUST 显示 `共分配1,000张卡`
|
||||
- **AND** 对话框 MUST NOT 显示未分组的 `共分配1000张卡`
|
||||
- **AND** 当任一端点变化时,格式化后的数量 MUST 立即更新
|
||||
@@ -0,0 +1,10 @@
|
||||
## 1. Specification
|
||||
|
||||
- [x] 1.1 为 IoT 卡管理“批量分配”补充号段范围派生数量提示 requirement,并明确无效范围时不展示提示
|
||||
- [x] 1.2 为 IoT 卡管理“批量回收”补充号段范围派生数量提示 requirement,并明确无效范围时不展示提示
|
||||
- [x] 1.3 为 IoT 卡“批量设置套餐系列绑定”和设备“批量设置设备套餐系列绑定”补充千分号格式化 requirement
|
||||
- [x] 1.4 明确所有新增或既有的 `共分配` range 提示都使用统一的十进制千分位分组格式
|
||||
|
||||
## 2. Validation
|
||||
|
||||
- [x] 2.1 运行 `openspec validate update-batch-range-count-hints-formatting --strict`
|
||||
Reference in New Issue
Block a user