From e809f5955584e600d8612540ea814977c49774c2 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期三, 27 八月 2025 23:51:54 +0800
Subject: [PATCH] 修改bug

---
 ManagementQYTTravel/guns-admin/src/main/webapp/static/modular/system/tDriver/yesDriver_info.js |   64 +++++++++++++++++++++++++++++--
 1 files changed, 59 insertions(+), 5 deletions(-)

diff --git a/ManagementQYTTravel/guns-admin/src/main/webapp/static/modular/system/tDriver/yesDriver_info.js b/ManagementQYTTravel/guns-admin/src/main/webapp/static/modular/system/tDriver/yesDriver_info.js
index b2494d0..086d4f4 100644
--- a/ManagementQYTTravel/guns-admin/src/main/webapp/static/modular/system/tDriver/yesDriver_info.js
+++ b/ManagementQYTTravel/guns-admin/src/main/webapp/static/modular/system/tDriver/yesDriver_info.js
@@ -404,7 +404,11 @@
             }
         }
     }
-
+    var areaValue = $("#areaId option:selected").attr("tag");
+    if(null == areaValue || "" == areaValue){
+        Feng.info("请选择司机从业地");
+        return;
+    }
     var sex = $("input[name='sex']:checked").val();
     var headImgUrl = $("#headImgUrl").val();
     if ("" == headImgUrl){
@@ -465,7 +469,7 @@
             window.parent.YesDriver.table.refresh();
             YesDriverInfoDlg.close();
         }else{
-            Feng.error("添加失败!" + data.message + "!");
+            Feng.error("添加失败!" + data + "!");
         }
     },function(data){
         Feng.error("添加失败!" + data.responseJSON.message + "!");
@@ -475,6 +479,7 @@
     ajax.set("lineStr",JSON.stringify(subArr));
     ajax.set("sex",sex);
     ajax.set("roleType",roleType);
+    ajax.set("placeOfEmployment",areaValue);
     if (1 == roleType){
         ajax.set("companyType",companyType);
         ajax.set("oneId",$("#oneId").val());
@@ -514,6 +519,11 @@
                 return;
             }
         }
+    }
+    var areaValue = $("#areaId option:selected").attr("tag");
+    if(null == areaValue || "" == areaValue){
+        Feng.info("请选择司机从业地");
+        return;
     }
     var sex = $("input[name='sex']:checked").val();
     var headImgUrl = $("#headImgUrl").val();
@@ -570,9 +580,13 @@
             Feng.error("登录账户已存在,请重新输入");
             return;
         }
-        Feng.success("修改成功!");
-        window.parent.YesDriver.table.refresh();
-        YesDriverInfoDlg.close();
+        if(200 == data.code){
+            Feng.success("修改成功!");
+            window.parent.YesDriver.table.refresh();
+            YesDriverInfoDlg.close();
+        }else{
+            Feng.error("修改失败!" + data + "!");
+        }
     },function(data){
         Feng.error("修改失败!" + data.responseJSON.message + "!");
     });
@@ -581,6 +595,7 @@
     ajax.set("lineStr",JSON.stringify(subArr));
     ajax.set("sex",sex);
     ajax.set("roleType",roleType);
+    ajax.set("placeOfEmployment",areaValue);
     if (1 == roleType){
         ajax.set("companyType",companyType);
         ajax.set("oneId",$("#oneId").val());
@@ -600,6 +615,45 @@
     ajax.start();
 }
 
+
+
+/**
+ * 省改变时执行
+ */
+YesDriverInfoDlg.provinceChange = function () {
+    var provinceId = $("#provinceId").val();
+    var ajax = new $ax(Feng.ctxPath + "/tOpenCity/change", function(data){
+        if(data!=null){
+            var content='<option value="">选择市</option>';
+            $.each(data, function(k,v) {
+                content += "<option value='"+v.id+"' tag='" + v.code + "'>"+v.name+"</option>";
+            });
+            $("#cityId").empty().append(content);
+            $("#areaId").empty().append('<option value="">选择区</option>');
+        }
+    });
+    ajax.set("id",provinceId);
+    ajax.start();
+}
+/**
+ * 市改变时执行
+ */
+YesDriverInfoDlg.cityChange = function () {
+    var cityId = $("#cityId").val();
+    var ajax = new $ax(Feng.ctxPath + "/tOpenCity/change", function(data){
+        if(data!=null){
+            var content='<option value="">选择区</option>';
+            $.each(data, function(k,v) {
+                content += "<option value='"+v.id+"' tag='" + v.code + "'>"+v.name+"</option>";
+            });
+            $("#areaId").empty().append(content);
+        }
+    });
+    ajax.set("id",cityId);
+    ajax.start();
+}
+
+
 $(function() {
     Feng.initValidator("yesDriverInfoForm", YesDriverInfoDlg.validateFields);
     // 初始化图片上传

--
Gitblit v1.7.1