Browse Source

财务权限

shish 2 years ago
parent
commit
800314c8d9
1 changed files with 4 additions and 3 deletions
  1. 4 3
      app-ghs/controllers/ExpendController.php

+ 4 - 3
app-ghs/controllers/ExpendController.php

@@ -149,9 +149,6 @@ class ExpendController extends BaseController
     public function actionAddExpend()
     {
         $staff = $this->shopAdmin;
-        if (isset($staff->finance) == false || $staff->finance == 0) {
-            util::fail('请财务操作。');
-        }
 
         $mainId = $this->mainId;
         if (getenv('YII_ENV') == 'production') {
@@ -159,6 +156,10 @@ class ExpendController extends BaseController
                 if (!in_array($this->adminId, [24655])) {
                     util::fail('请财务人员操作吧');
                 }
+            } else {
+                if (isset($staff->finance) == false || $staff->finance == 0) {
+                    util::fail('请财务人员操作。');
+                }
             }
         } else {
             if (in_array($mainId, [644])) {