shish 3 rokov pred
rodič
commit
a0bc5af2e7

+ 5 - 1
app-hd/controllers/ConsoleController.php

@@ -98,12 +98,16 @@ class ConsoleController extends BaseController
             ["name" => "绿植采购", "img" => "ghs/home/icon_caigou.png", "url" => "/admin/goods/plantCg", 'pf' => 1,],
         ];
 
+        //查看财务的权限
+        $lookMoney = \bizGhs\shop\classes\ShopAdminClass::lookMoneyPower($this->shopAdmin, $this->shop);
+
         util::success([
             'asset' => $this->main,
             'notice' => $notice,
             'todayData' => ['visit' => $visitCustom, 'income' => $todaySale, 'order' => $orderNum, 'wastage' => $wastage, 'bouquet' => $hsNum],
             'incomeStat' => [],
-            'menu' => $menu
+            'menu' => $menu,
+            'lookMoney' => $lookMoney,
         ]);
     }
 

+ 8 - 0
app-hd/controllers/StatKdController.php

@@ -9,10 +9,18 @@ class StatKdController extends BaseController
     //各渠道收入 ssh 20220711
     public function actionProfile()
     {
+
+        //查看财务的权限
+        $lookMoney = ShopAdminClass::lookMoneyPower($this->shopAdmin, $this->shop);
+        if ($lookMoney == 0) {
+            util::fail('没有权限查看');
+        }
+
         $shopAdmin = $this->shopAdmin;
         if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
             util::fail('超管才能查看');
         }
+
         //惠雅鲜花员工不能看收入情况
         $shopAdmin = $this->shopAdmin;
         $adminId = $shopAdmin->adminId ?? 0;