备货单与审批数据过滤

This commit is contained in:
2025-12-08 13:19:16 +08:00
parent 06a264ff21
commit a0a71161d3
2 changed files with 10 additions and 2 deletions
@@ -56,7 +56,11 @@ class ApprovalRecordsService
case 'todo':
if ($p['scene'] === 'todo') {
if (!in_array(1, $request->user->role_ids)) {
// if (!in_array(1, $request->user->role_ids)) {
// $config['where']['approver_id'] = $request->user->uid;
// }
$roles_id = array_intersect([1,5,6], $request->user->role_ids);
if(count($roles_id) === 0){
$config['where']['approver_id'] = $request->user->uid;
}
$config['where']['status'] = 'pending';