shish преди 2 години
родител
ревизия
bab98fcdf0
променени са 2 файла, в които са добавени 19 реда и са изтрити 3 реда
  1. 3 3
      app-ghs/controllers/PurchaseClearController.php
  2. 16 0
      app-ghs/controllers/PurchaseController.php

+ 3 - 3
app-ghs/controllers/PurchaseClearController.php

@@ -35,10 +35,10 @@ class PurchaseClearController extends BaseController
         }
 
         if (getenv('YII_ENV') == 'production') {
-            //小向花卉
+            //小向花卉采购的结账确认,有多处,关键词ghs_cg_clear_confirm
             if (in_array($this->mainId, [23390, 24516])) {
                 if (!in_array($this->adminId, [24655])) {
-                    util::fail('暂无权限');
+                    util::fail('不能操作哈');
                 }
             }
             //花大苪 洋桔梗,只有叶荷姐才能销账
@@ -50,7 +50,7 @@ class PurchaseClearController extends BaseController
         } else {
             if (in_array($this->shopId, [36523])) {
 //                if (!in_array($this->adminId, [919])) {
-//                    util::fail('暂无权限');
+//                    util::fail('不能操作...');
 //                }
             }
         }

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

@@ -43,6 +43,22 @@ class PurchaseController extends BaseController
     //批量确认 ssh 20240518
     public function actionBatchConfirm()
     {
+
+        if (getenv('YII_ENV') == 'production') {
+            //小向花卉采购的结账确认,有多处,关键词ghs_cg_clear_confirm
+            if (in_array($this->mainId, [23390, 24516])) {
+                if (!in_array($this->adminId, [24655])) {
+                    util::fail('不能操作哦');
+                }
+            }
+        } else {
+            if (in_array($this->shopId, [36523])) {
+//                if (!in_array($this->adminId, [919])) {
+//                    util::fail('不能操作哈');
+//                }
+            }
+        }
+
         $post = Yii::$app->request->post();
         $str = $post['id'] ?? 0;
         $ghsId = $post['ghsId'] ?? 0;