shish 15 часов назад
Родитель
Сommit
dc522f4e86
1 измененных файлов с 10 добавлено и 5 удалено
  1. 10 5
      app-ghs/controllers/PurchaseClearController.php

+ 10 - 5
app-ghs/controllers/PurchaseClearController.php

@@ -37,7 +37,7 @@ 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,77951])) {
+                if (!in_array($this->adminId, [24655, 77951])) {
                     util::fail('不能操作哈');
                 }
             }
@@ -55,7 +55,7 @@ class PurchaseClearController extends BaseController
             }
             //淘花里小榄店 thl_xl_clear
             if (in_array($this->shopId, [72366])) {
-                if (!in_array($this->adminId, [69792,55445,55707,69792])) {
+                if (!in_array($this->adminId, [69792, 55445, 55707, 69792])) {
                     util::fail('你不能销单那。。。');
                 }
             }
@@ -67,12 +67,12 @@ class PurchaseClearController extends BaseController
             }
             //小齐鲜花总店和出车,多处请搜索关键词 xq_clear_control
             if (in_array($this->shopId, [41467, 42946])) {
-                if (!in_array($this->adminId, [40144,42912,42023])) {
+                if (!in_array($this->adminId, [40144, 42912, 42023])) {
                     util::fail('不能操作哈。。');
                 }
             }
             //恋善好多花控制销账权限
-            if (in_array($this->shopId, [55238,56609,56611])) {
+            if (in_array($this->shopId, [55238, 56609, 56611])) {
                 if (!in_array($this->adminId, [43856, 54620])) {
                     util::fail('暂无权限,请联系老板或财务');
                 }
@@ -94,6 +94,11 @@ class PurchaseClearController extends BaseController
         $shopAdminName = $shopAdmin['name'] ?? '';
         $post['customShopAdminName'] = $shopAdminName;
 
+        $apiVersion = $post['apiVersion'] ?? 0;
+        if ($apiVersion < 1) {
+            util::fail('请先升级app或小程序');
+        }
+
         $connection = Yii::$app->db;
         $transaction = $connection->beginTransaction();
         try {
@@ -107,4 +112,4 @@ class PurchaseClearController extends BaseController
         }
     }
 
-}
+}