diff --git a/docs/功能测试-班组管理.md b/docs/功能测试-班组管理.md new file mode 100644 index 00000000..79930d69 --- /dev/null +++ b/docs/功能测试-班组管理.md @@ -0,0 +1,19 @@ +# 功能测试任务列表 - 班组管理 + +> 路由:`/system_settings/organization/production_team_manage` + +| 序号 | 测试项 | 操作步骤 | 预期结果 | 结果 | +|---|---|---|---|---| +| 1 | 页面入口 | 从菜单进入“班组管理” | 页面正常打开,展示班组名称、所属厂区、所属产线、创建/更新时间 | ☐ | +| 2 | 条件查询 | 输入班组名称、选择厂区/产线或创建时间后查询 | 列表按条件刷新 | ☐ | +| 3 | 新增校验 | 点击新增,不填班组名称、厂区或产线直接确认 | 显示必填校验,不提交 | ☐ | +| 4 | 新增班组 | 填写班组信息,添加成员并设置班组长后确认 | 提示操作成功,列表出现新班组 | ☐ | +| 5 | 班组长唯一性 | 添加多个成员并尝试设置两个班组长 | 第二个班组长被拦截,提示只允许一个班组长 | ☐ | +| 6 | 编辑班组 | 点击编辑,修改成员或班组信息后确认 | 保存成功,重新打开可看到新数据 | ☐ | +| 7 | 删除成员 | 编辑已有班组,删除已有成员 | 成员删除成功,列表刷新 | ☐ | +| 8 | 单条删除 | 点击行内删除并确认 | 班组删除成功 | ☐ | +| 9 | 批量删除 | 勾选多条数据后点击批量删除并确认 | 所选班组删除成功 | ☐ | +| 10 | 导入模板 | 点击导入后下载模板 | 浏览器下载班组导入模板 | ☐ | +| 11 | 导入数据 | 选择合法 xls/xlsx 文件并确认导入 | 预览数据正确,提交后提示成功并刷新列表 | ☐ | +| 12 | 导出任务 | 点击导出并确认 | 提示下载任务创建成功 | ☐ | +| 13 | 权限按钮 | 使用缺少权限账号进入页面 | 对应新增/编辑/删除/导入/导出按钮隐藏或不可操作 | ☐ | diff --git a/docs/迁移任务列表.md b/docs/迁移任务列表.md index 6c3734d3..587c9afa 100644 --- a/docs/迁移任务列表.md +++ b/docs/迁移任务列表.md @@ -3,8 +3,8 @@ > 根据 `后台Webman界面截图对照表.md` 生成。状态以当前 V2 项目中已落地的页面目录为准。 - 总功能数:79 -- 已迁移:75 -- 未迁移:4 +- 已迁移:76 +- 未迁移:3 | 状态 | 一级模块 | 二级模块 | 三级模块 | 功能说明 | V2 目标路径 | |:---:|---|---|---|---|---| @@ -26,7 +26,7 @@ | ✅ | 生产配置 (Production Master Data) | 物料模型 (Material Model) | BOM物料清单 (Bill of Materials) | 产品BOM管理 | `src/views/production-master-data/material-model/bill-of-materials/` | | ✅ | 生产配置 (Production Master Data) | 物料模型 (Material Model) | 计量单位 (Unit of Measure) | 计量单位配置与管理 | `src/views/production-master-data/material-model/material-unit/` | | ✅ | 生产配置 (Production Master Data) | SPC采集模型 (SPC Configuration) | SPC采集配置 (Data Collection Configuration) | 配置SPC采集参数 | `src/views/production-master-data/spc-configuration/data-collection-configuration/` | -| ⬜ | 生产配置 (Production Master Data) | 班组模型 (Team Model) | 班组管理 (Team Management) | 管理生产班组 | 待确认 | +| ✅ | 生产配置 (Production Master Data) | 班组模型 (Team Model) | 班组管理 (Team Management) | 管理生产班组 | `src/views/production-master-data/team-model/team-management/` | | ⬜ | 生产配置 (Production Master Data) | 班组模型 (Team Model) | 班次管理 (Shift Management) | 管理生产班次 | 待确认 | | ⬜ | 生产配置 (Production Master Data) | 班组模型 (Team Model) | 排班日历 (Scheduling Calendar) | 查看排班日历 | 待确认 | | ✅ | 设备模型 (Equipment Management) | 设备类别 (Equipment Category) | 设备类别 (Equipment Category) | 管理设备类别 | `src/views/equipment-management/equipment-model/equipment-category/` | diff --git a/src/api/production-master-data/team-management.js b/src/api/production-master-data/team-management.js new file mode 100644 index 00000000..f88868aa --- /dev/null +++ b/src/api/production-master-data/team-management.js @@ -0,0 +1,24 @@ +import { request } from '@/api/_service' + +const BASE = 'system_settings/organization/production_team_manage/' +const MEMBER_BASE = 'system_settings/organization/production_members_manage/' + +function params (method, data = {}) { + return { method: `system_settings_organization_production_team_manage_${method}`, platform: 'background', ...data } +} + +function memberParams (method, data = {}) { + return { method: `system_settings_organization_production_members_manage_${method}`, platform: 'background', ...data } +} + +export function getTeamAll (data) { return request({ url: BASE + 'all', method: 'get', params: params('all', data) }) } +export function getTeamList (data) { return request({ url: BASE + 'list', method: 'get', params: params('list', data) }) } +export function createTeam (data) { return request({ url: BASE + 'create', method: 'post', data: params('create', data) }) } +export function editTeam (data) { return request({ url: BASE + 'edit', method: 'put', data: params('edit', data) }) } +export function deleteTeam (data) { return request({ url: BASE + 'delete', method: 'delete', data: params('delete', data) }) } +export function getTeamImportTemplate (data) { return request({ url: BASE + 'get_import_template', method: 'post', responseType: 'blob', data: params('get_import_template', data) }) } +export function importTeamData (data) { return request({ url: BASE + 'data_import', method: 'post', data: params('data_import', data) }) } +export function exportTeamTask (data) { return request({ url: BASE + 'data_export_task', method: 'post', data: params('data_export_task', data) }) } + +export function getTeamMemberList (data) { return request({ url: MEMBER_BASE + 'list', method: 'get', params: memberParams('list', data) }) } +export function deleteTeamMember (data) { return request({ url: MEMBER_BASE + 'delete', method: 'delete', data: memberParams('delete', data) }) } diff --git a/src/locales/en.json b/src/locales/en.json index 66447d02..a0b838cb 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -487,6 +487,70 @@ "help": "Error/NG management is used to maintain equipment error types and product NG types" } }, + "team_model": { + "team_management": { + "search": "Search", + "reset": "Reset", + "add": "Add", + "edit": "Edit", + "delete": "Delete", + "batch_delete": "Batch Delete", + "import": "Import", + "export": "Export", + "confirm": "Confirm", + "cancel": "Cancel", + "prompt": "Notice", + "operation": "Operation", + "team_name": "Team Name", + "enter_team_name": "Please enter team name", + "area": "Area", + "select_area": "Please select area", + "production_line": "Production Line", + "select_area_then_line": "Select area before line", + "last_create_time": "Create Time", + "select_create_time": "Please select create time", + "start_time": "Start Time", + "end_time": "End Time", + "serial_number": "No.", + "affiliated_factory": "Factory Area", + "affiliated_production_line": "Production Line", + "create_time": "Created At", + "update_time": "Updated At", + "add_team": "Add Team", + "edit_team": "Edit Team", + "please_select": "Please select", + "please_select_factory_then_line": "Select factory before line", + "select_affiliated_factory": "Please select factory", + "select_affiliated_production_line": "Please select production line", + "please_enter_team_name": "Please enter team name", + "please_select_affiliated_factory": "Please select factory", + "please_select_affiliated_production_line": "Please select production line", + "length_2_to_20_characters": "Length must be 2-20 characters", + "add_member": "Add Member", + "member_name": "Member Name", + "is_team_leader": "Team Leader", + "yes": "Yes", + "no": "No", + "only_one_team_leader_allowed": "Only one team leader is allowed", + "operation_successful": "Operation successful", + "delete_team_confirm_message": "Are you sure to delete this team?", + "batch_delete_confirm_message": "Are you sure to delete selected teams?", + "please_select_table_data": "Please select table data first", + "export_confirm_message": "Export current query result?", + "download_task_created": "Download task created", + "operation_cancelled": "Operation cancelled", + "production_team_data_import": "Import Team Data", + "upload_file_alert_title": "Import using the template format", + "upload_file_alert_description": "Download the template before importing", + "production_team_data_import_table": "Team Import Table", + "select_file": "Select File", + "download_template": "Download Template", + "preview": "Preview", + "please_import_department_data": "Please import team data first", + "team_data_import_template": "Team Import Template", + "upload_format_error": "Please upload xls or xlsx file" + } + }, "spc_configuration": { "data_collection_configuration": { "search": "Search", diff --git a/src/locales/zh-chs.json b/src/locales/zh-chs.json index e24676b7..d2805108 100644 --- a/src/locales/zh-chs.json +++ b/src/locales/zh-chs.json @@ -487,6 +487,70 @@ "help": "异常不良管理用于维护设备的异常种类和产品的不良种类信息" } }, + "team_model": { + "team_management": { + "search": "查询", + "reset": "重置", + "add": "新增", + "edit": "编辑", + "delete": "删除", + "batch_delete": "批量删除", + "import": "导入", + "export": "导出", + "confirm": "确定", + "cancel": "取消", + "prompt": "提示", + "operation": "操作", + "team_name": "班组名称", + "enter_team_name": "请输入班组名称", + "area": "厂区", + "select_area": "请选择厂区", + "production_line": "产线", + "select_area_then_line": "请先选择厂区再选择产线", + "last_create_time": "创建时间", + "select_create_time": "请选择创建时间", + "start_time": "开始时间", + "end_time": "结束时间", + "serial_number": "序号", + "affiliated_factory": "所属厂区", + "affiliated_production_line": "所属产线", + "create_time": "创建时间", + "update_time": "更新时间", + "add_team": "新增班组", + "edit_team": "编辑班组", + "please_select": "请选择", + "please_select_factory_then_line": "请先选择厂区再选择产线", + "select_affiliated_factory": "请选择所属厂区", + "select_affiliated_production_line": "请选择所属产线", + "please_enter_team_name": "请输入班组名称", + "please_select_affiliated_factory": "请选择所属厂区", + "please_select_affiliated_production_line": "请选择所属产线", + "length_2_to_20_characters": "长度在 2 到 20 个字符", + "add_member": "添加成员", + "member_name": "成员名称", + "is_team_leader": "是否班组长", + "yes": "是", + "no": "否", + "only_one_team_leader_allowed": "只允许设置一个班组长", + "operation_successful": "操作成功", + "delete_team_confirm_message": "确定要删除该班组吗?", + "batch_delete_confirm_message": "确定要删除所选班组吗?", + "please_select_table_data": "请先选择表格数据", + "export_confirm_message": "确定要导出当前查询结果吗?", + "download_task_created": "下载任务创建成功", + "operation_cancelled": "操作已取消", + "production_team_data_import": "班组数据导入", + "upload_file_alert_title": "请按模板格式导入文件", + "upload_file_alert_description": "导入前请先下载模板并按模板字段填写", + "production_team_data_import_table": "班组数据导入表", + "select_file": "选择文件", + "download_template": "下载模板", + "preview": "预览", + "please_import_department_data": "请先导入班组数据", + "team_data_import_template": "班组数据导入模板", + "upload_format_error": "请上传 xls 或 xlsx 文件" + } + }, "spc_configuration": { "data_collection_configuration": { "search": "查询", diff --git a/src/router/modules/system-administration.js b/src/router/modules/system-administration.js index c8206ffa..a087f460 100644 --- a/src/router/modules/system-administration.js +++ b/src/router/modules/system-administration.js @@ -55,6 +55,12 @@ export default { name: `${pre}system_monitoring-setting`, meta: { ...meta, cache: true, title: '监控设置' }, component: _import('system-administration/system-monitoring/monitoring-configuration') + }, + { + path: 'organization/production_team_manage', + name: `${pre}organization-production_team_manage`, + meta: { ...meta, cache: true, title: '班组管理' }, + component: _import('production-master-data/team-model/team-management') } ])('system_settings-') } diff --git a/src/views/production-master-data/team-model/team-management/index.vue b/src/views/production-master-data/team-model/team-management/index.vue new file mode 100644 index 00000000..1371e0bd --- /dev/null +++ b/src/views/production-master-data/team-model/team-management/index.vue @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + + + + + {{ $t(key('search')) }} + {{ $t(key('reset')) }} + + + + + + + + + + + + + + + + + + + + + + + {{ $t(key('add_member')) }} + + + + + + + + + + + onLeaderChange(val, scope.$index)" /> + + + + {{ $t(key('delete')) }} + + + + {{ $t(key('cancel')) }} + {{ $t(key('confirm')) }} + + + + + + + {{ $t(key('select_file')) }} + {{ $t(key('download_template')) }} + + + + + + + + + + {{ $t(key('cancel')) }} + {{ $t(key('confirm')) }} + + + + + + + +