shish пре 3 година
родитељ
комит
4e0157ab40

+ 5 - 0
app-ghs/controllers/MainController.php

@@ -5,6 +5,7 @@ namespace ghs\controllers;
 use biz\shop\classes\ShopClass;
 use biz\stat\classes\StatCgClass;
 use bizGhs\product\classes\ProductClass;
+use bizGhs\shop\classes\ShopAdminClass;
 use bizHd\stat\classes\StatIncomeClass;
 use bizHd\stat\classes\StatOrderClass;
 use bizHd\wx\classes\WxOpenClass;
@@ -223,6 +224,9 @@ class MainController extends BaseController
     //我的 ssh 2021.1.30
     public function actionMy()
     {
+
+        $lookMoney = ShopAdminClass::lookMoneyPower($this->shopAdmin, $this->shop);
+
         $shop = $this->shop ?? null;
         $main = $this->main ?? null;
         $balance = $main->balance ?? 0.00;
@@ -254,6 +258,7 @@ class MainController extends BaseController
             'adminId' => $this->adminId,
             'money' => $money,
             'shopInfo' => $shop,
+            'lookMoney' => $lookMoney,
         ];
         util::success($data);
     }

+ 3 - 0
app-hd/controllers/MainController.php

@@ -154,6 +154,8 @@ class MainController extends BaseController
     //我的 ssh 2021.4.8
     public function actionMy()
     {
+        $lookMoney = \bizGhs\shop\classes\ShopAdminClass::lookMoneyPower($this->shopAdmin, $this->shop);
+
         $shop = $this->shop;
         $main = $this->main;
         $mainId = $main->id ?? 0;
@@ -186,6 +188,7 @@ class MainController extends BaseController
             'sjId' => $this->sjId,
             'money' => $money,
             'mainId' => $mainId,
+            'lookMoney' => $lookMoney,
         ];
         util::success($data);
     }

+ 5 - 5
biz-ghs/shop/classes/ShopAdminClass.php

@@ -29,35 +29,35 @@ class ShopAdminClass extends BaseClass
         $staffId = $staff->id ?? 0;
         if (getenv('YII_ENV', 'local') == 'production') {
             if ($mainId == 8502) {
-                //昱成只有指定人有查看财务权限
+                //昱成指定人有查看财务权限
                 $point = [134326, 134325, 134323, 134361, 134362];
                 if (in_array($staffId, $point) == false) {
                     $lookMoney = 0;
                 }
             }
             if ($mainId == 7704) {
-                //国恋只有指定人有查看财务权限
+                //国恋指定人有查看财务权限
                 $point = [133727, 133545, 133548];
                 if (in_array($staffId, $point) == false) {
                     $lookMoney = 0;
                 }
             }
             if ($mainId == 7756) {
-                //勇记只有指定人有查看财务权限
+                //勇记指定人有查看财务权限
                 $point = [133597, 133699];
                 if (in_array($staffId, $point) == false) {
                     $lookMoney = 0;
                 }
             }
             if ($mainId == 7779) {
-                //丰行只有指定人有查看财务权限
+                //丰行指定人有查看财务权限
                 $point = [133620, 133641];
                 if (in_array($staffId, $point) == false) {
                     $lookMoney = 0;
                 }
             }
             if ($mainId == 50) {
-                //石头花艺查看财务权限
+                //石头花艺指定人有查看财务权限
                 $point = [125880];
                 if (in_array($staffId, $point) == false) {
                     $lookMoney = 0;