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 @@
+
+
+
+
+
+
+
+
+
+
+ {{ t('moldCheck.selectMold') }}*
+
+
+ {{ moldInfo.id ? (moldInfo.name || moldInfo.code || '-') : t('moldCheck.selectMold') }}
+ {{ moldInfo.code || t('moldCheck.reSelectMold') }}
+
+
+
+
+
+
+
+ {{ t('moldCheck.moldGroupCode') }}
+ {{ moldInfo.code || '-' }}
+
+
+ {{ t('moldCheck.moldGroupName') }}
+ {{ moldInfo.name || '-' }}
+
+
+ {{ t('moldCheck.cavityCount') }}
+ {{ moldInfo.moldSize || '-' }}
+
+
+ {{ t('moldCheck.product') }}
+ {{ moldInfo.productName || '-' }}
+
+
+ {{ t('moldCheck.status') }}
+ {{ moldInfo.statusLabel || '-' }}
+
+
+ {{ t('moldCheck.currentDevice') }}
+ {{ moldInfo.currentDevice || '-' }}
+
+
+
+
+
+
+
+
+
+ {{ t('moldCheck.taskName') }}*
+
+
+
+ {{ t('moldCheck.templateSelection') }}*
+
+ {{ selectedTemplate?.planName || t('moldCheck.selectTemplate') }}
+
+
+
+
+
+
+ {{ t('moldCheck.noItems') }}
+
+
+
+
+
+ {{ t('moldCheck.inspectionMethod') }}
+ {{ inspectionMethodText(item.inspectionMethod) }}
+
+
+ {{ t('moldCheck.judgmentCriteria') }}
+ {{ textValue(item.judgmentCriteria) }}
+
+
+ {{ t('moldCheck.textInput') }}
+
+
+
+
+
+ {{ t('moldCheck.textInput') }}
+
+
+
+ {{ t('moldCheck.images') }}
+
+
+
+ ×
+
+
+ +
+
+
+
+
+ {{ t('moldCheck.remark') }}
+
+
+
+ {{ t('moldCheck.resultText') }}
+
+
+ {{ t('moldCheck.inspectionResultPass') }}
+
+
+ {{ t('moldCheck.inspectionResultFail') }}
+
+ {{ t('moldCheck.inspectionResultPending') }}
+
+
+
+
+
+
+
+
+
+ {{ t('dashboard.back') }}
+ {{ t('moldCheck.submit') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/moldCheck/detail.vue b/src/pages_function/pages/moldCheck/detail.vue
new file mode 100644
index 0000000..e62205f
--- /dev/null
+++ b/src/pages_function/pages/moldCheck/detail.vue
@@ -0,0 +1,424 @@
+
+
+
+
+
+
+
+
+ {{ textValue(detailData.moldName) }}
+
+
+ {{ t('moldCheck.taskType') }}:
+ {{ planTypeText }}
+
+
+ {{ t('moldCheck.planNo') }}:
+ {{ textValue(detailData.planNo) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('functionCommon.loading') }}
+ {{ t('moldCheck.noResultData') }}
+
+
+
+
+
+ {{ t('moldCheck.inspectionMethod') }}
+ {{ inspectionMethodText(item.inspectionMethod) }}
+
+
+ {{ t('moldCheck.judgmentCriteria') }}
+ {{ textValue(item.judgmentCriteria) }}
+
+
+
+ {{ t('moldCheck.textInput') }}
+
+
+
+
+
+ {{ t('moldCheck.textInput') }}
+
+ {{ textInputDisplay(item) }}
+
+
+
+ {{ t('moldCheck.images') }}
+
+
+
+ ×
+
+
+ +
+
+
+
+
+
+ {{ t('moldCheck.remark') }}
+ {{ textValue(item.remark) }}
+
+
+
+ {{ t('moldCheck.resultText') }}
+
+
+ {{ t('moldCheck.inspectionResultPass') }}
+
+
+ {{ t('moldCheck.inspectionResultFail') }}
+
+ {{ t('moldCheck.inspectionResultPending') }}
+
+
+
+
+
+
+
+
+
+ {{ t('dashboard.back') }}
+ {{ t('functionCommon.save') }}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages_function/pages/moldCheck/index.vue b/src/pages_function/pages/moldCheck/index.vue
new file mode 100644
index 0000000..47a099e
--- /dev/null
+++ b/src/pages_function/pages/moldCheck/index.vue
@@ -0,0 +1,560 @@
+
+
+
+
+
+
+
+
+
+
+ {{ currentJobStatusLabel }}
+
+
+
+ {{ t('functionCommon.reset') }}
+
+
+
+
+
+
+
+
+ {{ t('moldCheck.moldName') }}
+ {{ textValue(item.moldName) }}
+
+
+ {{ t('moldCheck.template') }}
+ {{ textValue(item.configName) }}
+
+
+ {{ t('moldCheck.operator') }}
+ {{ textValue(item.operatorName) }}
+
+
+ {{ t('moldCheck.taskTime') }}
+ {{ formatDateTime(item.taskTime) }}
+
+
+
+
+
+ {{ t('functionCommon.loading') }}
+ {{ t('moldCheck.empty') }}
+ {{ t('functionCommon.loadingMore') }}
+ {{ t('functionCommon.noMoreData') }}
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages_function/pages/moldLedger/detail.vue b/src/pages_function/pages/moldLedger/detail.vue
index 006b6ac..595bab7 100644
--- a/src/pages_function/pages/moldLedger/detail.vue
+++ b/src/pages_function/pages/moldLedger/detail.vue
@@ -1,191 +1,197 @@
-
+
- 基本信息
-
-
- 模具名称
- {{ getDetailField('name') }}
-
-
- 模具编号
- {{ getDetailField('code') }}
-
-
- 模具状态
-
-
-
- 模具型号
- {{ getDetailField('brandName') }}
-
-
- 模具规格
- {{ getDetailField('moldType') }}
-
-
- 工序
- {{ getDetailField('orgType') }}
-
-
- 模穴数
- {{ getDetailField('moldSize') }}
-
-
- 使用次数/次
- {{ getDetailField('useTime') }}
-
-
- 使用设备
- {{ machineLabel }}
-
-
- 入库日期
- {{ inTimeLabel }}
-
-
- 是否启用
- {{ enableLabel }}
-
-
- 备注
- {{ getDetailField('remark') }}
+ {{ t('moldLedger.basicInfo') }}
+
+
+
+ {{ t('moldLedger.moldPlaceholder') }}
+
+
+
+
+ {{ t('moldLedger.moldName') }}
+ {{ detailValue(detailData?.name) }}
+
+
+ {{ t('moldLedger.product') }}
+ {{ detailValue(detailData?.productName) }}
+
+
+ {{ t('moldLedger.moldCode') }}
+ {{ detailValue(detailData?.code) }}
+
+
+ {{ t('moldLedger.status') }}
+
+
+
+
+
+
+ {{ t('moldLedger.versionSpec') }}
+ {{ detailValue(detailData?.version || detailData?.moldType) }}
+
+
+ {{ t('moldLedger.cavityCount') }}
+ {{ detailValue(childMoldCount) }}
+
+
+ {{ t('moldLedger.currentDevice') }}
+ {{ currentDeviceLabel }}
+
+
+ {{ t('moldLedger.useCount') }}
+ {{ detailValue(detailData?.useTime || detailData?.useCount) }}
+
+
+
+
+ {{ summaryExpanded ? t('moldLedger.collapse') : t('moldLedger.expand') }}
+
+
-
- 履历
-
-
+
+
+
-
-
- 暂无点检数据
-
-
- [{{ group.time }}]
- 操作人: {{ group.operator }}
+
+
+ {{ t('functionCommon.loading') }}
+ {{ t('moldLedger.noChildMold') }}
+
+
+ {{ detailValue(item.name) }}
+ {{ moldTypeText(item.type) }}
+
+ {{ t('moldLedger.installLocation') }}
+ {{ detailValue(item.installLocation || item.installPosition || item.currentPosition || item.machineName)
+ }}
+ {{ t('moldLedger.material') }}{{
+ detailValue(item.material) }}
+ {{ t('moldLedger.quantity') }}{{
+ detailValue(item.quantity || item.count || 1) }}
+
+
+ {{ t('moldLedger.lastReplace') }}
+ {{ formatDateTime(item.pressureNetTime) }}
-
-
- {{ item.resultLabel }}
- {{ item.name }}
-
-
-
- 点检方式
- {{ detailValue(item.method) }}
-
-
- 判定标准
- {{ detailValue(item.criteria) }}
-
-
- 点检时间
- {{ detailValue(item.taskTimeLabel) }}
-
-
- 创建时间
- {{ detailValue(item.createTimeLabel) }}
-
-
- 备注
- {{ detailValue(item.remark) }}
-
-
-
-
-
+
+ {{ t('moldLedger.usedDays', { days: detailValue(item.pressureNetDays) }) }}
+
+
-
- 暂无保养数据
-
-
- [{{ group.time }}]
- 操作人: {{ group.operator }}
+
+ {{ t('functionCommon.loading') }}
+ {{ t('moldLedger.noInspection') }}
+
+
+ {{ group.time }}
+ {{ group.operator }}
+
+
+
+ {{ item.name }}
+ {{ item.resultLabel }}
-
-
- {{ item.resultLabel }}
- {{ item.name }}
-
-
-
- 保养方式
- {{ detailValue(item.method) }}
-
-
- 判定标准
- {{ detailValue(item.criteria) }}
-
-
- 保养时间
- {{ detailValue(item.taskTimeLabel) }}
-
-
- 创建时间
- {{ detailValue(item.createTimeLabel) }}
-
-
- 备注
- {{ detailValue(item.remark) }}
-
-
-
-
-
+ {{ t('moldLedger.inspectionMethod') }}{{
+ detailValue(item.method) }}
+ {{ t('moldLedger.criteria') }}{{
+ detailValue(item.criteria) }}
+ {{ t('moldLedger.inspectionTime') }}{{
+ detailValue(item.taskTimeLabel) }}
+ {{ t('moldLedger.remark') }}{{
+ detailValue(item.remark) }}
+
+
+
-
- 暂无维修数据
-
-
- {{ group.name }}
- 共{{ group.items.length }}条
+
+ {{ t('functionCommon.loading') }}
+ {{ t('moldLedger.noRepair') }}
+
+
+ {{ detailValue(row.repairCode || row.subjectName || row.repairName) }}
+ {{ row.resultLabel }}
+
+ {{ t('moldLedger.repairProject') }}{{
+ detailValue(row.subjectName || row.subjectCode) }}
+ {{ t('moldLedger.projectContent') }}{{
+ detailValue(row.subjectContent) }}
+ {{ t('moldLedger.finishTime') }}{{
+ detailValue(row.finishDateLabel) }}
+ {{ t('moldLedger.remark') }}{{
+ detailValue(row.remark) }}
+
+
+
+
+
+
+
+ {{ t('functionCommon.loading') }}
+ {{ t('moldLedger.noMaintenance') }}
+
+
+ {{ group.time }}
+ {{ group.operator }}
+
+
+
+ {{ item.name }}
+ {{ item.resultLabel }}
-
-
- {{ detailValue(row.subjectCode) }}
- {{ detailValue(row.subjectName) }}
-
-
-
- 项目内容
- {{ detailValue(row.subjectContent) }}
-
-
- 维修结果
-
- {{ row.resultLabel }}
-
-
-
- 备注
- {{ detailValue(row.remark) }}
-
-
- 完成日期
- {{ detailValue(row.finishDateLabel) }}
-
-
-
-
-
+ {{ t('moldLedger.maintainMethod') }}{{
+ detailValue(item.method) }}
+ {{ t('moldLedger.criteria') }}{{
+ detailValue(item.criteria) }}
+ {{ t('moldLedger.maintainTime') }}{{
+ detailValue(item.taskTimeLabel) }}
+ {{ t('moldLedger.remark') }}{{
+ detailValue(item.remark) }}
+
+
+
+
+ {{ t('functionCommon.loading') }}
+ {{ t('moldLedger.noInstall') }}
+
+
+ {{ operateTypeLabel(row.operateType) }}
+ {{ detailValue(row.deviceName) }}
+
+ {{ t('moldLedger.operateMold') }}{{
+ detailValue(row.moldName) }}
+ {{ t('moldLedger.operator') }}{{
+ detailValue(row.creatorName) }}
+ {{ t('moldLedger.time') }}{{
+ formatDateTime(row.createTime) }}
+ {{ t('moldLedger.remark') }}{{
+ detailValue(row.remark) }}
+
+
@@ -194,50 +200,55 @@
diff --git a/src/pages_function/pages/moldoperate/deviceSelect.vue b/src/pages_function/pages/moldoperate/deviceSelect.vue
new file mode 100644
index 0000000..8ff61e4
--- /dev/null
+++ b/src/pages_function/pages/moldoperate/deviceSelect.vue
@@ -0,0 +1,366 @@
+
+
+
+
+
+
+
+
+
+ ✕
+
+
+
+
+
+
+
+
+
+ {{ t('moldOperate.deviceCode') }}
+ {{ textValue(device.deviceCode) }}
+
+
+ {{ t('moldOperate.productionLine') }}
+ {{ textValue(device.workshopName) }}
+
+
+ {{ t('moldOperate.currentMold') }}
+ {{ getCurrentMold(device) }}
+
+
+ {{ t('moldOperate.deviceStatus') }}
+ {{ getStatusLabel(device) }}
+
+
+
+
+
+
+
+ {{ t('functionCommon.loading') }}
+ {{ t('moldOperate.noDeviceData') }}
+
+
+
+
+
+ {{ t('functionCommon.confirm') }}
+
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/moldoperate/dismount.vue b/src/pages_function/pages/moldoperate/dismount.vue
new file mode 100644
index 0000000..e802b79
--- /dev/null
+++ b/src/pages_function/pages/moldoperate/dismount.vue
@@ -0,0 +1,733 @@
+
+
+
+
+
+
+
+
+
+
+ {{ t('moldOperate.scanDevice') }}
+
+
+
+
+
+ {{ t('moldOperate.selectDevice') }}
+
+
+
+
+
+
+
+ {{ t('moldOperate.deviceInfo') }}
+
+
+
+
+ {{ t('moldOperate.deviceName') }}
+ {{ textValue(selectedDevice.deviceName) }}
+
+
+ {{ t('moldOperate.deviceCode') }}
+ {{ textValue(selectedDevice.deviceCode) }}
+
+
+
+
+ {{ t('moldOperate.productionLine') }}
+ {{ textValue(selectedDevice.workshopName) }}
+
+
+ {{ t('moldOperate.deviceStatus') }}
+ {{ deviceStatusLabel }}
+
+
+
+
+
+
+
+
+
+ {{ t('moldOperate.currentMoldInfo') }}
+
+
+
+
+
+
+ {{ t('moldOperate.moldName') }}
+ {{ textValue(selectedMold.moldName) }}
+
+
+ {{ t('moldOperate.moldCode') }}
+ {{ textValue(selectedMold.moldCode) }}
+
+
+
+
+ {{ t('moldOperate.product') }}
+ {{ textValue(selectedMold.productName) }}
+
+
+ {{ t('moldOperate.mountTime') }}
+ {{ textValue(selectedMold.mountTime) }}
+
+
+
+
+ {{ t('moldOperate.useCount') }}
+ {{ formatUseCount(selectedMold.useCount) }}
+
+
+
+
+
+
+ ⇄
+ {{ t('moldOperate.changeTarget') }}
+
+
+
+
+
+ {{ t('moldOperate.noMoldOnDevice') }}
+
+
+
+
+ + {{ t('moldOperate.clickSelectDeviceFirst') }}
+
+
+
+
+
+ {{ t('moldOperate.confirmDismount') }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/moldoperate/index.vue b/src/pages_function/pages/moldoperate/index.vue
index 217aca3..fbf033c 100644
--- a/src/pages_function/pages/moldoperate/index.vue
+++ b/src/pages_function/pages/moldoperate/index.vue
@@ -1,922 +1,630 @@
-
-
-
-
- {{
- t('moldOperate.tabUp') }}
- {{
- t('moldOperate.tabDown') }}
+
+
+
+ <
+
+ {{ t('moldOperate.tabUp') }}
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+ {{ t('moldOperate.scanDevice') }}
+
+
+
+
+
+ {{ t('moldOperate.selectDevice') }}
- {{ t('functionCommon.search') }}
-
-
-
- {{ moldFilterLabel }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ + {{ t('moldOperate.clickSelectMold') }}
-
-
-
-
-
+
diff --git a/src/pages_function/pages/moldoperate/moldSelect.vue b/src/pages_function/pages/moldoperate/moldSelect.vue
new file mode 100644
index 0000000..f7692e1
--- /dev/null
+++ b/src/pages_function/pages/moldoperate/moldSelect.vue
@@ -0,0 +1,351 @@
+
+
+
+
+
+
+
+
+
+ ✕
+
+
+
+
+
+
+
+
+
+ {{ t('moldOperate.moldCode') }}
+ {{ textValue(mold.code) }}
+
+
+ 产品型号
+ {{ textValue(mold.productName) }}
+
+
+ {{ t('moldOperate.status') }}
+ {{ getStatusText(mold.status) }}
+
+
+
+
+
+
+
+ {{ t('functionCommon.loading') }}
+ {{ t('moldOperate.noMoldData') }}
+
+
+
+
+
+ {{ t('functionCommon.confirm') }}{{ selectedIds.size > 0 ? `(${selectedIds.size})` : '' }}
+
+
+
+
+
+
+
+
diff --git a/src/utils/dict.ts b/src/utils/dict.ts
index bf128bc..0eff075 100644
--- a/src/utils/dict.ts
+++ b/src/utils/dict.ts
@@ -13,6 +13,7 @@ export enum DICT_TYPE {
VALUE_TYPES = "value_types",
JOB_STATUS = "job_status",
MES_TASK_STATUS = "mes_task_status",
+ SUBMOLD_TYPE = "submold_type",
}
type DictItem = {
diff --git a/src/utils/permissionMenu.js b/src/utils/permissionMenu.js
index a4e6847..b4a7d31 100644
--- a/src/utils/permissionMenu.js
+++ b/src/utils/permissionMenu.js
@@ -73,6 +73,8 @@ const MENU_ROUTE_MAP = {
moldget: '/pages_function/pages/moldget/index',
moldreturn: '/pages_function/pages/moldreturn/index',
moldoperate: '/pages_function/pages/moldoperate/index',
+ moldmount: '/pages_function/pages/moldoperate/index',
+ molddismount: '/pages_function/pages/moldoperate/dismount',
mold: '/pages_function/pages/mold/index',
equipment: '/pages_function/pages/equipment/index',
spare: '/pages_function/pages/spare/index',
@@ -228,6 +230,32 @@ export function findTabMenuByPage(menus, pagePath) {
return dynamicMenus.find((menu) => normalizePagePath(resolveMenuUrl(menu)) === targetPath) || null
}
+// 上下模拆分映射
+const MOLD_OPERATE_SPLIT_MAP = {
+ '上下模': [
+ { name: '上模', key: 'moldmount' },
+ { name: '下模', key: 'molddismount' }
+ ],
+ moldoperate: [
+ { name: '上模', key: 'moldmount' },
+ { name: '下模', key: 'molddismount' }
+ ]
+}
+
+function splitMoldOperateEntry(entry) {
+ const keys = [String(entry.name || '').trim(), normalizeMenuKey(entry.component || ''), normalizeMenuKey(entry.enName || '')]
+ for (const k of keys) {
+ if (MOLD_OPERATE_SPLIT_MAP[k]) {
+ return MOLD_OPERATE_SPLIT_MAP[k].map((item) => ({
+ ...entry,
+ name: item.name,
+ _splitKey: item.key
+ }))
+ }
+ }
+ return null
+}
+
export function buildPageModules(tabMenu) {
return toArray(tabMenu?.children)
.map((module) => {
@@ -236,12 +264,18 @@ export function buildPageModules(tabMenu) {
if (hasNestedEntries) {
return {
...module,
- children: directChildren.flatMap((child) => toArray(child.children))
+ children: directChildren.flatMap((child) => toArray(child.children).flatMap((entry) => {
+ const splitted = splitMoldOperateEntry(entry)
+ return splitted || [entry]
+ }))
}
}
return {
...module,
- children: directChildren
+ children: directChildren.flatMap((entry) => {
+ const splitted = splitMoldOperateEntry(entry)
+ return splitted || [entry]
+ })
}
})
.filter((module) => (module.children || []).length > 0)
@@ -252,6 +286,11 @@ export function resolveMenuUrl(menu) {
return '/pages/index'
}
+ // 拆分后的上下模子项,优先用 _splitKey 匹配(必须在 directRoute 之前)
+ if (menu?._splitKey && MENU_ROUTE_MAP[menu._splitKey]) {
+ return MENU_ROUTE_MAP[menu._splitKey]
+ }
+
const directRoute = getDirectRoute(menu?.path) || getDirectRoute(menu?.component)
if (directRoute) {
return directRoute
diff --git a/src/utils/request.ts b/src/utils/request.ts
index 2e621db..425503b 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -21,6 +21,10 @@ const request = (config: RequestConfig): Promise> => {
if (getToken() && !isToken) {
config.header['Authorization'] = 'Bearer ' + getToken()
}
+ // POST/PUT 请求明确设置 Content-Type 为 application/json
+ if ((config.method === 'POST' || config.method === 'PUT') && config.data) {
+ config.header['Content-Type'] = 'application/json'
+ }
// get请求映射params参数
if (config.params) {
let url = config.url + '?' + tansParams(config.params)
@@ -65,7 +69,8 @@ const request = (config: RequestConfig): Promise> => {
return
} else if (code === 500) {
toast(msg)
- reject('500')
+ // 将完整的 data 对象 reject,便于调用方拿到后端错误信息
+ reject(data)
return
} else if (code !== 200) {
toast(msg)