Browse Source

客诉列表

wangxiaoming 7 years ago
parent
commit
66978040f2

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

@@ -95,6 +95,7 @@ public class CustomerInfo  implements Serializable {
     /*  客诉问题关联qa查询表  */
     private Integer describeId;        //客诉问题id
     private Integer complaintId;        //客诉类型id
+    private Integer smallClassId;        //客诉小类id
     private String smallClassName;      //客诉小类名称
     private String describeTitle;       //客诉问题标题
 
@@ -223,6 +224,14 @@ public class CustomerInfo  implements Serializable {
         this.complaintId = complaintId;
     }
 
+    public Integer getSmallClassId() {
+        return smallClassId;
+    }
+
+    public void setSmallClassId(Integer smallClassId) {
+        this.smallClassId = smallClassId;
+    }
+
     public Integer getBackStatus() {
         return backStatus;
     }

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

@@ -137,6 +137,9 @@
       <if test="complaintId != null and complaintId != ''">
         and ct.complaint_id = #{complaintId}
       </if>
+      <if test="smallClassId != null and smallClassId != ''">
+        and s.small_class_id = #{smallClassId}
+      </if>
       <if test="customerIsVisit != null and customerIsVisit != ''">
         and c.customer_is_visit = #{customerIsVisit}
       </if>

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

@@ -522,8 +522,15 @@ public class AdminCustomerController {
         ProductType productType = new ProductType();
         //查询产品类型集合
         List<ProductType> typeList = productService.listProductType(productType);
+
         //查询客诉类型集合
         List<ComplaintTypeInfo> complaintTypeList = complaintTypeInfoService.listComplaintTypeInfo(new ComplaintTypeInfo());
+        //查询客诉类型集合
+        List<ComplaintSmallClassInfo> complaintSmallClassInfoList = complaintSmallClassInfoService.listComplaintSmallClassInfo(new ComplaintSmallClassInfo());
+
+        //查询问题集合   第 30 条bug
+//        List<QuestionDescribe> questionDescribeList = questionDescribeService.listQuestionDescribe(new QuestionDescribe());
+
         //查询跟进客服集合
         Admin admin = new Admin();
         admin.setAdminStatus(1);
@@ -531,6 +538,7 @@ public class AdminCustomerController {
 
         //获取登录人id
         Integer loginAdminId = AdminUtils.getLoginAdminId();
+        mv.addObject("complaintSmallClassInfoList", complaintSmallClassInfoList);
         mv.addObject("loginAdminId", loginAdminId);
         mv.addObject("typeList", typeList);
         mv.addObject("complaintTypeList", complaintTypeList);

+ 13 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminOrderController.java

@@ -802,6 +802,19 @@ public class AdminOrderController {
         return json;
     }
 
+    @ResponseBody
+    @RequestMapping("/get_excel_rows")
+    public ResponseJson getExcelRSows( @RequestParam("productUrl") String filePath,
+                                        HttpServletRequest request) throws IOException {
+        ResponseJson json = new ResponseJson(200, "SUCCESS", 200);
+        Integer maxNumber = 100;
+        String path = request.getServletContext().getRealPath(filePath);
+        boolean flag = ExcelUtil.readExcelNumber(path,maxNumber);
+        json.addResponseKeyValue("flag",flag);
+        json.addResponseKeyValue("maxNumber",maxNumber);
+        return json;
+    }
+
     /**
      * 根据excel内容推送到百胜
      *

+ 57 - 0
watero-rst-web/src/main/java/com/iamberry/rst/utils/ExcelUtil.java

@@ -129,6 +129,63 @@ public class ExcelUtil {
     }
 
     /**
+     * 读取Excel内容 -- 行数是否超过100,超过false  不超过true;
+     * @param filePath
+     * @return
+     */
+    public static boolean readExcelNumber(String filePath,Integer maxNuber) throws IOException {
+        // 判断文件是否存在
+        File file = new File(filePath);
+        if (!file.exists()) {
+            return false;
+        }
+        // 获取Workbook
+        InputStream inputStream = new BufferedInputStream(new FileInputStream(file));
+        Workbook wb = null;
+        if (filePath.endsWith("xls")) {
+            wb = new HSSFWorkbook(inputStream);
+        } else {
+            wb = new XSSFWorkbook(inputStream);
+        }
+        inputStream.close();
+
+        // 获取Sheet
+        Sheet sheet = wb.getSheetAt(0);
+
+        Integer number = 0;     //控制有效行数在maxNumber之内
+        Integer i = 0;         //控制总行数在MaxNumber之内,因为会出现无效行数的问题,如果一直循环,会循环65535行
+
+        Iterator<Row> rows = sheet.rowIterator();
+        while (rows.hasNext()) {
+            Row row = rows.next();
+            Cell cell = row.getCell(0);
+            // 非空的列需要使用
+            if (cell == null) {
+                continue;
+            }
+            String name = getValue(cell);
+            String cellValue = "";
+            if (name != null && !"".equals(name.trim())) {
+                cellValue = getValue(cell);
+            }
+
+            if (cellValue != null && !"".equals(cellValue)) {
+                number ++;
+            }
+            i++;
+
+            if(number > maxNuber+1){
+                return false;
+            }
+
+            if(i > maxNuber+1){
+                break;
+            }
+        }
+        return true;
+    }
+
+    /**
      * 读取Excel内容
      * 读取bom单excel的内容
      *

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

@@ -163,7 +163,7 @@
                 </div>
             </div>
             <div class="row cl">
-                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>是否二次售后:</label>
+                <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"  >
@@ -176,7 +176,7 @@
                 </div>
             </div>
             <div class="row cl">
-                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>是否开箱损:</label>
+                <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="customerOutDamaged" value="1"  >

+ 44 - 24
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl

@@ -37,16 +37,17 @@
 <div class="page-container">
     <div class="text-c">
         <form action="${path}/admin/customer/select_customer_list" method="post">
-            <button type="button" style="cursor:pointer; float: left;height: 35px;margin-right: 30px;" class="my-btn-search" onclick="toAddCustomer();">新建客诉</button>
-            <input type="text" class="my-input"  style="width:90px;margin-right: 0px; margin-left: -65px;" value="${customerInfo.customerId!}" placeholder="客诉编号" id="customerId" name="customerId">
-            <input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerInfo.sendLogisticsNo!}" placeholder="物流编号" id="sendLogisticsNo" name="sendLogisticsNo">
-            <input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerInfo.customerName!}" placeholder="请输入姓名" id="customerName" name="customerName">
-            <input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerInfo.customerTel!}" placeholder="请输入电话号码" id="customerTel" name="customerTel">
-            <input type="text" style="width:90px;height:36px;margin-right: 0px;" name="startTime" id="startTime" class="input-text" placeholder="开始时间" onClick="WdatePicker({ dateFmt:'yyyy-MM-dd',skin:'whyGreen' })" value="${(customerInfo.startTime?string("yyyy-MM-dd"))!''}" readonly="readonly"/>-
-            <input type="text" style="width:90px;height:36px;margin-right: 0px;" name="endTime" id="endTime" class="input-text" placeholder="结束时间" onClick="WdatePicker({ dateFmt:'yyyy-MM-dd',skin:'whyGreen' })" value="${(customerInfo.endTime?string("yyyy-MM-dd"))!''}" readonly="readonly"/>
+            <button type="button" style="cursor:pointer; float: left;height: 35px;margin-right: 30px;margin-bottom: 10px;" class="my-btn-search" onclick="toAddCustomer();">新建客诉</button>
+            <input type="text" class="my-input"  style="width:90px;margin-right: 0px; margin-bottom: 10px;" value="${customerInfo.customerId!}" placeholder="客诉编号" id="customerId" name="customerId">
+            <input type="text" class="my-input"  style="width:90px;margin-right: 0px;margin-bottom: 10px;" value="${customerInfo.sendLogisticsNo!}" placeholder="物流编号" id="sendLogisticsNo" name="sendLogisticsNo">
+            <input type="text" class="my-input"  style="width:90px;margin-right: 0px;margin-bottom: 10px;" value="${customerInfo.customerName!}" placeholder="请输入姓名" id="customerName" name="customerName">
+            <input type="text" class="my-input"  style="width:90px;margin-right: 0px;margin-bottom: 10px;" value="${customerInfo.customerTel!}" placeholder="请输入电话号码" id="customerTel" name="customerTel">
+            <input type="text" style="width:90px;height:36px;margin-right: 0px;margin-bottom: 10px;" name="startTime" id="startTime" class="input-text" placeholder="开始时间" onClick="WdatePicker({ dateFmt:'yyyy-MM-dd',skin:'whyGreen' })" value="${(customerInfo.startTime?string("yyyy-MM-dd"))!''}" readonly="readonly"/>-
+            <input type="text" style="width:90px;height:36px;margin-right: 0px;margin-bottom: 10px;" name="endTime" id="endTime" class="input-text" placeholder="结束时间" onClick="WdatePicker({ dateFmt:'yyyy-MM-dd',skin:'whyGreen' })" value="${(customerInfo.endTime?string("yyyy-MM-dd"))!''}" readonly="readonly"/>
 
             <#--<input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerInfo.describeTitle!}" placeholder="请输入问题描述" id="describeTitle" name="describeTitle">-->
-            <select class="my-select" name="customerIsSolve" id="customerIsSolve" style="height: 36px;width: 100px;margin: 0px;padding: 6px 10px 6px 15px;">
+
+            <select class="my-select" name="customerIsSolve" id="customerIsSolve" style="height: 36px;width: 100px;margin: 0px;padding: 6px 10px 6px 15px;margin-bottom: 10px;">
                 <option value="">处理结果</option>
                 <option value="1" <#if customerInfo.customerIsSolve??><#if customerInfo.customerIsSolve == 1 >selected="selected"</#if></#if>>已解决</option>
                 <option value="2" <#if customerInfo.customerIsSolve??><#if customerInfo.customerIsSolve == 2 >selected="selected"</#if></#if>>未解决</option>
@@ -57,13 +58,13 @@
                 <option value="7" <#if customerInfo.customerIsSolve??><#if customerInfo.customerIsSolve == 7 >selected="selected"</#if></#if>>无理由退货</option>
             </select>
 
-            <select class="my-select" name="customerSourceType" id="customerSourceType" style="height: 36px;width: 100px;margin: 0px;padding: 6px 10px 6px 15px;">
+            <select class="my-select" name="customerSourceType" id="customerSourceType" style="height: 36px;width: 100px;margin: 0px;padding: 6px 10px 6px 15px;margin-bottom: 10px;">
                 <option value="">来源</option>
                 <option value="1" <#if customerInfo.customerSourceType??><#if customerInfo.customerSourceType == 1 >selected="selected"</#if></#if>>400电话</option>
                 <option value="2" <#if customerInfo.customerSourceType??><#if customerInfo.customerSourceType == 2 >selected="selected"</#if></#if>>微信公众号</option>
                 <option value="3" <#if customerInfo.customerSourceType??><#if customerInfo.customerSourceType == 3 >selected="selected"</#if></#if>>其他</option>
             </select>
-            <select class="my-select" name="typeId" id="typeId" style="height: 36px;width: 120px;margin: 0px;">
+            <select class="my-select" name="typeId" id="typeId" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
                 <option value ="">客诉产品</option>
                 <#if typeList?? &&  (typeList?size > 0) >
                     <#list typeList as type>
@@ -71,21 +72,15 @@
                     </#list>
                 </#if>
             </select>
-           <#-- <select class="my-select" name="complaintId" style="height: 36px;width: 120px;margin: 0px;">
-                <option value ="">客诉类型</option>
-                <#if complaintTypeList?? &&  (complaintTypeList?size > 0) >
-                    <#list complaintTypeList as complaint>
-                        <option value ="${complaint.complaintId!}" <#if customerInfo.complaintId??><#if customerInfo.complaintId ==complaint.complaintId >selected="selected"</#if></#if>>${complaint.complaintClassName!}</option>
-                    </#list>
-                </#if>
-            </select>-->
-            <select class="my-select" name="customerIsVisit" style="height: 36px;width: 120px;margin: 0px;>
+
+            <select class="my-select" name="customerIsVisit" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
                 <option value ="">是否需要回访</option>
                 <option value="">是否回访</option>
                 <option value ="1" <#if customerInfo.customerIsVisit??><#if customerInfo.customerIsVisit == "1" >selected="selected"</#if></#if>>不需要回访</option>
                 <option value ="2" <#if customerInfo.customerIsVisit??><#if customerInfo.customerIsVisit == "2" >selected="selected"</#if></#if>>需要回访</option>
             </select>
-            <select class="my-select" name="adminId" style="height: 36px;width: 120px;margin: 0px;">
+
+            <select class="my-select" name="adminId" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
                 <option value ="">全部跟进客服</option>
                 <#if adminList?? &&  (adminList?size > 0) >
                     <#list adminList as admin>
@@ -93,7 +88,8 @@
                     </#list>
                 </#if>
             </select>
-            <select class="my-select" name="visitDesignatedAdminId" style="height: 36px;width: 120px;margin: 0px;">
+
+            <select class="my-select" name="visitDesignatedAdminId" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
                 <option value ="">全部回访客服</option>
                 <#if adminList?? &&  (adminList?size > 0) >
                     <#list adminList as admin>
@@ -101,6 +97,24 @@
                     </#list>
                 </#if>
             </select>
+
+            <select class="my-select" name="complaintId" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
+                <option value ="">全部问题大类</option>
+                <#if complaintTypeList?? &&  (complaintTypeList?size > 0) >
+                    <#list complaintTypeList as complaint>
+                        <option value ="${complaint.complaintId!}" <#if customerInfo.complaintId??><#if customerInfo.complaintId ==complaint.complaintId >selected="selected"</#if></#if>>${complaint.complaintClassName!}</option>
+                    </#list>
+                </#if>
+            </select>
+
+            <select class="my-select" name="smallClassId" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
+                <option value ="">全部问题小类</option>
+                <#if complaintSmallClassInfoList?? &&  (complaintSmallClassInfoList?size > 0) >
+                    <#list complaintSmallClassInfoList as smallClass>
+                        <option value ="${smallClass.smallClassId!}" <#if customerInfo.smallClassId ??><#if (customerInfo.smallClassId == smallClass.smallClassId)>selected="selected"</#if></#if>>${smallClass.smallClassName!}</option>
+                    </#list>
+                </#if>
+            </select>
             <button type="submit" class="btn" style="background: #32a3d8;color: #fff;height: 35px; id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
         </form>
     </div>
@@ -119,7 +133,8 @@
             <#--<th width="80">客诉类型</th>-->
             <th width="80">问题类型</th>
             <th width="100">问题简述</th>
-            <th width="50">是否开箱损</th>
+            <th width="30">开箱损</th>
+            <th width="30">二次售后</th>
             <th width="60">销售</th>
             <th width="80">购买日期</th>
             <th width="60">区域</th>
@@ -165,10 +180,15 @@
                                         </a>&nbsp;
                                     </#if>
                             </td>
-                            <td><#if customer.customerOutDamaged??>
+                            <td><customer.customerOutDamaged??>
                                 <#if customer.customerOutDamaged == '1' >是</#if>
                                 <#if customer.customerOutDamaged == '2' >否</#if></td>
-                            <td>${customer.companyName!''}<br/>${customer.storeName!''}</#if></td>
+
+                            <td><customer.customerSecondaryCustomer??>
+                            <#if customer.customerSecondaryCustomer == '1' >是</#if>
+                            <#if customer.customerSecondaryCustomer == '2' >否</#if></td>
+
+                            <td>${customer.companyName!''}<br/>${customer.storeName!''}</td>
                             <td>${(customer.salesTime?string("yyyy-MM-dd"))!''}</td>
                             <td>${customer.customerArea!''}</td>
                             <td>进${customer.customerInTDS!'0'}PPM<br/>出${customer.customerOutTDS!'0'}PPM</td>

+ 2 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_customer.ftl

@@ -149,7 +149,7 @@
                 </div>
             </div>
             <div class="row cl">
-                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>是否二次售后:</label>
+                <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" <#if customerInfo.customerSecondaryCustomer == '1' >checked</#if> >
@@ -162,7 +162,7 @@
                 </div>
             </div>
             <div class="row cl">
-                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>是否开箱损:</label>
+                <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="customerOutDamaged" value="1"  <#if customerInfo.customerOutDamaged == '1' >checked</#if>>

+ 33 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/order/excel_to_order.ftl

@@ -189,6 +189,7 @@
 <script type="text/javascript">
 
     var download_order_id_path = "";
+    var isFlag = true;
     /*保存交易号*/
     function download_order_id(){
         if(download_order_id_path != null && download_order_id_path != ""){
@@ -203,6 +204,32 @@
         });
     });
 
+    /* 获取 */
+    $(function(){
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {
+                "productUrl":$("#productUrl").val()
+            },
+            url: root_path + "/admin/order/get_excel_rows",
+            async: false,
+            success: function(data){
+                console.log(data);
+                if (data.returnMsg.flag) {
+                    isFlag = true;
+                    return false;
+                } else {
+                    layer.msg("Excel数据表超过"+ data.returnMsg.maxNumber + "行,继续导入可能会出现问题,建议每次导入数据不超过"+ data.returnMsg.maxNumber + "行!",{icon: 5,time:6000});
+                    isFlag = false;
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+    })
+
+
     // 对话框 - 推送结果
     function modaldemo(){
         $("#modal-demo").modal("show")
@@ -231,6 +258,11 @@
 
     // 提交
     function sub() {
+        if(!isFlag){ //超过数量为falese
+            layer.msg("Excel数据表超过最大值,请分开上传!",{icon: 5,time:6000});
+            return false;
+        }
+
         var map = $(".productmap:checked");                 // 第三方平台的产品信息和Efast的产品信息管理数据 id-name
         var mapArray = new Array();
         for (var i = 0; i < map.length; i++) {
@@ -298,7 +330,7 @@
         /*超时控制器*/
         var timeout=setTimeout(function(){
                     layer.msg('连接超时,请重试!',{icon: 5,time:3000});
-                },100000
+                },360000
         );
 
         // 对应好Excel和系统需要的数据以后,准备推送Efast