wufeng 2 years ago
parent
commit
b85d154160
2 changed files with 8 additions and 3 deletions
  1. 4 3
      app/admin/controller/Proorder.php
  2. 4 0
      app/common.php

+ 4 - 3
app/admin/controller/Proorder.php

@@ -109,12 +109,13 @@ class Proorder extends Base
         $db = ProcessWait::alias("a")
             ->leftJoin('workflow b', 'a.order_type=b.order_type and a.order_code=b.order_code')
 //            ->leftJoin('process p', 'p.process_type=a.order_type AND p.is_del=0 AND p.status=1')
-            ->where(['a.status' => ProcessWait::$status_wait])
-            ->whereFindInSet('handle_user_list', $this->uid);
+            ->where(['a.status' => ProcessWait::$status_wait]);
+
 
 //        $db->where(function ($query) use ($param) {
         //所属角色
-//            $role = $this->checkRole();
+        $role = $this->checkRole();
+        if ($role['roleid'] != 1) $db->whereFindInSet('handle_user_list', $this->uid);
 
 //            if (!empty($role['write']) || $role['roleid'] == 33) $query->whereFindInSet('roleid', $role['roleid']);
 //            $query->whereFindInSet('roleid', $role['roleid']);

+ 4 - 0
app/common.php

@@ -1271,6 +1271,10 @@ if (!function_exists('get_handle_user_list')) {
         }
 
         $res = array_intersect($tmp, $data);//流程权限和数据权限取交集
+
+        //如果本人有流程权限的话,加入到数组中
+        if (in_array($holder_id, $data)) $res[] = $holder_id;
+
         sort($res);
         $res = array_unique($res);