shish há 2 anos atrás
pai
commit
5e751d5e61
1 ficheiros alterados com 13 adições e 0 exclusões
  1. 13 0
      app-ghs/controllers/ProductController.php

+ 13 - 0
app-ghs/controllers/ProductController.php

@@ -690,6 +690,19 @@ class ProductController extends BaseController
     //多个花材同时改成一个价 ssh 20231003
     public function actionManyItemChangeOnePrice()
     {
+
+        $shop = $this->shop;
+        $join = $shop->join ?? 0;
+        $default = $shop->default ?? 0;
+        if ($join == 0 && $default == 0) {
+            util::fail('当前直营分店,只能回总店修改价格');
+        }
+
+        $shopAdmin = $this->shopAdmin;
+        if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
+            util::fail('超管才能修改');
+        }
+
         $post = Yii::$app->request->post();
         $idsList = $post['ids'] ?? '';
         $ids = json_decode($idsList, true);