Files
one-pipe-system/openspec/changes/update-asset-import-popup-and-phone-display/proposal.md
luo 9a6761e01d
All checks were successful
构建并部署前端到测试环境 / deploy (push) Successful in 54s
fix: some
2026-09-20 17:29:09 +08:00

40 lines
3.0 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: 统一资产导入交互并补充关联手机号展示
## Why
当前 CSV 解绑导入使用独立的弹窗和原生上传实现,与批量导入 IoT 卡的导入体验不一致,也没有复用项目已有的上传组件。H5 运营弹窗配置仍把“资产详情”作为新增配置的可选页面,列表请求失败时还会重复弹出错误提示;核销申请状态文案、设备/IoT 卡列表及资产详情中的关联手机号展示也需要与后端返回契约和现有视觉规范保持一致。
## What Changes
- 将 CSV 解绑导入弹窗调整为与“批量导入 IoT 卡”一致的导入说明、模板入口、表单布局、提交状态和底部操作区。
- CSV 文件上传改用现有通用上传组件,限定单个 `.csv` 文件并沿用 `phone_unbind_import` 上传用途;上传中禁止重复提交,上传结果和校验错误在弹窗内可见。
- 在新增/编辑运营弹窗配置的 `PAGE_OPTIONS` 中隐藏“资产详情”选项;历史配置若已命中 `asset_detail` 仍可正常展示,不因隐藏选项而丢失或改写历史数据。
- 移除 H5 运营弹窗配置列表加载 `try/catch` 中的本地 `ElMessage.error(normalizeApiError(error).message || '获取运营弹窗配置列表失败')`,由公共请求层统一负责错误提示,页面保留必要的日志和加载状态收尾。
- 将核销申请的“已撤销或已关闭”统一改为“已关闭”,同步状态选项、映射和类型注释中的用户可见文案。
- 设备管理和 IoT 卡管理列表消费并展示接口返回的 `associated_phones`,多个手机号使用统一分隔符,无关联时显示稳定占位符;按后端资产数据范围展示完整手机号,不在前端脱敏或截断。
- 在资产信息基础信息区域的“关联手机号”标签前补充与其他字段一致的图标样式,并保持空数组的占位展示。
## Impact
- Affected specs:
- `phone-asset-association-management`
- `h5-popup-configuration-management`
- `employee-collection`
- `device-management`
- `iot-card-management`
- `asset-information`
- Affected code:
- `src/views/asset-management/phone-asset-association/index.vue`
- `src/components/business/VoucherUpload.vue`(仅在需要扩展 CSV 上传参数时调整)
- `src/views/settings/h5-popup-configuration/index.vue`
- `src/views/finance/employee-collection/employeeCollectionDisplay.ts`
- `src/views/asset-management/device-list/index.vue`
- `src/views/asset-management/iot-card-management/index.vue`
- `src/types/api/device.ts`、`src/types/api/card.ts`、相关列表列配置
- `src/views/asset-management/asset-information/components/BasicInfoCard.vue`
- Related changes:
- 衔接已有 `add-phone-asset-unbind-management` 的解绑导入 API 和权限约束。
- 衔接已有 `add-h5-popup-configuration-management` 的页面枚举、历史配置展示和权限约束。
- Breaking changes: 无后端 API 破坏性变更;新增配置页面选项对运营人员的可选范围有意收窄。