Files
one-pipe-system/openspec/changes/add-iot-card-recall-line-input/proposal.md
luo f5730089a1
All checks were successful
构建并部署前端到测试环境 / deploy (push) Successful in 54s
fix: 一行一个ICCID批量回收
2026-10-29 16:18:45 +08:00

24 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Change: 批量回收支持一行一个 ICCID
用户已确认并完成实施;验证结果见 `tasks.md`。
## Why
IoT 卡管理的批量回收目前只能从表格勾选 ICCID、输入号段范围或使用筛选条件。已有卡号清单的用户需要直接粘贴每行一个 ICCID,并复用现有 ICCID 列表的回收接口。
## What Changes
- 在“批量回收”弹窗的选卡方式中增加“一行一个ICCID”,选择后显示带标签和输入提示的多行文本框,沿用现有 Element Plus 表单样式。
- 按换行拆分输入,去除每行首尾空白并忽略空行;ICCID 始终按字符串处理,不作数字转换。不增加额外的卡号长度或格式限制。
- 提交时仍调用 `POST /api/admin/iot-cards/standalone/recall`,使用 `selection_type: "list"` 和 `iccids: string[]`,不向接口发送新的选卡方式或文本框字段。
- 没有有效输入时展示校验提示,不提交请求;切换方式后按当前方式构建参数,关闭再打开时清空手工输入。
- 取消批量回收入口必须勾选表格的限制。有勾选时仍默认“ICCID列表”,无勾选时默认“一行一个ICCID”;原有列表模式仍校验必须有勾选项。
- 保持号段范围、筛选条件、权限、备注、结果展示和刷新逻辑不变;不修改其他批量操作。
## Impact
- Affected specs: `iot-card-management`
- Affected code: `src/views/asset-management/iot-card-management/index.vue`
- Backend impact: 无;复用 `CardService.recallStandaloneCards` 及其现有列表请求结构。
- Related changes: `update-batch-range-count-hints-formatting`(保留其号段数量提示)。