shish 2 лет назад
Родитель
Сommit
4c0d20aebd
1 измененных файлов с 18 добавлено и 2 удалено
  1. 18 2
      app-ghs/controllers/StatController.php

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

@@ -72,8 +72,24 @@ class StatController 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, [28456])) {
+                    $hasPower = 1;
+                }
+            }
+        } else {
+            if ($this->mainId == 644) {
+                if (in_array($this->adminId, [1230])) {
+                    $hasPower = 1;
+                }
+            }
+        }
+        if ($lookMoney == 0 && $hasPower == 0) {
+            util::fail('没有财务权限哦');
         }
 
         $mainId = $this->mainId;