Jelajahi Sumber

修改客户信息

liujiankang 7 tahun lalu
induk
melakukan
758a71ceaa

+ 33 - 12
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_customer.ftl

@@ -190,11 +190,11 @@
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>二次售后:</label>
                 <div class="formControls col-10 col-sm-10 skin-minimal">
                     <div class="radio-box">
-                        <input type="radio"  name="customerSecondaryCustomer" value="1"  >
+                        <input type="radio" id="customerSecondaryCustomer1"  name="customerSecondaryCustomer" value="1"  >
                         <label for="customer-type-1">是</label>
                     </div>
                     <div class="radio-box">
-                        <input type="radio"   name="customerSecondaryCustomer" value="2"  checked>
+                        <input type="radio" id="customerSecondaryCustomer2"  name="customerSecondaryCustomer" value="2" checked>
                         <label for="customer-type-2">否</label>
                     </div>
                 </div>
@@ -687,9 +687,6 @@
 
 <script>
 
-    $(function(){
-    })
-
     /*是否是修改页面*/
     var isUpdate = false;
     /*是否需要回访  只有修改页面才会使用*/
@@ -840,17 +837,41 @@
      customerInitialId;//初始客诉id
     * */
     function markedSecondary(customerLastId,customerInitialId,obj){
-            $("#customerLastId").val(customerLastId);
-            if(customerInitialId == null || customerInitialId == "" || typeof(customerInitialId) == "undefined"){
-                $("#customerInitialId").val(customerLastId);
-            }else{
-                $("#customerInitialId").val(customerInitialId);
-            }
+        $("#customerLastId").val(customerLastId);
+        if(customerInitialId == null || customerInitialId == "" || typeof(customerInitialId) == "undefined"){
+            $("#customerInitialId").val(customerLastId);
+        }else{
+            $("#customerInitialId").val(customerInitialId);
+        }
         $(obj).parents("tr").siblings().css({'background-color':''});
+        $(obj).parents("tr").siblings().each(function(){
+            /*$(this).find("a").eq(1).parent().append('<a onclick="markedSecondary('+customerLastId+','+customerInitialId+',this)">标记为二次售后</a>');*/
+            $(this).find("a").eq(1).show();
+            $(this).find("a").eq(2).hide();
+        })
+
         $(obj).parents("tr").css('background-color', '#ccc');
-        $(obj).html(<a onclick="markedSecondary('+onCustomer.customerId +','+onCustomer.customerInitialId +',this)">取消二次售后标记</a>);
+        /*$(obj).parent().append('<a onclick="cancelMarkedSecondary('+customerLastId+','+customerInitialId+',this)">取消二次售后标记</a>');
+        $(obj).remove();*/
+        $(obj).hide();
+        $(obj).next().show();
+        /*$(":radio[name='customerSecondaryCustomer'][value='2']").prop("checked",false);
+        $(":radio[name='customerSecondaryCustomer'][value='1']").prop("checked",true);*/
+
 
+        $("#customerSecondaryCustomer1").iCheck('check');
     }
+    function cancelMarkedSecondary(customerLastId,customerInitialId,obj){
+        $("#customerLastId").val("");
+        $("#customerInitialId").val("");
+        $(obj).parents("tr").css('background-color', '');
+        /*$(obj).parent().append('<a onclick="markedSecondary('+customerLastId+','+customerInitialId+',this)">标记为二次售后</a>');
+        $(obj).remove();*/
+        $(obj).hide();
+        $(obj).prev().show();
+        $("#customerSecondaryCustomer2").iCheck('check');
+    }
+
 </script>
 
 </body>

+ 2 - 2
watero-rst-web/src/main/webapp/common/js/customer/customer.js

@@ -1939,7 +1939,6 @@ function processIsEmpty(process){
 
 
 $("#customerWechatName").blur(function(){
-    alert("1");
     selectOnCustomer();
 });
 $("#customerName").blur(function(){
@@ -2020,7 +2019,8 @@ function selectOnCustomer() {
                            ' <td style="text-align: center;">'+onCustomer.describeTitle +'</td>' +
                            ' <td style="text-align: center;">'+onCustomer.describeContent +'</td>' +
                            ' <td style="text-align: center;"><a onclick="admin_update_customer('+onCustomer.customerId +')">继续跟进</a>' +
-                           '<br><a onclick="markedSecondary('+onCustomer.customerId +','+onCustomer.customerInitialId +',this)">标记为二次售后</a></td>' +
+                           '<br><a onclick="markedSecondary('+onCustomer.customerId +','+onCustomer.customerInitialId +',this)">标记为二次售后</a>' +
+                           '<a style="display: none;" onclick="cancelMarkedSecondary('+onCustomer.customerId+','+onCustomer.customerInitialId +',this)">取消二次售后标记</a></td>' +
                            ' </tr>' +
                            '';
                    }