From 2094025ea62c340b6ba908a7f749c2bab321ce6f Mon Sep 17 00:00:00 2001
From: liujie <liujie>
Date: 星期三, 26 七月 2023 18:23:36 +0800
Subject: [PATCH] 后台代码城市管理

---
 cloud-server-account/src/main/java/com/dsh/account/controller/CityController.java                      |    9 
 cloud-server-management/src/main/webapp/WEB-INF/view/system/tCity/TCity.html                           |   12 
 cloud-server-management/src/main/webapp/static/modular/system/tCity/tCity_info.js                      |  358 +++++++++++++++++++++++++
 cloud-server-management/src/main/java/com/dsh/course/feignClient/account/CityClient.java               |    2 
 cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCityController.java |   39 ++
 .idea/workspace.xml                                                                                    |  112 +++++--
 cloud-server-management/src/main/webapp/static/modular/system/tCity/tCity.js                           |  292 ++++++++++++++++++++
 cloud-server-account/src/main/java/com/dsh/account/entity/TCityManager.java                            |    3 
 cloud-server-management/src/main/webapp/WEB-INF/view/system/tCity/TCity_add.html                       |    5 
 cloud-server-management/src/main/webapp/static/modular/system/tCar/tCar_info.js                        |    8 
 10 files changed, 786 insertions(+), 54 deletions(-)

diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index fb546d1..f2ab91c 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -19,16 +19,20 @@
     <select />
   </component>
   <component name="ChangeListManager">
-    <list default="true" id="cb08d02f-fd4f-4fa2-85fe-abd508fa83ac" name="Default Changelist" comment="后台代码删除">
+    <list default="true" id="cb08d02f-fd4f-4fa2-85fe-abd508fa83ac" name="Default Changelist" comment="后台代码">
+      <change afterPath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/static/modular/system/tCity/tCity.js" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/static/modular/system/tCity/tCity_info.js" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/cloud-server-account/mb-cloud-account.iml" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-account/mb-cloud-account.iml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/cloud-server-account/src/main/java/com/dsh/account/controller/CityController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-account/src/main/java/com/dsh/account/controller/CityController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/cloud-server-account/src/main/java/com/dsh/account/entity/TCityManager.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-account/src/main/java/com/dsh/account/entity/TCityManager.java" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/cloud-server-activity/mb-cloud-activity.iml" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-activity/mb-cloud-activity.iml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/cloud-server-auth/mb-cloud-auth.iml" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-auth/mb-cloud-auth.iml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/course/feignClient/account/CityClient.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/course/feignClient/account/CityClient.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/course/service/ICityService.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/course/service/ICityService.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/course/service/impl/CityServiceImpl.java" beforeDir="false" />
       <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCityController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCityController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCity/TCity.html" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCity/TCity.html" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCity/TCity_add.html" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCity/TCity_add.html" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/static/modular/system/tCar/tCar_info.js" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/static/modular/system/tCar/tCar_info.js" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -77,12 +81,13 @@
     <property name="WebServerToolWindowFactoryState" value="false" />
     <property name="aspect.path.notification.shown" value="true" />
     <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1686656087610" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/cloud-server-account/src/main/resources/mapper" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/cloud-server-management/src/main/webapp/static/modular/system" />
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
     <property name="nodejs_npm_path_reset_for_default_project" value="true" />
     <property name="project.structure.last.edited" value="Global Libraries" />
     <property name="project.structure.proportion" value="0.0" />
     <property name="project.structure.side.proportion" value="0.2" />
+    <property name="run.code.analysis.last.selected.profile" value="pProject Default" />
     <property name="settings.editor.selected.configurable" value="project.propVCSSupport.Mappings" />
   </component>
   <component name="ReactorSettings">
@@ -97,11 +102,11 @@
       <recent name="com.dsh.account.controller" />
     </key>
     <key name="CopyFile.RECENT_KEYS">
+      <recent name="F:\code\PlayPai\cloud-server-management\src\main\webapp\static\modular\system" />
       <recent name="F:\code\PlayPai\cloud-server-account\src\main\resources\mapper" />
       <recent name="F:\code\PlayPai\cloud-server-management\src\main\webapp\WEB-INF\view\system" />
       <recent name="F:\code\PlayPai\cloud-server-competition\src\main\java\com\dsh" />
       <recent name="F:\code\PlayPai\cloud-server-management\src\main\resources\mapper" />
-      <recent name="F:\code\PlayPai\cloud-server-management\src\main\webapp\static\modular\system" />
     </key>
   </component>
   <component name="RunDashboard">
@@ -198,7 +203,7 @@
       <updated>1686653431962</updated>
       <workItem from="1686653433491" duration="2267000" />
       <workItem from="1690190039038" duration="16883000" />
-      <workItem from="1690333209172" duration="23458000" />
+      <workItem from="1690333209172" duration="26986000" />
     </task>
     <task id="LOCAL-00001" summary="后台代码删除">
       <created>1690249807612</created>
@@ -270,7 +275,28 @@
       <option name="project" value="LOCAL" />
       <updated>1690362658673</updated>
     </task>
-    <option name="localTasksCounter" value="11" />
+    <task id="LOCAL-00011" summary="后台代码删除">
+      <created>1690363462474</created>
+      <option name="number" value="00011" />
+      <option name="presentableId" value="LOCAL-00011" />
+      <option name="project" value="LOCAL" />
+      <updated>1690363462474</updated>
+    </task>
+    <task id="LOCAL-00012" summary="后台代码">
+      <created>1690364368448</created>
+      <option name="number" value="00012" />
+      <option name="presentableId" value="LOCAL-00012" />
+      <option name="project" value="LOCAL" />
+      <updated>1690364368448</updated>
+    </task>
+    <task id="LOCAL-00013" summary="后台代码">
+      <created>1690364506501</created>
+      <option name="number" value="00013" />
+      <option name="presentableId" value="LOCAL-00013" />
+      <option name="project" value="LOCAL" />
+      <updated>1690364506501</updated>
+    </task>
+    <option name="localTasksCounter" value="14" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
@@ -289,9 +315,9 @@
     <option name="oldMeFiltersMigrated" value="true" />
   </component>
   <component name="VcsManagerConfiguration">
