diff --git a/src/api/mes/moldCheck.js b/src/api/mes/moldCheck.js new file mode 100644 index 0000000..3ace03a --- /dev/null +++ b/src/api/mes/moldCheck.js @@ -0,0 +1,93 @@ +import upload from '@/utils/upload' +import request from '@/utils/request' + +// 模具点检工单分页 +export function getMoldCheckPage(params = {}) { + return request({ + url: '/admin-api/mes/mold-ticket-management/page', + method: 'get', + params + }) +} + +// 模具点检结果分页 +export function getMoldCheckResultsPage(params = {}) { + return request({ + url: '/admin-api/mes/mold-ticket-results/page', + method: 'get', + params + }) +} + +// 批量更新点检结果 +export function batchUpdateMoldCheckResults(data) { + return request({ + url: '/admin-api/mes/mold-ticket-results/batchUpdate', + method: 'put', + data + }) +} + +// 图片上传 +export function uploadMoldCheckImage(filePath, name = 'file') { + return upload({ + url: '/admin-api/infra/file/upload', + name, + filePath, + showLoading: false + }) +} + +// 点检模板分页(项目表单) +export function getPlanMaintenancePage(params = {}) { + return request({ + url: '/admin-api/mes/mold-plan-maintenance/page', + method: 'get', + params + }) +} + +// 获取模板下的点检项 +export function getSubjectList(id) { + return request({ + url: '/admin-api/mes/mold-plan-maintenance/getSubjectList', + method: 'get', + params: { id } + }) +} + +// 直接创建模具点检工单 +export function createMoldTicketDirect(data) { + return request({ + url: '/admin-api/mes/mold-task-management/createMoldTicketDirect', + method: 'post', + data + }) +} + +// 获取模具详情 +export function getMoldBrandDetail(id) { + return request({ + url: '/admin-api/erp/mold-brand/get', + method: 'get', + params: { id } + }) +} + +// 获取模具列表(选择模具用) +export function getMoldList(params = {}) { + return request({ + url: '/admin-api/erp/mold-brand/getMoldList', + method: 'get', + params + }) +} + +// 批量更新工单状态 +export function batchUpdateMoldCheckStatus(data) { + return request({ + url: '/admin-api/mes/mold-ticket-management/batchUpdateStatus', + method: 'put', + data + }) +} diff --git a/src/api/mes/moldoperate.js b/src/api/mes/moldoperate.js index 8ecd716..5ed7229 100644 --- a/src/api/mes/moldoperate.js +++ b/src/api/mes/moldoperate.js @@ -50,8 +50,8 @@ export function getLowerMoldList(id) { export function getDeviceLedgerList(params = {}) { return request({ - url: '/admin-api/mes/device-ledger/list', + url: '/admin-api/mes/device-ledger/page', method: 'get', - params + params: { pageNo: params.pageNo || 1, pageSize: params.pageSize || 100, ...params } }) } diff --git a/src/components/common/PermissionMenuPage.vue b/src/components/common/PermissionMenuPage.vue index b468d99..8e1b115 100644 --- a/src/components/common/PermissionMenuPage.vue +++ b/src/components/common/PermissionMenuPage.vue @@ -211,6 +211,7 @@ function getUviewIconName(icon) { function handleClick(menu) { const url = resolveMenuUrl(menu) + console.log('[PermissionMenu] 点击菜单:', menu?.name, '| _splitKey:', menu?._splitKey, '| 路由:', url) if (url) { uni.navigateTo({ url }) return diff --git a/src/locales/en-US.js b/src/locales/en-US.js index 5590b17..79f8846 100644 --- a/src/locales/en-US.js +++ b/src/locales/en-US.js @@ -183,6 +183,7 @@ export default { search: 'Search', reset: 'Reset', cancel: 'Cancel', + confirm: 'Confirm', save: 'Save', loading: 'Loading...', loadingMore: 'Loading more...', @@ -339,7 +340,35 @@ export default { validatorMoldRequired: 'Select at least one mold for mounting', validatorLowerMoldRequired: 'Select at least one mold for dismounting', loadEditFailed: 'Failed to load edit data', - confirmDelete: 'Confirm delete this mold operate record?' + confirmDelete: 'Confirm delete this mold operate record?', + scanDevice: 'Scan Device', + selectDevice: 'Select Device', + selectedDevice: 'Selected Device', + deviceCode: 'Device Code', + productionLine: 'Production Line', + currentMold: 'Current Mold', + deviceStatus: 'Device Status', + statusRunning: 'Running', + statusStop: 'Stopped', + statusFault: 'Fault', + selectMountMold: 'Select Mold to Mount', + product: 'Product', + status: 'Status', + pendingMount: 'Pending Mount', + confirmMount: 'Confirm Mount', + clickSelectMold: 'Click to select mold', + noDeviceData: 'No device data', + deviceNotFound: 'Device not found', + deviceInfo: 'Device Info', + currentMoldInfo: 'Current Mold on Machine', + mountTime: 'Mount Time', + useCount: 'Usage Count', + countUnit: '', + changeMountTarget: 'Change Mount Target', + changeTarget: 'Change Dismount Target', + confirmDismount: 'Confirm Dismount', + clickSelectDeviceFirst: 'Please select a device first', + noMoldOnDevice: 'No mold on this device' }, moldInspectionItems: { moduleName: 'Inspection Items', @@ -989,6 +1018,143 @@ export default { validatorNameRequired: 'Component name is required', confirmDeleteContent: 'Confirm delete component [{name}]?' }, + moldLedger: { + moduleName: 'Mold Ledger', + subTitle: 'Mold ledger management', + detailTitle: 'Mold Detail', + basicInfo: 'Mold Basic Info', + moldPlaceholder: 'Mold', + moldName: 'Mold Name', + product: 'Product', + moldCode: 'Mold Code', + status: 'Status', + versionSpec: 'Version/Spec', + cavityCount: 'Cavity Count', + currentDevice: 'Current Device', + useCount: 'Use Count', + expand: 'Expand', + collapse: 'Collapse', + tabChildMold: 'Sub-molds', + tabInspection: 'Inspection', + tabRepair: 'Repair', + tabMaintenance: 'Maintenance', + tabInstall: 'Installation', + installLocation: 'Install Location', + material: 'Material', + quantity: 'Quantity', + lastReplace: 'Last Replace', + usedDays: 'Used {days} days', + remark: 'Remark', + noChildMold: 'No sub-mold data', + noInspection: 'No inspection records', + noRepair: 'No repair records', + noMaintenance: 'No maintenance records', + noInstall: 'No installation records', + inspectionMethod: 'Inspection Method', + criteria: 'Criteria', + inspectionTime: 'Inspection Time', + maintainMethod: 'Maintenance Method', + maintainTime: 'Maintenance Time', + repairProject: 'Repair Project', + projectContent: 'Project Content', + finishTime: 'Finish Time', + operateMold: 'Mold', + operator: 'Operator', + time: 'Time', + upperMold: 'Mount', + lowerMold: 'Dismount', + missingBrandId: 'Missing mold brand ID', + detailLoadFailed: 'Failed to load detail', + childLoadFailed: 'Failed to load sub-molds', + inspectionLoadFailed: 'Failed to load inspection records', + repairLoadFailed: 'Failed to load repair records', + maintainLoadFailed: 'Failed to load maintenance records', + installLoadFailed: 'Failed to load installation records', + resultPending: 'Pending', + resultPass: 'Pass', + resultWarning: 'Warning', + repairCompleted: 'Completed', + repairAbnormal: 'Abnormal', + repairProcessing: 'Processing', + searchPlaceholder: 'Enter mold code or name', + allStatus: 'All', + selectMoldStatus: 'Select Mold Status', + clear: 'Clear', + name: 'Name', + createTime: 'Created At', + confirmDeleteContent: 'Confirm delete mold brand "{name}"?', + empty: 'No mold ledger data', + scanUnrecognized: 'Unrecognized QR code', + scanFormatError: 'Invalid QR code format', + scanFailed: 'Scan failed', + noIdView: 'Missing ID, cannot view details', + noIdDelete: 'Missing ID, cannot delete' + }, + moldCheck: { + moduleName: 'Mold Inspection', + addTitle: 'Add Inspection', + detailTitle: 'Inspection Detail', + searchPlaceholder: 'Enter inspection No.', + empty: 'No inspection records', + add: 'Add', + moldName: 'Mold Name', + moldCode: 'Mold Code', + product: 'Product', + status: 'Status', + taskType: 'Task Type', + taskTypeInspect: 'Inspection', + taskTypeMaintain: 'Maintenance', + planNo: 'Inspection No.', + taskTime: 'Task Time', + template: 'Template', + operator: 'Operator', + jobStatusPending: 'Pending', + jobStatusProcessing: 'Processing', + jobStatusCompleted: 'Completed', + jobStatusTimeout: 'Timeout', + jobStatusCancelled: 'Cancelled', + jobResultOk: 'OK', + jobResultNg: 'NG', + progressTitle: 'Progress', + noResultData: 'No inspection result data', + requiredText: 'Required', + inspectionMethod: 'Inspection Method', + judgmentCriteria: 'Judgment Criteria', + textInput: 'Input Value', + inputPlaceholder: 'Enter value', + images: 'Images', + remark: 'Remark', + resultText: 'Result', + inspectionResultPass: 'Pass', + inspectionResultFail: 'Fail', + inspectionResultPending: 'Pending', + maxUploadCount: 'Max 3 images', + selectAllDecisionError: 'Please select all inspection results', + currentMoldInfo: 'Mold Info', + moldGroupCode: 'Mold Group Code', + moldGroupName: 'Mold Group Name', + cavityCount: 'Cavity Count', + moldSize: 'Mold Size', + currentDevice: 'Current Device', + selectMold: 'Select Mold', + reSelectMold: 'Re-select Mold', + selectMoldError: 'Please select a mold', + searchMold: 'Enter mold name', + noMoldInfo: 'Please select a mold', + noMoldData: 'No molds available', + taskName: 'Task Name', + taskInfo: 'Task Info', + placeholderTaskName: 'Enter task name', + templateSelection: 'Template/Task Selection', + selectTemplate: 'Select Template', + selectTemplateError: 'Please select inspection template', + noItems: 'Please select inspection template first', + noTemplate: 'No templates', + submit: 'Submit Inspection', + submitSuccess: 'Inspection submitted successfully', + submitFailed: 'Failed to submit inspection', + reInspect: 'Re-inspect' + }, moldRepair: { moduleName: 'Mold Repair', createTitle: 'Create Mold Repair', diff --git a/src/locales/index.js b/src/locales/index.js index f4d1f0c..0f309b8 100644 --- a/src/locales/index.js +++ b/src/locales/index.js @@ -106,6 +106,8 @@ const literalMap = { '模具入库': 'moldReturn.moduleName', '模具入库详情': 'moldReturn.detailTitle', '上下模': 'moldOperate.moduleName', + '上模': 'moldOperate.tabUp', + '下模': 'moldOperate.tabDown', '上下模详情': 'moldOperate.detailTitle', '点检项库': 'moldInspectionItems.moduleName', '点检项库详情': 'moldInspectionItems.detailTitle', @@ -122,7 +124,12 @@ const literalMap = { '设备点检记录': 'equipmentInspectionRecord.moduleName', '设备点检记录详情': 'equipmentInspectionRecord.detailTitle', '点检记录': 'moldWorkOrder.moduleName', - '点检记录详情': 'moldWorkOrder.detailTitle' + '点检记录详情': 'moldWorkOrder.detailTitle', + '模具台账': 'moldLedger.moduleName', + '模具详情': 'moldLedger.detailTitle', + '模具点检': 'moldCheck.moduleName', + '点检详情': 'moldCheck.detailTitle', + '新增点检': 'moldCheck.addTitle' } export function getCurrentLocale() { diff --git a/src/locales/zh-CN.js b/src/locales/zh-CN.js index a1250c2..3dcec29 100644 --- a/src/locales/zh-CN.js +++ b/src/locales/zh-CN.js @@ -183,6 +183,7 @@ export default { search: '查询', reset: '重置', cancel: '取消', + confirm: '确认', save: '保存', loading: '加载中...', loadingMore: '正在加载更多...', @@ -339,7 +340,35 @@ export default { validatorMoldRequired: '请至少选择一个上模模具', validatorLowerMoldRequired: '请至少选择一个下模模具', loadEditFailed: '加载编辑数据失败', - confirmDelete: '确认删除该上下模记录吗?' + confirmDelete: '确认删除该上下模记录吗?', + scanDevice: '扫设备码', + selectDevice: '选择设备', + selectedDevice: '已选设备', + deviceCode: '设备编码', + productionLine: '所属产线', + currentMold: '当前在机模具', + deviceStatus: '设备状态', + statusRunning: '运行中', + statusStop: '已停止', + statusFault: '故障', + selectMountMold: '选择待上模模具', + product: '产品', + status: '状态', + pendingMount: '待上模', + confirmMount: '确认上模', + clickSelectMold: '点击选择模具', + noDeviceData: '暂无设备数据', + deviceNotFound: '未找到对应设备', + deviceInfo: '设备信息', + currentMoldInfo: '当前在机模具', + mountTime: '上模时间', + useCount: '使用次数', + countUnit: '次', + changeMountTarget: '更换上模对象', + changeTarget: '更换下模对象', + confirmDismount: '确认下模', + clickSelectDeviceFirst: '请先选择设备', + noMoldOnDevice: '该设备暂无在机模具' }, moldInspectionItems: { moduleName: '点检项库', @@ -992,6 +1021,143 @@ export default { validatorNameRequired: '关键件名称不能为空', confirmDeleteContent: '确认删除关键件【{name}】吗?' }, + moldLedger: { + moduleName: '模具台账', + subTitle: '模具台账管理', + detailTitle: '模具详情', + basicInfo: '模具基本信息', + moldPlaceholder: '模具', + moldName: '模具名称', + product: '产品', + moldCode: '模具编号', + status: '状态', + versionSpec: '版本/规格', + cavityCount: '模穴数', + currentDevice: '当前设备', + useCount: '使用次数', + expand: '展开', + collapse: '收起', + tabChildMold: '子模具', + tabInspection: '点检记录', + tabRepair: '维修记录', + tabMaintenance: '保养记录', + tabInstall: '安装记录', + installLocation: '安装位置', + material: '材质', + quantity: '数量', + lastReplace: '上次更换', + usedDays: '已使用{days}天', + remark: '备注', + noChildMold: '暂无子模具数据', + noInspection: '暂无点检记录', + noRepair: '暂无维修记录', + noMaintenance: '暂无保养记录', + noInstall: '暂无安装记录', + inspectionMethod: '点检方式', + criteria: '判定标准', + inspectionTime: '点检时间', + maintainMethod: '保养方式', + maintainTime: '保养时间', + repairProject: '维修项目', + projectContent: '项目内容', + finishTime: '完成时间', + operateMold: '模具', + operator: '操作人', + time: '时间', + upperMold: '上模', + lowerMold: '下模', + missingBrandId: '缺少模具组ID', + detailLoadFailed: '详情加载失败', + childLoadFailed: '子模具加载失败', + inspectionLoadFailed: '点检记录加载失败', + repairLoadFailed: '维修记录加载失败', + maintainLoadFailed: '保养记录加载失败', + installLoadFailed: '安装记录加载失败', + resultPending: '待处理', + resultPass: '合格', + resultWarning: '警告', + repairCompleted: '完成', + repairAbnormal: '异常', + repairProcessing: '处理中', + searchPlaceholder: '请输入模具组编码或名称', + allStatus: '全部', + selectMoldStatus: '选择模具状态', + clear: '清空', + name: '名称', + createTime: '创建时间', + confirmDeleteContent: '确认删除模具组"{name}"吗?', + empty: '暂无模具台账数据', + scanUnrecognized: '无法识别二维码', + scanFormatError: '二维码格式不正确', + scanFailed: '扫描失败', + noIdView: '缺少ID,无法查看详情', + noIdDelete: '缺少ID,无法删除' + }, + moldCheck: { + moduleName: '模具点检', + addTitle: '新增点检', + detailTitle: '点检详情', + searchPlaceholder: '请输入点检单号', + empty: '暂无点检记录', + add: '新增', + moldName: '模具名称', + moldCode: '模具编号', + product: '产品', + status: '状态', + taskType: '任务类型', + taskTypeInspect: '点检', + taskTypeMaintain: '保养', + planNo: '点检单号', + taskTime: '执行时间', + template: '配置模板', + operator: '操作员', + jobStatusPending: '待执行', + jobStatusProcessing: '执行中', + jobStatusCompleted: '已完成', + jobStatusTimeout: '已超时', + jobStatusCancelled: '已取消', + jobResultOk: '通过', + jobResultNg: '不通过', + progressTitle: '进度', + noResultData: '暂无点检结果数据', + requiredText: '必检', + inspectionMethod: '点检方式', + judgmentCriteria: '判定标准', + textInput: '输入值', + inputPlaceholder: '请输入', + images: '图片', + remark: '备注', + resultText: '结果', + inspectionResultPass: '通过', + inspectionResultFail: '不通过', + inspectionResultPending: '待判定', + maxUploadCount: '最多上传3张图片', + selectAllDecisionError: '请选择所有点检项的判定结果', + currentMoldInfo: '模具信息', + moldGroupCode: '模具组编码', + moldGroupName: '模具组名称', + cavityCount: '模穴数', + moldSize: '模具尺寸', + currentDevice: '当前设备', + selectMold: '选择模具', + reSelectMold: '重新选择模具', + selectMoldError: '请选择模具', + searchMold: '请输入模具名称', + noMoldInfo: '请选择模具', + noMoldData: '暂无可选模具', + taskName: '任务名称', + taskInfo: '任务信息', + placeholderTaskName: '请输入任务名称', + templateSelection: '模板/任务选择', + selectTemplate: '请选择模板', + selectTemplateError: '请选择点检模板', + noItems: '请先选择点检模板', + noTemplate: '暂无模板', + submit: '提交点检', + submitSuccess: '点检提交成功', + submitFailed: '点检提交失败', + reInspect: '再次点检' + }, moldRepair: { moduleName: '模具维修', createTitle: '新增模具维修', diff --git a/src/pages.json b/src/pages.json index b6a1bfb..d7a1c5f 100644 --- a/src/pages.json +++ b/src/pages.json @@ -578,7 +578,7 @@ { "path": "moldoperate/index", "style": { - "navigationBarTitleText": "上下模", + "navigationBarTitleText": "上模", "navigationStyle": "custom" } }, @@ -589,6 +589,27 @@ "navigationStyle": "custom" } }, + { + "path": "moldoperate/dismount", + "style": { + "navigationBarTitleText": "下模", + "navigationStyle": "custom" + } + }, + { + "path": "moldoperate/deviceSelect", + "style": { + "navigationBarTitleText": "选择设备", + "navigationStyle": "custom" + } + }, + { + "path": "moldoperate/moldSelect", + "style": { + "navigationBarTitleText": "选择待上模模具", + "navigationStyle": "custom" + } + }, { "path": "moldRepair/index", "style": { @@ -700,6 +721,27 @@ "navigationBarTitleText": "任务计划", "navigationStyle": "custom" } + }, + { + "path": "moldCheck/index", + "style": { + "navigationBarTitleText": "模具点检", + "navigationStyle": "custom" + } + }, + { + "path": "moldCheck/detail", + "style": { + "navigationBarTitleText": "点检详情", + "navigationStyle": "custom" + } + }, + { + "path": "moldCheck/add", + "style": { + "navigationBarTitleText": "新增点检", + "navigationStyle": "custom" + } } ] } diff --git a/src/pages_function/pages/moldCheck/add.vue b/src/pages_function/pages/moldCheck/add.vue new file mode 100644 index 0000000..0ba8050 --- /dev/null +++ b/src/pages_function/pages/moldCheck/add.vue @@ -0,0 +1,724 @@ +