Browse Source

权限管理

shish 11 tháng trước cách đây
mục cha
commit
8c4081e678

+ 8 - 2
app-ghs/controllers/GhsController.php

@@ -29,7 +29,7 @@ class GhsController extends BaseController
         if ($ghs->ownMainId != $this->mainId) {
             util::fail('不是你的供货商');
         }
-        $newLocation = $ghs->location == 0 ? 1 :0;
+        $newLocation = $ghs->location == 0 ? 1 : 0;
         $ghs->location = $newLocation;
         $ghs->save();
         util::complete('修改成功');
@@ -201,10 +201,16 @@ class GhsController extends BaseController
             }
             //小向花卉采购控制
             if ($this->mainId == 23390) {
-                if (!in_array($this->adminId, [24586, 24115, 24759, 26390, 23960, 25011, 25004, 24655,28521,4])) {
+                if (!in_array($this->adminId, [24586, 24115, 24759, 26390, 23960, 25011, 25004, 24655, 28521, 4])) {
                     util::fail('没有数据哦6');
                 }
             }
+            //贴心鲜花批发,只有老板可以查看
+            if ($this->mainId == 15144) {
+                if (!in_array($this->adminId, [16163])) {
+                    util::fail('暂时不能查看哦,编号6868');
+                }
+            }
         }
 
         $list = GhsClass::getGhsList($where);

+ 6 - 0
app-ghs/controllers/PurchaseOrderController.php

@@ -761,6 +761,12 @@ class PurchaseOrderController extends BaseController
                     util::fail('暂时不能查看哦,编号6811');
                 }
             }
+            //贴心鲜花批发,只有老板可以查看
+            if ($mainId == 15144) {
+                if (!in_array($adminId, [16163])) {
+                    util::fail('暂时不能查看哦,编号6818');
+                }
+            }
         }
 
         $data = PurchaseOrderClass::getOrderList($where);