-    <MESSAGE value="后台代码" />
     <MESSAGE value="后台代码删除" />
-    <option name="LAST_COMMIT_MESSAGE" value="后台代码删除" />
+    <MESSAGE value="后台代码" />
+    <option name="LAST_COMMIT_MESSAGE" value="后台代码" />
   </component>
   <component name="WindowStateProjectService">
     <state x="590" y="80" key="#&lt;template&gt;_of_Spring_Boot" timestamp="1690338437444">
@@ -326,10 +352,14 @@
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
     <state x="674" y="382" width="571" height="274" key="#com.intellij.refactoring.move.moveClassesOrPackages.MoveClassesOrPackagesDialog.classes/0.0.1920.1032@0.0.1920.1032" timestamp="1690338847091" />
-    <state x="519" y="82" key="CommitChangelistDialog2" timestamp="1690362656327">
+    <state x="703" y="346" key="ANALYSIS_DLG_com.intellij.analysis.BaseAnalysisAction$1" timestamp="1690363667225">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
-    <state x="519" y="82" key="CommitChangelistDialog2/0.0.1920.1032@0.0.1920.1032" timestamp="1690362656327" />
+    <state x="703" y="346" key="ANALYSIS_DLG_com.intellij.analysis.BaseAnalysisAction$1/0.0.1920.1032@0.0.1920.1032" timestamp="1690363667225" />
+    <state x="519" y="82" key="CommitChangelistDialog2" timestamp="1690364505261">
+      <screen x="0" y="0" width="1920" height="1032" />
+    </state>
+    <state x="519" y="82" key="CommitChangelistDialog2/0.0.1920.1032@0.0.1920.1032" timestamp="1690364505261" />
     <state width="464" height="466" key="DebuggerActiveHint" timestamp="1690354723383">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
@@ -338,62 +368,62 @@
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
     <state x="740" y="270" key="FileChooserDialogImpl/0.0.1920.1032@0.0.1920.1032" timestamp="1690249419357" />
