Jelajahi Sumber

Merge remote-tracking branch 'liujiankang/master'

liujiankang 7 tahun lalu
induk
melakukan
b8c2b24cd2

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

@@ -418,11 +418,14 @@
         /*初始化销售产品(大类)*/
         initPromotingProducts();
 
+        /*监听客户类型*/
+        $("[name='customerType']").change(function (){
+            initAccountType($(this).val());
+        })
         /*监听省份*/
         $("[name='customerProvinceCode']").change(function (){
             initCity($(this).val());
         })
-
         /*监听渠道类别*/
         $("[name='channelCategory']").change(function (){
             initChannelType($(this).val());
@@ -519,8 +522,21 @@
             $("#isShowOpenTicket").show();
             $("#isShowEnterprise").show();
             $("#isShowAddress").show();
+            var customerType = $("[name='customerType']").val();
+            initAccountType(customerType);
         }
     }
+
+    function initAccountType(customerType) {
+        if(customerType == "1"){
+            $("#accountType-2").iCheck('check');//个人
+            $("#accountNameId").html("收款人姓名:");
+        }else{
+            $("#accountType-1").iCheck("check");//公司
+            $("#accountNameId").html("企业名称:");
+        }
+    }
+
     /*初始化省份*/
     function initProvince() {
         //默认查询参数为空

+ 18 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/customer/update_customer_info.ftl

@@ -560,6 +560,11 @@
         /*初始化销售产品(大类)*/
         initPromotingProducts();
 
+        /*监听客户类型*/
+        $("[name='customerType']").change(function (){
+            initAccountType($(this).val());
+        })
+
         /*监听省份*/
         $("[name='customerProvinceCode']").change(function (){
             initCity($(this).val());
@@ -653,6 +658,8 @@
             $("#isShowOpenTicket").show();
             $("#isShowEnterprise").show();
             $("#isShowAddress").show();
+            var customerType = $("[name='customerType']").val();
+            initAccountType(customerType);
         }
     }
 
@@ -663,6 +670,17 @@
             $(".normalTicketType").hide();
         }
     }
+
+    function initAccountType(customerType) {
+        if(customerType == "1"){
+            $("#accountType-2").iCheck('check');//个人
+            $("#accountNameId").html("收款人姓名:");
+        }else{
+            $("#accountType-1").iCheck("check");//公司
+            $("#accountNameId").html("企业名称:");
+        }
+    }
+
     /*初始化省份*/
     function initProvince() {
         //默认查询参数为空