From 87b9f0602d3fd244307bf0936c2e7be2abf064ff Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Mon, 18 Mar 2024 09:12:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=83=E9=99=90=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dict.ts | 1 + .../deviceSpotInspectionRecordMain/index.vue | 4 +--- .../eam/device/devicemaintainjob/index.vue | 8 ++------ .../deviceMaintenanceMain.data.ts | 18 +++++++++++++++++- .../eam/device/devicemaintenancejob/index.vue | 18 +++++++----------- src/views/eam/mold/moldinspectionjob/index.vue | 2 +- src/views/eam/mold/moldmaintainjob/index.vue | 12 +++--------- .../eam/mold/moldmaintenancejob/index.vue | 7 ++++--- .../moldMaintenanceMain.data.ts | 1 + 9 files changed, 37 insertions(+), 34 deletions(-) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index b2b2127..48604a2 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -300,5 +300,6 @@ export enum DICT_TYPE { ADJUST_STATUS = 'adjust_status', //盘点调整状态 APP_DEVICE_MOLD_TYPE = 'app_device_mold_type', //设备/模具/工艺:类型 ITEM_SUBJECT = 'item_subject', //备件的科目 + TURN_TYPE = 'turn_type', //转移类型 } diff --git a/src/views/eam/device/deviceSpotInspectionRecordMain/index.vue b/src/views/eam/device/deviceSpotInspectionRecordMain/index.vue index 9ce90ef..a85a473 100644 --- a/src/views/eam/device/deviceSpotInspectionRecordMain/index.vue +++ b/src/views/eam/device/deviceSpotInspectionRecordMain/index.vue @@ -179,9 +179,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - // defaultButtons.defaultAddBtn({ - // hide: !userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker') - // }), // 新增 + // defaultButtons.defaultAddBtn(null), // 新增 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null) // 设置 diff --git a/src/views/eam/device/devicemaintainjob/index.vue b/src/views/eam/device/devicemaintainjob/index.vue index 8dd8398..8c44f7f 100644 --- a/src/views/eam/device/devicemaintainjob/index.vue +++ b/src/views/eam/device/devicemaintainjob/index.vue @@ -181,7 +181,6 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ // defaultButtons.defaultAddBtn({ - // hide: !userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker') // }), // 新增 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 @@ -226,9 +225,7 @@ const butttondata = (row) => { defaultButtons.acceptOrderBtn({ hide: !( - row.status == 'PENDING' && - (userStore?.userSelfInfo?.posts?.some((item) => item.code == 'engineer') || - userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker')) + row.status == 'PENDING' ) }), // 接单 // defaultButtons.turnOrderBtn({ @@ -239,8 +236,7 @@ const butttondata = (row) => { // }), // 维修 // defaultButtons.verifyOrderBtn({ // hide: !( - // row.status == 'COMPLETED' && - // userStore?.userSelfInfo?.posts?.some((item) => item.code == 'engineer') + // row.status == 'COMPLETED' // ) // }), // 验证 defaultButtons.finishOrderBtn({ diff --git a/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts b/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts index 57760d6..03f0284 100644 --- a/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts +++ b/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts @@ -50,7 +50,22 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ isSearch: false, isTable: true, }, - + { + label: '转办类型', + field: 'turnType', + sort: 'custom', + isDetail: false, + isTable: false, + isSearch: false, + isForm: true, + dictType: DICT_TYPE.TURN_TYPE, + dictClass: 'string', + form: { + component: 'Select', + componentProps: { + } + } + }, { label: '设备模具编号', field: 'deviceNumber', @@ -254,6 +269,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ }, isSearch: false, isTable: true, + isForm: false, dictType: DICT_TYPE.WEI_XIU_ORDER_STATUS, dictClass: 'string', form: { diff --git a/src/views/eam/device/devicemaintenancejob/index.vue b/src/views/eam/device/devicemaintenancejob/index.vue index 05a4fa5..70a38d5 100644 --- a/src/views/eam/device/devicemaintenancejob/index.vue +++ b/src/views/eam/device/devicemaintenancejob/index.vue @@ -198,11 +198,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({ - hide: !userStore?.userSelfInfo?.posts?.some((item) => { - return item.code == 'worker' - }) - }), // 新增 + defaultButtons.defaultAddBtn(null), // 新增 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null) // 设置 @@ -248,8 +244,7 @@ const butttondata = (row) => { defaultButtons.mainListEditBtn(null), // 编辑 defaultButtons.acceptOrderBtn({ hide: !( - row.status == 'PENDING' && - userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker') + row.status == 'PENDING' ) }), // 接单 defaultButtons.turnOrderBtn({ @@ -260,16 +255,14 @@ const butttondata = (row) => { }), // 维修 defaultButtons.verifyOrderBtn({ hide: !( - row.status == 'COMPLETED' && - userStore?.userSelfInfo?.posts?.some((item) => item.code == 'engineer') + row.status == 'COMPLETED' ) }), // 验证 defaultButtons.finishOrderBtn({ hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) }), // 完成 defaultButtons.pictureBtn({ - hide: !(row.filePathList != null && row.filePathList.length > 0 && - userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker')) + hide: !(row.filePathList != null && row.filePathList.length > 0) }) // 预览报修图片 ] } @@ -302,6 +295,9 @@ const buttonTableClick = async (val, row) => { } else if (val == 'repair') { openDetail(row, '代码', row.number) } else if (val == 'turnOrder') { + DeviceMaintenanceMain.allSchemas.formSchema.find(item => { + return item.field == 'turnType' + }).show = true DeviceMaintenanceMain.allSchemas.formSchema.find(item => { return item.field == 'type' }).componentProps.options = deviceMoldTypeList diff --git a/src/views/eam/mold/moldinspectionjob/index.vue b/src/views/eam/mold/moldinspectionjob/index.vue index 3c29d50..68aafc5 100644 --- a/src/views/eam/mold/moldinspectionjob/index.vue +++ b/src/views/eam/mold/moldinspectionjob/index.vue @@ -145,7 +145,7 @@ const HeadButttondata = [ // defaultButtons.defaultAddBtn({hasPermi:'eam:moldInspectionMain:create'}), // 新增 // defaultButtons.defaultImportBtn({hasPermi:'eam:moldInspectionMain:import'}), // 导入 // defaultButtons.defaultExportBtn({ hasPermi: 'eam:moldInspectionMain:export' }), // 导出 - defaultButtons.defaultAddBtn({ hide: !(userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker') || userStore?.userSelfInfo?.posts?.some((item) => item.code == 'engineer')) }), // 新增 + defaultButtons.defaultAddBtn(null), // 新增 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 diff --git a/src/views/eam/mold/moldmaintainjob/index.vue b/src/views/eam/mold/moldmaintainjob/index.vue index b8b4065..500331d 100644 --- a/src/views/eam/mold/moldmaintainjob/index.vue +++ b/src/views/eam/mold/moldmaintainjob/index.vue @@ -182,9 +182,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - // defaultButtons.defaultAddBtn({ - // hide: !userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker') - // }), // 新增 + // defaultButtons.defaultAddBtn(null), // 新增 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null) // 设置 @@ -228,10 +226,7 @@ const butttondata = (row) => { defaultButtons.acceptOrderBtn({ hide: !( - row.status == 'PENDING' && - (userStore?.userSelfInfo?.posts?.some((item) => item.code == 'engineer') || - userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker')) || - row.status == 1 + row.status == 'PENDING' && row.status == 1 ) }), // 接单 // defaultButtons.turnOrderBtn({ @@ -242,8 +237,7 @@ const butttondata = (row) => { // }), // 维修 // defaultButtons.verifyOrderBtn({ // hide: !( - // row.status == 'COMPLETED' && - // userStore?.userSelfInfo?.posts?.some((item) => item.code == 'engineer') + // row.status == 'COMPLETED' // ) // }), // 验证 defaultButtons.finishOrderBtn({ diff --git a/src/views/eam/mold/moldmaintenancejob/index.vue b/src/views/eam/mold/moldmaintenancejob/index.vue index 8cc9296..1c68234 100644 --- a/src/views/eam/mold/moldmaintenancejob/index.vue +++ b/src/views/eam/mold/moldmaintenancejob/index.vue @@ -199,9 +199,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({ - hide: !userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker') - }), // 新增 + defaultButtons.defaultAddBtn(null), // 新增 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null) // 设置 @@ -307,6 +305,9 @@ const buttonTableClick = async (val, row) => { } else if (val == 'acceptOrder') { acceptOrder(row) } else if (val == 'turnOrder') { + MoldMaintenanceMain.allSchemas.formSchema.find(item => { + return item.field == 'turnType' + }).isForm = true MoldMaintenanceMain.allSchemas.formSchema.find(item => { return item.field == 'type' }).componentProps.options = deviceMoldTypeList diff --git a/src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts b/src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts index e2154d2..173f448 100644 --- a/src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts +++ b/src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts @@ -204,6 +204,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive([ table: { width: '150', }, + isForm: false, isSearch: false, isTable: true, dictType: DICT_TYPE.WEI_XIU_ORDER_STATUS,