更新
This commit is contained in:
@@ -156,6 +156,24 @@ class PrescriptionOrderLogic
|
|||||||
return in_array((int) $row->creator_id, $ids, true);
|
return in_array((int) $row->creator_id, $ids, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否已分配「处方业务订单」相关菜单/按钮权限(lists、detail、审核等任一子权限即可)
|
||||||
|
*/
|
||||||
|
public static function hasPrescriptionOrderMenuAccess(array $adminInfo): bool
|
||||||
|
{
|
||||||
|
if (!empty($adminInfo['root']) && (int) $adminInfo['root'] === 1) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
$perms = AuthLogic::getAuthByAdminId((int) ($adminInfo['admin_id'] ?? 0));
|
||||||
|
foreach ($perms as $p) {
|
||||||
|
if (is_string($p) && str_starts_with($p, 'tcm.prescriptionOrder/')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param PrescriptionOrder $row
|
* @param PrescriptionOrder $row
|
||||||
*/
|
*/
|
||||||
@@ -164,6 +182,9 @@ class PrescriptionOrderLogic
|
|||||||
if (self::canSeeAllPrescriptionOrders($adminInfo)) {
|
if (self::canSeeAllPrescriptionOrders($adminInfo)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (self::hasPrescriptionOrderMenuAccess($adminInfo)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if ((int) $row->creator_id === $adminId) {
|
if ((int) $row->creator_id === $adminId) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user