Browse Source

修改了客诉列表信息

liuzhiwei 7 years ago
parent
commit
fa28c4bd04
18 changed files with 328 additions and 79 deletions
  1. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/BackGoods.java
  2. 25 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerCommon.java
  3. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/NoreasonBack.java
  4. 5 5
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Renewed.java
  5. 5 5
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Repair.java
  6. 9 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SalesOrderItem.java
  7. 42 15
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java
  8. 5 3
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/backGoodsMapper.xml
  9. 3 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/fittingsInfoMapper.xml
  10. 5 3
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/noreasonBackMapper.xml
  11. 2 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/reissueMapper.xml
  12. 2 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/renewedMapper.xml
  13. 2 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/repairMapper.xml
  14. 3 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml
  15. 4 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java
  16. 3 3
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/mq/MQTask.java
  17. 149 3
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_detail.ftl
  18. 44 34
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl

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

@@ -48,10 +48,20 @@ public class BackGoods  implements Serializable {
     @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
     private Date salesPayTime;                  //支付时间
 
+    private Integer detectState;                //品质检测状态
+
     private List<ClosedFitting> closedFittings = new ArrayList<ClosedFitting>();//寄回配件集合
 
     private List<ClosedProdcue> closedProdcues = new ArrayList<ClosedProdcue>();//机会产品集合
 
+    public Integer getDetectState() {
+        return detectState;
+    }
+
+    public void setDetectState(Integer detectState) {
+        this.detectState = detectState;
+    }
+
     public Date getSalesPayTime() {
         return salesPayTime;
     }

+ 25 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerCommon.java

@@ -75,6 +75,26 @@ public class CustomerCommon implements Serializable {
     private List<ClosedProdcue> closedProdcues = new ArrayList<ClosedProdcue>();
     //售后寄回产品配件表
     private List<ClosedFitting> closedFittings = new ArrayList<ClosedFitting>();
+    //是否可返修
+    private Integer maintenanceIsRepair;
+    //品质检测状态
+    private Integer detectState;
+
+    public Integer getDetectState() {
+        return detectState;
+    }
+
+    public void setDetectState(Integer detectState) {
+        this.detectState = detectState;
+    }
+
+    public Integer getMaintenanceIsRepair() {
+        return maintenanceIsRepair;
+    }
+
+    public void setMaintenanceIsRepair(Integer maintenanceIsRepair) {
+        this.maintenanceIsRepair = maintenanceIsRepair;
+    }
 
     public List<SendProdcue> getSendProdcues() {
         return sendProdcues;
@@ -488,6 +508,7 @@ public class CustomerCommon implements Serializable {
                 customerCommon.setRelationIsTransfer(renewed.getRenewedIsTransfer());
                 customerCommon.setRelationCreateTime(renewed.getRenewedCreateTime());
                 customerCommon.setRelationUpdateTime(renewed.getRenewedUpdateTime());
+                customerCommon.setMaintenanceIsRepair(renewed.getMaintenanceIsRepair());
                 break;
             case 4://维修
                 Repair repair = (Repair)object;
@@ -519,6 +540,8 @@ public class CustomerCommon implements Serializable {
                 customerCommon.setRelationIsTransfer(repair.getRepairIsTransfer());
                 customerCommon.setRelationCreateTime(repair.getRepairCreateTime());
                 customerCommon.setRelationUpdateTime(repair.getRepairUpdateTime());
+                customerCommon.setMaintenanceIsRepair(repair.getMaintenanceIsRepair());
+                customerCommon.setDetectState(repair.getDetectState());
                 break;
             case 5://补发
                 Reissue reissue = (Reissue)object;
@@ -560,6 +583,7 @@ public class CustomerCommon implements Serializable {
                 customerCommon.setRelationIsTransfer(backGoods.getBackGoodsIsTransfer());
                 customerCommon.setRelationCreateTime(backGoods.getBackGoodsCreateTime());
                 customerCommon.setRelationUpdateTime(backGoods.getBackGoodsUpdateTime());
+                customerCommon.setDetectState(backGoods.getDetectState());
                 break;
             case 7://无理由退货
                 NoreasonBack noreasonBack = (NoreasonBack)object;
@@ -580,6 +604,7 @@ public class CustomerCommon implements Serializable {
                 customerCommon.setRelationIsTransfer(noreasonBack.getNoreasonBackIsTransfer());
                 customerCommon.setRelationCreateTime(noreasonBack.getNoreasonBackCreateTime());
                 customerCommon.setRelationUpdateTime(noreasonBack.getNoreasonBackUpdateTime());
+                customerCommon.setDetectState(noreasonBack.getDetectState());
                 break;
                 default:
                     customerCommon = null;

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

@@ -48,10 +48,20 @@ public class NoreasonBack  implements Serializable {
     @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
     private Date salesPayTime;                  //支付时间
 
+    private Integer detectState;                //品质检测状态
+
     private List<ClosedFitting> closedFittings = new ArrayList<ClosedFitting>();//寄回配件集合
 
     private List<ClosedProdcue> closedProdcues = new ArrayList<ClosedProdcue>();//机会产品集合
 
+    public Integer getDetectState() {
+        return detectState;
+    }
+
+    public void setDetectState(Integer detectState) {
+        this.detectState = detectState;
+    }
+
     public Date getSalesPayTime() {
         return salesPayTime;
     }

+ 5 - 5
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Renewed.java

@@ -79,7 +79,7 @@ public class Renewed  implements Serializable {
     private String detectPoint;                 //故障指向
     private String detectAnalysis;              //原因分析
     private Integer detectRevolutionProduced;   //是否转入生产部门
-    private Integer maintenanceIdRepair;        //是否可返修
+    private Integer maintenanceIsRepair;        //是否可返修
     private String maintenanceContent;          //返修内容
     private Date maintenanceContentDate;        //返修日期
     private Integer closedProdcueNumber;        //寄回产品数量
@@ -196,12 +196,12 @@ public class Renewed  implements Serializable {
         this.detectRevolutionProduced = detectRevolutionProduced;
     }
 
-    public Integer getMaintenanceIdRepair() {
-        return maintenanceIdRepair;
+    public Integer getMaintenanceIsRepair() {
+        return maintenanceIsRepair;
     }
 
-    public void setMaintenanceIdRepair(Integer maintenanceIdRepair) {
-        this.maintenanceIdRepair = maintenanceIdRepair;
+    public void setMaintenanceIsRepair(Integer maintenanceIsRepair) {
+        this.maintenanceIsRepair = maintenanceIsRepair;
     }
 
     public String getMaintenanceContent() {

+ 5 - 5
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Repair.java

@@ -79,7 +79,7 @@ public class Repair implements Serializable {
     private String detectPoint;                 //故障指向
     private String detectAnalysis;              //原因分析
     private Integer detectRevolutionProduced;   //是否转入生产部门
-    private Integer maintenanceIdRepair;        //是否可返修
+    private Integer maintenanceIsRepair;        //是否可返修
     private String maintenanceContent;          //返修内容
     private Date maintenanceContentDate;        //返修日期
     private Integer closedProdcueNumber;        //寄回产品数量
@@ -172,12 +172,12 @@ public class Repair implements Serializable {
         this.detectRevolutionProduced = detectRevolutionProduced;
     }
 
-    public Integer getMaintenanceIdRepair() {
-        return maintenanceIdRepair;
+    public Integer getMaintenanceIsRepair() {
+        return maintenanceIsRepair;
     }
 
-    public void setMaintenanceIdRepair(Integer maintenanceIdRepair) {
-        this.maintenanceIdRepair = maintenanceIdRepair;
+    public void setMaintenanceIsRepair(Integer maintenanceIsRepair) {
+        this.maintenanceIsRepair = maintenanceIsRepair;
     }
 
     public String getMaintenanceContent() {

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

@@ -22,6 +22,15 @@ public class SalesOrderItem implements Serializable {
     private Integer itemProductPrice;   //产品市场价
     private Integer itemProductDiscount;//产品折扣价
     private Date itemCreateTime;        //创建时间
+    private Integer itemIsSource;       //产品来源 1:产品颜色表,2:配件表
+
+    public Integer getItemIsSource() {
+        return itemIsSource;
+    }
+
+    public void setItemIsSource(Integer itemIsSource) {
+        this.itemIsSource = itemIsSource;
+    }
 
     public Integer getItemId() {
         return itemId;

+ 42 - 15
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java

@@ -1,5 +1,6 @@
 package com.iamberry.rst.service.cm;
 
+import com.iamberry.rst.core.cm.FittingsInfo;
 import com.iamberry.rst.core.cm.SalesOrder;
 import com.iamberry.rst.core.cm.SalesOrderItem;
 import com.iamberry.rst.core.cm.StoreInfo;
@@ -8,6 +9,7 @@ import com.iamberry.rst.faces.cm.SalesOrderService;
 import com.iamberry.rst.faces.cm.StoreInfoService;
 import com.iamberry.rst.faces.order.EfastOrderService;
 import com.iamberry.rst.faces.product.ProductService;
+import com.iamberry.rst.service.cm.mapper.FittingsInfoMapper;
 import com.iamberry.rst.service.cm.mapper.SalesOrderMapper;
 import com.iamberry.wechat.tools.DateTimeUtil;
 import net.sf.json.JSONArray;
@@ -36,6 +38,8 @@ public class SalesOrderServiceImpl implements SalesOrderService {
     private EfastOrderService efastOrderService;
     @Autowired
     private SalesOrderService salesOrderService;
+    @Autowired
+    private FittingsInfoMapper fittingsInfoMapper;
 
     @Override
     public Integer addSalesOrder(SalesOrder salesOrder) {
@@ -245,22 +249,45 @@ public class SalesOrderServiceImpl implements SalesOrderService {
                 SalesOrderItem item = new SalesOrderItem();
                 color.setColorBar(itemJson.getString("goods_sn"));
                 List<ProductColor> colorList = productService.listproductAndColor(color);
-                if (colorList == null || colorList.size() == 0) {
-                    return;
+                if (colorList != null || colorList.size() > 0) {
+                    color = colorList.get(0);
+                    item.setItemColorBar(itemJson.getString("goods_sn"));//商品69码
+                    item.setItemNum(itemJson.getInt("sn"));//商品数量
+                    item.setItemCreateTime(salesOrder.getSalesCreateTime());
+                    item.setItemColorId(color.getColorId());
+                    item.setItemProductColor(color.getColorName());
+                    item.setItemProductDiscount(color.getColorDiscount());
+                    item.setItemProductId(color.getColorProductId());
+                    item.setItemProductName(color.getProductName());
+                    item.setItemProductPic(color.getColorPicture());
+                    item.setItemProductType(color.getProductType());
+                    item.setItemProductPrice(color.getColorPrice());
+                    item.setItemIsSource(1);
+                    itemList.add(item);
+                } else {
+                    //获取配件信息
+                    FittingsInfo fittingsInfo = new FittingsInfo();
+                    fittingsInfo.setFittingsBar(itemJson.getString("goods_sn"));
+                    List<FittingsInfo> Fittings = fittingsInfoMapper.listFittings(fittingsInfo);
+                    if (Fittings == null || Fittings.size() == 0) {
+                        return;
+                    }
+                    fittingsInfo = Fittings.get(0);
+                    item.setItemColorBar(itemJson.getString("goods_sn"));//商品69码
+                    item.setItemNum(itemJson.getInt("sn"));//商品数量
+                    item.setItemCreateTime(salesOrder.getSalesCreateTime());
+                    item.setItemColorId(fittingsInfo.getFittingsId());
+                    item.setItemProductColor(fittingsInfo.getFittingsName());
+                    item.setItemProductDiscount(fittingsInfo.getFittingsDiscount());
+                    item.setItemProductId(fittingsInfo.getProductId());
+                    item.setItemProductName(fittingsInfo.getFittingsName());
+                    item.setItemProductPic("");
+                    item.setItemProductType(0);
+                    item.setItemProductPrice(fittingsInfo.getFittingsPrice());
+                    item.setItemIsSource(2);
+                    itemList.add(item);
                 }
-                color = colorList.get(0);
-                item.setItemColorBar(itemJson.getString("goods_sn"));//商品69码
-                item.setItemNum(itemJson.getInt("sn"));//商品数量
-                item.setItemCreateTime(salesOrder.getSalesCreateTime());
-                item.setItemColorId(color.getColorId());
-                item.setItemProductColor(color.getColorName());
-                item.setItemProductDiscount(color.getColorDiscount());
-                item.setItemProductId(color.getColorProductId());
-                item.setItemProductName(color.getProductName());
-                item.setItemProductPic(color.getColorPicture());
-                item.setItemProductType(color.getProductType());
-                item.setItemProductPrice(color.getColorPrice());
-                itemList.add(item);
+
             }
             //添加订单和订单项
             salesOrderService.addOrderAndItem(salesOrder,itemList);

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

@@ -37,16 +37,18 @@
   <select id="listBackGoods" resultType="BackGoods" parameterType="BackGoods">
     select
       g.*,
-      o.sales_pay_time salesPayTime
+      o.sales_pay_time salesPayTime,
+      d.detect_state detectState
     from
       tb_rst_back_goods g
     LEFT JOIN tb_rst_sales_order_info o ON g.order_id = o.sales_id
+    LEFT JOIN tb_rst_complaint_detect d ON g.customer_id = d.customer_id
     <where>
       <if test="customerId != null and customerId != ''">
-        customer_id = #{customerId}
+        g.customer_id = #{customerId}
       </if>
       <if test="backGoodsState != null and backGoodsState != ''">
-        and back_goods_state = #{backGoodsState}
+        and g.back_goods_state = #{backGoodsState}
       </if>
     </where>
   </select>

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

@@ -33,6 +33,9 @@
       <if test="productId != null">
         product_id = #{productId}
       </if>
+      <if test="fittingsBar != null">
+        and fittings_bar = #{fittingsBar}
+      </if>
     </where>
   </select>
 

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

@@ -38,16 +38,18 @@
   <select id="listNoreasonBack" resultType="NoreasonBack" parameterType="NoreasonBack">
     select
       b.*,
-      o.sales_pay_time salesPayTime
+      o.sales_pay_time salesPayTime,
+      d.detect_state detectState
     from
       tb_rst_noreason_back b
     LEFT JOIN tb_rst_sales_order_info o ON b.order_id = o.sales_id
+    LEFT JOIN tb_rst_complaint_detect d ON b.customer_id = d.customer_id
     <where>
       <if test="customerId != null and customerId != ''">
-        customer_id = #{customerId}
+        b.customer_id = #{customerId}
       </if>
       <if test="noreasonBackState != null and noreasonBackState != ''">
-        and noreason_back_state = #{noreasonBackState}
+        and b.noreason_back_state = #{noreasonBackState}
       </if>
     </where>
   </select>

+ 2 - 2
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/reissueMapper.xml

@@ -44,10 +44,10 @@
     LEFT JOIN tb_rst_sales_order_info o ON r.order_id = o.sales_id
     <where>
       <if test="customerId != null and customerId != ''">
-        customer_id = #{customerId}
+        r.customer_id = #{customerId}
       </if>
       <if test="reissueState != null and reissueState != ''">
-        and reissue_state = #{reissueState}
+        and r.reissue_state = #{reissueState}
       </if>
     </where>
   </select>

+ 2 - 2
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/renewedMapper.xml

@@ -53,7 +53,7 @@
       d.detect_point detectPoint,
       d.detect_analysis detectAnalysis,
       d.detect_revolution_produced detectRevolutionProduced,
-      m.maintenance_id_repair maintenanceIdRepair,
+      m.maintenance_is_repair maintenanceIsRepair,
       m.maintenance_content maintenanceContent,
       m.maintenance_content_date maintenanceContentDate
     from
@@ -62,7 +62,7 @@
     LEFT JOIN tb_rst_complaint_maintenance m ON d.detect_id = m.detect_id
     <where>
       <if test="renewedId != null and renewedId != ''">
-        renewed_id = #{renewedId}
+        r.renewed_id = #{renewedId}
       </if>
       <if test="customerId != null and customerId != ''">
         and r.customer_id = #{customerId}

+ 2 - 2
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/repairMapper.xml

@@ -76,7 +76,7 @@
       d.detect_point detectPoint,
       d.detect_analysis detectAnalysis,
       d.detect_revolution_produced detectRevolutionProduced,
-      m.maintenance_id_repair maintenanceIdRepair,
+      m.maintenance_is_repair maintenanceIsRepair,
       m.maintenance_content maintenanceContent,
       m.maintenance_content_date maintenanceContentDate
     from
@@ -85,7 +85,7 @@
     LEFT JOIN tb_rst_complaint_maintenance m ON d.detect_id = m.detect_id
     <where>
       <if test="repairId != null and repairId != ''">
-        repair_id = #{repairId}
+        r.repair_id = #{repairId}
       </if>
       <if test="customerId != null and customerId != ''">
         and r.customer_id = #{customerId}

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

@@ -145,14 +145,15 @@
       (
         item_order_id,item_product_id,item_num,item_color_id,item_product_type,
         item_product_name,item_product_pic,item_product_color,item_color_bar,
-        item_product_price,item_product_discount,item_create_time
+        item_product_price,item_product_discount,item_create_time,item_is_source
       )
     VALUES
     <foreach collection="list" item="item" separator=",">
       (
         #{item.itemOrderId},#{item.itemProductId},#{item.itemNum},#{item.itemColorId},
         #{item.itemProductType},#{item.itemProductName},#{item.itemProductPic},#{item.itemProductColor},
-        #{item.itemColorBar},#{item.itemProductPrice},#{item.itemProductDiscount},#{item.itemCreateTime}
+        #{item.itemColorBar},#{item.itemProductPrice},#{item.itemProductDiscount},#{item.itemCreateTime},
+        #{item.itemIsSource}
       )
     </foreach>
   </insert>

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

@@ -216,6 +216,10 @@ public class AdminCustomerController {
         Admin admin = new Admin();
         admin.setAdminStatus(1);
         List<Admin> adminList = sysService.listSelectAdmin(admin);
+
+        //获取登录人id
+        Integer loginAdminId = AdminUtils.getLoginAdminId();
+        mv.addObject("loginAdminId",loginAdminId);
         mv.addObject("typeList", typeList);
         mv.addObject("complaintTypeList", complaintTypeList);
         mv.addObject("adminList", adminList);

+ 3 - 3
watero-rst-web/src/main/java/com/iamberry/rst/controllers/mq/MQTask.java

@@ -92,7 +92,7 @@ public class MQTask implements InitializingBean {
 	 * 批量同步百胜订单信息
 	 * @throws Exception
 	 */
-	//@Scheduled(cron = "0 0 */1 * * ?")//每小时执行一次
+	@Scheduled(cron = "0 0 */1 * * ?")//每小时执行一次
 	//@Scheduled(cron = "*/10 * * * * ?")
 	public void syncEfastOrderList() throws Exception {
 		int pageNo = 1;
@@ -130,8 +130,8 @@ public class MQTask implements InitializingBean {
 	 * 同步百胜订单状态等信息
 	 * @throws Exception
 	 */
-	//@Scheduled(cron = "0 0 */1 * * ?")//每小时执行一次
-	@Scheduled(cron = "*/10 * * * * ?")
+	@Scheduled(cron = "0 0 */1 * * ?")//每小时执行一次
+	//@Scheduled(cron = "*/10 * * * * ?")
 	public void syncEfastOrderStatus() throws Exception {
 		int pageNo = 1;
 		int pageSize = 20;

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

@@ -231,7 +231,8 @@
                     var customerCommon = data.returnMsg.customerCommon;
                     var salesOrder = data.returnMsg.salesOrder;
                     if (customer.customerIsSolve != 1 && customer.customerIsSolve != 2) {
-                        resultshow(customer.customerIsSolve, customerCommon.relationBackStatus,customerCommon.relationSendStatus);
+                        resultshow(customer.customerIsSolve, customerCommon.relationBackStatus,customerCommon.relationSendStatus,
+                                customerCommon.maintenanceIsRepair,customerCommon.detectState);
                     }
 
                     $('#adminName').html(customer.adminName);
@@ -355,7 +356,7 @@
      * backStatus:寄回状态
      * sendStatus:寄送状态
      */
-    function resultshow(customerIsSolve, backStatus, sendStatus) {
+    function resultshow(customerIsSolve, backStatus, sendStatus, maintenanceIsRepair, detectState) {
         var statusHtml = '<li id="div_li"><span class="arrow"></span><div id="div_number" class="number">status_index</div><div id="div_txt">status_html</div></li>';
         var result = [];
         var resultHtml = '';
@@ -368,7 +369,7 @@
             case 6:result = isSolve.backGoods;break;
             case 7:result = isSolve.noReasonBack;break;
         }
-        for(var i=0;i< result.length;i++){
+        for(var i = 0;i < result.length;i++){
             var html = statusHtml.replace("status_index",i+1);
             html = html.replace("div_li","li-"+(i+1));
             html = html.replace("div_number","number-"+(i+1));
@@ -377,6 +378,151 @@
             resultHtml += html;
         }
         $(".time-line-list").html(resultHtml);
+        $('#number-1').attr('class','red');
+        $('#txt-1').attr('class','txt-red');
+        if (customerIsSolve == 3) {
+            switch (backStatus) {
+                case 1:
+                    $('#number-2').attr('class','red');
+                    $('#txt-2').attr('class','txt-red');
+                    break;
+                case 2:
+                    $('#number-2').attr('class','red');
+                    $('#number-3').attr('class','red');
+                    $('#txt-2').attr('class','txt-red');
+                    $('#txt-3').attr('class','txt-red');
+                    break;
+                case 3:
+                    $('#number-2').attr('class','red');
+                    $('#number-3').attr('class','red');
+                    $('#number-4').attr('class','red');
+                    $('#txt-2').attr('class','txt-red');
+                    $('#txt-3').attr('class','txt-red');
+                    $('#txt-4').attr('class','txt-red');
+                    break;
+            }
+            switch (sendStatus) {
+                case 1:
+                    $('#number-5').attr('class','red');
+                    $('#txt-5').attr('class','txt-red');
+                    break;
+                case 2:
+                    $('#number-5').attr('class','red');
+                    $('#number-6').attr('class','red');
+                    $('#txt-5').attr('class','txt-red');
+                    $('#txt-6').attr('class','txt-red');
+                    break;
+                case 3:
+                    $('#number-5').attr('class','red');
+                    $('#number-6').attr('class','red');
+                    $('#number-7').attr('class','red');
+                    $('#txt-5').attr('class','txt-red');
+                    $('#txt-6').attr('class','txt-red');
+                    $('#txt-7').attr('class','txt-red');
+                    break;
+            }
+        } else if (customerIsSolve == 4) {
+            switch (backStatus) {
+                case 1:
+                    $('#number-2').attr('class','red');
+                    $('#txt-2').attr('class','txt-red');
+                    break;
+                case 2:
+                    $('#number-2').attr('class','red');
+                    $('#number-3').attr('class','red');
+                    $('#txt-2').attr('class','txt-red');
+                    $('#txt-3').attr('class','txt-red');
+                    break;
+                case 3:
+                    $('#number-2').attr('class','red');
+                    $('#number-3').attr('class','red');
+                    $('#number-4').attr('class','red');
+                    $('#txt-2').attr('class','txt-red');
+                    $('#txt-3').attr('class','txt-red');
+                    $('#txt-4').attr('class','txt-red');
+                    break;
+            }
+            switch (sendStatus) {
+                case 1:
+                    $('#number-7').attr('class','red');
+                    $('#txt-7').attr('class','txt-red');
+                    break;
+                case 2:
+                    $('#number-7').attr('class','red');
+                    $('#number-8').attr('class','red');
+                    $('#txt-7').attr('class','txt-red');
+                    $('#txt-8').attr('class','txt-red');
+                    break;
+                case 3:
+                    $('#number-7').attr('class','red');
+                    $('#number-8').attr('class','red');
+                    $('#number-9').attr('class','red');
+                    $('#txt-7').attr('class','txt-red');
+                    $('#txt-8').attr('class','txt-red');
+                    $('#txt-9').attr('class','txt-red');
+                    break;
+            }
+            if (detectState == 2 || detectState == 3 || detectState == 4) {
+                $('#number-5').attr('class','red');
+                $('#txt-5').attr('class','txt-red');
+            }
+            if (maintenanceIsRepair != null && maintenanceIsRepair != '') {
+                $('#number-6').attr('class','red');
+                $('#txt-6').attr('class','txt-red');
+            }
+        } else if (customerIsSolve == 5) {
+            $('#number-2').attr('class','red');
+            $('#txt-2').attr('class','txt-red');
+            switch (sendStatus) {
+                case 1:
+                    $('#number-3').attr('class','red');
+                    $('#txt-3').attr('class','txt-red');
+                    break;
+                case 2:
+                    $('#number-3').attr('class','red');
+                    $('#number-4').attr('class','red');
+                    $('#number-5').attr('class','red');
+                    $('#txt-3').attr('class','txt-red');
+                    $('#txt-4').attr('class','txt-red');
+                    $('#txt-5').attr('class','txt-red');
+                    break;
+                case 3:
+                    $('#number-3').attr('class','red');
+                    $('#number-4').attr('class','red');
+                    $('#number-5').attr('class','red');
+                    $('#number-6').attr('class','red');
+                    $('#txt-3').attr('class','txt-red');
+                    $('#txt-4').attr('class','txt-red');
+                    $('#txt-5').attr('class','txt-red');
+                    $('#txt-6').attr('class','txt-red');
+                    break;
+            }
+        } else if (customerIsSolve == 6 || customerIsSolve == 7) {
+            switch (backStatus) {
+                case 1:
+                    $('#number-2').attr('class', 'red');
+                    $('#txt-2').attr('class', 'txt-red');
+                    break;
+                case 2:
+                    $('#number-2').attr('class', 'red');
+                    $('#number-3').attr('class', 'red');
+                    $('#txt-2').attr('class', 'txt-red');
+                    $('#txt-3').attr('class', 'txt-red');
+                    break;
+                case 3:
+                    $('#number-2').attr('class', 'red');
+                    $('#number-3').attr('class', 'red');
+                    $('#number-4').attr('class', 'red');
+                    $('#txt-2').attr('class', 'txt-red');
+                    $('#txt-3').attr('class', 'txt-red');
+                    $('#txt-4').attr('class', 'txt-red');
+                    break;
+            }
+            if (detectState == 2 || detectState == 3 || detectState == 4) {
+                $('#number-5').attr('class', 'red');
+                $('#txt-5').attr('class', 'txt-red');
+            }
+        }
     }
 
 </script>

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

@@ -66,7 +66,7 @@
                         <select class="my-select" name="visitAdminId" id="visitAdminId" style="height: 36px;width: 200px;margin: 0px;padding: 6px 10px 6px 15px;">
                         <#if adminList?? &&  (adminList?size > 0) >
                             <#list adminList as admin>
-                                <option value ="${admin.adminId!}" >${admin.adminName!}</option>
+                                <option value ="${admin.adminId!}" <#if loginAdminId??><#if admin.adminId == loginAdminId >selected="selected"</#if></#if> >${admin.adminName!}</option>
                             </#list>
                         </#if>
                         </select>
@@ -75,7 +75,7 @@
                 </div>
                 <div style="margin-left: 10px;">
                     <label>
-                        您将为 自己 指定一个回访任务。<br/>
+                        您将为 <label id="visit-admin" style="color: red;">自己</label> 指定一个回访任务。<br/>
                         提示原则:<br/>
                         1、上午的回访 系统将在16日晚上22点、17日早晨9:30提醒您;<br/>
                         2、中午的回访 系统将在本日12点提醒您;<br/>
@@ -824,17 +824,17 @@
         </div>
         <!-- 补发处理end -->
         <form action="${path}/admin/customer/select_customer_list" method="post">
-            <button type="button" style="cursor:pointer; float: left;" class="my-btn-search" onclick="toAddCustomer();">新建客诉</button>
-            <input type="text" class="my-input"  style="width:100px;margin-right: 0px;" value="${customerId!}" placeholder="客户姓名" id="customerName" name="customerName">
-            <input type="text" class="my-input"  style="width:100px;margin-right: 0px;" value="${customerId!}" placeholder="客户电话号码" id="customerTel" name="customerTel">
-            <input type="text" class="my-input"  style="width:100px;margin-right: 0px;" value="${customerId!}" placeholder="请输入问题描述" id="describeTitle" name="describeTitle">
+            <button type="button" style="cursor:pointer; float: left;height: 35px;" class="my-btn-search" onclick="toAddCustomer();">新建客诉</button>
+            <input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerId!}" placeholder="请输入姓名" id="customerName" name="customerName">
+            <input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerId!}" placeholder="请输入电话号码" id="customerTel" name="customerTel">
+            <input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerId!}" placeholder="请输入问题描述" id="describeTitle" name="describeTitle">
             <select class="my-select" name="customerSource" id="customerSource" style="height: 36px;width: 100px;margin: 0px;padding: 6px 10px 6px 15px;">
                 <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: 100px;margin: 0px;padding: 6px 10px 6px 15px;">
+            <select class="my-select" name="typeId" id="typeId" style="height: 36px;width: 120px;margin: 0px;">
                 <option value ="">客诉产品</option>
                 <#if typeList?? &&  (typeList?size > 0) >
                     <#list typeList as type>
@@ -842,7 +842,7 @@
                     </#list>
                 </#if>
             </select>
-            <select class="my-select" name="complaintId" style="height: 36px;width: 100px;margin: 0px;padding: 6px 10px 6px 15px;">
+            <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>
@@ -850,12 +850,12 @@
                     </#list>
                 </#if>
             </select>
-            <select class="my-select" name="customerIsVisit" style="height: 36px;width: 100px;margin: 0px;padding: 6px 10px 6px 15px;">
+            <select class="my-select" name="customerIsVisit" style="height: 36px;width: 120px;margin: 0px;>
                 <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: 100px;margin: 0px;padding: 6px 10px 6px 15px;">
+            <select class="my-select" name="adminId" style="height: 36px;width: 120px;margin: 0px;">
                 <option value ="">跟进客服</option>
                 <#if adminList?? &&  (adminList?size > 0) >
                     <#list adminList as admin>
@@ -863,7 +863,7 @@
                     </#list>
                 </#if>
             </select>
-            <button type="submit" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
+            <button type="submit" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
         </form>
     </div>
 
@@ -874,7 +874,7 @@
         <tr class="text-c">
             <th width="50">跟进客服</th>
             <th width="60">姓名</th>
-            <th width="100">电话</th>
+            <th width="70">电话</th>
             <th width="80">来源入口</th>
             <th width="80">客诉产品</th>
             <th width="80">客诉类型</th>
@@ -882,12 +882,12 @@
             <th width="100">问题简述</th>
             <th width="80">销售</th>
             <th width="80">购买日期</th>
-            <th width="80">区域</th>
-            <th width="80">TDS</th>
+            <th width="60">区域</th>
+            <th width="60">TDS</th>
             <th width="80">处理结果</th>
             <th width="80">需要回访</th>
             <th width="80">客诉时间</th>
-            <th width="80">操作</th>
+            <th width="100">操作</th>
         </tr>
         </thead>
         <tbody>
@@ -896,7 +896,11 @@
                         <tr class="text-c">
                             <td>${customer.adminName!''}</td>
                             <td>${customer.customerName!''}</td>
-                            <td>${customer.customerTel!''}</td>
+                            <#if (customer.customerTel)?? && customer.customerTel?length gt 7>
+                                <td>${customer.customerTel?substring(0,3)}***${customer.customerTel?substring(customer.customerTel?length-4,customer.customerTel?length)}</td>
+                            <#else>
+                                <td>${customer.customerTel!''}</td>
+                            </#if>
                             <td>
                                 <#if customer.customerSourceType == 1>
                                     400电话
@@ -912,15 +916,15 @@
                             <td>
                                 ${customer.describeTitle!'暂无'}
                                     <#if customer.describeTitle??>
-                                        <a style="text-decoration:none" href="javascript:void(0);" title="查看详情" onclick="getDescribeInfo(${customer.customerId!''})">
-                                            <i class="Hui-iconfont">查看详情</i>
+                                        <a style="" href="javascript:void(0);" title="查看详情" onclick="getDescribeInfo(${customer.customerId!''})">
+                                            查看详情
                                         </a>&nbsp;
                                     </#if>
                             </td>
-                            <td>${customer.companyName!''}-${customer.storeName!''}</td>
-                            <td>${(customer.salesTime?string("yyyy-MM-dd HH:mm:ss"))!''}</td>
+                            <td>${customer.companyName!''}<br/>${customer.storeName!''}</td>
+                            <td>${(customer.salesTime?string("yyyy-MM-dd"))!''}</td>
                             <td>${customer.customerArea!''}</td>
-                            <td>进${customer.customerInTDS!'0'}出${customer.customerOutTDS!'0'}</td>
+                            <td>进${customer.customerInTDS!'0'}<br/>出${customer.customerOutTDS!'0'}</td>
                             <td id="txt_customerIsSolve">
                                 <#if customer.customerIsSolve == 1>
                                     已解决
@@ -1025,41 +1029,36 @@
                                     不需要回访
                                 <#elseif customer.customerIsVisit == "2">
                                     <#if customer.visitStatus == 1>
-                                        待回访
+                                        待回访<font style="color:red;">(${(customer.visitDate?string("yyyy-MM-dd"))!''}完成)</font>
                                     <#elseif customer.visitStatus == 2>
-                                        已回访
+                                        已回访<br/>
                                         <a style="text-decoration:none" href="javascript:void(0);" title="回访内容" onclick="getVisitInfo(${customer.customerId!''})">
                                             <i class="Hui-iconfont">回访内容</i>
                                         </a>&nbsp;
                                     </#if>
                                 </#if>
                             </td>
-                            <td>${(customer.customerCreateTime?string("yyyy-MM-dd HH:mm:ss"))!''}</td>
+                            <td>${(customer.customerCreateTime?string("yyyy-MM-dd"))!''}</td>
                             <td>
                                 <#if customer.customerIsSolve == 2>
                                     <a style="text-decoration:none" href="javascript:void(0);" title="已解决" onclick="updateCustomerIsSolve(${customer.customerId!''})">
                                         <i class="Hui-iconfont">已解决</i>
-                                    </a>&nbsp;
+                                    </a><br/>
                                 </#if>
                                 <a style="text-decoration:none" href="javascript:void(0);" title="详情" onclick="admin_details_customer(${customer.customerId!''})">
                                     <i class="Hui-iconfont">详情</i>
-                                </a>&nbsp;
+                                </a><br/>
                                 <#if customer.customerIsVisit == "2">
                                     <#if customer.visitStatus == 1 && customer.customerIsVisit == "2">
                                         <a style="text-decoration:none" href="javascript:void(0);" title="已完成回访" onclick="showVisitFinish(${customer.customerId!''})">
-                                            <i class="Hui-iconfont">
-                                                已完成回访
-                                            </i>
-                                        </a>&nbsp;
+                                            <i class="Hui-iconfont">已完成回访</i>
+                                        </a><br/>
                                     </#if>
                                 </#if>
-                                <#--<a style="text-decoration:none" href="javascript:void(0);" title="修改客诉信息" onclick="admin_update_customer(${customer.customerId!''})">
-                                    <i class="Hui-iconfont">修改客诉信息</i>
-                                </a>&nbsp;-->
                                 <#if customer.customerIsVisit == "1">
                                     <a style="text-decoration:none" href="javascript:void(0)" title="需要回访" onclick="showVisit(${customer.customerId!''})">
                                         <i class="Hui-iconfont">需要回访</i>
-                                    </a>
+                                    </a><br/>
                                 </#if>
                             </td>
                         </tr>
@@ -1080,6 +1079,7 @@
     var uname = /^[\u4e00-\u9fa5a-zA-Z]{1,12}$/; //中文英文
     var money = /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/;//金额
     var flag = true;
+    var loginAdminId = ${loginAdminId!''};
 
     /**
      * 跳转到添加customer页面
@@ -1176,6 +1176,16 @@
         }
     }
 
+    $('#visitAdminId').change(function() {
+        var name = $('#visitAdminId option:selected').html();
+        var adminId = $('#visitAdminId option:selected').val();
+        if (adminId == loginAdminId) {
+            $('#visit-admin').html('自己');
+        } else {
+            $('#visit-admin').html(name);
+        }
+    })
+
     /**
      * 添加回访完成信息
      */