diff --git a/docs/功能测试-电池复投管理.md b/docs/功能测试-电池复投管理.md new file mode 100644 index 00000000..4c8e579b --- /dev/null +++ b/docs/功能测试-电池复投管理.md @@ -0,0 +1,36 @@ +# 功能测试 - 电池复投管理 + +> 模块:计划与生产 / 生产监控 / 电池复投管理 (Rework Management) +> 路由:`/planning_production/produce/monitor/set_battery_rebatch` + +## 测试前置条件 + +- 测试账号具备访问“电池复投管理”的菜单权限。 +- 准备至少 3 个可用于验证的电池条码,其中包含: + - 允许复投的电池条码。 + - 不允许复投或不存在的电池条码。 + - 已激活和未激活状态各一条。 +- 后端 Workerman 服务可用,接口 `production_configuration/workerman/send` 可正常响应。 + +## 测试任务列表 + +| 序号 | 测试项 | 操作步骤 | 预期结果 | +|---:|---|---|---| +| 1 | 页面入口 | 从菜单进入“电池复投管理”页面,或直接访问 `/planning_production/produce/monitor/set_battery_rebatch` | 页面正常打开,显示电池条码输入框、验证数据、重置、复投激活按钮和空表格 | +| 2 | 单个电池验证 | 在电池条码输入框输入一条有效电池条码,点击“验证数据” | 表格展示该电池的批次、托盘、流水号、激活状态、档位、上一工序和当前工序 | +| 3 | 多电池粘贴验证 | 在输入框输入多个条码,使用逗号、空格或换行分隔,点击“验证数据” | 系统可自动规范化输入并返回多行电池数据 | +| 4 | 多电池弹窗输入 | 点击输入框右侧导入按钮,在弹窗中每行输入一个电池条码,点击“确定”后再点击“验证数据” | 输入框自动填入逗号分隔条码,表格展示对应验证数据 | +| 5 | 空输入校验 | 清空电池条码,点击“验证数据” | 页面提示“请输入电池条码数据”,不发起有效验证 | +| 6 | 重置功能 | 输入条码并验证出表格数据后,点击“重置” | 输入框、表格数据和已选行清空 | +| 7 | 全部复投激活 | 验证出多条可复投电池数据,不勾选表格行,点击“复投激活”并确认 | 请求提交表格内全部电池条码,成功后提示复投激活操作成功 | +| 8 | 选中行复投激活 | 验证出多条电池数据,勾选其中一部分,点击“复投激活”并确认 | 仅提交被勾选的电池条码,成功后提示复投激活操作成功 | +| 9 | 未验证直接复投 | 输入电池条码但不点击“验证数据”,直接点击“复投激活” | 页面提示需要先验证电池数据,不提交 Workerman 复投请求 | +| 10 | 复投取消 | 验证出表格数据,点击“复投激活”,在确认框点击取消 | 不提交复投请求,页面数据保持不变 | +| 11 | 后端失败提示 | 使用后端会返回失败的电池数据执行复投 | 页面显示后端错误信息或“复投激活失败”提示 | +| 12 | 国际化检查 | 切换中英文语言后重新进入页面 | 页面按钮、表格列和提示文案随语言切换显示 | + +## 回归关注点 + +- 验证接口返回空数据时,表格应显示空态且页面不报错。 +- 表格行勾选后再重置,已选状态应同步清空。 +- 复投激活接口调用参数中的 `action` 应为 `set_battery_rebatch`,`battery_ids` 应与测试输入或勾选行一致。 diff --git a/docs/迁移任务列表.md b/docs/迁移任务列表.md index dd19aac5..bafe9c90 100644 --- a/docs/迁移任务列表.md +++ b/docs/迁移任务列表.md @@ -3,8 +3,8 @@ > 根据 `后台Webman界面截图对照表.md` 生成。状态以当前 V2 项目中已落地的页面目录为准。 - 总功能数:79 -- 已迁移:26 -- 未迁移:53 +- 已迁移:27 +- 未迁移:52 | 状态 | 一级模块 | 二级模块 | 三级模块 | 功能说明 | V2 目标路径 | |:---:|---|---|---|---|---| @@ -48,7 +48,7 @@ | ✅ | 计划与生产 (Planning & Production) | 生产批次管理 (Batch Management) | 生产批次不良报表 (Batch Defect Report) | 不良报表 | `src/views/planning-production/batch-management/batch-defect-report/` | | ✅ | 计划与生产 (Planning & Production) | 预警中心 (Alert Center) | 预警中心 (Alert Center) | 预警中心 | `src/views/planning-production/alert-center/` | | ✅ | 计划与生产 (Planning & Production) | 生产监控 (Production Monitoring) | 物料监控 (Material Monitoring) | 物料监控 | `src/views/planning-production/production-monitoring/material-monitoring/` | -| ⬜ | 计划与生产 (Planning & Production) | 生产监控 (Production Monitoring) | 电池复投管理 (Rework Management) | 返工管理 | 待确认 | +| ✅ | 计划与生产 (Planning & Production) | 生产监控 (Production Monitoring) | 电池复投管理 (Rework Management) | 返工管理 | `src/views/planning-production/production-monitoring/rework-management/` | | ✅ | 计划与生产 (Planning & Production) | 生产监控 (Production Monitoring) | 托盘管理 (Tray Management) | 托盘管理 | `src/views/planning-production/production-monitoring/tray-management/` | | ✅ | 计划与生产 (Planning & Production) | 生产监控 (Production Monitoring) | 托盘登录 (Tray Registration) | 托盘登记 | `src/views/planning-production/production-monitoring/tray-registration/` | | ✅ | 计划与生产 (Planning & Production) | 生产监控 (Production Monitoring) | 设备监控 (Equipment Monitoring) | 设备监控 | `src/views/planning-production/production-monitoring/equipment-monitoring/` | diff --git a/src/api/planning-production/rework-management.js b/src/api/planning-production/rework-management.js new file mode 100644 index 00000000..5ffef230 --- /dev/null +++ b/src/api/planning-production/rework-management.js @@ -0,0 +1,19 @@ +import { request } from '@/api/_service' + +const BASE = 'planning_production/produce/set_battery_rebatch/' + +function apiParams (method, data = {}) { + return { + method, + platform: 'background', + ...data + } +} + +export function verifyBatteryRebatchInfo (data) { + return request({ + url: BASE + 'verify', + method: 'get', + params: apiParams('planning_production_produce_change_battery_process_verify', data) + }) +} diff --git a/src/locales/en.json b/src/locales/en.json index 89c32fc9..021a65d6 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1111,6 +1111,35 @@ "enter_semi_finished_id": "Enter semi-finished ID", "start_time": "Start Time", "end_time": "End Time" + }, + "rework_management": { + "active": "Activated", + "not_activated": "Inactive", + "reset": "Reset", + "battery_id": "Battery Barcode", + "enter_battery_id": "Enter battery barcode", + "verify_data": "Verify Data", + "input_rule": "Rule: One barcode per line", + "re_activate": "Re-activate", + "multi_battery_input": "Multi-Battery Input", + "confirm": "Confirm", + "cancel": "Cancel", + "enter_battery_id_before_action": "Enter battery barcode first!", + "enter_battery_data": "Enter battery barcode data", + "sort": "No.", + "batch": "Batch", + "tray": "Tray", + "lot": "No.", + "class_type": "Grade Type", + "class": "Grade", + "previous_process": "Previous Process", + "current_process": "Current Process", + "active_status": "Activation Status", + "prompt": "Notice", + "re_activate_success": "Re-activation successful", + "rethrow_activation_failed": "Re-activation failed", + "re_activate_warning": "Activating will skip current process. Proceed?", + "verify_data_before_action": "Verify battery data before re-activation" } }, "alert_center": { diff --git a/src/locales/zh-chs.json b/src/locales/zh-chs.json index 91b17045..1b2bf083 100644 --- a/src/locales/zh-chs.json +++ b/src/locales/zh-chs.json @@ -1111,6 +1111,35 @@ "enter_semi_finished_id": "请输入半成品ID", "start_time": "开始时间", "end_time": "结束时间" + }, + "rework_management": { + "active": "激活", + "not_activated": "未激活", + "reset": "重置", + "battery_id": "电池条码", + "enter_battery_id": "请输入电池条码", + "verify_data": "验证数据", + "input_rule": "输入规则:每个电池条码占一行输入", + "re_activate": "复投激活", + "multi_battery_input": "多电池条码输入", + "confirm": "确定", + "cancel": "取消", + "enter_battery_id_before_action": "请输入电池条码后再执行此操作!", + "enter_battery_data": "请输入电池条码数据", + "sort": "序号", + "batch": "批次", + "tray": "托盘", + "lot": "流水号", + "class_type": "档位类型", + "class": "档位", + "previous_process": "上一工序", + "current_process": "当前工序", + "active_status": "激活状态", + "prompt": "提示!", + "re_activate_success": "复投激活操作成功!", + "rethrow_activation_failed": "复投激活失败", + "re_activate_warning": "确认后电池将激活,激活后只能从下一工序开始生产,不能重新做当前工序!", + "verify_data_before_action": "请先验证电池数据后再执行复投激活" } }, "alert_center": { diff --git a/src/router/modules/planning-production.js b/src/router/modules/planning-production.js index 528f8a02..b835b4f3 100644 --- a/src/router/modules/planning-production.js +++ b/src/router/modules/planning-production.js @@ -44,6 +44,12 @@ export default { meta: { ...meta, cache: true, title: '预警中心' }, component: _import('planning-production/alert-center') }, + { + path: 'produce/monitor/set_battery_rebatch', + name: `${pre}monitor-set_battery_rebatch`, + meta: { ...meta, cache: true, title: '电池复投管理' }, + component: _import('planning-production/production-monitoring/rework-management') + }, { path: 'produce/monitor/tray_manage', name: `${pre}monitor-tray_manage`, diff --git a/src/views/planning-production/production-monitoring/rework-management/index.vue b/src/views/planning-production/production-monitoring/rework-management/index.vue new file mode 100644 index 00000000..82a57e72 --- /dev/null +++ b/src/views/planning-production/production-monitoring/rework-management/index.vue @@ -0,0 +1,209 @@ + + + + + + + + + + + + + {{ $t(key('verify_data')) }} + + + {{ $t(key('reset')) }} + + + {{ $t(key('re_activate')) }} + + + + + + + + + + {{ Number(row.active) === 0 ? $t(key('not_activated')) : $t(key('active')) }} + + + + + + + + + + + + + + + {{ $t(key('cancel')) }} + {{ $t(key('confirm')) }} + + + + + + + +