|
|
@ -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 = '' |
|
|
|