shish 1 жил өмнө
parent
commit
f62a23f09b

+ 20 - 0
app-ghs/controllers/CustomController.php

@@ -691,6 +691,26 @@ class CustomController extends BaseController
         util::complete();
     }
 
+    //修改状态 ssh 20240924
+    public function actionChangePassStatus()
+    {
+        $get = Yii::$app->request->get();
+        $passStatus = isset($get['passStatus']) ? $get['passStatus'] : 0;
+        $customId = isset($get['customId']) ? $get['customId'] : 0;
+        $custom = CustomClass::getById($customId, true);
+        CustomClass::valid($custom, $this->shopId);
+        $ghsId = $custom->ghsId ?? 0;
+        $ghs = GhsClass::getById($ghsId, true);
+        if (empty($ghs)) {
+            util::fail('没有找到供货商');
+        }
+        $ghs->passStatus = $passStatus;
+        $ghs->save();
+        $custom->passStatus = $passStatus;
+        $custom->save();
+        util::complete();
+    }
+
     //允许月结开关 ssh 2021.1.8
     public function actionDebt()
     {