Browse Source

修改物流名称

shish 3 years ago
parent
commit
825f65c608
1 changed files with 22 additions and 0 deletions
  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
 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
     //修改物流信息 ssh 20230105
     public function actionChangeWl()
     public function actionChangeWl()
     {
     {