-    <state width="1293" height="440" key="GridCell.Tab.0.bottom" timestamp="1690363241404">
+    <state width="1293" height="418" key="GridCell.Tab.0.bottom" timestamp="1690366694918">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
-    <state width="1293" height="440" key="GridCell.Tab.0.bottom/0.0.1920.1032@0.0.1920.1032" timestamp="1690363241404" />
-    <state width="1293" height="440" key="GridCell.Tab.0.center" timestamp="1690363241404">
+    <state width="1293" height="418" key="GridCell.Tab.0.bottom/0.0.1920.1032@0.0.1920.1032" timestamp="1690366694918" />
+    <state width="1293" height="418" key="GridCell.Tab.0.center" timestamp="1690366694918">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
-    <state width="1293" height="440" key="GridCell.Tab.0.center/0.0.1920.1032@0.0.1920.1032" timestamp="1690363241404" />
-    <state width="1293" height="440" key="GridCell.Tab.0.left" timestamp="1690363241404">
+    <state width="1293" height="418" key="GridCell.Tab.0.center/0.0.1920.1032@0.0.1920.1032" timestamp="1690366694918" />
+    <state width="1293" height="418" key="GridCell.Tab.0.left" timestamp="1690366694918">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
-    <state width="1293" height="440" key="GridCell.Tab.0.left/0.0.1920.1032@0.0.1920.1032" timestamp="1690363241404" />
-    <state width="1293" height="440" key="GridCell.Tab.0.right" timestamp="1690363241404">
+    <state width="1293" height="418" key="GridCell.Tab.0.left/0.0.1920.1032@0.0.1920.1032" timestamp="1690366694918" />
+    <state width="1293" height="418" key="GridCell.Tab.0.right" timestamp="1690366694918">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
-    <state width="1293" height="440" key="GridCell.Tab.0.right/0.0.1920.1032@0.0.1920.1032" timestamp="1690363241404" />
-    <state width="1293" height="440" key="GridCell.Tab.1.bottom" timestamp="1690363241405">
+    <state width="1293" height="418" key="GridCell.Tab.0.right/0.0.1920.1032@0.0.1920.1032" timestamp="1690366694918" />
+    <state width="1293" height="418" key="GridCell.Tab.1.bottom" timestamp="1690366694918">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
-    <state width="1293" height="440" key="GridCell.Tab.1.bottom/0.0.1920.1032@0.0.1920.1032" timestamp="1690363241405" />
-    <state width="1293" height="440" key="GridCell.Tab.1.center" timestamp="1690363241404">
+    <state width="1293" height="418" key="GridCell.Tab.1.bottom/0.0.1920.1032@0.0.1920.1032" timestamp="1690366694918" />
+    <state width="1293" height="418" key="GridCell.Tab.1.center" timestamp="1690366694918">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
-    <state width="1293" height="440" key="GridCell.Tab.1.center/0.0.1920.1032@0.0.1920.1032" timestamp="1690363241404" />
-    <state width="1293" height="440" key="GridCell.Tab.1.left" timestamp="1690363241404">
+    <state width="1293" height="418" key="GridCell.Tab.1.center/0.0.1920.1032@0.0.1920.1032" timestamp="1690366694918" />
+    <state width="1293" height="418" key="GridCell.Tab.1.left" timestamp="1690366694918">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
-    <state width="1293" height="440" key="GridCell.Tab.1.left/0.0.1920.1032@0.0.1920.1032" timestamp="1690363241404" />
-    <state width="1293" height="440" key="GridCell.Tab.1.right" timestamp="1690363241404">
+    <state width="1293" height="418" key="GridCell.Tab.1.left/0.0.1920.1032@0.0.1920.1032" timestamp="1690366694918" />
+    <state width="1293" height="418" key="GridCell.Tab.1.right" timestamp="1690366694918">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
-    <state width="1293" height="440" key="GridCell.Tab.1.right/0.0.1920.1032@0.0.1920.1032" timestamp="1690363241404" />
-    <state width="1293" height="473" key="GridCell.Tab.2.bottom" timestamp="1690354799499">
+    <state width="1293" height="418" key="GridCell.Tab.1.right/0.0.1920.1032@0.0.1920.1032" timestamp="1690366694918" />
+    <state width="1293" height="418" key="GridCell.Tab.2.bottom" timestamp="1690366555269">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
-    <state width="1293" height="473" key="GridCell.Tab.2.bottom/0.0.1920.1032@0.0.1920.1032" timestamp="1690354799499" />
-    <state width="1293" height="473" key="GridCell.Tab.2.center" timestamp="1690354799499">
+    <state width="1293" height="418" key="GridCell.Tab.2.bottom/0.0.1920.1032@0.0.1920.1032" timestamp="1690366555269" />
+    <state width="1293" height="418" key="GridCell.Tab.2.center" timestamp="1690366555269">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
-    <state width="1293" height="473" key="GridCell.Tab.2.center/0.0.1920.1032@0.0.1920.1032" timestamp="1690354799499" />
-    <state width="1293" height="473" key="GridCell.Tab.2.left" timestamp="1690354799499">
+    <state width="1293" height="418" key="GridCell.Tab.2.center/0.0.1920.1032@0.0.1920.1032" timestamp="1690366555269" />
+    <state width="1293" height="418" key="GridCell.Tab.2.left" timestamp="1690366555269">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
-    <state width="1293" height="473" key="GridCell.Tab.2.left/0.0.1920.1032@0.0.1920.1032" timestamp="1690354799499" />
-    <state width="1293" height="473" key="GridCell.Tab.2.right" timestamp="1690354799499">
+    <state width="1293" height="418" key="GridCell.Tab.2.left/0.0.1920.1032@0.0.1920.1032" timestamp="1690366555269" />
+    <state width="1293" height="418" key="GridCell.Tab.2.right" timestamp="1690366555269">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
-    <state width="1293" height="473" key="GridCell.Tab.2.right/0.0.1920.1032@0.0.1920.1032" timestamp="1690354799499" />
+    <state width="1293" height="418" key="GridCell.Tab.2.right/0.0.1920.1032@0.0.1920.1032" timestamp="1690366555269" />
     <state x="461" y="160" key="SettingsEditor" timestamp="1690191509088">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
     <state x="461" y="160" key="SettingsEditor/0.0.1920.1032@0.0.1920.1032" timestamp="1690191509088" />
-    <state x="552" y="248" key="Vcs.Push.Dialog.v2" timestamp="1690362671126">
+    <state x="552" y="248" key="Vcs.Push.Dialog.v2" timestamp="1690364507500">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
-    <state x="552" y="248" key="Vcs.Push.Dialog.v2/0.0.1920.1032@0.0.1920.1032" timestamp="1690362671126" />
+    <state x="552" y="248" key="Vcs.Push.Dialog.v2/0.0.1920.1032@0.0.1920.1032" timestamp="1690364507500" />
     <state x="92" y="92" width="1736" height="848" key="com.intellij.history.integration.ui.views.DirectoryHistoryDialog" timestamp="1690340014123">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
@@ -406,14 +436,14 @@
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
     <state x="754" y="428" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/0.0.1920.1032@0.0.1920.1032" timestamp="1690362660961" />
-    <state x="661" y="224" width="646" height="584" key="find.popup" timestamp="1690358747900">
+    <state x="661" y="224" width="721" height="584" key="find.popup" timestamp="1690365779184">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
-    <state x="661" y="224" width="646" height="584" key="find.popup/0.0.1920.1032@0.0.1920.1032" timestamp="1690358747900" />
-    <state x="623" y="223" width="672" height="678" key="search.everywhere.popup" timestamp="1690338774328">
+    <state x="661" y="224" width="721" height="584" key="find.popup/0.0.1920.1032@0.0.1920.1032" timestamp="1690365779184" />
+    <state x="623" y="223" width="672" height="678" key="search.everywhere.popup" timestamp="1690365810397">
       <screen x="0" y="0" width="1920" height="1032" />
     </state>
-    <state x="623" y="223" width="672" height="678" key="search.everywhere.popup/0.0.1920.1032@0.0.1920.1032" timestamp="1690338774328" />
+    <state x="623" y="223" width="672" height="678" key="search.everywhere.popup/0.0.1920.1032@0.0.1920.1032" timestamp="1690365810397" />
   </component>
   <component name="XDebuggerManager">
     <breakpoint-manager>
diff --git a/cloud-server-account/src/main/java/com/dsh/account/controller/CityController.java b/cloud-server-account/src/main/java/com/dsh/account/controller/CityController.java
index 0208ed9..c3d307b 100644
--- a/cloud-server-account/src/main/java/com/dsh/account/controller/CityController.java
+++ b/cloud-server-account/src/main/java/com/dsh/account/controller/CityController.java
@@ -66,5 +66,14 @@
     }
 
 
