Kaynağa Gözat

修改客户信息

liujiankang 7 yıl önce
ebeveyn
işleme
af5f4680a3

+ 2 - 2
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerInfo.java

@@ -139,8 +139,8 @@ public class CustomerInfo  implements Serializable {
     @DateTimeFormat(pattern="yyyy-MM-dd")
     @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
     private Date endTime;   //结束时间
-    private Integer customerLastId;
-    private Integer customerInitialId;
+    private Integer customerLastId;//上次客诉id
+    private Integer customerInitialId;//初始客诉id
 
 
     public void setComplaintDetectList(List<ComplaintDetectInfo> complaintDetectList) {

+ 18 - 3
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml

@@ -56,7 +56,9 @@
       t.customer_question_title,
       t.customer_desc,
       t.customer_out_damaged,
-      t.customer_secondary_customer
+      t.customer_secondary_customer,
+      t.customer_last_id,
+      t.customer_initial_id
     from tb_rst_customer_info t
     where t.customer_id = #{customerId,jdbcType=INTEGER}
   </select>
@@ -92,6 +94,8 @@
       c.customer_desc,
       c.customer_out_damaged,
       c.customer_secondary_customer,
+      c.customer_last_id,
+      c.customer_initial_id,
       v.visit_status,
       v.visit_complete_date,
       v.visit_name,
@@ -255,6 +259,8 @@
     <result column="customer_desc" property="customerDesc"/>
     <result column="customer_out_damaged" property="customerOutDamaged"/>
     <result column="customer_secondary_customer" property="customerSecondaryCustomer"/>
+    <result column="customer_last_id" property="customerLastId"/>
+    <result column="customer_initial_id " property="customerInitialId"/>
     <result column="visit_status" property="visitStatus"/>
     <result column="visit_complete_date" property="visitCompleteDate"/>
     <result column="visit_name" property="visitName"/>
@@ -283,13 +289,14 @@
       company_id, store_id, customer_source_type, 
       customer_source, customer_counsel_type, customer_name, 
       customer_tel,customer_wechat_name, customer_is_solve, customer_is_visit,
-      customer_in_TDS, customer_out_TDS, customer_area, type_id, customer_desc, customer_out_damaged, customer_secondary_customer
+      customer_in_TDS, customer_out_TDS, customer_area, type_id, customer_desc, customer_out_damaged, customer_secondary_customer, customer_last_id, customer_initial_id
       )
     values (#{customerId,jdbcType=INTEGER}, #{adminId,jdbcType=INTEGER}, #{questionId,jdbcType=INTEGER}, 
       #{companyId,jdbcType=INTEGER}, #{storeId,jdbcType=INTEGER}, #{customerSourceType,jdbcType=TINYINT}, 
       #{customerSource,jdbcType=VARCHAR}, #{customerCounselType,jdbcType=BIT}, #{customerName,jdbcType=VARCHAR}, 
       #{customerTel,jdbcType=VARCHAR},#{customerWechatName,jdbcType=VARCHAR}, #{customerIsSolve,jdbcType=TINYINT}, #{customerIsVisit,jdbcType=VARCHAR},
       #{customerInTDS,jdbcType=INTEGER}, #{customerOutTDS,jdbcType=INTEGER}, #{customerArea,jdbcType=VARCHAR},#{typeId},#{customerDesc},#{customerOutDamaged},#{customerSecondaryCustomer}
+      ,#{customerLastId},#{customerInitialId}
       )
   </insert>
 
@@ -358,7 +365,13 @@
         customer_out_damaged = #{customerOutDamaged},
       </if>
       <if test="customerSecondaryCustomer != null" >
-        customer_secondary_customer = #{customerSecondaryCustomer}
+        customer_secondary_customer = #{customerSecondaryCustomer},
+      </if>
+      <if test="customerLastId != null" >
+        customer_last_id = #{customerLastId},
+      </if>
+      <if test="customerInitialId != null" >
+        customer_initial_id = #{customerInitialId}
       </if>
     </set>
     where customer_id = #{customerId}
@@ -418,6 +431,8 @@
     c.customer_desc,
     c.customer_out_damaged,
     c.customer_secondary_customer,
+    c.customer_last_id,
+    c.customer_initial_id,
     v.visit_status,
     v.visit_complete_date,
     v.visit_name,

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

@@ -162,7 +162,8 @@
                     <input type="text" class="input-text associated-phone" placeholder="用户电话" id="customerTel" name="customerTel" value="">
                 </div>
             </div>
-            <input type="hidden" value="" id="">
+            <input type="hidden" value="" id="customerLastId" name="customerLastId">
+            <input type="hidden" value="" id="customerInitialId" name="customerInitialId">
             <div class="row cl" >
                 <div class="formControls col-9 col-sm-9 text-c" id="onCustomerTable">
                     <table class="table table-border table-bg table-bordered">
@@ -833,6 +834,23 @@
     function admin_update_customer(customerId) {
         window.location.href= "${path}/admin/customer/to_update_customer?customerId="+customerId;
     }
+    /**
+    * 标记为二次售后
+     customerLastId;//上次客诉id
+     customerInitialId;//初始客诉id
+    * */
+    function markedSecondary(customerLastId,customerInitialId,obj){
+            $("#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").css('background-color', '#ccc');
+        $(obj).html(<a onclick="markedSecondary('+onCustomer.customerId +','+onCustomer.customerInitialId +',this)">取消二次售后标记</a>);
+
+    }
 </script>
 
 </body>

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

@@ -2019,7 +2019,8 @@ function selectOnCustomer() {
                            ' <td style="text-align: center;">'+customerIsSolve +'</td>' +
                            ' <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>标记为二次售后</a></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>' +
                            ' </tr>' +
                            '';
                    }