|
@ -264,9 +264,7 @@ const butttondata = (row) => { |
|
|
// defaultButtons.mainListEditBtn(null), // 编辑 |
|
|
// defaultButtons.mainListEditBtn(null), // 编辑 |
|
|
defaultButtons.acceptOrderBtn({ |
|
|
defaultButtons.acceptOrderBtn({ |
|
|
hasPermi:'eam:mold-maintain-job-main:orderClick', |
|
|
hasPermi:'eam:mold-maintain-job-main:orderClick', |
|
|
hide: !( |
|
|
hide: !(row.status == 'PENDING') |
|
|
row.status == 'PENDING' && judgeIsTheClass(row) |
|
|
|
|
|
) |
|
|
|
|
|
}), // 接单 |
|
|
}), // 接单 |
|
|
defaultButtons.maintainBtn({ |
|
|
defaultButtons.maintainBtn({ |
|
|
hasPermi:'eam:mold-maintain-job-main:maintain', |
|
|
hasPermi:'eam:mold-maintain-job-main:maintain', |
|
@ -278,11 +276,11 @@ const butttondata = (row) => { |
|
|
}), // 完成 |
|
|
}), // 完成 |
|
|
defaultButtons.verifyOrderBtn({ |
|
|
defaultButtons.verifyOrderBtn({ |
|
|
hasPermi:'eam:mold-maintain-job-main:orderClickVerify', |
|
|
hasPermi:'eam:mold-maintain-job-main:orderClickVerify', |
|
|
hide: !(row.status == 'COMPLETED' && judgeIsTheClassEngineer(row)) |
|
|
hide: !(row.status == 'COMPLETED') |
|
|
}), // 验证 |
|
|
}), // 验证 |
|
|
defaultButtons.orderPrintBtn({ |
|
|
defaultButtons.orderPrintBtn({ |
|
|
hasPermi:'eam:mold-maintain-job-main:print', |
|
|
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) => { |
|
|
const openDialog = (row) => { |
|
|
dialogRowData.value = row |
|
|
dialogRowData.value = row |
|
|
updateFormValue.value.verifyContent = '' |
|
|
updateFormValue.value.verifyContent = '' |
|
|