diff --git a/src/views/eam/device/deviceRepair/index.vue b/src/views/eam/device/deviceRepair/index.vue index 0ab12ff..0e57df8 100644 --- a/src/views/eam/device/deviceRepair/index.vue +++ b/src/views/eam/device/deviceRepair/index.vue @@ -112,9 +112,6 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - // defaultButtons.defaultAddBtn({hasPermi:'eam:deviceRepair:create'}), // 新增 - // defaultButtons.defaultImportBtn({hasPermi:'eam:deviceRepair:import'}), // 导入 - // defaultButtons.defaultExportBtn({ hasPermi: 'eam:deviceRepair:export' }), // 导出 defaultButtons.defaultAddBtn({hasPermi:'eam:device-repair-request:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'eam:device-repair-request:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'eam:device-repair-request:export'}), // 导出 diff --git a/src/views/eam/device/devicemaintainjob/index.vue b/src/views/eam/device/devicemaintainjob/index.vue index 81df738..52de514 100644 --- a/src/views/eam/device/devicemaintainjob/index.vue +++ b/src/views/eam/device/devicemaintainjob/index.vue @@ -275,11 +275,11 @@ const butttondata = (row) => { }), // 完成 defaultButtons.verifyOrderBtn({ hasPermi:'eam:device-maintain-job-main:orderClickVerify', - hide: !(row.status == 'COMPLETED' && judgeIsTheClassEngineer(row)) + hide: !(row.status == 'COMPLETED') }), // 验证 defaultButtons.orderPrintBtn({ hasPermi:'eam:device-maintain-job-main:print', - hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) || !((row.status == 'COMPLETED' || row.status == 'PECEIVED') && judgeIsTheClassEngineer(row)) + hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) || !((row.status == 'COMPLETED' || row.status == 'PECEIVED')) }) // 打印 ] diff --git a/src/views/eam/device/devicemaintenancejob/index.vue b/src/views/eam/device/devicemaintenancejob/index.vue index b4dd370..9831cfb 100644 --- a/src/views/eam/device/devicemaintenancejob/index.vue +++ b/src/views/eam/device/devicemaintenancejob/index.vue @@ -383,7 +383,8 @@ const judgeIsTheClassEngineer = (row) => { const judgeIsTheClassEngineerAndApply = (row,type) => { // 根据不同的状态进行判断 - if (row.status === 'COMPLETED' && type == 'CONFIRM') { + // if (row.status === 'COMPLETED' && type == 'CONFIRM') { + if (row.status === 'COMPLETED') { // COMPLETED状态下,需要额外判断requestNumber和declarer if(row.requestNumber != null && row.requestNumber !== '' && row.declarer === userStore.getUser.id){ return true diff --git a/src/views/eam/mold/moldSpotInspectionRecordMain/index.vue b/src/views/eam/mold/moldSpotInspectionRecordMain/index.vue index ebdb7f3..4d989db 100644 --- a/src/views/eam/mold/moldSpotInspectionRecordMain/index.vue +++ b/src/views/eam/mold/moldSpotInspectionRecordMain/index.vue @@ -262,7 +262,7 @@ const isShowMainButton = (row, val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.approveBtn({ hasPermi:'eam:mold-spot-inspection-record-main:approve', hide: !(row.status == 'COMPLETED' && judgeIfMoldRole())}), // 审批 + defaultButtons.approveBtn({ hasPermi:'eam:mold-spot-inspection-record-main:approve', hide: !(row.status == 'COMPLETED')}), // 审批 ] } const onChange = (field, cur, item) => { @@ -509,20 +509,6 @@ function buttonControllFunction(row, val) { return true } } -/** - * 判断是否为模具工程师 - */ -const judgeIfMoldRole = () => { - const rolesOk = userStore.roles.find(item => { - return item == 'mold_class_Engineer_role' - }) - if (rolesOk != undefined && rolesOk != null) { - return true - } else { - return false - } -} - const handleBeforeClose = async(done)=>{ done() } diff --git a/src/views/eam/mold/moldinspectionjob/index.vue b/src/views/eam/mold/moldinspectionjob/index.vue index f65ff75..deef944 100644 --- a/src/views/eam/mold/moldinspectionjob/index.vue +++ b/src/views/eam/mold/moldinspectionjob/index.vue @@ -244,18 +244,15 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = (row) => { return [ - // defaultButtons.mainListEditBtn({hasPermi:'eam:moldInspectionMain:update'}), // 编辑 - // defaultButtons.mainListDeleteBtn({hasPermi:'eam:moldInspectionMain:delete'}), // 删除 - // defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED' && isReceiver(row.maintenance))}), // 编辑 defaultButtons.mainInspectionOrderBtn({ hasPermi:'eam:mold-inspection-job-main:inspection', hide: !(row.status == 'PECEIVED' && (userStore.getUser.id == row.maintenance)) }), //检修 defaultButtons.finishOrderBtn({ hasPermi:'eam:mold-inspection-job-main:orderClickFinish', hide: !(row.status == 'PECEIVED' && (userStore.getUser.id == row.maintenance)) }), //完成 defaultButtons.verifyOrderBtn({ hasPermi:'eam:mold-inspection-job-main:orderClickVerify', - hide: !(row.status == 'COMPLETED' && judgeIsTheClassEngineer(row)) + hide: !(row.status == 'COMPLETED') }), // 验证 defaultButtons.orderPrintBtn({ hasPermi:'eam:mold-inspection-job-main:print', - hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) || !((row.status == 'COMPLETED' || row.status == 'PECEIVED') && judgeIsTheClassEngineer(row)) + hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) || !((row.status == 'COMPLETED' || row.status == 'PECEIVED')) }) // 打印 ] } @@ -670,18 +667,6 @@ function verifyCancel(row) { verifyDialogVisible.value = false } -const judgeIsTheClassEngineer = (row) => { - const rolesOk = userStore.roles.find(item => { - return item == 'mold_class_Engineer_role' - }) - if (rolesOk != undefined && rolesOk != null) { - return true - } else { - return false - } -} - - const orderPrint = (row) => { window.open(src.value + "&id=" + row.id) } diff --git a/src/views/eam/mold/moldmaintainjob/index.vue b/src/views/eam/mold/moldmaintainjob/index.vue index 5a612b4..1d4f5e7 100644 --- a/src/views/eam/mold/moldmaintainjob/index.vue +++ b/src/views/eam/mold/moldmaintainjob/index.vue @@ -264,9 +264,7 @@ const butttondata = (row) => { // defaultButtons.mainListEditBtn(null), // 编辑 defaultButtons.acceptOrderBtn({ hasPermi:'eam:mold-maintain-job-main:orderClick', - hide: !( - row.status == 'PENDING' && judgeIsTheClass(row) - ) + hide: !(row.status == 'PENDING') }), // 接单 defaultButtons.maintainBtn({ hasPermi:'eam:mold-maintain-job-main:maintain', @@ -278,11 +276,11 @@ const butttondata = (row) => { }), // 完成 defaultButtons.verifyOrderBtn({ hasPermi:'eam:mold-maintain-job-main:orderClickVerify', - hide: !(row.status == 'COMPLETED' && judgeIsTheClassEngineer(row)) + hide: !(row.status == 'COMPLETED') }), // 验证 defaultButtons.orderPrintBtn({ hasPermi:'eam:mold-maintain-job-main:print', - hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) || !((row.status == 'COMPLETED' || row.status == 'PECEIVED') && judgeIsTheClassEngineer(row)) + hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) || !((row.status == 'COMPLETED' || row.status == 'PECEIVED')) }) // 打印 ] } @@ -622,31 +620,6 @@ function isReceiver(orderPerson) { } } - -const judgeIsTheClass = (row) => { - const rolesOk = userStore.roles.find(item => { - if (row.type == 'MOLD') { - return item == 'mold_class_worker_role' || item == 'mold_class_Engineer_role' - } - }) - if (rolesOk != undefined && rolesOk != null) { - return true - } else { - return false - } -} - -const judgeIsTheClassEngineer = (row) => { - const rolesOk = userStore.roles.find(item => { - return item == 'mold_class_Engineer_role' - }) - if (rolesOk != undefined && rolesOk != null) { - return true - } else { - return false - } -} - const openDialog = (row) => { dialogRowData.value = row updateFormValue.value.verifyContent = '' diff --git a/src/views/eam/mold/moldmaintenancejob/index.vue b/src/views/eam/mold/moldmaintenancejob/index.vue index 531dc70..b67985e 100644 --- a/src/views/eam/mold/moldmaintenancejob/index.vue +++ b/src/views/eam/mold/moldmaintenancejob/index.vue @@ -1167,7 +1167,7 @@ const validateRow = (row) => { const judgeIsTheClassEngineerAndApply = (row,type) => { // 根据不同的状态进行判断 - if (row.status === 'COMPLETED' && type == 'CONFIRM') { + if (row.status === 'COMPLETED') { // COMPLETED状态下,需要额外判断requestNumber和declarer if(row.requestNumber != null && row.requestNumber !== '' && row.declarer === userStore.getUser.id){ return true