+    @PostMapping("/base/city/add")
+    public void add(@RequestBody TCityManager manager){
+        try {
+            cityService.save(manager);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+    }
+
 
 }
diff --git a/cloud-server-account/src/main/java/com/dsh/account/entity/TCityManager.java b/cloud-server-account/src/main/java/com/dsh/account/entity/TCityManager.java
index 3c3cd79..6a0f5e8 100644
--- a/cloud-server-account/src/main/java/com/dsh/account/entity/TCityManager.java
+++ b/cloud-server-account/src/main/java/com/dsh/account/entity/TCityManager.java
@@ -1,12 +1,15 @@
 package com.dsh.account.entity;
 
+import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
 
 @Data
 @TableName("t_city_manager")
 public class TCityManager {
+    @TableId(type = IdType.AUTO)
     private Integer id;
     private String name;
     private String phone;
diff --git a/cloud-server-management/src/main/java/com/dsh/course/feignClient/account/CityClient.java b/cloud-server-management/src/main/java/com/dsh/course/feignClient/account/CityClient.java
index 07e6d3f..c47cd34 100644
--- a/cloud-server-management/src/main/java/com/dsh/course/feignClient/account/CityClient.java
+++ b/cloud-server-management/src/main/java/com/dsh/course/feignClient/account/CityClient.java
@@ -12,4 +12,6 @@
     @PostMapping("/base/city/list")
     Page<TCityManager> list(CityListQuery listQuery);
 
+    @PostMapping("/base/city/add")
+    void add(TCityManager manager);
 }
diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCityController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCityController.java
index bd85872..5aea2e2 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCityController.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCityController.java
@@ -1,5 +1,7 @@
 package com.dsh.guns.modular.system.controller.code;
 
+import cn.hutool.crypto.SecureUtil;
+import com.alibaba.nacos.common.utils.Md5Utils;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.dsh.course.entity.City;
@@ -12,10 +14,12 @@
 import com.dsh.course.feignClient.competition.model.ListQuery;
 import com.dsh.course.feignClient.competition.model.Participant;
 import com.dsh.guns.core.base.controller.BaseController;
+import com.dsh.guns.core.base.tips.SuccessTip;
 import com.dsh.guns.core.common.constant.factory.PageFactory;
 import com.dsh.guns.core.util.ToolUtil;
 import com.dsh.guns.modular.system.model.TCity;
 import com.dsh.guns.modular.system.model.TStore;
+import com.dsh.guns.modular.system.service.ICityService;
 import com.dsh.guns.modular.system.service.IStoreService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -48,6 +52,8 @@
 
     @Autowired
     private IStoreService storeService;
+    @Autowired
+    private ICityService cityService;
 
 
     /**
@@ -55,15 +61,19 @@
      */
     @RequestMapping("")
     public String index(Model model) {
+        List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0));
+        model.addAttribute("list",list);
         return PREFIX + "TCity.html";
     }
 
     /**
      * 跳转到添加车辆管理
      */
-    @RequestMapping("/tCompetition_add")
+    @RequestMapping("/tCity_add")
     public String tCompetitionAdd(Model model) {
-        return PREFIX + "TCompetition_add.html";
+        List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0));
+        model.addAttribute("list",list);
+        return PREFIX + "TCity_add.html";
     }
 
 
@@ -89,10 +99,18 @@
 
 
     @RequestMapping(value = "/add")
-    public Object list(Competition competition) {
+    @ResponseBody
+    public Object list(TCityManager manager) {
         try {
-            competitionClient.add(competition);
-            return SUCCESS_TIP;
+            String pwd = SecureUtil.md5("a123456");
+            manager.setPassword(pwd);
+            manager.setState(1);
+            TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, manager.getProvinceCode()));
+            manager.setProvince(one.getName());
+            TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, manager.getCityCode()));
+            manager.setCity(one1.getName());
+            cityClient.add(manager);
+            return new SuccessTip<>();
         }catch (Exception e){
             e.printStackTrace();
             return ERROR;
@@ -109,6 +127,17 @@
             return ERROR;
         }
     }
+    @RequestMapping(value = "/onChange")
+    @ResponseBody
+    public Object onChange(Integer oneId) {
+        try {
+            TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, oneId));
+            return cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId()));
+        }catch (Exception e){
+            e.printStackTrace();
+            return ERROR;
+        }
+    }
 
 
     @RequestMapping(value = "/cancel")
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCity/TCity.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCity/TCity.html
index 53ad69f..e405654 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCity/TCity.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCity/TCity.html
@@ -11,6 +11,12 @@
                     <div class="col-sm-12">
                         <div class="row">
                             <div class="col-sm-3">
+                                <#SelectCon id="pCode" name="所在省" >
+                                <option value="">全部</option>
+                                @for(obj in list){
+                                <option value="${obj.code}">${obj.name}</option>
+                                @}
+                            </#SelectCon>
                             </div>
                             <div class="col-sm-3">
 
@@ -29,9 +35,9 @@
                 <div class="hidden-xs" id="TCompetitionTableToolbar" role="group">
                     <#button name="添加" icon="fa-plus" clickFun="TCompetition.openAddTCompetition()"/>
                     <#button name="编辑" icon="fa-edit" clickFun="TCompetition.openTCompetitionDetail()" space="true"/>
