shish 2 lat temu
rodzic
commit
ea4881504f

+ 2 - 2
app-ghs/controllers/StatController.php

@@ -75,9 +75,9 @@ class StatController extends BaseController
 
         $hasPower = 0;
         if (getenv('YII_ENV') == 'production') {
-            //小向花卉采购控制
+            //小向花卉
             if ($this->mainId == 23390) {
-                if (in_array($this->adminId, [28456])) {
+                if (in_array($this->adminId, [28456,31105])) {
                     $hasPower = 1;
                 }
             }

+ 18 - 2
app-ghs/controllers/StatItemController.php

@@ -25,8 +25,24 @@ class StatItemController extends BaseController
 
         //查看财务的权限
         $lookMoney = ShopAdminClass::lookMoneyPower($this->shopAdmin, $this->shop);
-        if ($lookMoney == 0) {
-            util::fail('无法查看');
+
+        $hasPower = 0;
+        if (getenv('YII_ENV') == 'production') {
+            //小向花卉
+            if ($this->mainId == 23390) {
+                if (in_array($this->adminId, [31105])) {
+                    $hasPower = 1;
+                }
+            }
+        } else {
+            if ($this->mainId == 644) {
+                if (in_array($this->adminId, [1230])) {
+                    $hasPower = 1;
+                }
+            }
+        }
+        if ($lookMoney == 0 && $hasPower == 0) {
+            util::fail('没有财务权限哦');
         }
 
         $get = Yii::$app->request->get();