Selaa lähdekoodia

添加客户基本信息

dujinyan 7 vuotta sitten
vanhempi
commit
3763074d44

+ 23 - 28
watero-rst-web/src/main/webapp/WEB-INF/views/customer/save_customer_info.ftl

@@ -381,17 +381,16 @@
     }
 
     /*根据省份代号初始化城市*/
-    function initCity(customerProvince){
-        alert("initCity start...");
+    function initCity(customerProvinceId){
         var cityListInfo = null;
-        if(customerProvince == null || customerProvince == ""){
+        if(customerProvinceId == null || customerProvinceId == ""){
             var html = '<option value="">请选择城市</option>';
             $("[name='customerCityCode']").html(html);
         }else{
             $.ajax({
                 type: "POST",
                 data: {
-                    provinceId : customerProvince
+                    provinceId : customerProvinceId
                 },
                 url: "${path}/admin/customerBasic/query_cityList",
                 async: true,
@@ -415,31 +414,30 @@
 
     /*初始化渠道类别*/
     function initChannelCategory() {
-        //默认为售前咨询
-        //var customerCounselTypeOverall = allCustomerInfoType;
-        var customerChannelCategory = null;
+        //默认查询参数为空
+        var channelCategoryListInfo = null;
         $.ajax({
             type: "POST",
             data: {
-                complaintConsultingType : customerChannelCategory
+                channelCategoryId : channelCategoryListInfo
             },
-            url: "${path}/admin/complaintQuestion/list_complaintType",
+            url: "${path}/admin/customerBasic/query_channelCategoryList",
             async: true,
             success: function(data){
                 var html = '<option value="">请选择渠道类别</option>';
                 var id;
                 if (data.returnCode == 200) {
-                    for(var i=0;i<data.returnMsg.complaintTypeInfoList.length;i++){
-                        var complaintTypeInfo = data.returnMsg.complaintTypeInfoList[i];
+                    for(var i=0;i<data.returnMsg.channelCategoryList.length;i++){
+                        channelCategoryListInfo = data.returnMsg.channelCategoryList[i];
                         if(i == 0 ){
-                            id = complaintTypeInfo.complaintId;
+                            id = channelCategoryListInfo.channelCategory;
                         }
-                        html += '<option value="'+ complaintTypeInfo.complaintId +'">'+ complaintTypeInfo.complaintClassName +'</option>';
+                        html += '<option value="'+ channelCategoryListInfo.channelCategory +'">'+ channelCategoryListInfo.channelName +'</option>';
                     }
                 }else{
                     html = '';
                 }
-                $("[name='complaintId']").html(html);
+                $("[name='channelCategory']").html(html);
             },
             error: function(XmlHttpRequest, textStatus, errorThrown){
             }
@@ -447,33 +445,30 @@
     }
 
     /*根据渠道类别初始化渠道类型*/
-    function initChannelType(complaintId,smallId){
-        if(complaintId == null || complaintId == ""){
+    function initChannelType(channelCategory){
+        var channelTypeListInfo = null;
+        if(channelCategory == null || channelCategory == ""){
             var html = '<option value="">请选择渠道类别</option>';
-            $("[name='smallClassId']").html(html);
+            $("[name='channelCategory']").html(html);
         }else{
             $.ajax({
                 type: "POST",
                 data: {
-                    complaintId : complaintId
+                    channelCategoryId : channelCategory
                 },
-                url: "${path}/admin/complaintQuestion/list_complaintSmallClass",
+                url: "${path}/admin/customerBasic/query_channelTypeList",
                 async: true,
                 success: function(data){
-                    var html = '<option value="">请选择渠道类型</option>';
+                    var html = '<option value="">请选择城市</option>';
                     if (data.returnCode == 200) {
-                        for(var i=0;i<data.returnMsg.customerChannelTypeList.length;i++){
-                            var ComplaintSmallClassInfo = data.returnMsg.customerChannelTypeList[i];
-                            html += '<option value="'+ ComplaintSmallClassInfo.smallClassId +'">'+ ComplaintSmallClassInfo.smallClassName +'</option>';
+                        for(var i=0;i<data.returnMsg.channelTypeList.length;i++){
+                            channelTypeListInfo = data.returnMsg.channelTypeList[i];
+                            html += '<option value="'+ channelTypeListInfo.channelDivisionId +'">'+ channelTypeListInfo.channelType +'</option>';
                         }
                     }else{
                         html = '';
                     }
-                    $("[name='smallClassId']").html(html);
-
-                    if(smallId != null && smallId != "" && typeof(smallId)!="undefined" ){
-                        $("select[name='smallClassId']").val(smallId);
-                    }
+                    $("[name='channelType']").html(html);
                 },
                 error: function(XmlHttpRequest, textStatus, errorThrown){
                 }