-                    <#button name="取消" icon="fa-remove" clickFun="TCompetition.delete()" space="true"/>
-                    <#button name="查看详情" icon="fa-remove" clickFun="TCompetition.delete()" space="true"/>
-                    <#button name="已报名人员" icon="fa-remove" clickFun="TCompetition.delete()" space="true"/>
+                    <#button name="冻结" icon="fa-remove" clickFun="TCompetition.freeze()" space="true"/>
+                    <#button name="解冻" icon="fa-remove" clickFun="TCompetition.unfreeze()" space="true"/>
+                    <#button name="重置密码" icon="fa-remove" clickFun="TCompetition.reload()" space="true"/>
 
                 </div>
                 <#table id="TCompetitionTable"/>
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCity/TCity_add.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCity/TCity_add.html
index e9a3212..9827bfe 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCity/TCity_add.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCity/TCity_add.html
@@ -8,8 +8,11 @@
             <div class="form-group" id="provinceCode">
                 <label class="col-sm-3 control-label">所在省:</label>
                 <div class="col-sm-9">
-                    <select class="form-control" id="pCode" name="pCode">
+                    <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)">
                         <option value="">选择省</option>
+                        @for(obj in list){
+                        <option value="${obj.code}">${obj.name}</option>
+                        @}
                     </select>
                 </div>
             </div>
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tCar/tCar_info.js b/cloud-server-management/src/main/webapp/static/modular/system/tCar/tCar_info.js
index 0b9bddd..0a2aa88 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tCar/tCar_info.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tCar/tCar_info.js
@@ -392,19 +392,19 @@
  */
 TCarInfoDlg.oneChange = function (e) {
     var oneId=$(e).val();
-    var ajax = new $ax(Feng.ctxPath + "/tDriver/oneChange", function(data){
+    var ajax = new $ax(Feng.ctxPath + "/tCity/oneChange", function(data){
         if(data!=null){
             if(language==1){
-                var content='<option value="">选择所属加盟商</option>';
+                var content='<option value="">选择市</option>';
             }else if(language==2){
                 var content='<option value="">Choose your franchisee</option>';
             }else {
                 var content='<option value="">Pilih franchisee Anda</option>';
             }
             $.each(data, function(k,v) {
-                content += "<option value='"+v.id+"'>"+v.name+"</option>";
+                content += "<option value='"+v.code+"'>"+v.name+"</option>";
             });
-            $("#twoId").empty().append(content);
+            $("#cCode").empty().append(content);
         }
     });
     ajax.set("oneId",oneId);
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tCity/tCity.js b/cloud-server-management/src/main/webapp/static/modular/system/tCity/tCity.js
new file mode 100644
index 0000000..86c0720
--- /dev/null
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tCity/tCity.js
@@ -0,0 +1,292 @@
+/**
+ * 车辆管理管理初始化
+ */
+var TCompetition = {
+    id: "TCompetitionTable",	//表格id
+    seItem: null,		//选中的条目
+    table: null,
+    layerIndex: -1
+};
+var language =1
+/**
+ * 初始化表格的列
+ */
+TCompetition.initColumn = function () {
+    return [
+        {field: 'selectItem', radio: true},
+        {title: '省', field: 'province', visible: true, align: 'center', valign: 'middle'
+        },
+        {title: '市', field: 'city', visible: true, align: 'center', valign: 'middle'},
+        {title: '管理员姓名', field: 'name', visible: true, align: 'center', valign: 'middle'
+        },
+        {title:  '管理员手机号', field: 'phone', visible: true, align: 'center', valign: 'middle'
+        },
+        {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle'
+            ,formatter:function (data) {
+                return{1:"正常",2:"冻结"}[data]
+            }
+        },
+    ];
+};
+function currentTime(timestamp){
+    var time = timestamp + '';
+    if(time.length != 13){
+        timestamp = timestamp * 1000;
+    }
+    var date = new Date(timestamp);;
+    var Y = date.getFullYear() + '-';
+    var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
+    var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' ';
+
+    var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':';
+    var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':';
+    var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds());
+    var strDate = Y + M + D + h + m + s;
+    return strDate
+}
+
+function currentTime1(timestamp){
+    var time = timestamp + '';
+    if(time.length != 13){
+        timestamp = timestamp * 1000;
+    }
+    var date = new Date(timestamp);;
+    var Y = date.getFullYear() + '-';
+    var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
+    var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' ';
+
+    var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':';
+    var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':';
+    var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds());
+    var strDate = Y + M + D ;
+    return strDate
+}
+/**
+ * 检查是否选中
+ */
+TCompetition.check = function () {
+    var selected = $('#' + this.id).bootstrapTable('getSelections');
+    if(selected.length == 0){
+            Feng.info("请先选中表格中的某一记录!");
+        return false;
+    }else{
+        TCompetition.seItem = selected[0];
+        return true;
+    }
+};
+
+/**
+ * 点击添加车辆管理
+ */
+TCompetition.openAddTCompetition = function () {
+    var index = layer.open({
+        type: 2,
+        title: '添加',
+        area: ['100%', '100%'], //宽高
+        fix: false, //不固定
+        maxmin: true,
+        content: Feng.ctxPath + '/tCity/tCity_add'
+    });
+    this.layerIndex = index;
+};
+
+/**
+ * 打开查看车辆管理详情
+ */
+TCompetition.openTCompetitionDetail = function () {
+    if (this.check()) {
+        var index = layer.open({
+            type: 2,
+            title:'编辑',
+            area: ['100%', '100%'], //宽高
+            fix: false, //不固定
+            maxmin: true,
+            content: Feng.ctxPath + '/TCompetition/TCompetition_update/' + TCompetition.seItem.id
+        });
+        this.layerIndex = index;
+    }
+};
+
+/**
+ * 删除车辆管理
+ */
+TCompetition.delete = function () {
+    if (this.check()) {
+        var nickname = TCompetition.seItem.carLicensePlate;
+        if (nickname == "" || nickname == null || nickname == undefined){
+                nickname = "该车辆";
+        }else{
+            nickname = "【"+nickname+"】";
+        }
+        swal({
+           title: language==1?"您是否确认删除" + nickname + "?":(language==2?"Are you sure to delete the" + nickname + "?":"Apakah Anda pasti akan menghapus" + nickname + "?"),
+            text: language==1?"请谨慎操作!":(language==2?' Please operate with caution!':'Harap beroperasi dengan hati -hati!'),
+            type: "warning",
+            showCancelButton: true,
+            confirmButtonColor: "#DD6B55",
+            confirmButtonText: language==1?"删除":(language==2?'Delete':'Hapus'),
+            closeOnConfirm: true
+        }, function () {
+            var ajax = new $ax(Feng.ctxPath + "/TCompetition/delete", function (data) {
+                  if(language==1){
+                    swal("删除成功", "您已经成功删除了" + nickname + "。", "success");
+                }else if(language==2){
+                    swal("Delete succeeded!", "You have successfully deleted it" + nickname + "。", "success");
+                }else {
+                    swal("Hapus berhasil!", "Anda berhasil menghapus" + nickname + "。", "success");
+                }
+                TCompetition.table.refresh();
+            }, function (data) {
+                if(language==1){
+                    swal("删除失败", data.responseJSON.message + "!", "warning");
+                }else if(language==2){
+                    swal("Failed to delete", data.responseJSON.message + "!", "warning");
+                }else {
+                    swal("Hapus Gagal", data.responseJSON.message + "!", "warning");
+                }
+
+            });
+            ajax.set("TCompetitionId",TCompetition.seItem.id);
+            ajax.start();
+        });
+    }
+};
+
+
+TCompetition.carInsurance = function () {
+    if (this.check()) {
+        var index = layer.open({
+            type: 2,
+            title: language==1?'车辆保险':(language==2?'Vehicle insurance':'Asuransi kendaraan'),
+            area: ['100%', '100%'], //宽高
+            fix: false, //不固定
+            maxmin: true,
+            content: Feng.ctxPath + '/TCompetition/carInsurance?carId=' + TCompetition.seItem.id
+        });
+        this.layerIndex = index;
+    }
+};
+
+
+
+/**
+ * 查询车辆管理列表
+ */
+TCompetition.search = function () {
+    var queryData = {};
+    TCompetition.table.refresh({query: queryData});
+};
+
+TCompetition.resetSearch = function () {
+    TCompetition.search();
+};
+
+$(function () {
+    var defaultColunms = TCompetition.initColumn();
+    var table = new BSTable(TCompetition.id, "/tCity/list", defaultColunms);
+    table.setPaginationType("server");
+    TCompetition.table = table.init();
+});
+
+/**
+ * 下载模板
+ */
+TCompetition.uploadCarModel = function () {
+    window.location.href = Feng.ctxPath + "/TCompetition/uploadCarModel";
+}
+
+var agreement = function(){
+    this.init = function(){
+        //模拟上传excel  
+        $("#uploadEventBtn").unbind("click").bind("click",function(){
+            $("#uploadEventFile").click();
+        });
+    };
+}
+/**
+ * 导入合同
+ */
+TCompetition.exporTCompetition = function () {
+    var uploadEventFile = $("#uploadEventFile").val();
+    if(uploadEventFile == ''){
+        if(language==1){
+            Feng.info("请选择Excel,再上传");
+        }else if(language==2){
+            Feng.info("Please select Excel and upload");
+        }else {
+            Feng.info("Silakan pilih Excel dan upload");
+        }
+    }else if(uploadEventFile.lastIndexOf(".xls")<0){//可判断以.xls和.xlsx结尾的excel  
+        if(language==1){
+            Feng.info("只能上传Excel文件");
+        }else if(language==2){
+            Feng.info("Only Excel files can be uploaded");
+        }else {
+            Feng.info("Hanya berkas Excel yang dapat diunggah");
+        }
+    }else{
+        var url = Feng.ctxPath + '/TCompetition/exporTCompetition';
+        var file = document.querySelector('input[name=file]').files[0];
+        var reader = new FileReader();
+        if (file) {
+            var formData = new FormData();
+            formData.append("myfile", file);
+            this.sendAjaxRequest(url, 'POST', formData);
+        }
+    }
+}
+TCompetition.sendAjaxRequest = function(url,type,data){
+    $.ajax({
+        url : url,
+        type : type,
+        data : data,
+        success : function(result) {
+            if(result.code==500) {
+                Feng.info(result.message);
+            }else {
+                if(language==1){
+                    Feng.success("导入成功!");
+                }else if(language==2){
+                    Feng.success("SUCCESSFUL IMPORT!");
+                }else {
+                    Feng.success("Import berhasil!");
+                }
+            }
+            TCompetition.table.refresh();
+        },
+        error : function() {
+            if(language==1){
+                Feng.error("excel上传失败!");
+            }else if(language==2){
+                Feng.error("Uploading excel Fails. Procedure!");
+            }else {
+                Feng.error("Gagal mengunggah excel!");
+            }
+        },
+        cache : false,
+        contentType : false,
+        processData : false
+    });
+};
+
+var agreement;
+$(function(){
+    agreement = new agreement();
+    agreement.init();
+});
+
+/**
+ * 导出车辆操作
+ */
+TCompetition.ouTCompetition = function () {
+    var operation = function() {
+        window.location.href = Feng.ctxPath + "/TCompetition/ouTCompetition";
+    };
+    if(language==1){
+        Feng.confirm("是否确认导出车辆信息?", operation);
+    }else if(language==2){
+        Feng.confirm("Are you sure to export vehicle information?", operation);
+    }else {
+        Feng.confirm("Apakah Anda pasti akan mengekspor informasi kendaraan?", operation);
+    }
+}
\ No newline at end of file
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tCity/tCity_info.js b/cloud-server-management/src/main/webapp/static/modular/system/tCity/tCity_info.js
new file mode 100644
index 0000000..400699d
--- /dev/null
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tCity/tCity_info.js
@@ -0,0 +1,358 @@
+/**
+ * 初始化车辆管理详情对话框
+ */
+var language=1;
+var TCarInfoDlg = {
+    tCarInfoData : {},
+    validateFields: {
+    }
+};
+
+/**
+ * 验证数据是否为空
+ */
+TCarInfoDlg.validate = function () {
+    $('#carInfoForm').data("bootstrapValidator").resetForm();
+    $('#carInfoForm').bootstrapValidator('validate');
+    return $("#carInfoForm").data('bootstrapValidator').isValid();
+};
+
+/**
+ * 清除数据
+ */
+TCarInfoDlg.clearData = function() {
+    this.tCarInfoData = {};
+}
+
+/**
+ * 设置对话框中的数据
+ *
+ * @param key 数据的名称
+ * @param val 数据的具体值
+ */
+TCarInfoDlg.set = function(key, val) {
+    this.tCarInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val;
+    return this;
+}
+
+/**
+ * 设置对话框中的数据
+ *
+ * @param key 数据的名称
+ * @param val 数据的具体值
+ */
+TCarInfoDlg.get = function(key) {
+    return $("#" + key).val();
+}
+
+/**
+ * 关闭此对话框
+ */
+TCarInfoDlg.close = function() {
+    parent.layer.close(window.parent.TCompetition.layerIndex);
+}
+
+/**
+ * 收集数据
+ */
+TCarInfoDlg.collectData = function() {
+    this
+    .set('id')
+    .set('isPlatCar')
+    .set('companyId')
+    .set('franchiseeId')
+    .set('carColor')
+    .set('carModelId')
+    .set('carBrandId')
+    .set('carLicensePlate')
+    .set('carPhoto')
+    .set('drivingLicenseNumber')
+    .set('drivingLicensePhoto')
+    .set('annualInspectionTime')
+    .set('commercialInsuranceTime')
+    .set('createTime')
+    .set('state')
+    .set('addType')
+    .set('addObjectId')
+    .set('plateColor')
+    .set('vehicleType')
+    .set('ownerName')
+    .set('engineId')
+    .set('VIN')
+    .set('certifyDateA')
+    .set('fuelType')
+    .set('engineDisplace')
+    .set('certificate')
+    .set('transAgency')
+    .set('transArea')
+    .set('transDateStart')
+    .set('transDateStop')
+    .set('certifyDateB')
+    .set('fixState')
+    .set('nextFixDate')
+    .set('checkState')
+    .set('feePrintId')
+    .set('GPSBrand')
+    .set('GPSModel')
+    .set('GPSIMEI')
+    .set('GPSInstallDate')
+    .set('registerDate')
+    .set('commercialType');
+}
+
+/**
+ * 提交添加
+ */
+TCarInfoDlg.addSubmit = function() {
+
+    this.clearData();
+    this.collectData();
+    if(!this.validate()){
+        return ;
+    }
+
+    let pCode = $("#pCode").val()
+    let cCode = $("#cCode").val()
+    let name = $("#name").val()
+    let phone = $("#phone").val()
+
+    //提交信息
+    var ajax = new $ax(Feng.ctxPath + "/tCity/add", function(data){
+        if(data.code == 200){
+            if(language==1){
+                Feng.success("添加成功!");
+            }else if(language==2){
+                Feng.success("Successfully added!");
+            }else {
+                Feng.success("Sangat berhasil ditambah!");
+            }
+            window.parent.TCompetition.table.refresh();
+            TCarInfoDlg.close();
+        }else{
+            Feng.error(data.msg);
+        }
+
+    },function(data){
+        if(language==1){
+            Feng.error("添加失败!" + data.responseJSON.message + "!");
+        }else if(language==2){
+            Feng.error("Fail to add!" + data.responseJSON.message + "!");
+        }else {
+            Feng.error("Gagal menambah!" + data.responseJSON.message + "!");
+        }
+    });
+    ajax.set(this.tCarInfoData);
+    ajax.set("provinceCode",pCode);
+    ajax.set("cityCode",cCode);
+    ajax.set("name",name);
+    ajax.set("phone",phone);
+    ajax.start();
+}
+
+/**
+ * 提交修改
+ */
+TCarInfoDlg.editSubmit = function() {
+
+    this.clearData();
+    this.collectData();
+    if(!this.validate()){
+        return ;
+    }
+
+    var roleType = $("#roleType").val();  //1=平台  2=分公司 3=加盟商
+    var companyType = $("input[name='companyType']:checked").val();
+    if (1 == roleType){
+        if (2 == companyType){
+            var oneId = $("#oneId").val();
+            if ("" == oneId){
+                if(language==1){
+                    Feng.info("所属分公司不能为空!");
+                }else if(language==2){
+                    Feng.info("The subordinate branch cannot be empty!");
+                }else {
+                    Feng.info("Cabang subordinat tidak dapat kosong!");
+                }
+                return;
+            }
+        }
+    }
+    var serverBox =[];
+    $('input[name="serverBox"]:checked').each(function(){
+        serverBox.push($(this).val());
+    });
+    if (serverBox.length == 0){
+        if(language==1){
+            Feng.info("请选择经营业务");
+        }else if(language==2){
+            Feng.info("Please select business");
+        }else {
+            Feng.info("Pilih bisnis");
+        }
+        return;
+    }
+    var carPhoto = $("#carPhoto").valueOf();
+    if ("" == carPhoto){
+        if(language==1){
+            Feng.info("请上传车辆照片");
+        }else if(language==2){
+            Feng.info("Please upload a photo of the vehicle");
+        }else {
+            Feng.info("Silakan mengunggah foto kendaraan");
+        }
+        return;
+    }
+    var drivingLicensePhoto = $("#drivingLicensePhoto").valueOf();
+    if ("" == drivingLicensePhoto){
+        if(language==1){
+            Feng.info("请上传行驶证照片");
+        }else if(language==2){
+            Feng.info("Please upload a photo of your vehicle. Please upload a photo of your driving license");
+        }else {
+            Feng.info("Silakan mengunggah foto kendaraanmu. Silakan mengunggah foto dari lisensi mengemudi Anda");
+        }
+        return;
+    }
+    //提交信息
+    var ajax = new $ax(Feng.ctxPath + "/tCar/update", function(data){
+        if(data.status == 200){
+            if(language==1){
+                Feng.success("修改成功!");
+            }else if(language==2){
+                Feng.success("Modify successfully!");
+            }else {
+                Feng.success("Mengubah dengan sukses!");
+            }
+            window.parent.TCar.table.refresh();
+            TCarInfoDlg.close();
+        }else{
+            Feng.error(data.msg);
+        }
+    },function(data){
+        if(language==1){
+            Feng.error("修改失败!" + data.responseJSON.message + "!");
+        }else if(language==2){
+            Feng.error("Fail to modify!" + data.responseJSON.message + "!");
+        }else {
+            Feng.error("Gagal mengubah!" + data.responseJSON.message + "!");;
+        }
+    });
+    ajax.set(this.tCarInfoData);
+    ajax.set("serverBox",serverBox.toString());
+    ajax.set("zcModel",$("#zcModel").val());
+    ajax.set("kcModel",$("#kcModel").val());
+    ajax.set("roleType",roleType);
+    if (1 == roleType){
+        ajax.set("companyType",companyType);
+        ajax.set("oneId",$("#oneId").val());
+        ajax.set("twoId",$("#twoId").val());
+        ajax.set("franchiseeId",0);
+    } else if (2 == roleType) {
+        ajax.set("franchiseeId",$("#franchiseeId").val());
+        ajax.set("companyType",0);
+        ajax.set("oneId",0);
+        ajax.set("twoId",0);
+    }else if (3 == roleType){
+        ajax.set("franchiseeId",0);
+        ajax.set("companyType",0);
+        ajax.set("oneId",0);
+        ajax.set("twoId",0);
+    }
+    ajax.start();
+}
+
+$(function() {
+    Feng.initValidator("carInfoForm", TCarInfoDlg.validateFields);
+    // 初始化图片上传
+    var carPhoto = new $WebUpload("carPhoto");
+    carPhoto.setUploadBarId("progressBar");
+    carPhoto.init();
+    var drivingLicensePhoto = new $WebUpload("drivingLicensePhoto");
+    drivingLicensePhoto.setUploadBarId("progressBar");
+    drivingLicensePhoto.init();
+});
+
+/**
+ * 选择分公司后执行
+ */
+TCarInfoDlg.oneChange = function (e) {
+    var oneId=$(e).val();
+    var ajax = new $ax(Feng.ctxPath + "/tCity/onChange", function(data){
+        if(data!=null){
+            if(language==1){
+                var content='<option value="">选择市</option>';
+            }else if(language==2){
+                var content='<option value="">Choose your franchisee</option>';
+            }else {
+                var content='<option value="">Pilih franchisee Anda</option>';
+            }
+            $.each(data, function(k,v) {
+                content += "<option value='"+v.code+"'>"+v.name+"</option>";
+            });
+            $("#cCode").empty().append(content);
+        }
+    });
+    ajax.set("oneId",oneId);
+    ajax.start();
+}
+
+/**
+ * 类型改变执行
+ * @param e
+ */
+TCarInfoDlg.companyTypeClick = function (e) {
+    if (1 == e){
+        $(".companyDiv").hide();
+    } else if (2 == e){
+        $(".companyDiv").show();
+    }
+}
+
+/**
+ * 车辆品牌改变时执行
+ */
+TCarInfoDlg.brandChange = function (e) {
+    var carBrandId=$(e).val();
+    var ajax = new $ax(Feng.ctxPath + "/tCar/brandChange", function(data){
+        if(data!=null){
+            if(language==1){
+                var content='<option value="">选择车辆类型</option>';
+            }else if(language==2){
+                var content='<option value="">Please select the vehicle type</option>';
+            }else {
+                var content='<option value="">Pilih Jenis Kendaraan</option>';
+            }
+
+            $.each(data, function(k,v) {
+                content += "<option value='"+v.id+"'>"+v.name+"</option>";
+            });
+            $("#carModelId").empty().append(content);
+        }
+    });
+    ajax.set("carBrandId",carBrandId);
+    ajax.start();
+}
+
+/**
+ * 专车服务被点击
+ */
+TCarInfoDlg.zcServerClick = function () {
+    var serverBox1 = $('#serverBox1').prop('checked');
+    if (serverBox1){
+        $("#zcModelDiv").show();
+    } else {
+        $("#zcModelDiv").hide();
+    }
+}
+
+/**
+ * 跨城服务被点击
+ */
+TCarInfoDlg.kcServerClick = function () {
+    var serverBox3 = $('#serverBox3').prop('checked');
+    if (serverBox3){
+        $("#kcModelDiv").show();
+    } else {
+        $("#kcModelDiv").hide();
+    }
+}

--
Gitblit v1.7.1