最后小修
This commit is contained in:
@@ -358,7 +358,6 @@ const userInfo = computed(() => getUserInfo())
|
||||
|
||||
// 招商经理只能编辑加盟合同,采购经理只能编辑采购合同,且每个员工只能操作自己的合同(管理员除外)
|
||||
const canEditRow = (row) => {
|
||||
if (isAdmin.value) return true
|
||||
if (!canUpdate.value) return false
|
||||
if (isProcurementManager.value && row.type !== 'supply') return false
|
||||
if (isFranchiseManager.value && row.type !== 'franchise') return false
|
||||
@@ -366,7 +365,6 @@ const canEditRow = (row) => {
|
||||
return true
|
||||
}
|
||||
const canDeleteRow = (row) => {
|
||||
if (isAdmin.value) return true
|
||||
if (!canDelete.value) return false
|
||||
if (isProcurementManager.value && row.type !== 'supply') return false
|
||||
if (isFranchiseManager.value && row.type !== 'franchise') return false
|
||||
|
||||
@@ -305,13 +305,11 @@ const currentUserId = computed(() => getUserInfo()?.id)
|
||||
|
||||
|
||||
const canEditRow = (row) => {
|
||||
if (isAdmin.value) return true
|
||||
if (!canUpdate.value) return false
|
||||
if (getUserInfo()?.employee_id !== row.employee_id) return false
|
||||
return true
|
||||
}
|
||||
const canDeleteRow = (row) => {
|
||||
if (isAdmin.value) return true
|
||||
if (!canDelete.value) return false
|
||||
if (getUserInfo()?.employee_id !== row.employee_id) return false
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user