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

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

@@ -23,6 +23,28 @@ use Yii;
 class CustomController extends BaseController
 {
 
+    //修改物流名称 ssh 20230112
+    public function actionChangeWlName()
+    {
+        $get = Yii::$app->request->get();
+        $id = $get['id'] ?? 0;
+        $wlName = $get['wlName'] ?? 0;
+        $custom = CustomClass::getById($id, true);
+        if (empty($custom) || $custom->ownMainId != $this->mainId) {
+            util::fail('修改失败');
+        }
+        $ghsId = $custom->ghsId ?? 0;
+        $ghs = GhsClass::getById($ghsId, true);
+        if (empty($ghs)) {
+            util::fail('修改失败');
+        }
+        $ghs->customWlName = $wlName;
+        $ghs->save();
+        $custom->wlName = $wlName;
+        $custom->save();
+        util::complete('已修改');
+    }
+
     //修改物流信息 ssh 20230105
     public function actionChangeWl()
     {