浏览代码

Merge remote-tracking branch 'origin/master'

xian 6 年之前
父节点
当前提交
5da6737533
共有 50 个文件被更改,包括 1356 次插入772 次删除
  1. 2 2
      watero-common-tool/src/main/java/com/iamberry/wechat/tools/ResponseJson.java
  2. 18 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintDetectItem.java
  3. 22 2
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SalesOrder.java
  4. 41 1
      watero-rst-core/src/main/java/com.iamberry.rst.core/order/OrderBatch.java
  5. 9 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/pts/Produce.java
  6. 15 1
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/SalesOrderService.java
  7. 0 34
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java
  8. 52 26
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java
  9. 6 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/SalesOrderMapper.java
  10. 4 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintDetectInfoMapper.xml
  11. 53 26
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml
  12. 21 3
      watero-rst-service/src/main/java/com/iamberry/rst/service/order/OrderBatchServiceImpl.java
  13. 3 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/order/mapper/orderBatchMapper.xml
  14. 2 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/machineMapper.xml
  15. 18 8
      watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/produceMapper.xml
  16. 4 0
      watero-rst-web/pom.xml
  17. 60 12
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java
  18. 20 20
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AppComplaintQuestionInfoController.java
  19. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/mq/MQTask.java
  20. 14 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminOrderBatchController.java
  21. 67 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java
  22. 4 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AwaitSendController.java
  23. 3 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminMachineController.java
  24. 32 2
      watero-rst-web/src/main/java/com/iamberry/rst/utils/GenerateKeyUtil.java
  25. 1 0
      watero-rst-web/src/main/java/com/iamberry/rst/utils/OrderUtils.java
  26. 16 10
      watero-rst-web/src/main/java/com/iamberry/rst/utils/StitchAttrUtil.java
  27. 0 70
      watero-rst-web/src/main/java/com/iamberry/rst/utils/test.java
  28. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/base/page_util.ftl
  29. 176 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_custome_list.ftl
  30. 161 128
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_customer.ftl
  31. 30 30
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_detail.ftl
  32. 17 17
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl
  33. 1 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/order_list.ftl
  34. 80 242
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_customer.ftl
  35. 3 3
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_detect.ftl
  36. 42 45
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/customer_detail.ftl
  37. 13 12
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl
  38. 3 2
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/associated_customer.ftl
  39. 3 3
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/customer_signclosed_list.ftl
  40. 5 5
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/signclosed_list.ftl
  41. 28 6
      watero-rst-web/src/main/webapp/WEB-INF/views/order/bacth/order_batch_list.ftl
  42. 26 7
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/add_order.ftl
  43. 9 7
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/list_wait_send_order.ftl
  44. 153 18
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_list.ftl
  45. 28 3
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/update_order.ftl
  46. 8 6
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/machine_print_List.ftl
  47. 3 0
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/produce/save_produce.ftl
  48. 2 1
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/produce/update_produce.ftl
  49. 16 6
      watero-rst-web/src/main/webapp/common/js/customer/customer.js
  50. 60 2
      watero-rst-web/src/main/webapp/common/js/salesOrder/salesOrder.js

+ 2 - 2
watero-common-tool/src/main/java/com/iamberry/wechat/tools/ResponseJson.java

