From fa698c901dca5799abca9120f6aab1fe56036906 Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Thu, 14 Mar 2024 08:40:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eam/device/deviceMaintenanceMain/index.ts | 10 ++++++++++ src/api/eam/mold/moldMaintenanceMain/index.ts | 6 ++++++ src/components/BasicForm/src/BasicForm.vue | 2 +- .../deviceMaintainOrderMain.data.ts | 2 +- .../eam/device/devicemaintenancejob/index.vue | 15 ++++++++++++++- src/views/eam/mold/moldinspectionjob/index.vue | 10 +++++----- .../moldMaintainOrderMain.data.ts | 2 +- src/views/eam/mold/moldmaintenancejob/index.vue | 17 +++++++++++++++-- .../moldMaintenanceMain.data.ts | 2 +- 9 files changed, 54 insertions(+), 12 deletions(-) diff --git a/src/api/eam/device/deviceMaintenanceMain/index.ts b/src/api/eam/device/deviceMaintenanceMain/index.ts index 644b4f5..b87f9aa 100644 --- a/src/api/eam/device/deviceMaintenanceMain/index.ts +++ b/src/api/eam/device/deviceMaintenanceMain/index.ts @@ -79,3 +79,13 @@ export const finishOrder = async (params) => { return await request.get({ url: `/eam/device-maintenance-job-main/orderClick`, params}) } + + +// 校验维修工单 +export const verifyOrder = async (params) => { + return await request.get({ url: `/eam/device-maintenance-job-main/orderClick`, params}) +} + + + + diff --git a/src/api/eam/mold/moldMaintenanceMain/index.ts b/src/api/eam/mold/moldMaintenanceMain/index.ts index 18e433a..c131617 100644 --- a/src/api/eam/mold/moldMaintenanceMain/index.ts +++ b/src/api/eam/mold/moldMaintenanceMain/index.ts @@ -77,4 +77,10 @@ export const getMoldMainTempList = async (type: String) => { // 完成维修工单 export const finishOrder = async (params) => { return await request.get({ url: `/eam/device-maintenance-job-main/orderClick`, params}) +} + + +// 校验维修工单 +export const verifyOrder = async (params) => { + return await request.get({ url: `/eam/device-maintenance-job-main/orderClick`, params}) } \ No newline at end of file diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index fa89661..965f5c7 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -548,7 +548,7 @@ const inpuFocus = (headerItem, row, index) => { * @param cur 改变后值 */ const onChange = (field, cur, item) => { - emit('onChange', field, cur, item) + emit('onChange', field, cur, item,formRef.value) } // 修改盘点类型 diff --git a/src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts b/src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts index 5fd941a..68a5948 100644 --- a/src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts +++ b/src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts @@ -120,7 +120,7 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive([ label: '类型', field: 'type', sort: 'custom', - isSearch: true, + isSearch: false, table: { width: '150', }, diff --git a/src/views/eam/device/devicemaintenancejob/index.vue b/src/views/eam/device/devicemaintenancejob/index.vue index a1689e5..25e00ef 100644 --- a/src/views/eam/device/devicemaintenancejob/index.vue +++ b/src/views/eam/device/devicemaintenancejob/index.vue @@ -297,6 +297,8 @@ const buttonTableClick = async (val, row) => { openForm('turnOrder', row) } else if (val == 'finish') { finishOrder(row) + } else if (val == 'verifyOrder') { + verifyOrder(row) } else if (val == 'picture') { showView.value = true urls.value = row.filePathList @@ -393,7 +395,18 @@ function finishOrder(row) { }) } // 验证 -function verifyOrder() {} +function verifyOrder(row) { + let param = { + id: row.id, + number: row.number, + status: row.status, + requestNumber: row.requestNumber, + } + DeviceMaintenanceMainApi.verifyOrder(param).then(res => { + getList() + message.success('操作成功') + }) +} // 维修 function repair() {} diff --git a/src/views/eam/mold/moldinspectionjob/index.vue b/src/views/eam/mold/moldinspectionjob/index.vue index 5b4bbc1..b42d846 100644 --- a/src/views/eam/mold/moldinspectionjob/index.vue +++ b/src/views/eam/mold/moldinspectionjob/index.vue @@ -181,7 +181,7 @@ const butttondata = (row) => { // defaultButtons.mainListEditBtn({hasPermi:'eam:moldInspectionMain:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({hasPermi:'eam:moldInspectionMain:delete'}), // 删除 defaultButtons.mainListEditBtn(null), // 编辑 - defaultButtons.maintenanceOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //检修 + defaultButtons.mainInspectionOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //检修 defaultButtons.finishOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //完成 ] } @@ -190,8 +190,8 @@ const butttondata = (row) => { const buttonTableClick = async (val, row) => { if (val == 'edit') { // 编辑 openForm('update', row) - } else if (val == 'maintenanceOrder') { // 检修 - handleMaintenanceOrder(row) + } else if (val == 'mainInspectionOrder') { // 检修 + openDetail(row, '代码', row.number) } else if (val == 'finishOrder') { // 完成 handleFinishOrder(row) } @@ -297,12 +297,12 @@ function handleFinishOrder(row) { const onChange = (field, cur, item) => { // 当有效天数 和 生效时间 发生变化 - if (field == 'moldNumber') { + if (field == 'deviceNumber') { basicFormRef.value.formRef.formModel.factoryAreaNumber = Number(item.componentProps.options.find(element => element.number == cur).factoryAreaNumber) basicFormRef.value.formRef.formModel.maintenance = String(userStore?.getUser?.id) basicFormRef.value.formRef.formModel.maintenanceNumber = '' } else if (field == 'maintenanceNumber') { - basicFormRef.value.formRef.formModel.moldNumber = item.componentProps.options.find(element => element.number == cur).moldNumber + basicFormRef.value.formRef.formModel.deviceNumber = item.componentProps.options.find(element => element.number == cur).deviceNumber basicFormRef.value.formRef.formModel.factoryAreaNumber = Number(item.componentProps.options.find(element => element.number == cur).factoryAreaNumber) basicFormRef.value.formRef.formModel.maintenance = String(userStore?.getUser?.id) } diff --git a/src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts b/src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts index 443d5a1..e874d2c 100644 --- a/src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts +++ b/src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts @@ -103,7 +103,7 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive([ label: '类型', field: 'type', sort: 'custom', - isSearch: true, + isSearch: false, table: { width: '150', }, diff --git a/src/views/eam/mold/moldmaintenancejob/index.vue b/src/views/eam/mold/moldmaintenancejob/index.vue index 69450c4..c19a76c 100644 --- a/src/views/eam/mold/moldmaintenancejob/index.vue +++ b/src/views/eam/mold/moldmaintenancejob/index.vue @@ -292,7 +292,9 @@ const buttonTableClick = async (val, row) => { openForm('turnOrder', row) } else if (val == 'finishOrder') { finishOrder(row) - } else if (val == 'repair') { + } else if (val == 'verifyOrder') { + verifyOrder(row) + } else if (val == 'repair') { openDetail(row, '代码', row.code) } else if (val == 'picture') { showView.value = true @@ -388,7 +390,18 @@ function finishOrder(row) { }) } // 验证 -function verifyOrder() {} +function verifyOrder(row) { + let param = { + id: row.id, + number: row.number, + status: row.status, + requestNumber: row.requestNumber, + } + MoldMaintenanceMainApi.verifyOrder(param).then(res => { + getList() + message.success('操作成功') + }) +} // 维修 function repair() {} diff --git a/src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts b/src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts index ea50e0d..d04bb92 100644 --- a/src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts +++ b/src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts @@ -141,7 +141,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive([ table: { width: '150', }, - isSearch: true, + isSearch: false, isForm: true, dictType: DICT_TYPE.DEVICE_MOLD_TYPE, dictClass: 'string',