shish 2 лет назад
Родитель
Сommit
3dff7a06b6
1 измененных файлов с 14 добавлено и 0 удалено
  1. 14 0
      app-ghs/controllers/PurchaseOrderController.php

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

@@ -274,6 +274,20 @@ class PurchaseOrderController extends BaseController
             util::fail('超管才能修改');
         }
 
+        if (getenv('YII_ENV') == 'production') {
+            if ($this->mainId == 23390) {
+                if (!in_array($this->adminId, [24586])) {
+                    util::fail('你不能采购哦');
+                }
+            }
+        } else {
+            if ($this->mainId == 644) {
+                if (!in_array($this->adminId, [919])) {
+                    util::fail('你不能采购哈');
+                }
+            }
+        }
+
         $shop = $this->shop;
         $carSale = $shop->carSale ?? 0;
         if ($carSale == 1) {