Przeglądaj źródła

开单和采购限制

shish 2 lat temu
rodzic
commit
65c6e2ba88

+ 16 - 0
app-ghs/controllers/OrderController.php

@@ -881,6 +881,22 @@ class OrderController extends BaseController
                 }
             }
         }
+
+        if (getenv('YII_ENV') == 'production') {
+            //小向花卉采购控制
+            if ($this->mainId == 23390) {
+                if (!in_array($this->adminId, [24043, 24585, 24586, 24654])) {
+                    util::fail('你不能开单哦');
+                }
+            }
+        } else {
+            if ($this->mainId == 644) {
+                if (!in_array($this->adminId, [91])) {
+                    util::fail('你不能开单哈');
+                }
+            }
+        }
+
         //开单人和收款人必定是同个人
         $post['shopAdminId'] = $shopAdminId;
         $post['shopAdminName'] = $shopAdminName;

+ 1 - 1
app-ghs/controllers/PurchaseOrderController.php

@@ -277,7 +277,7 @@ class PurchaseOrderController extends BaseController
         if (getenv('YII_ENV') == 'production') {
             //小向花卉采购控制
             if ($this->mainId == 23390) {
-                if (!in_array($this->adminId, [24586])) {
+                if (!in_array($this->adminId, [24586, 24115, 24759])) {
                     util::fail('你不能采购哦');
                 }
             }