ソースを参照

客服反馈问题优化

liujiankang 5 年 前
コミット
8e9b298b21

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

@@ -205,6 +205,8 @@ public class CustomerInfo  implements Serializable {
     private Integer customerTagId;//标记id
     private String tagDesc;//标记内容
     private Integer tagFlag;//标记旗帜1红、2黄、3绿、4蓝、5紫
+
+    private String detectNumber;//维修编号
     public Date getVisitDate() {
         return visitDate;
     }
@@ -1110,4 +1112,12 @@ public class CustomerInfo  implements Serializable {
     public void setTagFlag(Integer tagFlag) {
         this.tagFlag = tagFlag;
     }
+
+    public String getDetectNumber() {
+        return detectNumber;
+    }
+
+    public void setDetectNumber(String detectNumber) {
+        this.detectNumber = detectNumber;
+    }
 }

+ 1 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java

@@ -1566,7 +1566,7 @@ public class CustomerServiceImpl implements CustomerService {
         signclosedInfo.setSignclosedCompanyId(cmRelation.getCompanyId());
         signclosedInfo.setSignclosedCustomerId(cmRelation.getCustomerId());
         //查询是否已存在相同单号
-        if(sendbackInfo.getSendbackLogisticsNo() != null){
+        if(sendbackInfo.getSendbackLogisticsNo() != null && !sendbackInfo.getSendbackLogisticsNo().equals("")){
             ComplaintSignclosedInfo sinfo = new ComplaintSignclosedInfo();
             sinfo.setSignclosedLogisticsNumber(sendbackInfo.getSendbackLogisticsNo());
             if(complaintSignclosedInfoMapper.listSignclosed(sinfo).size() <= 0){

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

@@ -565,6 +565,9 @@
       <if test="tagFlag != null and tagFlag != ''">
         and ti.tag_flag = #{tagFlag}
       </if>
+      <if test="detectNumber != null and detectNumber != ''">
+        and cd.detect_number = #{detectNumber}
+      </if>
     </where>
     GROUP BY c.customer_id
     ORDER BY c.customer_id desc

+ 6 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -1330,6 +1330,12 @@ public class AdminCustomerController {
     public ModelAndView toUpdateRenewed(HttpServletRequest request) throws Exception {
         ModelAndView mv = new ModelAndView("cm/customer/update_relation");
         String customerId = request.getParameter("customerId");
+        String type = request.getParameter("type");
+        if(type != null && !type.equals("")){
+            mv.addObject("type",type);
+        }else{
+            mv.addObject("type",0);
+        }
         CmRelation cmRelation = new CmRelation();
         cmRelation.setCustomerId(Integer.valueOf(customerId));
         cmRelation = customerService.getCmRelationInfo(cmRelation);

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

@@ -222,6 +222,7 @@
                             <th style="text-align: center;" width="60">用户电话</th>
                             <th style="text-align: center;" width="60">处理方式</th>
                             <th style="text-align: center;" width="60">客诉问题</th>
+                            <#--<th style="text-align: center;" width="60">问题简介</th>-->
                             <th style="text-align: center;" width="60">操作</th>
                         </tr>
                         </thead>
@@ -313,12 +314,13 @@
             <#--<div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题回复:</label>
                 <div class="formControls col-9 col-sm-9">
-
+                    <input type="hidden" name="questionId" id="questionId" value="">
                     <script id="describeContentText" type="text/plain" style="width:100%;height:150px;"></script>
                     <input type="hidden" name="describeContent" id="describeContent" value="">
                 </div>
             </div>-->
             <input type="hidden" name="questionId" id="questionId" value="">
+            <input type="hidden" name="describeId" id="describeId" value="">
             <div class="row cl">
             <#--处理描述 - 客诉备注-->
                 <label class="form-label col-1 col-sm-1">问题描述:</label>

ファイルの差分が大きいため隠しています
+ 32 - 24
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl


+ 21 - 4
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/order_list.ftl

@@ -190,8 +190,8 @@
                     </div>
 
                     <div class="formControls col-3 col-sm-3">
-                        <span class="select-box">
-                            <select name="salesStoreId" class="select" id="salesStoreId">
+                        <span >
+                            <select name="salesStoreId" class="chosen" id="salesStoreId">
 
                             </select>
                         </span>
@@ -604,7 +604,7 @@
      * 展示销售公司
      */
     function setStore(companyId,node){
-        var companyId = $("#companyId").val();
+        var companyId = $("#salesCompanyId").val();
         var html = '<option value="">店铺</option>';
         $.ajax({
             type: "POST",
@@ -623,10 +623,12 @@
                     html = '';
                 }
                 $(node).html(html);
+                $("#salesStoreId").trigger("chosen:updated");//初始化
             },
             error: function(XmlHttpRequest, textStatus, errorThrown){
             }
         });
+
     }
 
     /**
@@ -708,7 +710,22 @@
         return productList;
     }
 
-
+    $('.chosen').chosen({
+        no_results_text: "没有找到结果!",//搜索无结果时显示的提示
+        search_contains:true,   //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
+        allow_single_deselect:true, //单选下拉框是否允许取消选择。如果允许,选中选项会有一个x号可以删除选项
+        disable_search: false, //禁用搜索。设置为true,则无法搜索选项。
+        disable_search_threshold: 0, //当选项少等于于指定个数时禁用搜索。
+        inherit_select_classes: true, //是否继承原下拉框的样式类,此处设为继承
+        placeholder_text_single: '选择店铺', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
+        width: '200px', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
+        max_shown_results: 1000, //下拉框最大显示选项数量
+        display_disabled_options: false,
+        single_backstroke_delete: false, //false表示按两次删除键才能删除选项,true表示按一次删除键即可删除
+        case_sensitive_search: false, //搜索大小写敏感。此处设为不敏感
+        group_search: false, //选项组是否可搜。此处搜索不可搜
+        include_group_label_in_selected: true //选中选项是否显示选项分组。false不显示,true显示。默认false。
+    });
 </script>
 </body>
 </html>

+ 32 - 10
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_relation.ftl

@@ -35,8 +35,9 @@
     <title></title>
 </head>
 <body>
-<article class="cl pd-20">
+<article  class="cl pd-20">
     <form action="" method="post" class="form form-horizontal" id="form-update-renewed" name="form-update-renewed">
+        <a id="test" class="js-btnHistory" href="#Targetname"></a>
         <div class="row cl" style="margin-left: -60px;margin-bottom: 20px;">
             <div class="formControls col-2 col-sm-2 text-r">
                 <strong>当前进度</strong>
@@ -1151,6 +1152,8 @@
                                     <td class="td-manage text-c" width="100">
                                         <a onclick="getDetectInfo('${detect.detectId}');">查看详情</a><br>
                                         <#if detect.detectState == 30 || detect.detectState == 34 || detect.detectState == 38 || detect.detectState == 37>
+                                        <input type="hidden" name="detectIds" value="${(detect.detectId)!}">
+                                        <input type="hidden" name="detectStates" value="${(detect.detectState)!}">
                                             <a onclick="to_updateDetectInfo('${(detect.detectId)!}','${(detect.detectState)!}');">维修处理</a>
                                         </#if>
                                     </td>
@@ -1343,17 +1346,28 @@
                     </div>
             </div>
         </div>
+        </div>
         <input type="hidden" id="customerId" name="customerId" value="${customerId!''}" seleType="primary">
+        <a name="Targetname" id="Targetname"></a>
     </form>
 </article>
 <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
 <script type="text/javascript" src="${path}/common/lib/icheck/jquery.icheck.min.js"></script>
 <script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/ajaxfileupload.js"></script>
 <script type="text/javascript">
+    var type= "${type }";
     //产品类型
     var productType = null;
-    $(function(){
-        $.Huitab("#tab_demo .tabBar span","#tab_demo .tabCon","current","click","0")});
+    if(type > 0){
+        $(function(){
+            $.Huitab("#tab_demo .tabBar span","#tab_demo .tabCon","current","click",4)});
+        $(function(){
+            $.Huitab("#tab_demo .tabBar span","#tab_demo .tabCon","current","click",5)});
+    }else{
+        $(function(){
+            $.Huitab("#tab_demo .tabBar span","#tab_demo .tabCon","current","click",0)});
+    }
+
     // #tab_demo 父级id
     // #tab_demo .tabBar span 控制条
     // #tab_demo .tabCon 内容区
@@ -1361,11 +1375,20 @@
     // 1	默认第2个tab为当前状态(从0开始)
 
 
-
     var mobile= /^1(3|4|5|7|8)\d{9}$/; //手机号码
     var uname = /^[\u4e00-\u9fa5a-zA-Z]{1,12}$/; //中文英文
     var money = /^(0{1}|([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/;//金额
-
+    var node = $("#Targetname");
+    $(function () {
+        if(type === "4"){
+            var detectId = $("input[name='detectIds']").val();
+            var detectState = $("input[name='detectStates']").val();
+            to_updateDetectInfo(detectId,detectState);
+            /*var btn = document.getElementById("test");
+            btn.click();*/
+            $("html,body").animate({scrollTop:node.offset().top},300);
+        }
+    });
 
     //添加寄回信息按钮
     function showSendbackDiv() {
@@ -1479,18 +1502,19 @@
                 layer.msg("请输入物流公司!",{icon: 5,time:1000});
                 return;
             }
+            */
             if(sendbackLogisticsNo == null || sendbackLogisticsNo == ""){
                 layer.msg("请输入物流单号!",{icon: 5,time:1000});
                 return;
-            }*/
-            if(sendbackName == null || sendbackName == ""){
+            }
+            /*if(sendbackName == null || sendbackName == ""){
                 layer.msg("请输入寄回人姓名!",{icon: 5,time:1000});
                 return;
             }
             if(sendbackTel == null || sendbackTel == ""){
                 layer.msg("请输入寄回人电话!",{icon: 5,time:1000});
                 return;
-            }
+            }*/
             /*if(sendbackSignTime == null || postageAlipayName == ""){
                 layer.msg("请输入签收时间!",{icon: 5,time:1000});
                 return;
@@ -3419,8 +3443,6 @@
           $("#sendbackPresaleAdminDiv2").hide();
         }
     }
-
-
 </script>
 </body>
 </html>

+ 155 - 18
watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/associated_customer.ftl

@@ -33,21 +33,16 @@
         <div class="input-box"  >
             <span class="input-dic spanhidth" style="margin-top: 12px;">客诉编号:</span>
             <input type="text" style="width: 400px;" class="input-text" placeholder="客诉编号" id="signclosedCustomerId" name="signclosedCustomerId">
-            <button type="button" class="my-btn-submit" style="margin-top: 4px;width: 120px;" onclick="select();">查询</button>
+            <button  id="buttonId" type="button" class="my-btn-submit" style="margin-top: 4px;width: 120px;" onclick="select();">查询</button>
         </div>
         <div id="noCustomerDiv" style="display: none; text-align:center;">
             <h3><strong style="color: #93da67">?没有搜索到客诉哦</strong></h3>
         </div>
         <div id="customerDiv" style="display: none;">
-            <#--<div class="row cl">
-                <div class="formControls col-2 col-sm-2 text-r">
-                    <strong>客诉时间:</strong>
-                </div>
-                <div class="formControls col-8 col-sm-8" id="customerCreateTime">
 
-                </div>
-            </div>-->
-                <table class="table table-border table-bg table-bordered" style="margin-top: 10px;width: 500px;">
+            <div class="row cl">
+                <div class="formControls col-10 col-sm-10 text-c" style="margin-left: 50px;" >
+                <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
                     <thead>
                     <tr>
                         <th width="5" style="text-align: center">客诉标题</th>
@@ -71,14 +66,40 @@
                     </tr>
                     </thead>
                 </table>
+            </div>
+            </div>
         </div>
+
+        <div class="row cl">
+            <div class="formControls col-10 col-sm-10 text-c" style="display:none;margin-left: 50px;" id="onCustomerTable">
+                <table class="table table-border table-bg table-bordered">
+                    <thead>
+                    <tr class="text-c">
+                        <th style="text-align: center;" width="60">客诉时间</th>
+                        <th style="text-align: center;" width="60">跟进客服</th>
+                        <th style="text-align: center;" width="60">用户姓名</th>
+                        <th style="text-align: center;" width="60">用户昵称</th>
+                        <th style="text-align: center;" width="60">用户电话</th>
+                        <th style="text-align: center;" width="60">处理方式</th>
+                        <th style="text-align: center;" width="60">客诉问题</th>
+                        <th style="text-align: center;" width="60">操作</th>
+                    </tr>
+                    </thead>
+                    <tbody id="onCustomer">
+
+                    </tbody>
+                </table>
+            </div>
+        </div>
+
         <div style="text-align:center;display: none" id="associatedId">
         <#if signclosedId??>
             <input type="hidden" value="${signclosedId!''}" id="signclosedId" name="signclosedId">
         </#if>
-            <button type="button" class="my-btn-submit" onclick="update();">确认关联</button>
+            <button type="button" id="submitId" class="my-btn-submit" onclick="update();">确认关联</button>
         </div>
-
+    <input type="hidden" value="${complaintSignclosedInfo.signclosedSendName!''}" id="signclosedSendName">
+    <input type="hidden" value="${complaintSignclosedInfo.signclosedSendTel!''}" id="signclosedSendTel">
     </form>
 </article>
 <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
@@ -118,14 +139,13 @@
 
 
     function  update() {
-        var signclosedCustomerId = $("#signclosedCustomerId").val();
-        if( signclosedCustomerId != null){
-            if( signclosedCustomerId.length > 10 ){
-                layer.msg('编号长度不得大于10个字符',{icon: 5,time:1000});
-                return;
+            var signclosedCustomerId = $("#signclosedCustomerId").val();
+            if( signclosedCustomerId != null){
+                if( signclosedCustomerId.length > 10 ){
+                    layer.msg('编号长度不得大于10个字符',{icon: 5,time:1000});
+                    return;
+                }
             }
-        }
-
         $.ajax({
             cache: true,
             type: "POST",
@@ -148,6 +168,123 @@
             }
         });
     }
+
+    function  to_update(customerId) {
+        $("#signclosedCustomerId").val(customerId);
+        $("#buttonId").click();
+        $("#submitId").click();
+
+
+    }
+    selectOnCustomer();
+    /*根据寄回信息查询老的客诉---start--*/
+    function selectOnCustomer() {
+        var customerName = $("#signclosedSendName").val();
+        var customerTel = $("#signclosedSendTel").val();
+        if(
+                (customerName == null || customerName == "") &&
+                (customerTel == null || customerTel == "")){
+            $("#onCustomerTable").hide();
+            return;
+            alert(11);
+        }
+        $.ajax({
+            type: "POST",
+            data: {
+                "customerName":customerName,
+                "customerTel":customerTel},
+            url: "${path}/admin/customer/selectOnCustomer",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    var onCustomerList = data.returnMsg.onCustomerList;
+                    if(onCustomerList != null && onCustomerList.length >0 ){
+                        $("#onCustomerTable").show();
+                        var onCustomerTd = "";
+                        for(var i = 0;i < onCustomerList.length; i++){
+                            var onCustomer = onCustomerList[i];
+                            //客诉时间
+                            var time = formatDate(new Date(onCustomer.customerCreateTime),"yyyy-MM-dd");
+                            //处理方式
+                            var customerIsSolve = "";
+                            switch (onCustomer.customerIsSolve){
+                                case 1:
+                                    customerIsSolve = "已解决";
+                                    break;
+                                case 2:
+                                    customerIsSolve = "未解决";
+                                    break;
+                                case 3:
+                                    customerIsSolve = "换新"+ backStatus(onCustomer.backStatus)+sendStatus(onCustomer.sendStatus);
+                                    break;
+                                case 4:
+                                    customerIsSolve = "维修"+ backStatus(onCustomer.backStatus)+sendStatus(onCustomer.sendStatus);
+                                    break;
+                                case 5:
+                                    customerIsSolve = "补发"+ sendStatus(onCustomer.sendStatus);
+                                    break;
+                                case 6:
+                                    customerIsSolve = "退货"+ backStatus(onCustomer.backStatus);
+                                    break;
+                                case 7:
+                                    customerIsSolve = "无理由退货"+ backStatus(onCustomer.backStatus);
+                                    break;
+                            }
+                            var customerWechatName = onCustomer.customerWechatName;
+                            //微信昵称
+                            if(typeof(onCustomer.customerWechatName)=="undefined"){
+                                customerWechatName = "";
+                            }
+                            var customerName = onCustomer.customerName;
+                            //姓名
+                            if(typeof(onCustomer.customerName)=="undefined"){
+                                customerName = "";
+                            }
+                            onCustomerTd += '' +
+                                    ' <tr>' +
+                                    ' <td style="text-align: center;">'+ time+'</td>' +
+                                    ' <td style="text-align: center;">'+onCustomer.adminName +'</td>' +
+                                    ' <td style="text-align: center;">'+customerName +'</td>' +
+                                    ' <td style="text-align: center;">'+customerWechatName +'</td>' +
+                                    ' <td style="text-align: center;">'+onCustomer.customerTel +'</td>' +
+                                    ' <td style="text-align: center;">'+customerIsSolve +'</td>' +
+                                    ' <td style="text-align: center;">'+onCustomer.describeTitle +'</td>' +
+                                    ' <td style="text-align: center;"><a onclick="to_update('+onCustomer.customerId +')">关联此客诉</a>' +
+                                    ' </tr>' +
+                                    '';
+                        }
+                        $("#onCustomer").html(onCustomerTd);
+                    }
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        });
+
+
+        function backStatus(status) {
+            if(status == 1){
+                return "(未寄回)";
+            }
+            if(status == 2){
+                return "(已寄回)";
+            }
+            if(status == 3){
+                return "(已收货)";
+            }
+        }
+        function sendStatus(status) {
+            if(status == 1){
+                return "(未寄送)";
+            }
+            if(status == 2){
+                return "(已寄送)";
+            }
+            if(status == 3){
+                return "(已收货)";
+            }
+        }
+    }
 </script>
 </body>
 </html>

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

@@ -1270,7 +1270,6 @@ function addCustomerReady(){
         return false;
     }
 
-
     /*----处理描述- start --*/
     var describeHandleDescText = UE.getEditor('describeHandleDescText').getContent();
     if(describeHandleDescText.length > 3000){