@@ -35,11 +35,11 @@ public class ResponseJson implements Serializable {
 	public static ResponseJson FAILURE = new ResponseJson(200, "FAILURE", 500);
 
 
-	public static ResponseJson getSUCCESS(){
+	public final static ResponseJson getSUCCESS(){
 		return  new ResponseJson(200, "SUCCESS", 200);
 	}
 
-	public static ResponseJson getFAILURE(){
+	public final static ResponseJson getFAILURE(){
 		return  new ResponseJson(200, "FAILURE", 500);
 	}
 

+ 18 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintDetectItem.java

@@ -33,6 +33,8 @@ public class ComplaintDetectItem implements Serializable {
     private Integer productTypeId;//产品类型id
     private String productTypeName;//产品类型名称
     private String questionTitle;//问题标题
+    private String colorName;//产品颜色名称
+    private String productName;//产品名称
 
     public Integer getDetectItemId() {
         return detectItemId;
@@ -225,4 +227,20 @@ public class ComplaintDetectItem implements Serializable {
     public void setProductColorId(Integer productColorId) {
         this.productColorId = productColorId;
     }
+
+    public String getColorName() {
+        return colorName;
+    }
+
+    public void setColorName(String colorName) {
+        this.colorName = colorName;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
 }

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

@@ -58,7 +58,7 @@ public class SalesOrder implements Serializable {
     private Integer salesType;              //订单类型  1:购买2:租赁
     private String salesDealCode;           //交易号
     private Integer salesOrderStatus;       //订单状态 订单状态:1:正常 2:换货 3:退货  4:维修  5:补发
-    private Integer salesShippingStatus;    //发货状态 0(未发货)1(已发货,即已扫描出库)3(备货中)4(收货)
+    private Integer salesShippingStatus;    //发货状态 0(未发货)1(已发货,即已扫描出库)3(备货中)4(收货) 11(已通知配货,后加)
     private Integer salesPayStatus;         //付款状态 0(未付款)2(已付款)
     private Integer salesProcessStatus;     //单据状态  0(正常单)1(问题单)
     private Integer salesIsSend;            //是否通知配货    0:否1:是
@@ -99,9 +99,13 @@ public class SalesOrder implements Serializable {
     private String salesBatchId;            //批次编号
     private Date batchCreateTime;           //批次创建时间
 
-    private Integer salesAddType;           //增加订单方式 1:手动增加 2:Excel导入
+    private Integer salesAddType;           //增加订单方式 1:手动增加 2:Excel导入 3:客诉增加订单
     private Integer salesAdminId;           //录入人id
 
+    private Integer salesCustomerId;           //客诉id
+    //  处理结果: 1:已解决  2:未解决 3:换新  4:维修 5:补发 6:退货 7:无理由退货
+    private Integer customerIsSolve;
+
     public String getStyleColor() {
         return styleColor;
     }
@@ -597,4 +601,20 @@ public class SalesOrder implements Serializable {
     public void setBatchCreateTime(Date batchCreateTime) {
         this.batchCreateTime = batchCreateTime;
     }
+
+    public Integer getSalesCustomerId() {
+        return salesCustomerId;
+    }
+
+    public void setSalesCustomerId(Integer salesCustomerId) {
+        this.salesCustomerId = salesCustomerId;
+    }
+
+    public Integer getCustomerIsSolve() {
+        return customerIsSolve;
+    }
+
+    public void setCustomerIsSolve(Integer customerIsSolve) {
+        this.customerIsSolve = customerIsSolve;
+    }
 }

+ 41 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/order/OrderBatch.java

@@ -27,10 +27,18 @@ public class OrderBatch  implements  Serializable{
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
     private Date batchCreateTime;
 
+    //是否有需要确认的订单   0:有   1:没有
+    private Integer isBatchOrderConfirm;
     //订单数量
     private Integer batchOrderNum;
+    //待审核数量
+    private Integer pendingReviewNum;
+    //待发货数量
+    private Integer pendingDeliveredNum;
+    //已发货数量
+    private Integer shippedNum;
 
-    private Integer isBatchOrderConfirm;   //是否有需要确认的订单   0:有   1:没有
+    private Integer salesAdminId;   //录入人id
 
     public String getBatchId(){
         return batchId;
@@ -95,4 +103,36 @@ public class OrderBatch  implements  Serializable{
     public void setIsBatchOrderConfirm(Integer isBatchOrderConfirm) {
         this.isBatchOrderConfirm = isBatchOrderConfirm;
     }
+
+    public Integer getSalesAdminId() {
+        return salesAdminId;
+    }
+
+    public void setSalesAdminId(Integer salesAdminId) {
+        this.salesAdminId = salesAdminId;
+    }
+
+    public Integer getPendingReviewNum() {
+        return pendingReviewNum;
+    }
+
+    public void setPendingReviewNum(Integer pendingReviewNum) {
+        this.pendingReviewNum = pendingReviewNum;
+    }
+
+    public Integer getPendingDeliveredNum() {
+        return pendingDeliveredNum;
+    }
+
+    public void setPendingDeliveredNum(Integer pendingDeliveredNum) {
+        this.pendingDeliveredNum = pendingDeliveredNum;
+    }
+
+    public Integer getShippedNum() {
+        return shippedNum;
+    }
+
+    public void setShippedNum(Integer shippedNum) {
+        this.shippedNum = shippedNum;
+    }
 }

+ 9 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/pts/Produce.java

@@ -25,6 +25,7 @@ public class Produce implements Serializable {
     private String producePattern;         //产品型号前两位  WA
     private String produceModel;           //产品型号后两位  1X
     private String produceFeature;         //产品特性  产品特性 A:国内;B:美国;C:欧洲;D:其他;
+    private String produceBrand;         //品牌字母
 
     private Integer employeeId;            //员工id
     private Integer wechatMpId;            //所属公众号ID
@@ -174,4 +175,12 @@ public class Produce implements Serializable {
                 ", produceUpdateTime=" + produceUpdateTime +
                 '}';
     }
+
+    public String getProduceBrand() {
+        return produceBrand;
+    }
+
+    public void setProduceBrand(String produceBrand) {
+        this.produceBrand = produceBrand;
+    }
 }

+ 15 - 1
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/SalesOrderService.java

@@ -210,10 +210,24 @@ public interface SalesOrderService {
     Integer getSalesOrderNum(SalesOrder salesOrder);
 
     /**
-     * 批量确认订单
+     * 批量确认订单 根据批次
      * @param salesBatchId
      * @return
      */
     Integer listConfirmSalesOrderByBatch(String salesBatchId);
 
+    /**
+     * 批量确认订单
+     * @param salesId
+     * @return
+     */
+    Integer noticeDistribution(Integer salesId);
+
+
+    /**
+     * 确认订单,需要传入完整的order
+     * @param salesId
+     * @return
+     */
+    Integer confirmSalesOrder(Integer salesId);
 }

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

@@ -1325,42 +1325,8 @@ public class CustomerServiceImpl implements CustomerService {
     @Override
     public PagedResult<CustomerInfo> listCustomer(int pageNO, int pageSize, CustomerInfo customerInfo, boolean isTotalNum) {
         PageHelper.startPage(pageNO, pageSize, isTotalNum);
-
         //查询客诉列表
         List<CustomerInfo> customerList = customerInfoMapper.listCustomer(customerInfo);
-
-//        if (customerList != null && customerList.size() > 0) {
-//            for (CustomerInfo customer : customerList) {
-//
-//                CustomerCommon customerCommon = new CustomerCommon();
-//                customerCommon.setCustomerId(customer.getCustomerId());
-//                List<CustomerCommon> customerCommonList = customerCommonService.listCustomerCommon(customerCommon);
-//                if(customerCommonList == null || customerCommonList.size() < 1){
-//                    continue;
-//                }
-//                customerCommon = customerCommonList.get(0);
-//                customer.setBackStatus(customerCommon.getRelationBackStatus());
-//                customer.setSendStatus(customerCommon.getRelationSendStatus());
-//                customer.setSendLogisticsNo(customerCommon.getRelationSendLogisticsNo());
-//                customer.setSendLogisticsCompany(customerCommon.getRelationSendLogisticsCompany());
-//                customer.setBackLogisticsNo(customerCommon.getRelationBackLogisticsNo());
-//                customer.setBackLogisticsCompany(customerCommon.getRelationBackLogisticsCompany());
-//                Date date = null;
-//                List<SalesOrder> salesOrderList = customerCommon.getSalesOrderList();
-//                if(salesOrderList != null && salesOrderList.size() > 0){
-//                    for (int k = 0;k<salesOrderList.size();k++){
-//                        SalesOrder so = salesOrderList.get(k);
-//                        List<SalesOrderItem> salesOrderItemList = so.getSalesOrderItemList();
-//                        for (SalesOrderItem soi:salesOrderItemList) {
-//                            if(1 == soi.getItemIsSource()){
-//                                date = so.getSalesPayTime();
-//                            }
-//                        }
-//                    }
-//                }
-//                customer.setSalesTime(date);
-//            }
-//        }
         return PageUtil.getPage(customerList);
     }
 

+ 52 - 26
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java

@@ -785,14 +785,7 @@ public class SalesOrderServiceImpl implements SalesOrderService {
 
     @Transactional
     @Override
-    public synchronized Integer listConfirmSalesOrderByBatch(String salesBatchId) {
-        /*
-        *  查询订单
-        *  查询订单项
-        *  删除订单
-        *  修改查询的订单状态
-        *  添加订单
-        */
+    public Integer listConfirmSalesOrderByBatch(String salesBatchId) {
         Integer flag = 0;
         SalesOrder salesOrder = new SalesOrder();
         salesOrder.setSalesBatchId(salesBatchId);
@@ -802,26 +795,59 @@ public class SalesOrderServiceImpl implements SalesOrderService {
         }
 
         for (SalesOrder so:salesOrderList){
-            SalesOrderItem salesOrderItem = new SalesOrderItem();
-            salesOrderItem.setItemOrderId(so.getSalesId());
-            List<SalesOrderItem> salesOrderItemList = salesOrderMapper.listSalesOrderItem(salesOrderItem);
-            so.setSalesOrderItemList(salesOrderItemList);
-            //1:确认 状态
-            so.setSalesStatus(1);
-
-            flag = salesOrderMapper.delOrderById(so.getSalesId());
-            if(flag < 1){
-                throw  new RuntimeException("删除订单失败!");
-            }
+            flag = salesOrderService.confirmSalesOrder(so.getSalesId());
+        }
+        return flag;
+    }
 
-            flag = salesOrderMapper.delOrderItem(so.getSalesId());
-            if(flag < 1){
-                throw  new RuntimeException("删除订单项失败!");
-            }
+    @Override
+    public Integer noticeDistribution(Integer salesId) {
+        return salesOrderMapper.noticeDistribution(salesId);
+    }
+
+    @Transactional
+    @Override
+    public Integer confirmSalesOrder(Integer saleId) {
+         /*
+        *  查询订单
+        *  查询订单项
+        *  删除订单
+        *  修改查询的订单状态
+        *  添加订单
+        */
+        if(saleId == null ){
+            throw  new RuntimeException("确认订单-订单id异常!");
         }
-        /* 添加订单 */
-        for (SalesOrder so:salesOrderList){
-            boolean fl = salesOrderService.addRstOrderAndIteminfo(so);
+
+        SalesOrder salesOrder = salesOrderMapper.getSalesOrderById(saleId);
+        if(salesOrder == null){
+            throw  new RuntimeException("确认订单-订单异常!");
+        }
+
+        Integer flag = 0;
+        SalesOrderItem salesOrderItem = new SalesOrderItem();
+        salesOrderItem.setItemOrderId(salesOrder.getSalesId());
+        List<SalesOrderItem> salesOrderItemList = salesOrderMapper.listSalesOrderItem(salesOrderItem);
+        if(salesOrderItemList == null || salesOrderItemList.size()<1){
+            throw  new RuntimeException("确认订单-查询订单项失败!");
+        }
+        salesOrder.setSalesOrderItemList(salesOrderItemList);
+
+        flag = salesOrderMapper.delOrderById(salesOrder.getSalesId());
+        if(flag < 1){
+            throw  new RuntimeException("确认订单-删除订单失败!");
+        }
+
+        flag = salesOrderMapper.delOrderItem(salesOrder.getSalesId());
+        if(flag < 1){
+            throw  new RuntimeException("确认订单-删除订单项失败!");
+        }
+
+        //1:确认 状态
+        salesOrder.setSalesStatus(1);
+        boolean fl = salesOrderService.addRstOrderAndIteminfo(salesOrder);
+        if(!fl){
+            throw  new RuntimeException("确认订单-添加订单失败!");
         }
         return flag;
     }

+ 6 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/SalesOrderMapper.java

@@ -177,6 +177,11 @@ public interface SalesOrderMapper {
      */
     Integer delOrderById(Integer ids);
 
-
+    /**
+     * 批量确认订单
+     * @param salesId
+     * @return
+     */
+    Integer noticeDistribution(Integer salesId);
 
 }

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

@@ -68,12 +68,14 @@
     cd.detect_item_create_time detectItemCreateTime,
     cd.detect_item_update_time detectItemUpdateTime,
     qd.describe_title questionTitle,
-    pi.product_name productTypeName,
-    pt.type_name productTypeName
+    pi.product_name productName,
+    pt.type_name productTypeName,
+    ci.color_name colorName
     from tb_rst_complaint_detect_item cd
     LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
     LEFT JOIN tb_rst_question_describe qd on cd.customer_id = qd.customer_id
     LEFT JOIN tb_rst_product_type pt on pi.product_type = pt.type_id
+    LEFT JOIN tb_rst_product_color ci on cd.product_color_id = ci.color_id
     <where>
       <if test="productTypeId != null" >
         AND pt.type_id = #{productTypeId,jdbcType=INTEGER}

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

@@ -47,10 +47,14 @@
       	t.*,
       	trsc.company_name companyName,
       	trsi.store_efast  storeEfast,
-        trsi.store_name  storeName
+        trsi.store_name  storeName,
+        ci.customer_is_solve customerIsSolve,
+        od.batch_create_time  batchCreateTime
     from tb_rst_sales_order_info t
     LEFT JOIN tb_rst_sales_company trsc ON t.sales_company_id = trsc.company_id
     LEFT JOIN tb_rst_store_info trsi ON t.sales_store_id = trsi.store_id
+     LEFT JOIN tb_rst_order_batch od ON t.sales_batch_id = od.batch_id
+    LEFT JOIN tb_rst_customer_info ci ON t.sales_customer_id = ci.customer_id
     where sales_id = #{salesId}
   </select>
 
@@ -60,11 +64,13 @@
     tb_rst_sales_order_info.*,
     trsc.company_name companyName,
     trsi.store_name  storeName,
+    ci.customer_is_solve customerIsSolve,
     od.batch_create_time  batchCreateTime
     from tb_rst_sales_order_info
     LEFT JOIN tb_rst_sales_company trsc ON tb_rst_sales_order_info.sales_company_id = trsc.company_id
     LEFT JOIN tb_rst_store_info trsi ON tb_rst_sales_order_info.sales_store_id = trsi.store_id
     LEFT JOIN tb_rst_order_batch od ON tb_rst_sales_order_info.sales_batch_id = od.batch_id
+    LEFT JOIN tb_rst_customer_info ci ON tb_rst_sales_order_info.sales_customer_id = ci.customer_id
     <where>
       <if test="salesIsDownload !=null and salesIsDownload !=''">
         AND sales_is_download = #{salesIsDownload}
@@ -85,13 +91,13 @@
         AND sales_company_id = #{salesCompanyId}
       </if>
       <if test="salesId !=null">
-        AND sales_id like CONCAT('%',#{salesId},'%')
+        AND sales_id = #{salesId}
       </if>
       <if test="salesOrderId !=null and salesOrderId !=''">
-        AND sales_orderId like CONCAT('%',#{salesOrderId},'%')
+        AND sales_orderId = #{salesOrderId}
       </if>
       <if test="salesDealCode !=null and salesDealCode !=''">
-        AND sales_deal_code like CONCAT('%',#{salesDealCode},'%')
+        AND sales_deal_code = #{salesDealCode}
       </if>
       <if test="salesAddressTel !=null and salesAddressTel !=''">
         AND sales_address_tel like CONCAT('%',#{salesAddressTel},'%')
@@ -108,6 +114,12 @@
       <if test="endDate != null and endDate != ''">
         AND sales_create_time <![CDATA[<=]]> #{endDate}
       </if>
+      <if test="salesAdminId != null ">
+         AND sales_admin_id = #{salesAdminId}
+      </if>
+      <if test="salesAddType != null ">
+         AND sales_add_type = #{salesAddType}
+      </if>
       <if test="salesIds != null and salesIds != ''">
         AND sales_id IN
         <foreach collection="salesIds" item="node" index="index" separator="," open="(" close=")">
@@ -164,19 +176,19 @@
         AND sales_store_id = #{salesStoreId}
       </if>
       <if test="salesId !=null">
-        o.sales_id like CONCAT('%',#{salesId},'%')
+        o.sales_id = #{salesId}
       </if>
       <if test="salesOrderId !=null and salesOrderId !=''">
-        AND o.sales_orderId like CONCAT('%',#{salesOrderId},'%')
+        AND o.sales_orderId = #{salesOrderId}
       </if>
       <if test="salesDealCode !=null and salesDealCode !=''">
-        AND o.sales_deal_code like CONCAT('%',#{salesDealCode},'%')
+        AND o.sales_deal_code = #{salesDealCode}
       </if>
       <if test="salesAddressTel !=null and salesAddressTel !=''">
-        AND o.sales_address_tel like CONCAT('%',#{salesAddressTel},'%')
+        AND o.sales_address_tel = #{salesAddressTel}
       </if>
       <if test="salesAddressName !=null and salesAddressName !=''">
-        AND o.sales_address_name like CONCAT('%',#{salesAddressName},'%')
+        AND o.sales_address_name = #{salesAddressName}
       </if>
       <if test="salesBatchId !=null and salesBatchId !=''">
         AND sales_batch_id = #{salesBatchId}
@@ -212,26 +224,26 @@
         <if test="salesStatus !=null ">
            AND sales_status = #{salesStatus}
         </if>
-        <if test="salesShippingStatus !=null and salesShippingStatus !=''">
+        <if test="salesShippingStatus !=null">
           AND sales_shipping_status = #{salesShippingStatus}
         </if>
         <if test="salesStoreId !=null and salesStoreId !=''">
           AND sales_store_id = #{salesStoreId}
         </if>
         <if test="salesId !=null">
-          o.sales_id like CONCAT('%',#{salesId},'%')
-        </if>
-        <if test="salesOrderId !=null and salesOrderId !=''">
-          AND o.sales_orderId like CONCAT('%',#{salesOrderId},'%')
-        </if>
-        <if test="salesDealCode !=null and salesDealCode !=''">
-          AND o.sales_deal_code like CONCAT('%',#{salesDealCode},'%')
-        </if>
-        <if test="salesAddressTel !=null and salesAddressTel !=''">
-          AND o.sales_address_tel like CONCAT('%',#{salesAddressTel},'%')
-        </if>
-        <if test="salesAddressName !=null and salesAddressName !=''">
-          AND o.sales_address_name like CONCAT('%',#{salesAddressName},'%')
+              o.sales_id = #{salesId}
+          </if>
+          <if test="salesOrderId !=null and salesOrderId !=''">
+              AND o.sales_orderId = #{salesOrderId}
+          </if>
+          <if test="salesDealCode !=null and salesDealCode !=''">
+              AND o.sales_deal_code = #{salesDealCode}
+          </if>
+          <if test="salesAddressTel !=null and salesAddressTel !=''">
+              AND o.sales_address_tel = #{salesAddressTel}
+          </if>
+          <if test="salesAddressName !=null and salesAddressName !=''">
+              AND o.sales_address_name = #{salesAddressName}
         </if>
         <if test="salesBatchId !=null and salesBatchId !=''">
           AND sales_batch_id = #{salesBatchId}
@@ -290,7 +302,8 @@
                 sales_batch_id,
                 sales_add_type,
                 sales_create_time,
-                sales_admin_id
+                sales_admin_id,
+                sales_customer_id
             )
         values
             (
@@ -334,7 +347,8 @@
                 #{salesBatchId},
                 #{salesAddType},
                 now(),
-                #{salesAdminId}
+                #{salesAdminId},
+                #{salesCustomerId}
             )
   </insert>
 
@@ -712,12 +726,12 @@
       SELECT
           t.sales_id,
           t.sales_status,
+          t.sales_shipping_status,
           si.store_name
       FROM
           tb_rst_sales_order_info t
       LEFT JOIN tb_rst_store_info si ON t.sales_store_id = si.store_id
       WHERE t.sales_batch_id = #{salesBatchId}
-      GROUP BY t.sales_store_id
   </select>
 
   <!-- 按照批次查询订单项,并下载,订单列表主要按照订单项来排列 -->
@@ -768,4 +782,17 @@
             sales_batch_id = #{salesBatchId}
     </update>
 
+    <!-- 批量配货 -->
+    <update id="noticeDistribution" parameterType="Integer">
+        update tb_rst_sales_order_info
+        SET
+          sales_shipping_status = 11
+        WHERE
+          sales_shipping_status = 0
+        AND
+          sales_status = 1
+        AND
+          sales_id = #{salesId}
+    </update>
+
 </mapper>

+ 21 - 3
watero-rst-service/src/main/java/com/iamberry/rst/service/order/OrderBatchServiceImpl.java

@@ -11,6 +11,7 @@ import com.iamberry.rst.util.PageUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.HashSet;
 import java.util.List;
 
 /**
@@ -42,16 +43,33 @@ public class OrderBatchServiceImpl  implements OrderBatchService {
         List<OrderBatch> list = orderBatchMapper.getOrderBatchList(orderBatch);
         for (OrderBatch ob : list){
             List<SalesOrder> salesOrderList = salesOrderMapper.getOrderStoreName(ob.getBatchId());
-            Integer flag = 1;   //是否有需要确认的订单   0:有   1:没有
-            StringBuffer sb = new StringBuffer();
+            //是否有需要确认的订单   0:有   1:没有
+            Integer flag = 1;
+            //待审核数量  , 代发货 , 已发货
+            Integer pendingReviewNum = 0,pendingDeliveredNum=0,shippedNum=0;
+            HashSet store = new HashSet();
             for (SalesOrder so: salesOrderList) {
-                sb.append( sb.length()<1?so.getStoreName():(","+so.getStoreName()));
+                store.add(so.getStoreName());
                 if(so.getSalesStatus() == null || so.getSalesStatus() == 0){
                     flag = 0;
+                    pendingReviewNum++;
+                }
+                if(so.getSalesShippingStatus() == null || so.getSalesShippingStatus() == 0 ){
+                    pendingDeliveredNum ++;
+                }else if(so.getSalesShippingStatus() == 1){
+                    shippedNum++;
                 }
             }
+
+            StringBuffer sb = new StringBuffer();
+            for(Object s : store){
+                sb.append( sb.length()<1?s:(","+s));
+            }
             ob.setBatchChannel(sb.toString());
             ob.setIsBatchOrderConfirm(flag);
+            ob.setPendingReviewNum(pendingReviewNum);
+            ob.setPendingDeliveredNum(pendingDeliveredNum);
+            ob.setShippedNum(shippedNum);
         }
         return PageUtil.getPage(list);
     }

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

@@ -24,6 +24,9 @@
         from tb_rst_order_batch t
         LEFT JOIN tb_rst_sales_order_info soi ON t.batch_id = soi.sales_batch_id
         <where>
+            <if test="salesAdminId != null and salesAdminId != ''">
+                AND soi.sales_admin_id = #{salesAdminId}
+            </if >
             <if test="batchId != null and batchId != ''">
                 AND t.batch_id  like  CONCAT ('%',#{batchId},'%')
             </if >

+ 2 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/machineMapper.xml

@@ -558,7 +558,8 @@
             TRPP.produce_pattern AS producePattern,
             TRPP.produce_model AS produceModel,
             TRPP.produce_feature AS produceFeature,
-			TRPP.produce_name AS produceName
+			TRPP.produce_name AS produceName,
+			TRPP.produce_brand AS produceBrand
         FROM
             tb_rst_pts_produce TRPP
         WHERE

+ 18 - 8
watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/produceMapper.xml

@@ -12,7 +12,8 @@
             tb_rst_pts_produce.produce_remake AS produceRemake,
             tb_rst_pts_produce.produce_create_time AS  produceCreateTime,
             tb_rst_pts_produce.produce_update_time AS produceUpdateTime,
-            tb_rst_pts_produce.wechat_mp_id AS wechatMpId
+            tb_rst_pts_produce.wechat_mp_id AS wechatMpId,
+            tb_rst_pts_produce.produce_brand AS produceBrand
         FROM
             tb_rst_pts_produce
         <where>
@@ -36,6 +37,7 @@
         <result column="produce_create_time" property="produceCreateTime" />
         <result column="produce_update_time" property="produceUpdateTime" />
         <result column="wechat_mp_id" property="wechatMpId" />
+        <result column="produce_brand" property="produceBrand" />
         <collection property="process" column="{produceId = produce_id}" javaType="ArrayList"
                     ofType="com.iamberry.rst.core.pts.ProduceProcess" select="getAllProduceProcessList"/>
     </resultMap>
@@ -128,7 +130,8 @@
         tb_rst_pts_produce.produce_remake AS produceRemake,
         tb_rst_pts_produce.produce_create_time AS  produceCreateTime,
         tb_rst_pts_produce.produce_update_time AS produceUpdateTime,
-        tb_rst_pts_produce.wechat_mp_id AS wechatMpId
+        tb_rst_pts_produce.wechat_mp_id AS wechatMpId,
+        tb_rst_pts_produce.produce_brand AS produceBrand
         FROM
         tb_rst_pts_produce
         WHERE
@@ -197,8 +200,8 @@
 
 
     <insert id="saveProduce" parameterType="Produce" useGeneratedKeys="true"  keyProperty="produceId">
-        insert into tb_rst_pts_produce (produce_id,produce_no,produce_name,produce_status,produce_remake,produce_type,produce_pattern,produce_model,produce_feature,wechat_mp_id)
-        values (#{produceId},#{produceNo},#{produceName},#{produceStatus},#{produceRemake},#{produceType},#{producePattern},#{produceModel},#{produceFeature},#{wechatMpId})
+        insert into tb_rst_pts_produce (produce_id,produce_no,produce_name,produce_status,produce_remake,produce_type,produce_pattern,produce_model,produce_feature,wechat_mp_id,produce_brand)
+        values (#{produceId},#{produceNo},#{produceName},#{produceStatus},#{produceRemake},#{produceType},#{producePattern},#{produceModel},#{produceFeature},#{wechatMpId},#{produceBrand})
     </insert>
 
     <update id="updateProduce" parameterType="Produce" >
@@ -229,7 +232,10 @@
                 produce_remake = #{produceRemake},
             </if>
             <if test="wechatMpId !=null and wechatMpId !=''">
-                wechat_mp_id = #{wechatMpId}
+                wechat_mp_id = #{wechatMpId},
+            </if>
+            <if test="produceBrand !=null and produceBrand !=''">
+                produce_brand = #{produceBrand}
             </if>
         </set>
         WHERE
@@ -314,7 +320,8 @@
             produce_remake AS produceRemake,
             produce_create_time AS  produceCreateTime,
             produce_update_time AS produceUpdateTime,
-            wechat_mp_id AS wechatMpId
+            wechat_mp_id AS wechatMpId,
+            produce_brand AS produceBrand
 
         FROM
             tb_rst_pts_produce
@@ -335,7 +342,8 @@
         produce_remake AS produceRemake,
         produce_create_time AS  produceCreateTime,
         produce_update_time AS produceUpdateTime,
-        wechat_mp_id AS wechatMpId
+        wechat_mp_id AS wechatMpId,
+        produce_brand AS produceBrand
         FROM
         tb_rst_pts_produce
         WHERE
@@ -350,6 +358,7 @@
         <result column="produce_remake" property="produceRemake"/>
         <result column="produce_create_time" property="produceCreateTime"/>
         <result column="produce_update_time" property="produceUpdateTime"/>
+        <result column="produce_brand" property="produceBrand"/>
         <collection property="process" column="produce_id" ofType="ProduceProcess" select="listSelectProduceProcess"/>
     </resultMap>
 
@@ -448,7 +457,8 @@
         produce_remake AS produceRemake,
         produce_create_time AS  produceCreateTime,
         produce_update_time AS produceUpdateTime,
-        wechat_mp_id AS wechatMpId
+        wechat_mp_id AS wechatMpId,
+        produce_brand AS produceBrand
         FROM
         tb_rst_pts_produce LIMIT 1
     </select>

+ 4 - 0
watero-rst-web/pom.xml

@@ -126,6 +126,10 @@
                 <configuration>
                     <source>1.7</source>
                     <target>1.7</target>
+                    <compilerArguments>
+                        <verbose />
+                        <bootclasspath>${java.home}/lib/rt.jar</bootclasspath>
+                    </compilerArguments>
                 </configuration>
             </plugin>
         </plugins>

+ 60 - 12
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -100,6 +100,8 @@ public class AdminCustomerController {
     private EfastOrderService efastOrderService;
     @Autowired
     private RelationOrderService relationOrderService;
+    @Autowired
+    private GenerateKeyUtil generateKeyUtil ;
 
 
     /**
@@ -450,10 +452,12 @@ public class AdminCustomerController {
         salesOrder.setSalesShippingFee(0); //邮费
 
         Integer adminId = AdminUtils.getLoginAdminId();
-        String orderCode = OrderNoUtil.createOrderCode(adminId);
+        String orderCode = GenerateKeyUtil.createOrderCode(adminId);
         salesOrder.setSalesDealCode(orderCode);
         salesOrder.setSalesOrderId(orderCode);
 
+        salesOrder.setSalesBatchId(generateKeyUtil.getSalesBatchIdKS());
+
         //salesOrder = salesOrderService.addOrderAndIteminfo(salesOrder,list);
         salesOrder.setSalesOrderItemList(list);
 
@@ -2060,17 +2064,20 @@ public class AdminCustomerController {
                         for (SalesOrder salesOrder : common.getSalesOrderList()) {
                             if (salesOrder.getSalesOrderItemList().size() > 0) {
                                 for (SalesOrderItem salesOrderItem : salesOrder.getSalesOrderItemList()) {
-                                    customer.setRelationBackLogisticsCompany(common.getRelationBackLogisticsCompany());
-                                    customer.setRelationBackLogisticsNo(common.getRelationBackLogisticsNo());
-                                    customer.setRelationSendLogisticsCompany(common.getRelationSendLogisticsCompany());
-                                    customer.setRelationSendLogisticsNo(common.getRelationSendLogisticsNo());
-                                    customer.setRelationBackStatus(String.valueOf(common.getRelationBackStatus()));
-                                    customer.setRelationBackReceiptDate(common.getRelationBackReceiptDate() == null?null:format.format(common.getRelationBackReceiptDate()));
-                                    customer.setSalesPayTime(salesOrder.getSalesPayTime());
-                                    customer.setItemProductName(salesOrderItem.getItemProductName());
-                                    customer.setItemProductColor(salesOrderItem.getItemProductColor());
-                                    customer.setItemNum(String.valueOf(salesOrderItem.getItemNum()));
-                                    customerStatisticalInfoList.add(customer);
+                                    //将数据copy到新容器
+                                    CustomerStatisticalInfo customers = new CustomerStatisticalInfo();
+                                    BeanUtils.copyProperties(customer, customers);
+                                    customers.setRelationBackLogisticsCompany(common.getRelationBackLogisticsCompany());
+                                    customers.setRelationBackLogisticsNo(common.getRelationBackLogisticsNo());
+                                    customers.setRelationSendLogisticsCompany(common.getRelationSendLogisticsCompany());
+                                    customers.setRelationSendLogisticsNo(common.getRelationSendLogisticsNo());
+                                    customers.setRelationBackStatus(String.valueOf(common.getRelationBackStatus()));
+                                    customers.setRelationBackReceiptDate(common.getRelationBackReceiptDate() == null?null:format.format(common.getRelationBackReceiptDate()));
+                                    customers.setSalesPayTime(salesOrder.getSalesPayTime());
+                                    customers.setItemProductName(salesOrderItem.getItemProductName());
+                                    customers.setItemProductColor(salesOrderItem.getItemProductColor());
+                                    customers.setItemNum(String.valueOf(salesOrderItem.getItemNum()));
+                                    customerStatisticalInfoList.add(customers);
                                 }
                             } else {
                                 customerStatisticalInfoList.add(customer);
@@ -2354,7 +2361,48 @@ public class AdminCustomerController {
         ResponseJson rj = new ResponseJson(200, "查询成功", 200);
         rj.addResponseKeyValue("listReturnStatisticsInfo", listReturnStatisticsInfo);
         return rj;
+    }
+
+
+    @RequestMapping("/to_add_customer_list")
+    public ModelAndView toAddCustomerList(HttpServletRequest request) throws Exception {
+        ModelAndView mv = new ModelAndView("cm/customer/add_custome_list");
+        return mv;
+    }
+
+    @ResponseBody
+    @RequestMapping("/add_customer_list")
+    public ResponseJson addCustomerList(HttpServletRequest request, CustomerInfo customer,
+            @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
+            @RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
+            @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum) throws Exception {
+
+        PagedResult<CustomerInfo> pagedResult = customerService.listCustomer(pageNO, pageSize, customer, totalNum == 0);
+        if (totalNum != 0) {
+            pagedResult.setTotal(totalNum);
+        }
+//
+//        //查询产品类型集合
+//        List<ProductType> typeList = productService.listProductType(new ProductType());
+//        //查询客诉类型集合
+//        List<ComplaintTypeInfo> complaintTypeList = complaintTypeInfoService.listComplaintTypeInfo(new ComplaintTypeInfo());
+//        //查询客诉类型集合
+//        List<ComplaintSmallClassInfo> complaintSmallClassInfoList = complaintSmallClassInfoService.listComplaintSmallClassInfo(new ComplaintSmallClassInfo());
 
+        //查询跟进客服集合
+        Admin admin = new Admin();
+        admin.setAdminDept(3);
+        admin.setAdminStatus(1);
+        List<Admin> adminList = sysService.listSelectAdmin(admin);
+
+        ResponseJson rj = ResponseJson.getSUCCESS();
+//        rj.addResponseKeyValue("typeList",typeList);
+//        rj.addResponseKeyValue("complaintTypeList",complaintTypeList);
+//        rj.addResponseKeyValue("complaintSmallClassInfoList",complaintSmallClassInfoList);
+        rj.addResponseKeyValue("adminList",adminList);
+        rj.addResponseKeyValue("customerList",pagedResult.getDataList());
+        return rj;
     }
+
 }
 

+ 20 - 20
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AppComplaintQuestionInfoController.java

@@ -315,26 +315,26 @@ public class AppComplaintQuestionInfoController {
      * @param request
      * @return
      */
-    @ResponseBody
-    @RequestMapping(value = "/synRelatedOrder")
-    public ResponseJson synRelatedOrder(HttpServletRequest request){
-        ResponseJson msg = new ResponseJson();
-        List<RelationOrder>  relationOrderList = relationOrderService.getRelationOrderList(new RelationOrder());
-        for (int i=0;i<relationOrderList.size();i++) {
-            RelationOrder ro = relationOrderList.get(i);
-            CustomerCommon customerCommon = new CustomerCommon();
-            customerCommon.setRelationId(ro.getRelationId());
-            customerCommon.setCustomerIsSolve(ro.getRelationType());  //customerIsSolve
-            List<CustomerCommon> customerCommonList = customerCommonService.listCustomerCommon(customerCommon);
-
-            RelationOrder newRo = new RelationOrder();
-            newRo.setRelationOrderId(ro.getRelationOrderId());
-            newRo.setRelationCustomerId(customerCommonList.get(0).getCustomerId());
-            relationOrderService.update(newRo);
-        }
-        logger.info("----交易号为空--订单id为"+1);
-        return msg;
-    }
+//    @ResponseBody
+//    @RequestMapping(value = "/synRelatedOrder")
+//    public ResponseJson synRelatedOrder(HttpServletRequest request){
+//        ResponseJson msg = new ResponseJson();
+//        List<RelationOrder>  relationOrderList = relationOrderService.getRelationOrderList(new RelationOrder());
+//        for (int i=0;i<relationOrderList.size();i++) {
+//            RelationOrder ro = relationOrderList.get(i);
+//            CustomerCommon customerCommon = new CustomerCommon();
+//            customerCommon.setRelationId(ro.getRelationId());
+//            customerCommon.setCustomerIsSolve(ro.getRelationType());  //customerIsSolve
+//            List<CustomerCommon> customerCommonList = customerCommonService.listCustomerCommon(customerCommon);
+//
+//            RelationOrder newRo = new RelationOrder();
+//            newRo.setRelationOrderId(ro.getRelationOrderId());
+//            newRo.setRelationCustomerId(customerCommonList.get(0).getCustomerId());
+//            relationOrderService.update(newRo);
+//        }
+//        logger.info("----交易号为空--订单id为"+1);
+//        return msg;
+//    }
 
 
 

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

@@ -435,7 +435,7 @@ public class MQTask implements InitializingBean {
 
 
 	/**客诉系统  自动追踪发货信息**/
-	@Scheduled(cron = "0 0/30 * * * ?")//每30分钟执行一次
+	@Scheduled(cron = "0 0/60 * * * ?")//每60分钟执行一次
 //	@Scheduled(cron = "0 0/1 * * * ?")//每1分钟执行一次
 	public void syncSendBackCustomer()throws Exception{
 		CustomerCommon customerCommon = new CustomerCommon();

+ 14 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminOrderBatchController.java

@@ -3,8 +3,10 @@ package com.iamberry.rst.controllers.order;
 import com.iamberry.rst.core.cm.SalesOrder;
 import com.iamberry.rst.core.order.OrderBatch;
 import com.iamberry.rst.core.page.PagedResult;
+import com.iamberry.rst.core.sys.Admin;
 import com.iamberry.rst.faces.cm.SalesOrderService;
 import com.iamberry.rst.faces.order.OrderBatchService;
+import com.iamberry.rst.utils.AdminUtils;
 import com.iamberry.rst.utils.StitchAttrUtil;
 import com.iamberry.wechat.tools.ResponseJson;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -39,6 +41,12 @@ public class AdminOrderBatchController {
                                          @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum) {
         ModelAndView mv = new ModelAndView("order/bacth/order_batch_list");
 
+        Admin admin = AdminUtils.getLoginAdmin();
+        Integer identity = admin.getAdminDept();
+        if(identity == 2){
+            orderBatch.setSalesAdminId(admin.getAdminId());
+        }
+
         PagedResult<OrderBatch> pagedResult = orderBatchService.listOrderBatchPage(pageNO, pageSize, orderBatch, totalNum == 0);
         if (totalNum != 0){
             pagedResult.setTotal(totalNum);
@@ -65,7 +73,12 @@ public class AdminOrderBatchController {
 
         SalesOrder salesOrder = new SalesOrder();
         /*确认该批次下的所有订单*/
-        Integer flag = salesOrderService.listConfirmSalesOrderByBatch(batchId);
+        Integer flag = 0;
+        try{
+            flag = salesOrderService.listConfirmSalesOrderByBatch(batchId);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
 
         rj = ResponseJson.getSUCCESS();
         rj.addResponseKeyValue("number",flag);

+ 67 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java

@@ -84,6 +84,13 @@ public class AdminSalesOrderController {
                                         @RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
                                         @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum) throws Exception {
         ModelAndView mv = new ModelAndView("order/salesOrder/sales_order_list");
+
+        Admin admin = AdminUtils.getLoginAdmin();
+        Integer identity = admin.getAdminDept();
+        if(identity == 2){
+            salesOrder.setSalesAdminId(admin.getAdminId());
+        }
+
         //分页获取订单信息
         PagedResult<SalesOrder> pagedResult = salesOrderService.listSalesOrderPage(pageNO, pageSize, salesOrder,totalNum == 0);
         if (totalNum != 0) {
@@ -97,6 +104,7 @@ public class AdminSalesOrderController {
                 .setModelAndView(salesOrder, mv, "/admin/salesOrder/list_order_page", pagedResult);
 
         mv.addObject("listStoreInfo",listStoreInfo);
+        mv.addObject("identity",identity);
         return mv;
     }
 
@@ -879,13 +887,70 @@ public class AdminSalesOrderController {
     @RequestMapping(value = "/select_company")
     @RequiresPermissions("salesOrder:add:manual")
     public ResponseJson getCompany(HttpServletRequest request) throws Exception {
-
         //获取销售公司
         List<CompanyInfo> companyInfoList = companyInfoService.listCompanyInfo(new CompanyInfo());
-
         ResponseJson rj = new ResponseJson(200, "查询成功", 200);
         rj.addResponseKeyValue("companyInfoList", companyInfoList);
         return rj;
     }
 
+    /**
+     * 通知配货
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @ResponseBody
+    @RequestMapping("/notice_distribution")
+    @RequiresPermissions("salesOrder:distribution:salesOrder")
+    public ResponseJson noticeDistribution(HttpServletRequest request,Integer[] salesOrderIds) throws Exception {
+        ResponseJson rj = ResponseJson.getFAILURE();
+        Integer flag = 0;
+        String errorId = "";
+        for (Integer salesIds:salesOrderIds) {
+            flag = salesOrderService.noticeDistribution(salesIds);
+            if(flag < 1){
+                errorId  += salesIds + ",";
+            }
+        }
+        if(errorId.length() > 0){
+            rj.addResponseKeyValue("errorId",errorId);
+            return rj;
+        }
+        rj = new ResponseJson(200, "修改成功", 200);
+        return rj;
+    }
+
+
+    /**
+     * 通知订单
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @ResponseBody
+    @RequestMapping("/confirm_salesOrder")
+    @RequiresPermissions("salesOrder:confirm:salesOrder")
+    public ResponseJson confirmSalesOrder(HttpServletRequest request,Integer[] salesOrderIds) throws Exception {
+        ResponseJson rj = ResponseJson.getFAILURE();
+        Integer flag = 0;
+        String errorId = "";
+        for (Integer salesIds:salesOrderIds) {
+            try{
+                flag = salesOrderService.confirmSalesOrder(salesIds);
+            }catch (Exception e){
+                e.printStackTrace();
+            }
+            if(flag < 1){
+                errorId  += salesIds + ",";
+            }
+        }
+        if(errorId.length() > 0){
+            rj.addResponseKeyValue("errorId",errorId);
+            return rj;
+        }
+        rj = new ResponseJson(200, "确认订单成功", 200);
+        return rj;
+    }
+
 }

+ 4 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AwaitSendController.java

@@ -10,7 +10,6 @@ import com.iamberry.rst.faces.cm.SalesOrderService;
 import com.iamberry.rst.utils.OrderUtils;
 import com.iamberry.rst.utils.StitchAttrUtil;
 import com.iamberry.wechat.tools.ResponseJson;
-import org.apache.poi.hssf.record.cf.IconMultiStateFormatting;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -22,7 +21,10 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
-import java.io.*;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
 import java.util.*;
 
 /**

+ 3 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminMachineController.java

@@ -613,6 +613,7 @@ public class AdminMachineController {
     private String productModel = "1X";//产品型号
     private String productFeatures = "A";//产品特性
     private String softwareVersion = "30";//软件版本
+    private String productBrand = "";//品牌字母
 
     //生成条形码
     public String generationBarCode(Produce produce) {
@@ -627,8 +628,9 @@ public class AdminMachineController {
         producePattern = produce.getProducePattern();
         productModel = produce.getProduceModel();
         productFeatures = produce.getProduceFeature();
+        productBrand = produce.getProduceBrand();
         //拼接
-        String barcode = producePattern + productModel + productFeatures +  String.valueOf(year).substring(2, 4) + months;
+        String barcode = productBrand+producePattern + productModel + productFeatures +  String.valueOf(year).substring(2, 4) + months;
         return barcode;
     }
 

+ 32 - 2
watero-rst-web/src/main/java/com/iamberry/rst/utils/GenerateKeyUtil.java

@@ -1,18 +1,18 @@
 package com.iamberry.rst.utils;
 
 import com.iamberry.rst.core.cm.SalesOrder;
-import com.iamberry.rst.core.order.OrderBatch;
 import com.iamberry.rst.core.sys.SysConfig;
 import com.iamberry.rst.faces.cm.SalesOrderService;
 import com.iamberry.rst.faces.order.OrderBatchService;
 import com.iamberry.rst.faces.sys.SysConfigService;
-import com.iamberry.wechat.tools.ResponseJson;
+import com.iamberry.wechat.tools.StaticInfo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Date;
+import java.util.Random;
 
 /***
  * 用于生成单号
@@ -50,6 +50,28 @@ public class GenerateKeyUtil {
     /*批量添加批次编号*/
     private final static String SC_BATCH = "C";
 
+    private static char[] chars = {
+            'G', 'I', 'J', 'K', 'L', 'M', 'N', 'U', 'V', 'W', 'Y', 'Z',
+            'P', 'Q', 'A', 'B', 'C', 'D', 'E', 'F', 'R', 'S', 'T'
+    };
+    public static Random random = new Random();
+    /**
+     * 产生一个订单编号
+     * @param id :为当前订单所属 用户id
+     */
+    public static String createOrderCode(Integer id) {
+        StringBuilder code = new StringBuilder();
+        code.append("KS");
+        //产生基本数据
+        code.append(StaticInfo.dateFormat.format(new Date()));
+        //避免同一秒内,操作多次
+        code.append(Math.abs(random.nextInt(1000)));
+        //避免多用户操作
+        code.append(id);
+        code.append(Math.abs(random.nextInt(1000)));
+        return code.toString();
+    }
+
     /**
      * 获取交易号-手动添加
      * @return
@@ -113,6 +135,14 @@ public class GenerateKeyUtil {
         return ("S"+ SC_BATCH + SDF_BATCH.format(new Date()) + String.format("%08d", number));
     }
 
+    /**
+     * 获取批次号 客诉录入
+     * @return
+     */
+    public String getSalesBatchIdKS(){
+        return ("KS00000000000001");
+    }
+
 
     /**
      * 产生4位随机数

+ 1 - 0
watero-rst-web/src/main/java/com/iamberry/rst/utils/OrderUtils.java

@@ -5,6 +5,7 @@ import com.iamberry.rst.core.order.EOrderRequestData;
 import com.iamberry.wechat.tools.HttpClient431Util;
 import com.sun.org.apache.xml.internal.security.utils.Base64;
 
+
 import java.io.FileOutputStream;
 import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;

+ 16 - 10
watero-rst-web/src/main/java/com/iamberry/rst/utils/StitchAttrUtil.java

@@ -18,14 +18,15 @@ public class StitchAttrUtil {
 
     private StitchAttrUtil(){
         propertySet = new HashSet<String>(Arrays.asList(noProperty));
-        timeDateSet = new HashSet<String>(Arrays.asList(timeDate));
     };
 
     /**
      * 组装参数时,会过滤以下参数
-     * 推荐使用:addNoPro(),添加过滤
+     * 推荐使用:addDatePro(),添加过滤
      */
-    private final  String timeDate[] = {};
+     // TODO: 2018/8/28  time 的转换调整,支持一个类中有有多种time的格式,因此注释掉初始化的time的Set,只能使用addDatePro()
+//    private final  String timeDate[] = {};
+
     /**
      * 控制时间参数格式
      * 推荐使用:addDatePro(),添加过滤
@@ -36,9 +37,9 @@ public class StitchAttrUtil {
             "signclosedProductInfoList"
     };
 
-    private SimpleDateFormat sdf = null;
+
     private Set<String> propertySet;
-    private Set<String> timeDateSet;
+    private Map<String,SimpleDateFormat> timeMap = new HashMap<String,SimpleDateFormat>();
 
     /**
      * 组装ModelAndView
@@ -111,8 +112,12 @@ public class StitchAttrUtil {
             }catch (IllegalAccessException e){
             }
             if (value != null && !propertySet.contains(fieldName)) {
-                if(timeDateSet.contains(fieldName))
-                    value = sdf.format(value);
+                /* 遍历map,将时间格式进行转换 */
+                for (Map.Entry<String, SimpleDateFormat> entry : timeMap.entrySet()) {
+                    if(entry.getKey().equals(fieldName)){
+                        value = entry.getValue().format(value);
+                    }
+                }
                 sb.append("&"+fieldName+ "=" + value.toString());
             }
         }
@@ -136,10 +141,11 @@ public class StitchAttrUtil {
      * @param pros
      */
     public StitchAttrUtil addDatePro(String fom,String...pros){
-        sdf = new SimpleDateFormat(fom);
+        SimpleDateFormat sdf = new SimpleDateFormat(fom);
         for(String pro : pros){
-            if(pro != null && !"".equals(pro))
-                timeDateSet.add(pro);
+            if(pro != null && !"".equals(pro)){
+                timeMap.put(pro,sdf);
+            }
         }
         return this;
     }

+ 0 - 70
watero-rst-web/src/main/java/com/iamberry/rst/utils/test.java

@@ -1,70 +0,0 @@
-package com.iamberry.rst.utils;
-import com.alibaba.dubbo.common.json.JSON;
-
-import com.auth0.jwt.internal.org.apache.commons.codec.binary.Base64;
-import com.auth0.jwt.internal.org.apache.commons.codec.binary.StringUtils;
-import net.sf.json.JSONArray;
-import net.sf.json.JSONObject;
-//import org.apache.kafka.clients.consumer.ConsumerRecord;
-//import org.apache.kafka.clients.consumer.ConsumerRecord;
-
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.security.Key;
-import java.util.Map;
-
-import javax.crypto.Cipher;
-import javax.crypto.spec.SecretKeySpec;
-import java.security.Key;
-
-
-public class test {
-    private static final String AES = "AES";
-
-    public static String decrypt(String encryptedData, String secretKey) throws Exception {
-        Key key = new SecretKeySpec(secretKey.getBytes(), AES);
-        Cipher c = Cipher.getInstance(AES);
-        c.init(2, key);
-        byte[] decodedValue = Base64.decodeBase64(encryptedData);
-        byte[] decValue = c.doFinal(decodedValue);
-        String decryptedValue = StringUtils.newStringUtf8(decValue);
-        return decryptedValue;
-    }
-
-
-    /*public static void main(String[] args) throws Exception {
-        ConsumerRecord<String, String> record = new ConsumerRecord<String, String>("4", 1, 1, "data", "{\"data\":\"7uiBfrOFcdy/EDWxcT6SlQgcMKSMSMuoqvsehLBoghAHxfaWrU9wkHCARR3wuaMwHOKWzrv5DHEfJNt9/QrlfTk6VcHGwiPGycwiPvDkoTe4eJOW8Qqwm/1H4nNX+1Ed/CTueaJe3E/BNsFxe7rF+n32z8r2qDMY9IAHCARuYJRgWKSV9GygcuObQZ+gpq6uCTCNBf4XIxuHSB/BGVZpATEykU1vILnX89GzoJlV+10=\"}");
-        String appKey = "5kkyurvvtt58bbuxueee";//填APP KEY
-        String secretKey = "rhj6na6u3y6uhy6qrbb3944mg5uqqpbb";//APP SECRET
-        String data = decrypt(JSONObject.fromObject(record.value()).getString("data"),
-                secretKey.substring(8, 24));//解析后的真正数据
-
-        JSONObject jasonObject = JSONObject.fromObject(data);
-
-        System.out.println(jasonObject);
-
-        if(jasonObject.has("dps")){
-            JSONArray dps = jasonObject.getJSONArray("dps");
-            boolean flog = false;
-            for(int i = 0; i < dps.size(); i++){
-                Map maps = (Map) JSON.parse(dps.getString(i));
-                    for (Object obj : maps.keySet()){
-                    if(obj.equals("DEVECE_CONTROL_MILK")){
-                        String milkPowder = maps.get(obj).toString();
-                        flog = true;//如果数据中包含当前字段,表示当前推送的数据为奶粉记录
-                    }
-                    if(obj.equals("t")){
-                        Long milkTime = (Long)maps.get((obj));
-                    }
-                }
-            }
-            if(flog){
-                // 根据机器ID 获取对应的用户id
-                String devId = jasonObject.getString("devId");
-
-                flog = false;
-            }
-        }
-    }*/
-}

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/base/page_util.ftl

@@ -23,7 +23,7 @@
 </script>
 
 
-<div align="right" style="margin-right: 18px">
+<div align="right" style="margin-right: 18px;margin-bottom: 20px;">
     <div class="divBody">
         <div id="testDIV"></div>
         <form action="" id="myForm" method="post"></form>

+ 176 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_custome_list.ftl

@@ -0,0 +1,176 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+    <link rel="Bookmark" href="/favicon.ico" >
+    <link rel="Shortcut Icon" href="/favicon.ico" />
+<#include "/base/add_base.ftl">
+    <title>客诉列表</title>
+    <style>
+        *{padding: 0;margin: 0;}
+        .my-input{border: 1px solid rgba(0,0,0,.1);padding: 1px 5px;height: 32px;margin-right: 10px;}
+        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/select-1.png) right center no-repeat;background-size:auto 100%;}
+        .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
+        .table-bg thead th{background-color: #e2f6ff;}
+        .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
+        .txt2{width:60px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
+        .postage-table{float: left;width: 150px;height: 30px;line-height: 30px;}
+    </style>
+</head>
+<body>
+
+
+<div class="page-container">
+    <div class="text-c">
+        <form action="" id="customer_condition" method="post">
+            <input type="text" class="my-input trim_input"  style="width:120px;margin-bottom: 10px;" value="" placeholder="客诉编号" id="customerId" name="customerId">
+            <input type="text" class="my-input trim_input"  style="width:120px;margin-bottom: 10px;" value="" placeholder="姓名" id="customerName" name="customerName">
+            <input type="text" class="my-input trim_input"  style="width:120px;margin-bottom: 10px;" value="" placeholder="手机号码" id="customerTel" name="customerTel">
+            <select class="my-select" name="customerIsSolve" id="customerIsSolve" style="height: 36px;width: 120px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
+                <option value="">处理结果</option>
+                <option value="1" >已解决</option>
+                <option value="2" >未解决</option>
+                <option value="3" >换新</option>
+                <option value="4" >维修</option>
+                <option value="5" >补发</option>
+                <option value="6" >退货</option>
+                <option value="7" >无理由退货</option>
+            </select>
+            <button type="button" class="btn" style="background: #32a3d8;color: #fff;height: 35px;margin-bottom: 10px;"name="" onclick="searchOrder()"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
+        </form>
+    </div>
+
+    <div class="order-list" style="    margin-top: -10px;">
+        <div class="mt-20" style="height: 330px;overflow: auto;overflow-x: hidden;margin-bottom: 12px;border: 1px solid #ddd;">
+            <table class="table table-border table-bordered table-bg table-hover table-sort">
+                <thead>
+                <tr class="text-c">
+                    <th width="10">
+                        <#--<input type="checkbox" class="selectAll" id="selectAll" value="selectAll" >-->
+                    </th>
+                    <th width="50">客诉编号</th>
+                    <th width="50">姓名</th>
+                    <th width="50">电话</th>
+                    <th width="50">问题简述</th>
+                    <th width="50">处理结果</th>
+                    <th width="80">客诉时间</th>
+                </tr>
+                </thead>
+                <tbody id="productHtml">
+                </tbody>
+            </table>
+        </div>
+
+        <div class="formControls col-1 col-sm-1" style="margin-left: 45%;">
+            <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="selectProduct()">确认选择</button>
+        </div>
+    </div>
+
+</div>
+
+<tfoot>
+</tfoot>
+
+<script>
+    $(function () {
+        /*搜索*/
+        $(document).on('click', '#searchOrder', function() {
+            searchOrder();
+        });
+
+        /*初始化  搜索订单  */
+       searchOrder();
+
+        /*回车搜索*/
+        $('.input-text').keydown(function(event){
+            if(event.keyCode == 13){ //绑定回车
+                $('#searchOrder').click();
+            }
+        });
+    })
+
+    /**
+     * 搜索订单
+     */
+    function searchOrder(){
+        var index = layer.load(1, {
+            shade: [0.5,'#fff'] //0.1透明度的白色背景
+        });
+
+        var data = $("#customer_condition").serialize();
+
+        $.ajax({
+            type: "POST",
+            data: data,
+            url: "${path}/admin/customer/add_customer_list",
+            success: function(data){
+                var html = "";
+                if (data.returnCode == 200 && data.returnMsg.customerList.length > 0 ) {
+                    for(var i=0;i<data.returnMsg.customerList.length;i++){
+                        var customer = data.returnMsg.customerList[i];
+
+                        var isSolve = "";
+                        switch (customer.customerIsSolve){
+                            //1:已解决  2:未解决 3:换新  4:维修 5:补发 6:退货 7:无理由退货
+                            case 1:
+                                isSolve = "已解决";
+                                break;
+                            case 2:
+                                isSolve = "未解决";
+                                break;
+                            case 3:
+                                isSolve = "换新";
+                                break;
+                            case 4:
+                                isSolve = "维修";
+                                break;
+                            case 5:
+                                isSolve = "补发";
+                                break;
+                            case 6:
+                                isSolve = "退货";
+                                break;
+                            case 7:
+                                isSolve = "无理由退货";
+                                break;
+                            default:
+                                break;
+                        }
+                        html += '<tr class="text-c">' +
+                                ' <td><input type="radio" class="customer_id" id="" value="'+ customer.customerId +'" ></td>' +
+                                ' <td>'+ cufte(customer.customerId) +'</td>' +
+                                ' <td>'+ cufte(customer.customerName) +'</td>' +
+                                ' <td>'+ cufte(customer.customerTel) +'</td>' +
+                                ' <td style="text-align: left">'+ cufte(customer.describeTitle) +'</td>' +
+                                ' <td>'+ isSolve +'</td>' +
+                                ' <td>'+ formatDate(customer.customerCreateTime,"yyyy-MM-dd HH:mm:ss") +'</td>' +
+                                ' </tr>';
+                    }
+                }else{
+                    html = '<tr class="text-c"><td colspan="12">没有搜索到商品,请重试!</td></tr>';
+                }
+                $("#productHtml").html(html);
+                layer.close(index);
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.close(index);
+            }
+        });
+    }
+
+    /**
+     * 选择订单,返回订单内容到父级
+     */
+    function selectProduct() {
+        var customerId = $(".customer_id:checked").val();
+        parent.setSelectCustomer(customerId);
+        parent.layer.close(parent.layer.getFrameIndex(window.name));
+    }
+</script>
+
+</body>
+</html>

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

@@ -14,7 +14,7 @@
     <style>
         .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
         .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
-        .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
+        .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;color: #0000FF;}
         .tit-2:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
         #province select{margin-right:10px; width:100px;height: 31px;-webkit-appearance:none !important;appearance:none;background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;padding-left:3px;padding-right: 25px;}
 
@@ -86,7 +86,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-4 col-sm-4"> <span class="select-box" >
                     <select name="adminId" id="adminId" class="select">
                     </select>
@@ -150,9 +150,8 @@
                     </div>
                 </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>
                 <input type="hidden" id="typeCompany" name="typeCompany" value="">
                 <div class="formControls col-10 col-sm-10 skin-minimal produce_type_html" id="produceTypeHtml">
                     <#--<div class="radio-box">
@@ -165,6 +164,13 @@
                     </div>-->
                 </div>
             </div>
+            <div class="row cl">
+                <label class="form-label col-3">
+                    <div class="tit-2">用户信息</div>
+                </label>
+                <div class="formControls col-9">
+                </div>
+            </div>
             <div class="row cl" id="salesChannelsSelect">
                 <input type="hidden" id="companyId" name="companyId" value="" >
                 <input type="hidden" id="storeId" name="storeId" value="" >
@@ -183,7 +189,7 @@
                 </div>
             </div>
             <div class="row cl">
-                <label class="form-label col-1 col-sm-1">户信息:</label>
+                <label class="form-label col-1 col-sm-1">户信息:</label>
                 <div class="formControls col-2 col-sm-2 skin-minimal">
                     <input type="text" class="input-text trim_input" placeholder="微信昵称" id="customerWechatName" name="customerWechatName" value="">
                 </div>
@@ -197,7 +203,7 @@
             <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" style="display:none;" id="onCustomerTable">
+                <div class="formControls col-9 col-sm-9 text-c" style="display:none;margin-left: 50px;" id="onCustomerTable">
                     <table class="table table-border table-bg table-bordered">
                         <thead>
                         <tr class="text-c">
@@ -218,6 +224,13 @@
                     </table>
                 </div>
             </div>
+            <div class="row cl">
+                <label class="form-label col-3">
+                    <div class="tit-2">客诉问题</div>
+                </label>
+                <div class="formControls col-9">
+                </div>
+            </div>
             <div class="row cl" id="twiceSellEnd">
                 <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">
@@ -294,7 +307,6 @@
                 <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:250px;"></script>
-                    </script>
                     <input type="hidden" name="describeContent" id="describeContent" value="">
                 </div>
             </div>
@@ -305,7 +317,6 @@
                 <div class="formControls col-9 col-sm-9">
                     <span>问题描述详情,内部使用,不会对外公布。</span>
                     <script id="describeHandleDescText" type="text/plain" style="width:100%;height:250px;"></script>
-                    </script>
                     <input type="hidden" id="describeHandleDesc" name="describeHandleDesc">
                 </div>
             </div>
@@ -327,7 +338,7 @@
             </div>
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1">
-                    <div class="tit">处理结果</div>
+                    <div class="tit-2">处理结果</div>
                 </label>
                 <div class="formControls col-10 col-sm-10">
                 </div>
@@ -490,48 +501,6 @@
 
                 </div>
             </div>
-
-            <div class="row cl" id="TDScollect" style="display: none;">
-                <label class="form-label col-1 col-sm-1">TDS收集:</label>
-                <div class="formControls col-2 col-sm-2" style="position: relative;">
-                    <#--<input type="hidden" name="arrcity_3word" id="arrcity_3word" value="" />
-                    <input style="width: 190px;" placeholder="" class="input-text my-search-input" placeholder="请输入城市名称搜索" type="text" name="arrcity" id="arrcity" />
-                    <div id="suggest" class="ac_results"></div>-->
-                    <span class="select-box">
-                        <select name="initProvinceCode" class="select" id="initProvince">
-                            <option value="">请选择省份</option>
-                        </select>
-				    </span>
-                </div>
-                <div class="formControls col-2 col-sm-2">
-                    <span class="select-box">
-                        <select name="initCityCode" class="select" id="initCity">
-                            <option value="">请选择城市</option>
-                        </select>
-                    </span>
-                </div>
-                <div class="formControls col-2 col-sm-2" style="position: relative;">
-                    <span class="select-box">
-                        <select name="initDistrictCode" class="select" id="initCountry">
-                            <option value="">请选择区/县</option>
-                        </select>
-				    </span>
-                 </div>
-                <input type="hidden" name="customerArea" id="customerArea">
-                <div class="formControls col-1 col-sm-1">
-                    <input type="text" class="input-text" value="" placeholder="进水TDS数值,最大999" id="customerInTDS" name="customerInTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
-                </div>
-                <div class="formControls col-1 col-sm-1">
-                    <input type="text" class="input-text" value="" placeholder="出水TDS数值,最大999" id="customerOutTDS" name="customerOutTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
-                </div>
-            </div>
-            <div class="row cl" id="TDScollectShow" style="display: none;">
-                <label class="form-label col-1 col-sm-1"></label>
-                <div class="formControls col-6 col-sm-6">
-                    <span id="DTS-address"></span>
-                    &nbsp;&nbsp;&nbsp;&nbsp;<span id="DTS-in"></span>&nbsp;&nbsp;  <span id="DTS-out"></span>
-                </div>
-            </div>
             <div class="row cl" id="customerCostsDiv" style="display: none;">
                   <label class="form-label col-1 col-sm-1">工厂报价:</label>
                   <div class="col-2 col-sm-2">
@@ -542,8 +511,15 @@
                     <input type="text" class="input-text trim_input" placeholder="客户报价" id="relationCustomerCosts" name="relationCustomerCosts" value="">
                   </div>
             </div>
+            <div class="row cl"  id="sendInformationTitle">
+                 <label class="form-label col-1 col-sm-1">
+                     <div class="tit-2">寄回信息</div>
+                 </label>
+                     <div class="formControls col-10 col-sm-10">
+                      </div>
+            </div>
             <div class="row cl" id="sendAddressInfo">
-                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>寄回信息:</label>
+                <label class="form-label col-1 col-sm-1"></label>
                 <div class="formControls col-9 col-sm-9" style="height: 240px" id="sendAddressSmsHtml">
                    <#-- <script id="sendAddressSms" type="text/plain" style="width:983px;height:200px;"></script>
                     </script>-->
@@ -562,14 +538,71 @@
                     <div id="m-msg" style="color: #e00"></div>
                 </div>
             </div>
+
+            <div class="row cl">
+                 <label class="form-label col-1 col-sm-1">
+                 <div class="tit-2">TDS收集</div>
+                 </label>
+            <div class="formControls col-10 col-sm-10">
+            </div>
+            </div>
+             <div class="row cl" id="TDScollect" style="display: none;">
+             <label class="form-label col-1 col-sm-1"></label>
+                <div class="formControls col-2 col-sm-2" style="position: relative;">
+                  <span class="select-box">
+                  <select name="initProvinceCode" class="select" id="initProvince">
+                      <option value="">请选择省份</option>
+                  </select>
+                   </span>
+                </div>
+                <div class="formControls col-2 col-sm-2">
+                <span class="select-box">
+                 <select name="initCityCode" class="select" id="initCity">
+                   <option value="">请选择城市</option>
+                 </select>
+                 </span>
+             </div>
+                <div class="formControls col-2 col-sm-2" style="position: relative;">
+                  <span class="select-box">
+                   <select name="initDistrictCode" class="select" id="initCountry">
+                       <option value="">请选择区/县</option>
+                   </select>
+                  </span>
+                </div>
+                   <input type="hidden" name="customerArea" id="customerArea">
+           </div>
+          <div class="row cl" >
+             <label class="form-label col-1 col-sm-1"></label>
+             <div class="formControls col-2 col-sm-2">
+                 <input type="text" class="input-text" style="width: 156px;" value="" placeholder="进水TDS数值,最大999" id="customerInTDS" name="customerInTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
+                 </div>
+                  <div class="formControls col-1 col-sm-1">
+                    <input type="text" class="input-text" style="width: 156px;" value="" placeholder="出水TDS数值,最大999" id="customerOutTDS" name="customerOutTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
+                 </div>
+
+           </div>
+             <div class="row cl" id="TDScollectShow" style="display: none;">
+                  <!--<label class="form-label col-1 col-sm-1"></label>
+                  <div class="formControls col-6 col-sm-6">
+                    <span id="DTS-address"></span>
+                      &nbsp;&nbsp;&nbsp;&nbsp;<span id="DTS-in"></span>&nbsp;&nbsp;  <span id="DTS-out"></span>
+                  </div>-->
+              </div>
+            <div class="row cl">
+                <label class="form-label col-1 col-sm-1">
+                    <div class="tit-2">备注信息</div>
+                 </label>
+                 <div class="formControls col-10 col-sm-10">
+                 </div>
+            </div>
              <div class="row cl" id="customerDescDiv">
-                 <label class="form-label col-1 col-sm-1">备注信息:</label>
+                 <label class="form-label col-1 col-sm-1"></label>
                  <div class="col-9 col-sm-9">
                      <textarea type="text" placeholder="" id="customerDesc" name="customerDesc" style="width: 100%;height: 80px;"></textarea>
                  </div>
               </div>
             <div class="row cl" id="updateProduct" style="display: none;">
-                <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-9 col-sm-9" >
 
                     <table class="table table-border table-bg table-bordered">
@@ -643,82 +676,82 @@
             </div>
 
             <div class="row cl" style="display: none;">
-                <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" id="customer-visit-1" name="customerIsVisit" value="2" >
-                        <label for="customer-visit-1">需要回访</label>
-                    </div>
-                    <div class="radio-box">
-                        <input type="radio" id="customer-visit-2" name="customerIsVisit"  value="1" checked>
-                        <label for="customer-visit-2">不需要回访</label>
-                    </div>
-                </div>
-            </div>
-
-            <div id="needToVisit" style="display: none;">
-                <div class="row cl">
-                    <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>被回访人:</label>
-                    <div class="formControls col-2 col-sm-2">
-                        <input type="text" class="input-text trim_input" value="" placeholder="填写回访人姓名" id="" name="visitName"  datatype="*1-16" errormsg="回访人姓名格式不正确!" >
-                    </div>
-                    <div class="formControls col-2 col-sm-2">
-                        <input type="text" class="input-text associated-phone" value="" placeholder="填写回访人手机号" id="" name="visitTel"  ignore="ignore" errormsg="回访人手机号码格式不正确!">
-                    </div>
-                </div>
-                <div class="row cl">
-                    <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访日期:</label>
-                    <div class="formControls col-2 col-sm-2">
-                        <input type="text" placeholder="请选择回访日期" id="datemin"  name="visitDate" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',minDate:'%y-%M-%d'})"  readonly="readonly">
-                    </div>
-                </div>
-                <div class="row cl">
-                    <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" id="visit-time-1" name="visitTimeSelect" value="1" checked>
-                            <label for="visit-time-1">09:00-12:00</label>
-                        </div>
-                        <div class="radio-box">
-                            <input type="radio" id="visit-time-2" name="visitTimeSelect" value="2">
-                            <label for="visit-time-2">12:00-14:00</label>
-                        </div>
-                        <div class="radio-box">
-                            <input type="radio" id="visit-time-3" name="visitTimeSelect" value="3">
-                            <label for="visit-time-3">14:00-18:00</label>
-                        </div>
-                    </div>
-                </div>
-                <div class="row cl">
-                    <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>提醒人:</label>
-                    <div class="formControls col-4 col-sm-4"> <span class="select-box">
-                    <select class="select" id="visitAdminId" name="visitAdminId">
-
-                    </select>
-                    </span>
-                    </div>
-                </div>
-                <div class="cl"  style="display: table;width: 100%;">
-                    <label class="form-label col-1 col-sm-1"></label>
-                    <div class="formControls col-4 col-sm-4">
-                        <span class="c-red" id="visitAdminIdMsg">您将为自己指定一个回访任务</span>
-                    </div>
-                </div>
-            </div>
-            <div class="row cl">
-                <div class="col-2 col-sm-2 col-offset-3">
-                    <button class="btn btn-block btn-primary size-XL" type="submit">确认录入</button>
-                </div>
-            </div>
-        </form>
-    </div>
-</article>
+                            <#-- <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" id="customer-visit-1" name="customerIsVisit" value="2" >
+                                     <label for="customer-visit-1">需要回访</label>
+                                 </div>
+                                 <div class="radio-box">
+                                     <input type="radio" id="customer-visit-2" name="customerIsVisit"  value="1" checked>
+                                     <label for="customer-visit-2">不需要回访</label>
+                                 </div>
+                             </div>-->
+                         </div>
+
+                         <div id="needToVisit" style="display: none;">
+                             <div class="row cl">
+                                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>被回访人:</label>
+                                 <div class="formControls col-2 col-sm-2">
+                                     <input type="text" class="input-text trim_input" value="" placeholder="填写回访人姓名" id="" name="visitName"  datatype="*1-16" errormsg="回访人姓名格式不正确!" >
+                                 </div>
+                                 <div class="formControls col-2 col-sm-2">
+                                     <input type="text" class="input-text associated-phone" value="" placeholder="填写回访人手机号" id="" name="visitTel"  ignore="ignore" errormsg="回访人手机号码格式不正确!">
+                                 </div>
+                             </div>
+                             <div class="row cl">
+                                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访日期:</label>
+                                 <div class="formControls col-2 col-sm-2">
+                                     <input type="text" placeholder="请选择回访日期" id="datemin"  name="visitDate" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',minDate:'%y-%M-%d'})"  readonly="readonly">
+                                 </div>
+                             </div>
+                             <div class="row cl">
+                                 <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" id="visit-time-1" name="visitTimeSelect" value="1" checked>
+                                         <label for="visit-time-1">09:00-12:00</label>
+                                     </div>
+                                     <div class="radio-box">
+                                         <input type="radio" id="visit-time-2" name="visitTimeSelect" value="2">
+                                         <label for="visit-time-2">12:00-14:00</label>
+                                     </div>
+                                     <div class="radio-box">
+                                         <input type="radio" id="visit-time-3" name="visitTimeSelect" value="3">
+                                         <label for="visit-time-3">14:00-18:00</label>
+                                     </div>
+                                 </div>
+                             </div>
+                             <div class="row cl">
+                                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>提醒人:</label>
+                                 <div class="formControls col-4 col-sm-4"> <span class="select-box">
+                                 <select class="select" id="visitAdminId" name="visitAdminId">
+
+                                 </select>
+                                 </span>
+                                 </div>
+                             </div>
+                             <div class="cl"  style="display: table;width: 100%;">
+                                 <label class="form-label col-1 col-sm-1"></label>
+                                 <div class="formControls col-4 col-sm-4">
+                                     <span class="c-red" id="visitAdminIdMsg">您将为自己指定一个回访任务</span>
+                                 </div>
+                             </div>
+                         </div>
+                         <div class="row cl">
+                             <div class="col-2 col-sm-2 col-offset-3">
+                                 <button class="btn btn-block btn-primary size-XL" type="submit">确认录入</button>
+                             </div>
+                         </div>
+                     </form>
+                 </div>
+             </article>
 
-<script type="text/javascript">
-    var url_path = "${path}";
-</script>
+             <script type="text/javascript">
+                 var url_path = "${path}";
+             </script>
 
-<#--时间控件-->
+             <#--时间控件-->
 <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
 
 <script type="text/javascript" src="${path}/common/lib/webuploader/0.1.5/webuploader.min.js"></script>

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

@@ -65,17 +65,17 @@
             <thead>
             <tr>
                 <th width="10">跟进客服:</th>
-                <th width="10" style="font-weight: normal;"><span id="adminName"></span></th>
-                <th width="10"></th>
+                <td width="10" style="font-weight: normal;"><span id="adminName"></span></td>
+                <td width="10"></td>
                 <th width="10">来源入口:</th>
-                <th width="10" style="font-weight: normal;"><span id="customerSourceType"></span></th>
+                <td width="10" style="font-weight: normal;"><span id="customerSourceType"></span></td>
             </tr>
             <tr>
                 <th width="10">咨询类型:</th>
-                <th width="10" style="font-weight: normal;"><span id="customerCounselType"></span></th>
-                <th width="10"></th>
+                <td width="10" style="font-weight: normal;"><span id="customerCounselType"></span></td>
+                <td width="10"></td>
                 <th width="10">产品类别:</th>
-                <th width="10" style="font-weight: normal;"><span id="typeName"></span></th>
+                <td width="10" style="font-weight: normal;"><span id="typeName"></span></td>
             </tr>
             </thead>
         </table>
@@ -91,24 +91,24 @@
             <thead>
             <tr>
                 <th width="10">销售公司:</th>
-                <th width="10" style="font-weight: normal;"><span id="companyName"></span></th>
-                <th width="10"></th>
+                <td width="10" style="font-weight: normal;"><span id="companyName"></span></td>
+                <td width="10"></td>
                 <th width="10">店铺:</th>
-                <th width="10" style="font-weight: normal;"><span id="storeName"></span></th>
+                <td width="10" style="font-weight: normal;"><span id="storeName"></span></td>
             </tr>
             <tr>
                 <th width="10">微信昵称:</th>
-                <th width="10" style="font-weight: normal;"><span id="customerWechatName"></span></th>
-                <th width="10"></th>
+                <td width="10" style="font-weight: normal;"><span id="customerWechatName"></span></td>
+                <td width="10"></td>
                 <th width="10">用户姓名:</th>
-                <th width="10" style="font-weight: normal;"><span id="customerName"></span></th>
+                <td width="10" style="font-weight: normal;"><span id="customerName"></span></td>
             </tr>
             <tr>
                 <th width="10">用户电话:</th>
-                <th width="10" style="font-weight: normal;"><span id="customerTel"></span></th>
-                <th width="10"></th>
+                <td width="10" style="font-weight: normal;"><span id="customerTel"></span></td>
+                <td width="10"></td>
                 <th width="10"></th>
-                <th width="10" style="font-weight: normal;"><span></span></th>
+                <td width="10" style="font-weight: normal;"><span></span></td>
             </tr>
             </thead>
         </table>
@@ -123,17 +123,17 @@
             <thead>
             <tr>
                 <th width="10">客诉问题:</th>
-                <th width="10" style="font-weight: normal;"><span id="describeTitle"></span></th>
-                <th width="10"></th>
+                <td width="10" style="font-weight: normal;"><span id="describeTitle"></span></td>
+                <td width="10"></td>
                 <th width="10">问题描述:</th>
-                <th width="10" style="font-weight: normal;"><span id="questionProfile"></span></th>
+                <td width="10" style="font-weight: normal;"><span id="questionProfile"></span></td>
             </tr>
             <tr>
                 <th width="10">问题回复:</th>
-                <th width="10" style="font-weight: normal;"><span id="describeContent"></span></th>
-                <th width="10"></th>
+                <td width="10" style="font-weight: normal;"><span id="describeContent"></span></td>
+                <td width="10"></td>
                 <th width="10">备注信息:</th>
-                <th width="10" style="font-weight: normal;"><span id="customerDesc"></span></th>
+                <td width="10" style="font-weight: normal;"><span id="customerDesc"></span></td>
             </tr>
             </thead>
         </table>
@@ -202,24 +202,24 @@
             <thead>
             <tr>
                 <th width="10">寄回产品:</th>
-                <th width="10" style="font-weight: normal;"><span id="closeprodcue"></span></th>
-                <th width="10"></th>
+                <td width="10" style="font-weight: normal;"><span id="closeprodcue"></span></td>
+                <td width="10"></td>
                 <th width="10">寄送产品:</th>
-                <th width="10" style="font-weight: normal;"><span id="sendprodcue"></span></th>
+                <td width="10" style="font-weight: normal;"><span id="sendprodcue"></span></td>
             </tr>
             <tr>
                 <th width="10">TDS收集:</th>
-                <th width="10" style="font-weight: normal;"><span id="customerTDS"></span></th>
-                <th width="10"></th>
+                <td width="10" style="font-weight: normal;"><span id="customerTDS"></span></td>
+                <td width="10"></td>
                 <th width="10">收货地址:</th>
-                <th width="10" style="font-weight: normal;"><div id="sendMergeAddressDiv"><span id="relationSendMergeAddress"></span></div></th>
+                <td width="10" style="font-weight: normal;"><div id="sendMergeAddressDiv"><span id="relationSendMergeAddress"></span></div></td>
             </tr>
             <tr>
                 <th width="10">客服备注:</th>
-                <th width="10" style="font-weight: normal;"><span id="describeHandleDesc"></span></th>
-                <th width="10"></th>
+                <td width="10" style="font-weight: normal;"><span id="describeHandleDesc"></span></td>
+                <td width="10"></td>
                 <th width="10"></th>
-                <th width="10" style="font-weight: normal;"></th>
+                <td width="10" style="font-weight: normal;"></td>
             </tr>
             </thead>
         </table>

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

@@ -14,7 +14,7 @@
         *{padding: 0;margin: 0;}
         .my-input{border: 1px solid rgba(0,0,0,.1);padding: 1px 5px;height: 32px;margin-right: 10px;}
         /*.my-input::-webkit-input-placeholder,.my-select{color: #dcdcdc;}*/
-        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/select-1.png) right center no-repeat;background-size:auto 100%;}
+        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;height: 34px; -webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/select-1.png) right center no-repeat;background-size:auto 100%;}
         .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
         .table-bg thead th{background-color: #e2f6ff;}
         .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
@@ -43,12 +43,12 @@
             <input type="text" class="my-input trim_input"  style="width:120px;margin-right: 0px;margin-bottom: 10px;" value="${customerInfo.sendLogisticsNo!}" placeholder="物流编号" id="sendLogisticsNo" name="sendLogisticsNo">
             <input type="text" class="my-input trim_input"  style="width:120px;margin-right: 0px;margin-bottom: 10px;" value="${customerInfo.customerName!}" placeholder="请输入姓名" id="customerName" name="customerName">
             <input type="text" class="my-input trim_input"  style="width:120px;margin-right: 0px;margin-bottom: 10px;" value="${customerInfo.customerTel!}" placeholder="请输入电话号码" id="customerTel" name="customerTel">
-            <input type="text" style="width:120px;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:120px;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"/><br>
+            <input type="text" class="my-input trim_input" style="width:120px;margin-right: 0px; margin-bottom: 10px;" name="startTime" id="startTime"  placeholder="开始时间" onClick="WdatePicker({ dateFmt:'yyyy-MM-dd',skin:'whyGreen' })" value="${(customerInfo.startTime?string("yyyy-MM-dd"))!''}" readonly="readonly"/>-
+            <input type="text" class="my-input trim_input" style="width:120px;margin-right: 0px; margin-bottom: 10px;" name="endTime" id="endTime"  placeholder="结束时间" onClick="WdatePicker({ dateFmt:'yyyy-MM-dd',skin:'whyGreen' })" value="${(customerInfo.endTime?string("yyyy-MM-dd"))!''}" readonly="readonly"/><br>
 
             <#--<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: 120px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
+            <select class="my-select" name="customerIsSolve" id="customerIsSolve" style="margin-left: 50px;height: 36px;width: 132px;padding: 12px 10px 6px 15px;">
                 <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>
@@ -59,14 +59,14 @@
                 <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: 120px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
+            <select class="my-select" name="customerSourceType" id="customerSourceType" style="height: 36px;width: 132px;margin: 0px;padding: 12px 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;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
+            <select class="my-select" name="typeId" id="typeId" style="height: 36px;width: 132px;padding: 12px 10px 6px 15px;">
                 <option value ="">产品类型</option>
                 <#if typeList?? &&  (typeList?size > 0) >
                     <#list typeList as type>
@@ -82,7 +82,7 @@
                 <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;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
+            <select class="my-select" name="adminId" style="height: 36px;width: 132px;padding: 12px 10px 6px 15px;">
                 <option value ="">全部跟进客服</option>
                 <#if adminList?? &&  (adminList?size > 0) >
                     <#list adminList as admin>
@@ -100,7 +100,7 @@
                 </#if>
             </select>-->
 
-            <select class="my-select" name="complaintId" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
+            <select class="my-select" name="complaintId" style="height: 36px;width: 132px;padding: 12px 10px 6px 15px;">
                 <option value ="">全部问题大类</option>
                 <#if complaintTypeList?? &&  (complaintTypeList?size > 0) >
                     <#list complaintTypeList as complaint>
@@ -109,7 +109,7 @@
                 </#if>
             </select>
 
-            <select class="my-select" name="smallClassId" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
+            <select class="my-select" name="smallClassId" style="height: 36px;width: 132px;padding: 12px 10px 6px 15px;">
                 <option value ="">全部问题小类</option>
                 <#if complaintSmallClassInfoList?? &&  (complaintSmallClassInfoList?size > 0) >
                     <#list complaintSmallClassInfoList as smallClass>
@@ -117,7 +117,7 @@
                     </#list>
                 </#if>
             </select>
-            <button type="submit" class="btn" style="background: #32a3d8;color: #fff;height: 35px; id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
+            <button type="submit" class="btn" style="background: #32a3d8;color: #fff;height: 35px;margin-top: -8px;"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
         </form>
     </div>
 
@@ -380,11 +380,11 @@
                                 ${(customer.customerCreateTime?string("HH:mm:ss"))!''}
                             </td>
                             <td>
-                                <#if customer.customerIsSolve == 3 || customer.customerIsSolve == 4 || customer.customerIsSolve == 6>
+                                <#--<#if customer.customerIsSolve == 3 || customer.customerIsSolve == 4 || customer.customerIsSolve == 6>
                                     <a style="text-decoration:none" href="javascript:void(0);" title="申请邮费" onclick="ApplyForPostage(${customer.customerId!''})">
                                         <font color=#06c>申请邮费</font>
                                     </a><br/>
-                                </#if>
+                                </#if>-->
 
                                 <#--<#if customer.customerIsSolve == 2>
                                     <a style="text-decoration:none" href="javascript:void(0);" title="已解决" onclick="updateCustomerIsSolve(${customer.customerId!''})">
@@ -772,11 +772,11 @@
     }
 
     /* 所有trim_input 样式,input框都需要去除前后空格*/
-    $(".trim_input").change(function(){
-        /*var value = $.trim($(this).val());*/
-        var val = $(this).val().replace(/\s/g, "");
-        $(this).val(val);
-    })
+//    $(".trim_input").change(function(){
+//        /*var value = $.trim($(this).val());*/
+//        var val = $(this).val().replace(/\s/g, "");
+//        $(this).val(val);
+//    })
 
 </script>
 </body>

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

@@ -176,6 +176,7 @@
                <#-- <input type="hidden" name="salesCompanyId" id="salesCompanyId" value="0">-->
                 <input type="hidden" name="salesPayType" id="salesPayType" value="1">
                 <input type="hidden" name="salesSendType" id="salesSendType" value="2">
+                <input type="hidden" name="salesAddType" id="salesAddType" value="3">
 
                 <div class="row cl" id="recipientInfo" style=" margin-top: 20px;">
                     <label class="form-label col-1 col-sm-1" style="width: 110px;"><span class="c-red">*</span>销售公司:</label>

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

@@ -82,7 +82,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-4 col-sm-4"> <span class="select-box" style=" width: 625px;">
                     <select name="adminId" id="adminId" class="select">
                         <#list adminList as admin>
@@ -154,7 +154,7 @@
             </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>
                 <input type="hidden" id="typeCompany" name="typeCompany" value="">
                 <div class="formControls col-10 col-sm-10 skin-minimal" id="produceTypeHtml">
                     <#list typeList as type>
@@ -165,6 +165,15 @@
                     </#list>
                 </div>
             </div>
+
+            <div class="row cl">
+                <label class="form-label col-3">
+                    <div class="tit-2">用户信息</div>
+                </label>
+                <div class="formControls col-9">
+                </div>
+            </div>
+
             <div class="row cl" id="salesChannelsSelect" style="">
                 <input type="hidden" id="companyId" name="companyId" value="<#if customerInfo??>${customerInfo.companyId!''}</#if>">
                 <input type="hidden" id="storeId" name="storeId" value="<#if customerInfo??>${customerInfo.storeId!''}</#if>">
@@ -184,7 +193,7 @@
             </div>
 
             <div class="row cl">
-                <label class="form-label col-1 col-sm-1">户信息:</label>
+                <label class="form-label col-1 col-sm-1">户信息:</label>
                 <div class="formControls col-2 col-sm-2 skin-minimal">
                     <input type="text" class="input-text trim_input" placeholder="微信昵称" id="customerWechatName" name="customerWechatName" value="${customerInfo.customerWechatName!''}">
                 </div>
@@ -195,7 +204,13 @@
                     <input type="text" class="input-text" placeholder="用户电话" id="customerTel" name="customerTel" value="${customerInfo.customerTel!''}">
                 </div>
             </div>
-
+            <div class="row cl">
+                <label class="form-label col-3">
+                    <div class="tit-2">客诉问题</div>
+                </label>
+                <div class="formControls col-9">
+                </div>
+            </div>
             <div class="row cl" id="twiceSellEnd">
                 <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">
@@ -353,7 +368,7 @@
                     </div>
                 </div>
             </div>
-            <div class="row cl">
+            <div class="row cl" style="display: none;">
                 <label class="form-label col-1 col-sm-1"></label>
                 <div class="formControls col-10 col-sm-10">
                     <ul class="time-line-list" id="processResultStatus">
@@ -537,86 +552,54 @@
                                     <td style="text-align: center;" colspan="4">选择订单后展示</td>
                                 </tr>
                             </#if>
-
-                      <#--  <#list productList as product>
-                            <tr>
-                                <td width="80">
-                                    <input type="hidden" value="${product.productId}"><span>${product.productName}</span>
-                                </td>
-                                <td style="padding: 0px;text-align: center;">
-                                    <table style="height: 100%;">
-                                        <tbody>
-                                            <#list product.colorList as color>
-                                                <tr>
-                                                    <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">
-                                                        ${color.colorName}
-                                                    </td>
-                                                    <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
-                                                        <input type="hidden" class="input-produce-id" value="${product.productId}">
-                                                        <input type="hidden" class="input-color-id" value="${color.colorId}">
-                                                        <#assign number = ""/>
-                                                            <#if (customerCommon.sendProdcues?size>0)>
-                                                                <#list customerCommon.sendProdcues as sendProdcues>
-                                                                    <#if sendProdcues.colorId == color.colorId >
-                                                                        <#assign number = sendProdcues.sendProdcueNumber/>
-                                                                    </#if>
-                                                                </#list>
-                                                            <#else >
-                                                                <#list customerCommon.closedProdcues as closedProdcues>
-                                                                    <#if closedProdcues.colorId == color.colorId >
-                                                                        <#assign number = closedProdcues.closedProdcueNumber/>
-                                                                    </#if>
-                                                                </#list>
-                                                            </#if>
-                                                        <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="${number}" placeholder="产品数量" id="color-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
-                                                    </td>
-                                                </tr>
-                                            </#list>
-                                        </tbody>
-                                    </table>
-                                </td>
-                                <td style="padding: 0px;text-align: center;">
-                                    <table style="height: 100%;">
-                                        <tbody>
-                                            <#list product.fittingsList as fittingsInfo>
-                                                <tr>
-                                                    <td width="55" style="border-left: none;text-align: center; border-top: 1px solid #ddd;">${fittingsInfo.fittingsName}</td>
-                                                    <td width="45" style="border-top: 1px solid #ddd;padding: 0px;width: 25px;">
-                                                        <input type="hidden" class="input-produce-id" value="${fittingsInfo.productId}">
-                                                        <input type="hidden" class="input-fittings-id" value="${fittingsInfo.fittingsId}">
-                                                        <#assign number = ""/>
-
-                                                        <#if (customerCommon.sendFittings?size>0)>
-                                                            <#list customerCommon.sendFittings as sendFittings>
-                                                                <#if sendFittings.fittingsId == fittingsInfo.fittingsId >
-                                                                    <#assign number = sendFittings.sendFittingNumber/>
-                                                                </#if>
-                                                            </#list>
-                                                        <#else>
-                                                            <#list customerCommon.closedFittings as closedFittings>
-                                                                <#if closedFittings.fittingsId == fittingsInfo.fittingsId >
-                                                                    <#assign number = closedFittings.closedFittingNumber/>
-                                                                </#if>
-                                                            </#list>
-                                                        </#if>
-
-                                                        <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="${number}" placeholder="配件数量" id="fittings-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
-                                                    </td>
-                                                </tr>
-                                            </#list>
-                                        </tbody>
-                                    </table>
-                                </td>
-                            </tr>
-                        </#list>-->
-
                         </tbody>
                     </table>
                 </div>
             </div>
-
+                    <div class="row cl" id="customerCostsDiv" style="display: none;">
+                            <label class="form-label col-1 col-sm-1">工厂报价:</label>
+                    <div class="col-2 col-sm-2">
+                            <input type="text" class="input-text trim_input" placeholder="工厂报价" id="relationFactoryCosts" name="relationFactoryCosts" value="${customerCommon.relationFactoryCosts!''}">
+                            </div>
+                            <label class="form-label col-1 col-sm-1">给客户报价:</label>
+                    <div class="col-2 col-sm-2">
+                            <input type="text" class="input-text trim_input" placeholder="客户报价" id="relationCustomerCosts" name="relationCustomerCosts" value="${customerCommon.relationCustomerCosts!''}">
+                            </div>
+                            </div>
+                    <div class="row cl" id="sendInformationTitle">
+                          <label class="form-label col-1 col-sm-1">
+                          <div class="tit-2">寄回信息</div>
+                        </label>
+                       <div class="formControls col-10 col-sm-10">
+                      </div>
+                     </div>
+                        <div class="row cl" id="sendAddressInfo">
+                           <label class="form-label col-1 col-sm-1"></label>
+                        <div class="formControls col-9 col-sm-9" style="height: 250px" id="sendAddressSmsHtml">
+                            <#-- <script id="sendAddressSms" type="text/plain" style="width:983px;height:200px;"></script>
+                                </script>-->
+                         </div>
+                          </div>
+                          <div class="row cl" id="sendAddressByPhone" style="display: none;">
+                       <label class="form-label col-1 col-sm-1"></label>
+                       <div class="formControls col-2 col-sm-2">
+                      <input type="text" class="input-text associated-phone" value="" placeholder="请输入手机号" id="m-phone" name="">
+                        </div>
+                       <div class="formControls col-2 col-sm-2" style="width: 10%">
+                      <input type="button" class="btn btn-primary" value="发短信给用户" onclick="sendPhone('m','m-msg');">
+                     </div>
+                    <div class="formControls col-2 col-sm-2 msg-phone">
+                   <div id="m-msg" style="color: #e00"></div>
+                </div>
+             </div>
+             <div class="row cl">
+                 <label class="form-label col-1 col-sm-1">
+                 <div class="tit-2">TDS收集</div></label>
+                 <div class="formControls col-10 col-sm-10">
+                 </div>
+            </div>
             <div class="row cl" id="TDScollect" style="display: none;">
-                <label class="form-label col-1 col-sm-1">TDS收集:</label>
+                <label class="form-label col-1 col-sm-1"></label>
                 <div class="formControls col-2 col-sm-2" style="position: relative;">
                     <#--<input type="hidden" name="arrcity_3word" id="arrcity_3word" value="" />
                     <input style="width: 190px;" placeholder="" class="input-text my-search-input" placeholder="请输入城市名称搜索" type="text" name="arrcity" id="arrcity" value="" />
@@ -649,54 +632,35 @@
 				</span>
                 </div>-->
                 <input type="hidden" name="customerArea" id="customerArea" value="${customerInfo.customerArea!''}">
-                <div class="formControls col-1 col-sm-1">
-                    <input type="text" class="input-text" value="${customerInfo.customerInTDS!'0'}" placeholder="进水TDS数值,最大999" id="customerInTDS" name="customerInTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
+                </div>
+                <div class="row cl" >
+                 <label class="form-label col-1 col-sm-1"></label>
+                <div class="formControls col-2 col-sm-2">
+                    <input type="text" class="input-text" style="width: 156px;" value="${customerInfo.customerInTDS!'0'}" placeholder="进水TDS数值,最大999" id="customerInTDS" name="customerInTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
                 </div>
                 <div class="formControls col-1 col-sm-1">
-                    <input type="text" class="input-text" value="${customerInfo.customerOutTDS!'0'}" placeholder="出水TDS数值,最大999" id="customerOutTDS" name="customerOutTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
+                    <input type="text" class="input-text" style="width: 156px;" value="${customerInfo.customerOutTDS!'0'}" placeholder="出水TDS数值,最大999" id="customerOutTDS" name="customerOutTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
                 </div>
             </div>
             <div class="row cl" id="TDScollectShow" /*style="display: none;"*/>
-                <label class="form-label col-1 col-sm-1"></label>
+               <!-- <label class="form-label col-1 col-sm-1"></label>
                 <div class="formControls col-6 col-sm-6">
                     <span id="DTS-address"><#if customerInfo.customerArea??>地址:${customerInfo.customerArea}</#if></span>
                     &nbsp;&nbsp;&nbsp;&nbsp;<span id="DTS-in"><#if customerInfo.customerInTDS??>进水:${customerInfo.customerInTDS} PPM</#if></span>&nbsp;&nbsp;  <span id="DTS-out"><#if customerInfo.customerOutTDS??>出水:${customerInfo.customerOutTDS} PPM</#if></span>
-                </div>
-            </div>
-            <div class="row cl" id="customerCostsDiv" style="display: none;">
-                            <label class="form-label col-1 col-sm-1">工厂报价:</label>
-                    <div class="col-2 col-sm-2">
-                            <input type="text" class="input-text trim_input" placeholder="工厂报价" id="relationFactoryCosts" name="relationFactoryCosts" value="${customerCommon.relationFactoryCosts!''}">
-                            </div>
-                            <label class="form-label col-1 col-sm-1">给客户报价:</label>
-                    <div class="col-2 col-sm-2">
-                  <input type="text" class="input-text trim_input" placeholder="客户报价" id="relationCustomerCosts" name="relationCustomerCosts" value="${customerCommon.relationCustomerCosts!''}">
-               </div>
+                </div>-->
             </div>
 
-            <div class="row cl" id="sendAddressInfo">
-                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>寄回信息:</label>
-                <div class="formControls col-9 col-sm-9" style="height: 250px" id="sendAddressSmsHtml">
-                <#-- <script id="sendAddressSms" type="text/plain" style="width:983px;height:200px;"></script>
-                    </script>-->
-                </div>
-            </div>
-            <div class="row cl" id="sendAddressByPhone" style="display: none;">
-                <label class="form-label col-1 col-sm-1"></label>
-                <div class="formControls col-2 col-sm-2">
-                    <input type="text" class="input-text associated-phone" value="" placeholder="请输入手机号" id="m-phone" name="">
-                </div>
-                <div class="formControls col-2 col-sm-2" style="width: 10%">
-                    <input type="button" class="btn btn-primary" value="发短信给用户" onclick="sendPhone('m','m-msg');">
-                </div>
-                <div class="formControls col-2 col-sm-2 msg-phone">
-                    <div id="m-msg" style="color: #e00"></div>
-                </div>
-            </div>
+
+            <div class="row cl">
+                 <label class="form-label col-1 col-sm-1">
+                 <div class="tit-2">备注信息</div></label>
+                  <div class="formControls col-10 col-sm-10">
+                  </div>
+             </div>
              <div class="row cl" id="customerDescDiv">
-                 <label class="form-label col-1 col-sm-1">备注信息:</label>
+                 <label class="form-label col-1 col-sm-1"></label>
                     <div class="col-9 col-sm-9">
-                  <textarea type="text" placeholder="" id="customerDesc" name="customerDesc" style="width: 100%;height: 100px;">${customerInfo.customerDesc!''}</textarea>
+                  <textarea type="text" placeholder="" id="customerDesc" name="customerDesc" style="width: 100%;height: 80px;">${customerInfo.customerDesc!''}</textarea>
                     </div>
               </div>
             <div class="row cl" id="updateProduct" style="display: none;">
@@ -712,139 +676,13 @@
                             </tr>
                         </thead>
                         <tbody id="back-product">
-                        <#-- <#list productList as product>
-                <tr>
-                    <td width="80">
-                        <input type="hidden" value="${product.productId}"><span>${product.productName}</span>
-                    </td>
-                    <td style="padding: 0px;text-align: center;">
-                        <table style="height: 100%;">
-                            <tbody>
-
-                             <#list product.colorList as color>
-                                    <tr>
-                                    <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">
-                                            ${color.colorName}
-                                            </td>
-                                            <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
-                                            <input type="hidden" class="input-produce-id" value="${product.productId}">
-                                            <input type="hidden" class="input-color-id" value="${color.colorId}">
-                                                <#assign number = ""/>
-                                                <#list customerCommon.closedProdcues as closedProdcues>
-                                                    <#if closedProdcues.colorId == color.colorId >
-                                                        <#assign number = closedProdcues.closedProdcueNumber/>
-                                                    </#if>
-                                                </#list>
-                                            <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="${number}" placeholder="产品数量" id="color-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
-                                    </td>
-                                    </tr>
-                                </#list>
 
-                            </tbody>
-                            </table>
-                            </td>
-                                <td style="padding: 0px;text-align: center;">
-                                        <table style="height: 100%;">
-                                            <tbody>
-                                <#list product.fittingsList as fittingsInfo>
-                                                <tr>
-                                                <td width="55" style="border-left: none;text-align: center; border-top: 1px solid #ddd;">${fittingsInfo.fittingsName}</td>
-                                                        <td width="45" style="border-top: 1px solid #ddd;padding: 0px;width: 25px;">
-                                                        <input type="hidden" class="input-produce-id" value="${fittingsInfo.productId}">
-                                                        <input type="hidden" class="input-fittings-id" value="${fittingsInfo.fittingsId}">
-                                                            <#assign number2 = ""/>
-                                                            <#list customerCommon.closedFittings as closedFittings>
-                                                                <#if closedFittings.fittingsId == fittingsInfo.fittingsId >
-                                                                    <#assign number2 = closedFittings.closedFittingNumber/>
-                                                                </#if>
-                                                            </#list>
-                                                        <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="${number2}" placeholder="配件数量" id="fittings-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
-                                                </td>
-                                                </tr>
-                                                </#list>
-                                            </tbody>
-                                        </table>
-                                </td>
-                            </tr>
-                            </#list>-->
 
                         </tbody>
                     </table>
                 </div>
 
             </div>
-
-            <div class="row cl">
-                <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" id="customer-visit-1" name="customerIsVisit" value="2" <#if customerInfo.customerIsVisit == '2' >checked</#if> >
-                        <label for="customer-visit-1">需要回访</label>
-                    </div>
-                    <div class="radio-box">
-                        <input type="radio" id="customer-visit-2" name="customerIsVisit"  value="1" <#if customerInfo.customerIsVisit == '1' >checked</#if> >
-                        <label for="customer-visit-2">不需要回访</label>
-                    </div>
-                </div>
-            </div>
-            <div id="needToVisit" style="<#if customerInfo.customerIsVisit == '1' >display: none;</#if>">
-                <#if visit??>
-                    <#assign visitName = visit.visitName/>
-                    <#assign customerTel = visit.visitTel/>
-                    <#assign visitDate = visit.visitDate/>
-                    <#assign visitTimeSelect = visit.visitTimeSelect/>
-                    <#assign designatedAdminId = visit.designatedAdminId/>
-                </#if>
-                <div class="row cl">
-                    <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>被回访人:</label>
-                    <div class="formControls col-2 col-sm-2">
-                        <input type="text" class="input-text" value="${visitName!''}" placeholder="填写回访人姓名" id="" name="visitName"   errormsg="回访人姓名格式不正确!" >
-                    </div>
-                    <div class="formControls col-2 col-sm-2">
-                        <input type="text" class="input-text associated-phone" value="${customerTel!''}" placeholder="填写回访人手机号" id="" name="visitTel"  errormsg="回访人手机号码格式不正确!">
-                    </div>
-                </div>
-                <div class="row cl">
-                    <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访日期:</label>
-                    <div class="formControls col-2 col-sm-2">
-                        <input type="text" placeholder="请选择回访日期" id="datemin"  name="visitDate" value="${(visitDate?string("yyyy-MM-dd"))!''}" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',minDate:'%y-%M-%d'})"  readonly="readonly">
-                    </div>
-                </div>
-                <div class="row cl">
-                    <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" id="visit-time-1" name="visitTimeSelect" value="1" <#if visitTimeSelect?? && visitTimeSelect== 1 >checked</#if> >
-                            <label for="visit-time-1">09:00-12:00</label>
-                        </div>
-                        <div class="radio-box">
-                            <input type="radio" id="visit-time-2" name="visitTimeSelect" value="2" <#if visitTimeSelect?? && visitTimeSelect == 2 >checked</#if> >
-                            <label for="visit-time-2">12:00-14:00</label>
-                        </div>
-                        <div class="radio-box">
-                            <input type="radio" id="visit-time-3" name="visitTimeSelect" value="3" <#if visitTimeSelect?? && visitTimeSelect == 3 >checked</#if>  >
-                            <label for="visit-time-3">14:00-18:00</label>
-                        </div>
-                    </div>
-                </div>
-                <div class="row cl">
-                    <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>提醒人:</label>
-                    <div class="formControls col-4 col-sm-4"> <span class="select-box">
-                    <select class="select" id="visitAdminId" name="visitAdminId">
-                        <#list adminList as admin>
-                            <option value ="${admin.adminId!}" <#if designatedAdminId??><#if designatedAdminId == admin.adminId >selected="selected"</#if></#if>>${admin.adminName!}</option>
-                        </#list>
-                    </select>
-                    </span>
-                    </div>
-                </div>
-                <div class="cl"  style="display: table;width: 100%;">
-                    <label class="form-label col-1 col-sm-1"></label>
-                    <div class="formControls col-4 col-sm-4">
-                        <span class="c-red" id="visitAdminIdMsg">您将为自己指定一个回访任务</span>
-                    </div>
-                </div>
-            </div>
             <div class="row cl">
                 <div class="col-2 col-sm-2 col-offset-3">
                     <button class="btn btn-block btn-primary size-XL" type="submit">确认录入</button>

+ 3 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_detect.ftl

@@ -34,7 +34,7 @@
         <div class="input-box">
             <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>客诉编号:</label>
             <div class="formControls col-xs-8 col-sm-8 skin-minimal" style="margin: 10px 0px;">
-                <input class="my-input" type="text"  name="customerId" id="customerId" placeholder="请输入客诉编号,如没有请留空"/>
+                <input class="my-input" type="text" style="width: 78.5%;"  name="customerId" id="customerId" placeholder="请输入客诉编号,如没有请留空"/>
             </div>
         </div>
         <div class="input-box">
@@ -56,7 +56,7 @@
         <div class="input-box">
             <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>检测日期:</label>
             <div class="formControls col-xs-8 col-sm-8 skin-minimal" style="margin: 10px 0px;">
-                <input class="my-input" type="text"  name="itemDate" id="itemDate" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" placeholder="请选择检测日期" readonly="readonly"/>
+                <input class="my-input" type="text" style="width: 78.5%;" name="itemDate" id="itemDate" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" placeholder="请选择检测日期" readonly="readonly"/>
             </div>
         </div>
 
@@ -76,7 +76,7 @@
         <div class="input-box" >
             <label class="col-3 col-sm-3 huanhang"  style="text-align: right;margin: 10px 0px;"></label>
             <div class="formControls col-xs-8 col-sm-8 skin-minimal" style="margin: 10px 0px;">
-                <input class="my-input" list="contentlist" type="text" onchange="inputSelect()" name="content" id="content"  placeholder="输入关键字查询,如果没有请直接在问题简述填写"/>
+                <input class="my-input" list="contentlist" type="text" style="width: 78.5%;" onchange="inputSelect()" name="content" id="content"  placeholder="输入关键字查询,如果没有请直接在问题简述填写"/>
                 <datalist id="contentlist">
                     <#if (detectionBasisList?size > 0)>
                         <#list detectionBasisList as detectionBasis>

+ 42 - 45
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/customer_detail.ftl

@@ -14,64 +14,54 @@
     <!--<link href="lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css" />-->
     <title></title>
     <style>
-        .my-btn-submit{padding: 10px 20px;width: 150px; background-color: #32a3d8;color: #fff;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-btn-submit{padding: 10px 20px;width: 120px; background-color: #32a3d8;color: #fff;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
     </style>
 </head>
 <body>
 <article class="cl pd-20">
     <form action="" method="post" class="form form-horizontal" id="form-article-add">
         <div class="row cl">
-            <div class="formControls col-2 col-sm-2 text-r">
+            <div class="formControls col-2 col-sm-2 text-r" style="margin-top: 10px;">
                 <strong>客诉编号:</strong>
             </div>
             <div class="formControls col-8 col-sm-8">
-                <input type="text" style="" class="input-text" placeholder="客诉编号" id="signclosedCustomerId" name="signclosedCustomerId">
-                <button type="button" class="my-btn-submit" onclick="select();">查询</button>
-            </div>
-
-        </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>
-        <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="txtDescribeTitle">
-
+                <input type="text" style="width: 400px;" class="input-text" placeholder="客诉编号" id="signclosedCustomerId" name="signclosedCustomerId">
+                <button type="button" style="margin-top: 4px;" class="my-btn-submit" onclick="select();">查询</button>
             </div>
-        </div>
-        <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="txtDescribeContent">
 
-            </div>
         </div>
-        <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="txtCustomerDesc">
 
-            </div>
+        <div id="noCustomerDiv" style="display: none;margin-left: -110px;">
+            <h3><strong style="color: #93da67">?没有搜索到客诉哦</strong></h3>
         </div>
-
-        <div class="row cl">
+        <div id="customerDiv" style="display: none;margin-left: -110px;">
             <div class="formControls col-2 col-sm-2 text-r">
-                <strong>客诉描述:</strong>
+                <strong></strong>
             </div>
-            <div class="formControls col-8 col-sm-8" id="txtDescribeHandleDesc">
-
-            </div>
-        </div>
+            <table class="table table-border table-bg table-bordered" style="margin-top: 10px;width: 500px;">
+                <thead>
+                <tr>
+                    <th width="5" style="text-align: center">客诉标题</th>
+                    <td width="50" style="font-weight: normal;"><span id="txtDescribeTitle"></span></td>
+                </tr>
+                <tr>
+                    <th width="5" style="text-align: center">客诉回复</th>
+                    <td width="50" style="font-weight: normal;"><span id="txtDescribeContent"></span></td>
+                </tr>
+                <tr>
+                    <th width="5" style="text-align: center">客诉人姓名</th>
+                    <td width="50" style="font-weight: normal;"><span id="customerName"></span></td>
+                </tr>
+                <tr>
+                    <th width="5" style="text-align: center">客诉人手机号</th>
+                    <td width="50" style="font-weight: normal;"><span id="customerTel"></span></td>
+                </tr>
+                <tr>
+                    <th width="5" style="text-align: center">客诉时间</th>
+                    <td width="50" style="font-weight: normal;"><span id="customerCreateTime"></span></td>
+                </tr>
+                </thead>
+            </table>
         </div>
         <#--<div class="row cl">
             <div class="formControls col-2 col-sm-2">
@@ -101,12 +91,19 @@
             success: function(data){
                 if (data.returnCode == 200) {
                     var describe = data.returnMsg.describe;
-                    $('#customerCreateTime').html(formatDate(describe.customerCreateTime,"yyyy-MM-dd"));
+                    var customer = data.returnMsg.customerInfo;
+                    $('#customerCreateTime').html(formatDate(describe.customerCreateTime,"yyyy年MM月dd日"));
                     $('#txtDescribeTitle').html(describe.describeTitle);
                     $('#txtDescribeContent').html(describe.describeContent);
-                    $('#txtDescribeHandleDesc').html(describe.describeHandleDesc);
-                    $('#txtCustomerDesc').html(describe.customerDesc);
+                    $('#customerName').html(customer.customerName);
+                    $('#customerTel').html(customer.customerTel);
+                    $("#noCustomerDiv").hide();
                     $("#customerDiv").show();
+                    $("#associatedId").show();
+                }else {
+                    $("#customerDiv").hide();
+                    $("#associatedId").hide();
+                    $("#noCustomerDiv").show();
                 }
             },
             error: function(XmlHttpRequest, textStatus, errorThrown){

+ 13 - 12
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl

@@ -57,13 +57,13 @@
             <select id="productColorId" name="productColorId" class="my-select" style="width: 120px;">
 
             </select>
-            <input class="my-input" style="width: 70px;" type="text" name="customerId" value="${customerId!}" placeholder="客诉编号"/>
-            <input class="my-input" style="width: 70px;" type="text" name="questionTitle" value="${questionTitle!}" placeholder="客诉问题"/>
-            <input class="my-input" style="width: 70px;" type="text" name="detectItemPhenomenon" value="${detectItemPhenomenon!}" placeholder="工厂检测现象"/>
-            <input class="my-input" style="width: 70px;" type="text" name="detectItemFailureCause" value="${detectItemFailureCause!}" placeholder="故障原因"/>
-            <input class="my-input" style="width: 70px;" type="text" name="detectItemPoint" value="${detectItemPoint!}" placeholder="故障指向"/>
-            <input class="my-input" style="width: 70px;" type="text" name="detectItemNalysis" value="${detectItemNalysis!}" placeholder="原因分析"/>
-            <input class="my-input" style="width: 70px;" type="text" name="detectItemClassification" value="${detectItemClassification!}" placeholder="故障分类"/>
+            <input class="my-input" style="width: 70px;height: 29px;" type="text" name="customerId" value="${customerId!}" placeholder="客诉编号"/>
+            <input class="my-input" style="width: 70px;height: 29px;" type="text" name="questionTitle" value="${questionTitle!}" placeholder="客诉问题"/>
+            <input class="my-input" style="width: 70px;height: 29px;" type="text" name="detectItemPhenomenon" value="${detectItemPhenomenon!}" placeholder="工厂检测现象"/>
+            <input class="my-input" style="width: 70px;height: 29px;" type="text" name="detectItemFailureCause" value="${detectItemFailureCause!}" placeholder="故障原因"/>
+            <input class="my-input" style="width: 70px;height: 29px;" type="text" name="detectItemPoint" value="${detectItemPoint!}" placeholder="故障指向"/>
+            <input class="my-input" style="width: 70px;height: 29px;" type="text" name="detectItemNalysis" value="${detectItemNalysis!}" placeholder="原因分析"/>
+            <input class="my-input" style="width: 70px;height: 29px;" type="text" name="detectItemClassification" value="${detectItemClassification!}" placeholder="故障分类"/>
 
             <#--<select class="my-select" name="detectState" style="height: 30px;width: 150px">
                 <option value ="">选择状态</option>
@@ -109,7 +109,7 @@
                 <#list page.dataList as detect>
                 <tr>
                     <#--<td class="text-c" width="100">${detect.customerId!}</td>-->
-                    <td class="text-c" width="100">${detect.productTypeName!}</td>
+                    <td class="text-c" width="100">${detect.productName!'暂无产品'}(${detect.colorName!'暂无颜色'})</td>
                     <td class="text-c" width="100">
                         <#if detect.detectItemState == 1>
                             已检测
@@ -148,14 +148,15 @@
                            onclick="add_remark('修改备注','${path}/admin/detect/to_add_remark?detectItemId=${detect.detectItemId!''}','570','450');">
                             <i class="Hui-iconfont">&#xe6df;</i>
                         </a>-->
+                        <a style="text-decoration:none" href="javascript:;" title="修改检测信息"
+                           onclick="update_info('${path}/admin/detect/to_update_complete?detectItemId=${detect.detectItemId!''}');">
+                           <i class="Hui-iconfont">&#xe60c;</i>
+                        </a>
                         <a style="text-decoration:none" href="javascript:;" title="删除"
                            onclick="detele(${detect.detectItemId!''});">
                             <i class="Hui-iconfont">&#xe609;</i>
                         </a>
-                            <a style="text-decoration:none" href="javascript:;" title="修改检测信息"
-                               onclick="update_info('${path}/admin/detect/to_update_complete?detectItemId=${detect.detectItemId!''}');">
-                                <i class="Hui-iconfont">&#xe60c;</i>
-                            </a>
+
                         <#--<#if detect.signclosedId??>
                             <#if detect.detectState == 1>
                                 <a style="text-decoration:none" href="javascript:;" title="查看仓储进度"

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

@@ -33,12 +33,12 @@
         <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;" onclick="select();">查询</button>
+            <button 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;text-align: -moz-center;text-align: -webkit-center;">
+        <div id="customerDiv" style="display: none;">
             <#--<div class="row cl">
                 <div class="formControls col-2 col-sm-2 text-r">
                     <strong>客诉时间:</strong>
@@ -78,6 +78,7 @@
         </#if>
             <button type="button" class="my-btn-submit" onclick="update();">确认关联</button>
         </div>
+
     </form>
 </article>
 <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>

+ 3 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/customer_signclosed_list.ftl

@@ -53,7 +53,7 @@
         <table class="table table-border table-bordered table-bg table-hover table-sort">
             <thead>
             <tr class="text-c">
-                <th width="100">客诉编号</th>
+                <#--<th width="100">客诉编号</th>-->
                 <th width="160">物流</th>
                 <th width="120">寄件人姓名</th>
                 <th width="120">寄件人电话</th>
@@ -71,7 +71,7 @@
             <#if (page.dataList?size > 0)>
                 <#list page.dataList as signclosed>
                 <tr>
-                    <td class="text-c" width="100">${signclosed.signclosedCustomerId!}</td>
+                    <#--<td class="text-c" width="100">${signclosed.signclosedCustomerId!}</td>-->
 
                     <td class="text-c" width="160">
                         <#if signclosed.signclosedLogistics??>
@@ -115,7 +115,7 @@
                     ${signclosed.signclosedLogisticsNumber!}</td>
                     <td class="text-c" width="100">${signclosed.signclosedSendName!}</td>
                     <td class="text-c" width="180">${signclosed.signclosedSendTel!}</td>
-                    <td class="text-c" width="100">
+                    <td style="text-align: left;" width="100">
                         <div>
                         <#if signclosed.signclosedProductInfoList??>
                             <#if (signclosed.signclosedProductInfoList?size > 0)>

+ 5 - 5
watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/signclosed_list.ftl

@@ -72,7 +72,7 @@
                 <th width="130">退货地区</th>
                 <th width="90">售后原因</th>
                 <th width="150">客服备注</th>
-                <th width="150">返厂日期</th>
+                <th width="150">签收日期</th>
                 <th width="100">备注</th>
                 <th width="50">操作</th>
             </tr>
@@ -124,15 +124,15 @@
                     ${signclosed.signclosedLogisticsNumber!}</td>
                     <td class="text-c" width="100">${signclosed.signclosedSendName!}</td>
                     <td class="text-c" width="180">${signclosed.signclosedSendTel!}</td>
-                    <td class="text-c" width="100">
+                    <td style="text-align: left;" width="100">
                         <div>
                         <#if signclosed.signclosedProductInfoList??>
                             <#if (signclosed.signclosedProductInfoList?size > 0)>
                                 <#list signclosed.signclosedProductInfoList as info>
                                     <#if info.signclosedProductType == 1 >
-                                        <span class="label label-success radius txt" title="${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台">${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台</span><br>
+                                        <span class="label label-success radius" title="${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台">${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台</span><br>
                                     <#else >
-                                        <span class="label label-success radius txt" title="${info.productName!''} x ${info.productNum!''}件">${info.productName!''} x ${info.productNum!''}件>${info.productName!''} x ${info.productNum!''}件</span><br>
+                                        <span class="label label-success radius" title="${info.productName!''} x ${info.productNum!''}件">${info.productName!''} x ${info.productNum!''}件>${info.productName!''} x ${info.productNum!''}件</span><br>
                                     </#if>
                                 </#list>
                             <#else >
@@ -151,7 +151,7 @@
                         </#if>
                     </#if></td>
                     <td class="text-c" width="100">${signclosed.signclosedAddrProvinces!}-${signclosed.signclosedAddrCity!}-${signclosed.signclosedAddrArea!}</td>
-                    <td class="text-c" width="100"><span class="label txt2" title="${signclosed.customerIdDescribe!}" >${signclosed.customerIdDescribe!}</span><br><#if signclosed.customerIdDescribe??><#if signclosed.customerIdDescribe != ""><a href="#" onclick="getDescribeInfo(${signclosed.signclosedCustomerId!});"style="color : #4149FF;">查看详情</a></#if></#if></td>
+                    <td class="text-c" width="100">${signclosed.customerIdDescribe!}</td>
                     <td class="text-c" width="100">${signclosed.signclosedCustomerDesc!}</td>
                     <td class="text-c" width="100">${(signclosed.signclosedDate?string("yyyy-MM-dd"))!''}</td>
 

+ 28 - 6
watero-rst-web/src/main/webapp/WEB-INF/views/order/bacth/order_batch_list.ftl

@@ -52,8 +52,11 @@
         <thead>
         <tr class="text-c">
             <th width="100">批次编号</th>
-            <th width="50">订单数量</th>
             <th width="80">店铺</th>
+            <th width="50">订单数量</th>
+            <th width="50">待审核数量</th>
+            <th width="50">代发货数量</th>
+            <th width="50">已发货数量</th>
             <#--<th width="100">Excel下载</th>-->
             <#--<th width="80">交易号下载</th>-->
             <th width="80">创建时间</th>
@@ -65,10 +68,12 @@
                     <#list page.dataList as batch>
                         <tr class="text-c">
                             <td>${batch.batchId!''}</td>
-                            <td><a href="javascript:void(0)" style="color: #00E;" title="点击转到订单页面,查询该批次的所有订单" onclick="to_order_list('${batch.batchId!''}')">${batch.batchOrderNum!'0'}</a></td>
                             <td>${batch.batchChannel!''}</td>
-                            <#--<td>${batch.batchExcelPath!''}</td>-->
-                            <#--<td>${batch.batchTxtPath!''}</td>-->
+                            <td><a href="javascript:void(0)" style="color: #00E;" title="点击转到订单页面,查询该批次的所有订单" onclick="to_order_list('${batch.batchId!''}',1)">${batch.batchOrderNum!'0'}</a></td>
+                            <td><a href="javascript:void(0)" style="color: #00E;" title="点击转到订单页面,查询该批次的所有订单" onclick="to_order_list('${batch.batchId!''}',2)">${batch.pendingReviewNum!'0'}</a></td>
+                            <td><a href="javascript:void(0)" style="color: #00E;" title="点击转到订单页面,查询该批次的所有订单" onclick="to_order_list('${batch.batchId!''}',3)">${batch.pendingDeliveredNum!'0'}</a></td>
+                            <td><a href="javascript:void(0)" style="color: #00E;" title="点击转到订单页面,查询该批次的所有订单" onclick="to_order_list('${batch.batchId!''}',4)">${batch.shippedNum!'0'}</a></td>
+
                             <td>${(batch.batchCreateTime?string("yyyy-MM-dd HH:mm:ss"))!''}</td>
                             <td>
                                 <a style="text-decoration:none;color: #00E;" href="javascript:void(0);" title="下载该批次的所有订单的物流信息" onclick="download_order('${batch.batchId!''}')">
@@ -100,8 +105,24 @@
      *跳转到客诉列表页面
      * @param employee
      */
-    function to_order_list(batchId) {
-        window.location.href= "${path}/admin/salesOrder/list_order_page?salesBatchId="+batchId;
+    function to_order_list(batchId,type) {
+        switch (type){
+            case 1:
+                window.location.href= "${path}/admin/salesOrder/list_order_page?salesBatchId="+batchId;
+                break;
+            case 2: //待审核数量
+                window.location.href= "${path}/admin/salesOrder/list_order_page?salesBatchId="+batchId + "&salesStatus=0";
+                break;
+            case 3: //代发货数量
+                window.location.href= "${path}/admin/salesOrder/list_order_page?salesBatchId="+batchId + "&salesShippingStatus=0";
+                break;
+            case 4: //已发货数量
+                window.location.href= "${path}/admin/salesOrder/list_order_page?salesBatchId="+batchId + "&salesShippingStatus=1";
+                break;
+            default:
+            break;
+        }
+
     }
 
     /**
@@ -123,6 +144,7 @@
             timeout: 15000,
             success: function(dt) {
                 layer.msg("确认订单成功", {icon: 1, time: 3000});
+                location.reload();
             },
             error: function(xhr, type, errorThrown) {
                 layer.msg("确认订单失败,请重试!", {icon: 5, time: 3000});

+ 26 - 7
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/add_order.ftl

@@ -47,6 +47,9 @@
     <a class="btn radius r"
        style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;"
        href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
+    <a class="btn radius r"
+       style="line-height:1.6em;margin-top:3px;margin-right: 5px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;"
+       href="javascript:history.back(-1);" title="后退"><i class="Hui-iconfont">&#xe6d4;</i></a>
 </nav>
 <article class="page-container" style="padding: 10px;">
     <div class="pd-20 cl">
@@ -60,11 +63,31 @@
                 </div>
             </div>
 
-          
+            <div class="row cl" style="">
+                <label class="form-label col-1 col-sm-1">订单类型:</label>
+                <div class="formControls col-2 col-sm-2" style="">
+                    <span class="select-box">
+                        <select class="select" id="salesOrderStatus" name="salesOrderStatus" >
+                            <option value="1" >正常订单</option>
+                            <#if admin.adminDept == 3 || admin.adminDept == 1><option value="2" >售后订单</option></#if>
+                        </select>
+				    </span>
+                </div>
+                <div class="formControls col-2 col-sm-2" id="selectCustomer" style="display: none;">
+                    <input type="button" style="width: 100%;" class="btn btn-primary " onclick="add_customer()" value="选择客诉记录" >
+                </div>
+            </div>
+            <div class="row cl" id="salesCustomer" style="display: none;">
+                <label class="form-label col-1 col-sm-1"></label>
+                <div class="formControls col-2 col-sm-2" style="color: #c00;">
+                    <span id="salesCustomerIdHtml"></span>
+                    <input type="hidden" id="salesCustomerId" name="salesCustomerId" value="">
+                </div>
+            </div>
 
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1">批次编号:</label>
-                <div class="formControls col-3 col-sm-3" style="">
+                <div class="formControls col-2 col-sm-2" style="">
                     <span class="select-box">
                         <select class="select" id="salesBatchId" name="salesBatchId" >
                             <option value="1" >新增批次</option>
@@ -76,7 +99,6 @@
                 </div>
             </div>
 
-            <#if admin.adminDept == 3 || admin.adminDept == 1>
                 <div class="row cl sales_channel" id="" style="">
                     <label class="form-label col-1 col-sm-1">销售渠道:</label>
                     <div class="formControls col-2 col-sm-2" style="">
@@ -92,7 +114,6 @@
                     </span>
                     </div>
                 </div>
-            </#if>
 
             <div class="row cl" id="" style="">
                 <label class="form-label col-1 col-sm-1">用户信息:</label>
@@ -261,13 +282,11 @@
     });
 
     /*初始化省市区*/
-    var address = $(".address_info").initAddress(
-    );
+    var address = $(".address_info").initAddress();
 
     /*初始化销售公司店铺*/
     $(".sales_channel").initSalesChannel();
 
-
 </script>
 </body>
 </html>

+ 9 - 7
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/list_wait_send_order.ftl

@@ -18,11 +18,13 @@
 <div class="page-container">
     <div class="text-c">
         <form action="${path}/admin/await_send/listAwaitSendOrder" method="POST" id="search-form">
-            <select class="select" name="salesShippingStatus" id="salesShippingStatus" style="height: 31px;width: 150px">
-                <option value="">请选择发货状态</option>
+            <select class="select" name="salesShippingStatus" id="salesShippingStatus" style="height: 31px;width: 150px">-->
+                <option value="">发货状态</option>
                 <option <#if (req.salesShippingStatus)??><#if req.salesShippingStatus == 1>selected="selected"</#if></#if> value="1">待发货</option>
+                <option <#if (req.salesShippingStatus)??><#if req.salesShippingStatus == 11>selected="selected"</#if></#if> value="11">已通知配货</option>
                 <option <#if (req.salesShippingStatus)??><#if req.salesShippingStatus == 2>selected="selected"</#if></#if> value="2">已发货</option>
             </select>
+
             <input type="text" class="input-text" style="width:150px;margin-bottom: 3px;" value="${(req.salesOrderId)!}" placeholder="订单编号" id="salesOrderId" name="salesOrderId">
             <input type="text" class="input-text" style="width:150px;margin-bottom: 3px;" value="${(req.salesDealCode)!}" placeholder="交易号" id="salesDealCode" name="salesDealCode">
             <input type="text" class="input-text" style="width:150px;margin-bottom: 3px;" value="${(req.salesAddressName)!}" placeholder="收件人姓名" id="salesAddressName" name="salesAddressName">
@@ -55,7 +57,7 @@
             <#list page.dataList as o>
             <tr class="text-c">
                 <td>
-                    <#if o.salesShippingStatus == 1>
+                    <#if o.salesShippingStatus == 11>
                         <input type="checkbox" value="${(o.salesId)!}" class="salesid-input">
                     </#if>
                 </td>
@@ -73,9 +75,9 @@
                     </#if>
                 </td>
                 <td>
-                    <#if o.salesShippingStatus == 1>
-                        <span style="color: red;">待发货</span>
-                    <#else>
+                    <#if o.salesShippingStatus == 11>
+                        <span style="color: red;">通知配货</span>
+                    <#elseif o.salesShippingStatus == 1>
                         <p>已发货(${(o.salesSendTime?string("yyyy-MM-dd HH:mm:ss"))!"暂无发货时间"})</p>
                         <p class="label radius"><a href="#">${(o.salesPostFirm)!}-${(o.salesPostNum)!}</a></p>
                     </#if>
@@ -84,7 +86,7 @@
                 <td>${(o.salesAdminRemark)!}</td>
                 <td>${(o.salesCreateTime?string("yyyy-MM-dd"))!}</td>
                 <td class="td-manage">
-                    <#if o.salesShippingStatus == 1>
+                    <#if o.salesShippingStatus == 11>
                         <a title="打单发货" href="javascript:window.location.href='${path}/admin/await_send/printOrderUI?orderId=${o.salesId}'" class="ml-5" style="text-decoration:none">打单发货</a>
                     <#else>
                         <a title="重新打单" href="javascript:re_print_order('${(o.salesOrderId)!}')" class="ml-5" style="text-decoration:none">重新打单</a>

+ 153 - 18
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_list.ftl

@@ -32,7 +32,6 @@
 </nav>
 
 <!--  录入订单 -->
-
 <div class="page-container">
     <div class="text-c" id="form-download">
         <form action="${path}/admin/salesOrder/list_order_page" method="post">
@@ -42,15 +41,18 @@
                     <button type="button" style="top: 72px;display: none;" class="my-btn-search my-order" id="addOrderExcel" onclick="upFiles();">Excel导入</button>
                 </div>
 
-                <select class="my-select" name="salesIsDownload" id="salesIsDownload" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
-                    <option value ="">导出状态</option>
-                    <option value ="2" <#if salesOrder.salesIsDownload??><#if salesOrder.salesIsDownload == 2 >selected="selected"</#if></#if>>已导出</option>
-                    <option value ="1" <#if salesOrder.salesIsDownload??><#if salesOrder.salesIsDownload == 1 >selected="selected"</#if></#if>>未导出</option>
-                </select>
+                <#if identity != 2>
+                    <select class="my-select" name="salesIsDownload" id="salesIsDownload" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
+                        <option value ="">导出状态</option>
+                        <option value ="2" <#if salesOrder.salesIsDownload??><#if salesOrder.salesIsDownload == 2 >selected="selected"</#if></#if>>已导出</option>
+                        <option value ="1" <#if salesOrder.salesIsDownload??><#if salesOrder.salesIsDownload == 1 >selected="selected"</#if></#if>>未导出</option>
+                    </select>
+                </#if>
 
                 <select class="my-select" name="salesShippingStatus" id="salesShippingStatus" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
                     <option value ="">发货状态</option>
                     <option value ="0" <#if salesOrder.salesShippingStatus??><#if salesOrder.salesShippingStatus == 0 >selected="selected"</#if></#if>>未发货</option>
+                    <option value ="11" <#if salesOrder.salesShippingStatus??><#if salesOrder.salesShippingStatus == 11 >selected="selected"</#if></#if>>已通知配货</option>
                     <option value ="1" <#if salesOrder.salesShippingStatus??><#if salesOrder.salesShippingStatus == 1 >selected="selected"</#if></#if>>已发货</option>
                 </select>
 
@@ -93,6 +95,8 @@
         <table class="table table-border table-bg table-bordered">
             <thead>
             <tr class="text-c">
+                <th width="16"><input type="checkbox" ></th>
+                <th width="50">订单类型</th>
                 <th width="60">订单号</th>
                 <th width="70">交易号</th>
                 <th width="72">批次号</th>
@@ -100,8 +104,8 @@
                 <th width="70">收货人电话</th>
                 <th width="100">收货地址</th>
                 <th width="50">是否发货</th>
-                <th width="60">物流公司</th>
-                <th width="60">物流单号</th>
+                <th width="60">订单状态</th>
+                <th width="60">物流信息</th>
                 <#--<th width="50">订单金额</th>
                 <th width="50">支付金额</th>
                 <th width="50">是否付款</th>-->
@@ -115,6 +119,33 @@
             <#if page.dataList?? &&  (page.dataList?size > 0) >
                 <#list page.dataList as order>
                 <tr class="text-c">
+                    <td width="16"><input type="checkbox" class="sales_id" value="${order.salesId!''}" ></td>
+                    <td width="16">
+                        <#if (order.salesCustomerId)??>
+                            <div>售后订单</div>
+                            <div>
+                                (
+                                <#if order.customerIsSolve == 1>
+                                    已解决
+                                <#elseif order.customerIsSolve == 2>
+                                    未解决
+                                <#elseif order.customerIsSolve == 3>
+                                    换新
+                                <#elseif order.customerIsSolve == 4>
+                                    维修
+                                <#elseif order.customerIsSolve == 5>
+                                    补发
+                                <#elseif order.customerIsSolve == 6>
+                                    退货
+                                <#elseif order.customerIsSolve == 7>
+                                    无理由退货
+                                </#if>
+                                )
+                            </div>
+                        <#else>
+                            正常订单
+                        </#if>
+                    </td>
                     <td>${order.salesOrderId!''}</td>
                     <td>${order.salesDealCode!''}</td>
                     <td>${order.salesBatchId!''}</td>
@@ -130,8 +161,23 @@
                             未发货
                         <#elseif order.salesShippingStatus == 1>
                             已发货
-                        <#elseif order.salesShippingStatus == 1>
+                        <#elseif order.salesShippingStatus == 3>
                             备货中
+                        <#elseif order.salesShippingStatus == 4>
+                            收货
+                        <#elseif order.salesShippingStatus == 11>
+                            已通知配货
+                        </#if>
+                    </td>
+                    <td>
+                        <#if order.salesStatus == 0>
+                            未确认
+                        <#elseif order.salesStatus == 1>
+                            确认
+                        <#elseif order.salesStatus == 2>
+                            挂起
+                        <#elseif order.salesStatus == 3>
+                            作废
                         </#if>
                     </td>
                     <td>
@@ -172,8 +218,9 @@
                                 德邦物流
                             </#if>
                         </#if>
+                    <br>
+                    ${order.salesPostNum!''}
                     </td>
-                    <td>${order.salesPostNum!''}</td>
                     <#--<td>${order.salesAmount/100!''}</td>
                     <td>${order.salesPayMoney/100!''}</td>
                     <td>
@@ -202,10 +249,18 @@
                 </tr>
                 </#list>
             <#else>
-            <tr><td colspan="13" class="td-manage text-c" >暂时没有客诉信息,请添加!</td></tr>
+            <tr><td colspan="15" class="td-manage text-c" >暂时没有客诉信息,请添加!</td></tr>
             </#if>
             </tbody>
         </table>
+
+        <#if identity != 2>
+            <div style="float: left;margin-top: 20px;">
+                <button type="button" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;" id="" onclick="noticeDistribution()">通知配货</button>
+                <button type="button" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;" id="" onclick="confirmOrder()">确认订单</button>
+            </div>
+        </#if>
+
     </div>
 </div>
 <tfoot>
@@ -219,6 +274,7 @@
     /*判断上传类型 1:上传excel推送订单   2:下载订单  2:上传efast物流信息excel */
     var editorType;
     var _editor;
+
     /**
      *跳转到详情页面
      * @param employee
@@ -240,12 +296,11 @@
         
     }
     function hideDownloadOrderInfo() {
-
     }
-    /*$(function () {
-        /!*初始化店铺*!/
-        initEfastStoreName();
-    });*/
+
+    $(function () {
+    });
+
     $(function() {
         //重新实例化一个编辑器,防止在上面的editor编辑器中显示上传的图片或者文件
         _editor = UE.getEditor('upload_ue',{
@@ -350,6 +405,86 @@
             window.location.href=root_path + '/admin/salesOrder/to_add_order';
         }
 
+        /**
+         *  通知配货
+         */
+        function noticeDistribution() {
+            var index = layer.load(1, {
+                shade: [0.5,'#fff'] //0.1透明度的白色背景
+            });
+
+            var salesOrderIds = "";
+            $(".sales_id:checked").each(function(){
+                var val = $(this).val();
+                if(isEmpty(salesOrderIds)){
+                    salesOrderIds += ","+val
+                }else{
+                    salesOrderIds = val
+                }
+            })
+
+            $.ajax({
+                type:'POST',
+                url: '${path}/admin/salesOrder/notice_distribution',
+                data:{
+                    "salesOrderIds" : salesOrderIds
+                },
+                dataType: 'json',
+                success:function(res) {
+                    if(res.resultCode == 200 && res.returnCode == 200){
+                       location.reload();
+                    }else{
+                        layer.alert("通知配货异常!", function(index){
+                            layer.close(index);
+                        });
+                        layer.close(index);
+                    }
+                    return false;
+                }
+            });
+
+        }
+
+
+        /**
+         * 确认订单
+         */
+        function confirmOrder(){
+            var index = layer.load(1, {
+                shade: [0.5,'#fff'] //0.1透明度的白色背景
+            });
+
+            var salesOrderIds = "";
+            $(".sales_id:checked").each(function(){
+                var val = $(this).val();
+                if(isEmpty(salesOrderIds)){
+                    salesOrderIds += ","+val
+                }else{
+                    salesOrderIds = val
+                }
+            })
+
+            $.ajax({
+                type:'POST',
+                url: '${path}/admin/salesOrder/confirm_salesOrder',
+                data:{
+                    "salesOrderIds" : salesOrderIds
+                },
+                dataType: 'json',
+                success:function(res) {
+                    if(res.resultCode == 200 && res.returnCode == 200){
+                        location.reload();
+                    }else{
+                        layer.alert("确认订单异常!", function(index){
+                            layer.close(index);
+                        });
+                        layer.close(index);
+                    }
+                    return false;
+                }
+            });
+        }
+
 
        /* function submitSynOrder() {
             var efastOrderId = $.trim($('#efastOrderId').val());
@@ -379,7 +514,7 @@
         /*导出上传到efast的Excel*/
         $('#order_excel').click(function (e) {
             var salesIsDownload = $("#salesIsDownload").val(); //是否导出
-            var salesStatus = 1; //导出必须是确认状态
+            var salesStatus = 1; //订单状态
             var salesShippingStatus = $("#salesShippingStatus").val(); //是否已发货
             var salesStoreId = $("#salesStoreId").val(); //店铺
             var startDate = $("#startDate").val();
@@ -395,7 +530,7 @@
                 url: '${path}/admin/salesOrder/sync_efast_order_num',
                 data:{
                     "salesIsDownload" : salesIsDownload,
-                    "salesStatus" : salesStatus,
+//                    "salesStatus" : salesStatus,
                     "salesShippingStatus" : salesShippingStatus,
                     "salesStoreId" : salesStoreId,
                     "startDate" : startDate,

+ 28 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/update_order.ftl

@@ -47,6 +47,9 @@
     <a class="btn radius r"
        style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;"
        href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
+    <a class="btn radius r"
+       style="line-height:1.6em;margin-top:3px;margin-right: 5px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;"
+       href="javascript:history.back(-1);" title="后退"><i class="Hui-iconfont">&#xe6d4;</i></a>
 </nav>
 <article class="page-container" style="padding: 10px;">
     <div class="pd-20 cl">
@@ -84,10 +87,34 @@
                 </div>
             </div>
 
+            <div class="row cl" style="">
+                <label class="form-label col-1 col-sm-1">订单类型:</label>
+                <div class="formControls col-2 col-sm-2" style="">
+                    <span class="select-box">
+                        <select class="select" id="salesOrderStatus" name="salesOrderStatus" >
+                            <option value="1"  <#if !order.salesCustomerId?? >selected = "selected"</#if> >正常订单</option>
+                            <#if admin.adminDept == 3 || admin.adminDept == 1><option value="2"  <#if order.salesCustomerId?? >selected = "selected"</#if>  >售后订单</option></#if>
+                        </select>
+				    </span>
+                </div>
+                <div class="formControls col-2 col-sm-2" id="selectCustomer" style="
+                        <#if admin.adminDept != 3 && admin.adminDept != 1><#if !order.salesCustomerId?? >display: none;</#if></#if>
+                    ">
+                    <input type="button" style="width: 100%;" class="btn btn-primary " onclick="add_customer()" value="选择客诉记录" >
+                </div>
+            </div>
+
+            <div class="row cl" id="salesCustomer" style="<#if admin.adminDept != 3 && admin.adminDept != 1><#if !order.salesCustomerId?? >display: none;</#if></#if>">
+                <label class="form-label col-1 col-sm-1"></label>
+                <div class="formControls col-2 col-sm-2" style="color: #c00;">
+                    <span id="salesCustomerIdHtml">已经选择客诉记录:${order.salesCustomerId!''}</span>
+                    <input type="hidden" id="salesCustomerId" name="salesCustomerId" value="${order.salesCustomerId!''}">
+                </div>
+            </div>
 
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1">批次编号:</label>
-                <div class="formControls col-3 col-sm-3" style="">
+                <div class="formControls col-2 col-sm-2" style="">
                     <span class="select-box">
                         <select class="select" id="salesBatchId" name="salesBatchId" >
                             <option value="1" >新增批次</option>
@@ -99,7 +126,6 @@
                 </div>
             </div>
 
-            <#if admin.adminDept == 3 || admin.adminDept == 1>
                 <div class="row cl sales_channel" id="" style="">
                     <label class="form-label col-1 col-sm-1">销售渠道:</label>
                     <div class="formControls col-2 col-sm-2" style="">
@@ -115,7 +141,6 @@
                     </span>
                     </div>
                 </div>
-            </#if>
 
 
             <div class="row cl" id="" style="">

+ 8 - 6
watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/machine_print_List.ftl

@@ -172,6 +172,7 @@
             var producePattern =  produce.producePattern;    //获取产品型号前两位
             var produceModel =  produce.produceModel;        //获取产品型号后两位
             var produceName = produce.produceName;            //获取产品名称
+            var produceBrand = produce.produceBrand;            //获取品牌字母
 
             var machineNo = "NO." + $("#"+machineBarcode+"Id").val();
             for (var i = 0; i < settingNumber; i++) {
@@ -181,9 +182,9 @@
                 $("#qrcodeImg").attr('src',machineQrcode);*/
                 /* if (machineProduceType == 1) {//净水机模板*/
                 $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
-                        '<span style="position: absolute;left: 10px;font-size: 14px;">'+produceName+'</span>' +
-                        '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;">型号:'+producePattern+'-'+produceModel+'</span>' +
-                        '<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;">S/N</span>' +
+                        '<span style="position: absolute;left: 10px;font-size: 14px;">桌面净水机</span>' +
+                        '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;visibility:hidden;">型号:'+producePattern+'-'+produceModel+'</span>' +
+                        '<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;visibility:hidden;">S/N</span>' +
                         '<div style="position: absolute;left: 5px;top: 64px;height: 30px;" id="bcTarget2" class="barcodeImg">'+barcodes+'</div>' +
                         '<span style="position: absolute;top: 85px;left: 10px;font-size: 12px;width: 116px;text-align: center;" id="barcodeId">'+machineBarcode+'</span>' +
                         '<img style="position: absolute;right: 5px;top:18px;width: 76px;height: 76px;" id="qrcodeImg" src="'+machineQrcode+'" /> ' +
@@ -348,6 +349,7 @@
         var producePattern =  produce.producePattern;    //获取产品型号前两位
         var produceModel =  produce.produceModel;        //获取产品型号后两位
         var produceName = produce.produceName;            //获取产品名称
+        var produceBrand = produce.produceBrand;            //获取品牌字母
 
         for (var i=0;i<settingNumber;i++){
             code128(machineBarcode);
@@ -355,9 +357,9 @@
 
             /*if(machineProduceType == 1){//净水机模板*/
             $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
-                    '<span style="position: absolute;left: 10px;font-size: 14px;">'+produceName+'</span>' +
-                    '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;">型号:'+producePattern+'-'+produceModel+'</span>' +
-                    '<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;">S/N</span>' +
+                    '<span style="position: absolute;left: 10px;font-size: 14px;">桌面净水机</span>' +
+                    '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;visibility:hidden;">型号:'+producePattern+'-'+produceModel+'</span>' +
+                    '<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;visibility:hidden;">S/N</span>' +
                     '<div style="position: absolute;left: 5px;top: 64px;height: 30px;" id="bcTarget2" class="barcodeImg">'+barcodes+'</div>' +
                     '<span style="position: absolute;top: 85px;left: 10px;font-size: 12px;width: 116px;text-align: center;" id="barcodeId">'+machineBarcode+'</span>' +
                     '<img style="position: absolute;right: 5px;top:18px;width: 76px;height: 76px;" id="qrcodeImg" src="'+machineQrcode+'" /> ' +

+ 3 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/pts/produce/save_produce.ftl

@@ -59,6 +59,8 @@
                     </#if>
                     </select>
                 </div>
+                <div class="input-box"><span class="input-dic">品牌字母</span><input class="my-input" name="produceBrand" id="produceBrand" type="text" value="" placeholder="请输入品牌字母" required   maxlength="20" minlength="1"/> </div>
+
                 <div class="input-box"><span class="input-dic">产品型号</span><input class="my-input" style="width: 120px;" type="text" name="producePattern" id="producePattern" value="" placeholder="1-15位英文、数字组合" required  maxlength="15" minlength="1"/>-
                     <input class="my-input" style="width: 120px;" type="text" name="produceModel" id="produceModel" value="" placeholder="1-15位英文、数字组合" required  maxlength="15" minlength="1"/>  </div>
 
@@ -226,6 +228,7 @@
         produce.producePattern = $("[name='producePattern']").val();//产品型号
         produce.produceModel = $("[name='produceModel']").val();//产品型号
         produce.wechatMpId = $("[name='wechatMpId']").val();//公众号id
+        produce.produceBrand = $("[name='produceBrand']").val();//品牌字母
         return produce;
     }
 

+ 2 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/pts/produce/update_produce.ftl

@@ -60,7 +60,7 @@
                 </#if>
                 </select>
             </div>
-
+            <div class="input-box"><span class="input-dic">品牌字母</span><input class="my-input" name="produceBrand" id="produceBrand" type="text" value="${produce.produceBrand!}" placeholder="请输入品牌字母" required   maxlength="20" minlength="1"/> </div>
             <div class="input-box"><span class="input-dic">产品型号</span><input class="my-input" style="width: 120px;" type="text" name="producePattern" id="producePattern" placeholder="1-15位英文、数字组合" value="${produce.producePattern!}" placeholder="" required  maxlength="15" minlength="1"/>-
                 <input class="my-input" style="width: 120px;" type="text" name="produceModel" id="produceModel" value="${produce.produceModel!}" placeholder="1-15位英文、数字组合" required  maxlength="15" minlength="1"/>  </div>
 
@@ -247,6 +247,7 @@
         produce.producePattern = $("[name='producePattern']").val();//产品型号
         produce.produceModel = $("[name='produceModel']").val();//产品型号
         produce.wechatMpId = $("[name='wechatMpId']").val();//公众号id
+        produce.produceBrand = $("[name='produceBrand']").val();//品牌字母
 
         produce.delProcessIds = delProcessIds;    //需要删除的工序id
         produce.delNodeIds = delNodeIds;           //需要删除的工序操作id

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

@@ -495,11 +495,13 @@ function initProcessResult(type,allCustomerInfoType){
                 //$("#recipientAddressText").show();
                 $("#renewedProduct").show();
                 //$("#TDScollect").show();
-                $("#TDScollectShow").show();
+                //$("#TDScollectShow").show();
                 $("#sendAddressInfo").show();
                 $("#sendAddressByPhone").show();
                 $("#updateProduct").hide(); //换新产品
                 $("#postageAccount").show();    //邮费转账账户
+                $("#sendInformationTitle").show();
+                $("#sendAddressSmsHtml").show();
                 visitByType(2); //需要回访
                 //$("#salesChannelsSelect").show();  //展示销售公司
                 if(customerInfoType == 1){
@@ -523,11 +525,13 @@ function initProcessResult(type,allCustomerInfoType){
                 //$("#recipientAddressText").show();
                 $("#renewedProduct").show();
                 //$("#TDScollect").show();
-                $("#TDScollectShow").show();
+                //$("#TDScollectShow").show();
                 $("#sendAddressInfo").show();
                 $("#sendAddressByPhone").show();
                 $("#updateProduct").hide();//维修产品
                 $("#postageAccount").show();    //邮费转账账户
+                $("#sendInformationTitle").show();
+                $("#sendAddressSmsHtml").show();
                 visitByType(2); //需要回访
                 //$("#salesChannelsSelect").show();  //展示销售公司
                 if(customerInfoType == 1){
@@ -552,11 +556,13 @@ function initProcessResult(type,allCustomerInfoType){
                 // $("#recipientAddressText").show();
                 $("#renewedProduct").hide();
                 //$("#TDScollect").show();
-                $("#TDScollectShow").show();
+                //$("#TDScollectShow").show();
                 $("#sendAddressInfo").hide();
                 $("#sendAddressByPhone").hide();
                 $("#updateProduct").hide();
                 $("#postageAccount").hide();    //邮费转账账户 -- 隐藏
+                $("#sendInformationTitle").hide();    //寄回信息标题隐藏
+                $("#sendAddressSmsHtml").hide();    //寄回信息标题隐藏
                 visitByType(2); //需要回访
                 //$("#salesChannelsSelect").show();  //展示销售公司
                 if(customerInfoType == 1){
@@ -581,11 +587,13 @@ function initProcessResult(type,allCustomerInfoType){
                 //$("#recipientAddressText").show();
                 $("#renewedProduct").show();
                 //$("#TDScollect").show();
-                $("#TDScollectShow").show();
+                //$("#TDScollectShow").show();
                 $("#sendAddressInfo").show();
                 $("#sendAddressByPhone").show();
                 $("#updateProduct").hide();
                 $("#postageAccount").show();    //邮费转账账户
+                $("#sendInformationTitle").show();
+                $("#sendAddressSmsHtml").show();
                 visitByType(2); //需要回访
                 //$("#salesChannelsSelect").show();  //展示销售公司
                 if(customerInfoType == 1){
@@ -610,11 +618,13 @@ function initProcessResult(type,allCustomerInfoType){
                 //$("#recipientAddressText").show();
                 $("#renewedProduct").show();
                 //$("#TDScollect").show();
-                $("#TDScollectShow").show();
+                //$("#TDScollectShow").show();
                 $("#sendAddressInfo").show();
                 $("#sendAddressByPhone").show();
                 $("#updateProduct").hide();
                 $("#postageAccount").show();    //邮费转账账户
+                $("#sendInformationTitle").show();
+                $("#sendAddressSmsHtml").show();
                 visitByType(2); //需要回访
                 //$("#salesChannelsSelect").show();  //展示销售公司
                 if(customerInfoType == 1){
@@ -663,7 +673,7 @@ function otherHied(customerInfoType){
     $("#recipientAddressText").hide();
     $("#renewedProduct").hide();
     //$("#TDScollect").show();
-    $("#TDScollectShow").show();
+    //$("#TDScollectShow").show();
     $("#sendAddressInfo").hide();
     $("#sendAddressByPhone").hide();
     $("#updateProduct").hide();

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

@@ -1,12 +1,39 @@
 
+var allCustomerId = "";
+
+
 /**
- * 打开订单
+ * 打开商品列表
  */
 function add_product() {
     layer_show("商品列表",url_path + "/admin/salesOrder/to_add_product","1000","500");
 }
 
+/**
+ * 打开客诉列表
+ */
+function add_customer() {
+    layer_show("客诉列表",url_path + "/admin/customer/to_add_customer_list","1000","500");
+}
+
 $(function(){
+    $("#salesOrderStatus").change(function(){
+        var status = $(this).val();
+        if(status == 1){    //正常订单
+            $("#selectCustomer").hide();
+            $("#salesCustomer").hide();
+            $("#salesCustomerIdHtml").html("");
+            $("#salesCustomerId").val("");
+        }else{
+            $("#selectCustomer").show();
+            $("#salesCustomer").show();
+            $("#salesCustomerIdHtml").html("未选择客服编号!");
+        }
+    })
+})
+
+$(function(){
+    var loadIndex = 0;
     $("#form-order-add").Validform({
         tiptype: function (msg, o, cssctl) {
             if (o.type == 3) {//失败
@@ -47,7 +74,7 @@ $(function(){
 
             $("#orderItemString").val(JSON.stringify(orderItemArray));
 
-            var index = layer.load(1, {
+            loadIndex = layer.load(1, {
                 shade: [0.5,'#fff'] //0.1透明度的白色背景
             });
         },
@@ -60,11 +87,42 @@ $(function(){
                         layer.close(index);
                     }
                 });
+                if(loadIndex != 0 ){
+                    layer.close(loadIndex);
+                }
             }
         }
     });
 });
 
+
+/**
+ * 客诉回调
+ * @param colorIds
+ */
+function setSelectCustomer(customerId){
+    var index = layer.load(1, {
+        shade: [0.5,'#fff'] //0.1透明度的白色背景
+    });
+
+    $.ajax({
+        type: "POST",
+        data: { customerId : customerId},
+        url: url_path +"/admin/customer/get_customer_info",
+        success: function(data){
+            if (data.returnCode == 200 && data.returnMsg.customer != null ) {
+                var customer = data.returnMsg.customer;
+                $("#salesCustomerIdHtml").html("已经选择客诉记录:"+customer.customerId);
+                $("#salesCustomerId").val(customer.customerId);
+            }else{
+            }
+            $("#salesCustomer").show();
+        }
+    });
+    layer.close(index);
+}
+
+
 /**
  * 选择商品回调
  * @param colorIds