Преглед изворни кода

Merge branch 'master' of http://git.iamberry.com/hexiugang/iamberry-common-parent

liujiankang пре 7 година
родитељ
комит
437c5a9587
30 измењених фајлова са 948 додато и 268 уклоњено
  1. 13 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerCommon.java
  2. 5 5
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/NoreasonBack.java
  3. 72 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Postage.java
  4. 80 29
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/PostageAuthority.java
  5. 51 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/PostageAuthorityService.java
  6. 71 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/PostageAuthorityServiceImpl.java
  7. 3 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java
  8. 51 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/PostageAuthorityMapper.java
  9. 5 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerCommonMapper.xml
  10. 5 5
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/noreasonBackMapper.xml
  11. 123 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/postageAuthorityMapper.xml
  12. 15 5
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/postageMapper.xml
  13. 58 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java
  14. 150 125
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminPostageController.java
  15. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminSalesOrderController.java
  16. 8 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/mq/MQTask.java
  17. 2 0
      watero-rst-web/src/main/resources/watero-rst-orm.xml
  18. 179 10
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl
  19. 4 4
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_noreason_back.ftl
  20. 44 66
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/postage/postage_list.ftl
  21. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/report/customer_report.ftl
  22. 0 5
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/salesOrder/sales_order_list.ftl
  23. 1 6
      watero-rst-web/src/main/webapp/WEB-INF/views/login.ftl
  24. 4 4
      watero-rst-web/src/main/webapp/common/css/login/login.css
  25. BIN
      watero-rst-web/src/main/webapp/common/images/login/admin-login-bg.jpg
  26. BIN
      watero-rst-web/src/main/webapp/common/images/login/ipt_head.png
  27. BIN
      watero-rst-web/src/main/webapp/common/images/login/ipt_img.png
  28. BIN
      watero-rst-web/src/main/webapp/common/images/login/ipt_suo.png
  29. 1 1
      watero-rst-web/src/main/webapp/common/js/common/common.js
  30. 1 1
      watero-rst-web/src/main/webapp/common/static/h-ui.admin/css/H-ui.login.css

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

@@ -1,5 +1,7 @@
 package com.iamberry.rst.core.cm;
 
+import org.springframework.format.annotation.DateTimeFormat;
+
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Date;
@@ -94,6 +96,9 @@ public class CustomerCommon implements Serializable {
     private String salesOrderId;
     //是否需要添加订单
     private Integer isNeedSelectOrder;
+    //签收时间
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    private Date relationBackReceiptDate;
 
     public String getSalesOrderId() {
         return salesOrderId;
@@ -414,4 +419,12 @@ public class CustomerCommon implements Serializable {
     public void setIsNeedSelectOrder(Integer isNeedSelectOrder) {
         this.isNeedSelectOrder = isNeedSelectOrder;
     }
+
+    public Date getRelationBackReceiptDate() {
+        return relationBackReceiptDate;
+    }
+
+    public void setRelationBackReceiptDate(Date relationBackReceiptDate) {
+        this.relationBackReceiptDate = relationBackReceiptDate;
+    }
 }

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

@@ -53,7 +53,7 @@ public class NoreasonBack  implements Serializable {
     private Date noreasonBackUpdateTime;
     //签收日期
     @DateTimeFormat(pattern="yyyy-MM-dd")
-    private Date noreasonCackReceiptDate;
+    private Date noreasonBackReceiptDate;
 
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
@@ -252,11 +252,11 @@ public class NoreasonBack  implements Serializable {
         this.noreasonBackAlipayName = noreasonBackAlipayName;
     }
 
-    public Date getNoreasonCackReceiptDate() {
-        return noreasonCackReceiptDate;
+    public Date getNoreasonBackReceiptDate() {
+        return noreasonBackReceiptDate;
     }
 
-    public void setNoreasonCackReceiptDate(Date noreasonCackReceiptDate) {
-        this.noreasonCackReceiptDate = noreasonCackReceiptDate;
+    public void setNoreasonBackReceiptDate(Date noreasonBackReceiptDate) {
+        this.noreasonBackReceiptDate = noreasonBackReceiptDate;
     }
 }

+ 72 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Postage.java

@@ -10,6 +10,8 @@ public class Postage implements Serializable {
     private static final long serialVersionUID = -4278004816117383308L;
 
     private Integer postageId;
+    //销售公司
+    private Integer companyId;
     //客服人员id
     private Integer adminId;
     //客诉id
@@ -51,6 +53,20 @@ public class Postage implements Serializable {
     //销售来源名称
     private String storeName;
 
+    //物流单号上传
+    private String postageLogisticsImg;
+
+    //销售公司集合
+    private  Integer[] companyIds;
+
+    private Integer customerConfirm;    //确认   1有权限
+
+    private Integer customerManager;    //经理审核权限   1有权限
+
+    private Integer financeManager;    //财务审核权限   1有权限
+
+    private Integer financePay;    //财务转账         1有权限
+
     public Integer getPostageId() {
         return postageId;
     }
@@ -218,4 +234,60 @@ public class Postage implements Serializable {
     public void setCustomerId(Integer customerId) {
         this.customerId = customerId;
     }
+
+    public Integer getCompanyId() {
+        return companyId;
+    }
+
+    public void setCompanyId(Integer companyId) {
+        this.companyId = companyId;
+    }
+
+    public Integer[] getCompanyIds() {
+        return companyIds;
+    }
+
+    public void setCompanyIds(Integer[] companyIds) {
+        this.companyIds = companyIds;
+    }
+
+    public Integer getCustomerManager() {
+        return customerManager;
+    }
+
+    public void setCustomerManager(Integer customerManager) {
+        this.customerManager = customerManager;
+    }
+
+    public Integer getFinanceManager() {
+        return financeManager;
+    }
+
+    public void setFinanceManager(Integer financeManager) {
+        this.financeManager = financeManager;
+    }
+
+    public Integer getFinancePay() {
+        return financePay;
+    }
+
+    public void setFinancePay(Integer financePay) {
+        this.financePay = financePay;
+    }
+
+    public Integer getCustomerConfirm() {
+        return customerConfirm;
+    }
+
+    public void setCustomerConfirm(Integer customerConfirm) {
+        this.customerConfirm = customerConfirm;
+    }
+
+    public String getPostageLogisticsImg() {
+        return postageLogisticsImg;
+    }
+
+    public void setPostageLogisticsImg(String postageLogisticsImg) {
+        this.postageLogisticsImg = postageLogisticsImg;
+    }
 }

+ 80 - 29
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/PostageAuthority.java

@@ -1,55 +1,106 @@
 package com.iamberry.rst.core.cm;
 
-import java.util.Date;
+import  java.util.Date;
+import  java.io.Serializable;
 
-public class PostageAuthority {
-    private Integer postageAuthorityId;
-    //管理员id
+/**
+ *  邮费权限流程控制表类
+ * @author
+ * @Date 2018-04-09
+ */
+public class PostageAuthority  implements  Serializable{
+
+    private static final long serialVersionUID = 2784518115996494444L;
+
+    //主键
+    private Integer authorityId;
+    //销售公司
+    private Integer companyId;
+    //客服经理
+    private Integer authorityCustomerManager;
+    //财务经理
+    private Integer authorityFinancialManager;
+    //财务打款
+    private Integer authorityFinancialPayment;
+    //状态:1:使用中 2:未使用
+    private Integer authorityStatus;
+    //创建时间
+    private Date authorityCreateTime;
+    //修改时间
+    private Date authorityUpdateTime;
+
+    //登录id
     private Integer adminId;
-    //权限 1:客服人员   2:客服经理 3:财务
-    private Integer postageAuthorityGrade;
-    //状态 1:使用中  2:未使用
-    private Integer postageAuthorityStatus;
 
-    private Date postageAuthorityCreateTime;
+    public Integer getAuthorityId(){
+        return authorityId;
+    }
 
-    public Integer getPostageAuthorityId() {
-        return postageAuthorityId;
+    public void setAuthorityId(Integer  authorityId){
+        this.authorityId=authorityId;
     }
 
-    public void setPostageAuthorityId(Integer postageAuthorityId) {
-        this.postageAuthorityId = postageAuthorityId;
+    public Integer getCompanyId() {
+        return companyId;
     }
 
-    public Integer getAdminId() {
-        return adminId;
+    public void setCompanyId(Integer companyId) {
+        this.companyId = companyId;
     }
 
-    public void setAdminId(Integer adminId) {
-        this.adminId = adminId;
+    public Integer getAuthorityCustomerManager(){
+        return authorityCustomerManager;
+    }
+
+    public void setAuthorityCustomerManager(Integer  authorityCustomerManager){
+        this.authorityCustomerManager=authorityCustomerManager;
+    }
+
+    public Integer getAuthorityFinancialManager(){
+        return authorityFinancialManager;
+    }
+
+    public void setAuthorityFinancialManager(Integer  authorityFinancialManager){
+        this.authorityFinancialManager=authorityFinancialManager;
+    }
+
+    public Integer getAuthorityFinancialPayment(){
+        return authorityFinancialPayment;
+    }
+
+    public void setAuthorityFinancialPayment(Integer  authorityFinancialPayment){
+        this.authorityFinancialPayment=authorityFinancialPayment;
+    }
+
+    public Integer getAuthorityStatus(){
+        return authorityStatus;
     }
 
-    public Integer getPostageAuthorityGrade() {
-        return postageAuthorityGrade;
+    public void setAuthorityStatus(Integer  authorityStatus){
+        this.authorityStatus=authorityStatus;
     }
 
-    public void setPostageAuthorityGrade(Integer postageAuthorityGrade) {
-        this.postageAuthorityGrade = postageAuthorityGrade;
+    public Date getAuthorityCreateTime(){
+        return authorityCreateTime;
     }
 
-    public Integer getPostageAuthorityStatus() {
-        return postageAuthorityStatus;
+    public void setAuthorityCreateTime(Date  authorityCreateTime){
+        this.authorityCreateTime=authorityCreateTime;
     }
 
-    public void setPostageAuthorityStatus(Integer postageAuthorityStatus) {
-        this.postageAuthorityStatus = postageAuthorityStatus;
+    public Date getAuthorityUpdateTime(){
+        return authorityUpdateTime;
     }
 
-    public Date getPostageAuthorityCreateTime() {
-        return postageAuthorityCreateTime;
+    public void setAuthorityUpdateTime(Date  authorityUpdateTime){
+        this.authorityUpdateTime=authorityUpdateTime;
     }
 
-    public void setPostageAuthorityCreateTime(Date postageAuthorityCreateTime) {
-        this.postageAuthorityCreateTime = postageAuthorityCreateTime;
+    public Integer getAdminId() {
+        return adminId;
+    }
+
+    public void setAdminId(Integer adminId) {
+        this.adminId = adminId;
     }
 }

+ 51 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/PostageAuthorityService.java

@@ -0,0 +1,51 @@
+package com.iamberry.rst.faces.cm;
+
+import com.iamberry.rst.core.cm.PostageAuthority;
+
+import java.util.List;
+
+/**
+ *  邮费权限流程控制表接口
+ * @author -
+ * @Date 2018-04-09
+ */
+public interface PostageAuthorityService {
+    /**
+     * 获取集合
+     * @param  postageAuthority
+     * @return List
+     */
+    List<PostageAuthority> getPostageAuthorityList(PostageAuthority  postageAuthority);
+
+    /**
+     * 获取集合
+     * @param  adminId
+     * @return List
+     */
+    List<PostageAuthority> getPostageAuthorityListByAdminId(Integer adminId);
+
+    /**
+     * 查询单条数据
+     * @param  id
+     * @return  postageAuthority
+     */
+    PostageAuthority  getPostageAuthorityById(Integer  id);
+    /**
+     * 增加数据
+     * @param  postageAuthority
+     * @return Integer
+     */
+    Integer  save(PostageAuthority  postageAuthority);
+    /**
+     * 修改数据
+     * @param  postageAuthority
+     * @return Integer
+     */
+    Integer  update(PostageAuthority  postageAuthority);
+    /**
+     * 删除数据
+     * @param  id
+     * @return Integer
+     */
+    Integer  delete(Integer  id);
+}

+ 71 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/PostageAuthorityServiceImpl.java

@@ -0,0 +1,71 @@
+package com.iamberry.rst.service.cm;
+
+import com.iamberry.rst.core.cm.PostageAuthority;
+import com.iamberry.rst.faces.cm.PostageAuthorityService;
+import com.iamberry.rst.service.cm.mapper.PostageAuthorityMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ *  邮费权限流程控制表接口
+ * @author -
+ * @Date 2018-04-09
+ */
+@Service
+public class PostageAuthorityServiceImpl  implements PostageAuthorityService {
+    @Autowired
+    private PostageAuthorityMapper postageAuthorityMapper;
+    /**
+     * 获取集合
+     * @param  postageAuthority
+     * @return List
+     */
+    @Override
+    public List<PostageAuthority> getPostageAuthorityList(PostageAuthority  postageAuthority){
+        return  postageAuthorityMapper.getPostageAuthorityList(postageAuthority);
+    }
+
+    @Override
+    public List<PostageAuthority> getPostageAuthorityListByAdminId(Integer adminId) {
+        return  postageAuthorityMapper.getPostageAuthorityListByAdminId(adminId);
+    }
+
+    /**
+     * 查询单条数据
+     * @param  id
+     * @return  postageAuthority
+     */
+    @Override
+    public  PostageAuthority  getPostageAuthorityById(Integer  id){
+        return  postageAuthorityMapper.getPostageAuthorityById(id);
+    }
+    /**
+     * 增加数据
+     * @param  postageAuthority
+     * @return Integer
+     */
+    @Override
+    public  Integer  save(PostageAuthority  postageAuthority){
+        return  postageAuthorityMapper.save(postageAuthority);
+    }
+    /**
+     * 修改数据
+     * @param  postageAuthority
+     * @return Integer
+     */
+    @Override
+    public  Integer  update(PostageAuthority  postageAuthority){
+        return  postageAuthorityMapper.update(postageAuthority);
+    }
+    /**
+     * 删除数据
+     * @param  id
+     * @return Integer
+     */
+    @Override
+    public  Integer  delete(Integer  id){
+        return  postageAuthorityMapper.delete(id);
+    }
+}

+ 3 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java

@@ -28,6 +28,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.xml.crypto.Data;
+import java.beans.Transient;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -89,6 +90,7 @@ public class SalesOrderServiceImpl implements SalesOrderService {
     }
 
     @Override
+    @Transient
     public boolean addOrderAndItem(SalesOrder salesOrder, List<SalesOrderItem> list) throws Exception {
         if (list == null || list.size() == 0) {
             return false;
@@ -363,6 +365,7 @@ public class SalesOrderServiceImpl implements SalesOrderService {
     }
 
     @Override
+    @Transient
     public boolean syncEfastOrder(JSONObject orderInfo) throws Exception {
         if (orderInfo == null) {
             return false;

+ 51 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/PostageAuthorityMapper.java

@@ -0,0 +1,51 @@
+package com.iamberry.rst.service.cm.mapper;
+
+import com.iamberry.rst.core.cm.PostageAuthority;
+
+import java.util.List;
+
+/**
+ *  邮费权限流程控制表接口
+ * @author -
+ * @Date 2018-04-09
+ */
+public interface PostageAuthorityMapper {
+    /**
+     * 获取集合
+     * @param  postageAuthority
+     * @return List
+     */
+    List<PostageAuthority> getPostageAuthorityList(PostageAuthority  postageAuthority);
+
+    /**
+     * 获取集合
+     * @param  adminId
+     * @return List
+     */
+    List<PostageAuthority> getPostageAuthorityListByAdminId(Integer adminId);
+
+    /**
+     * 查询单条数据
+     * @param  id
+     * @return  postageAuthority
+     */
+    PostageAuthority  getPostageAuthorityById(Integer  id);
+    /**
+     * 增加数据
+     * @param  postageAuthority
+     * @return Integer
+     */
+    Integer  save(PostageAuthority  postageAuthority);
+    /**
+     * 修改数据
+     * @param  postageAuthority
+     * @return Integer
+     */
+    Integer  update(PostageAuthority  postageAuthority);
+    /**
+     * 删除数据
+     * @param  id
+     * @return Integer
+     */
+    Integer  delete(Integer  id);
+}

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

@@ -17,6 +17,7 @@
                 renewed_back_name AS  relationBackName,
                 renewed_back_tel AS  relationBackTel,
                 renewed_back_status  AS relationBackStatus,
+                renewed_back_receipt_date  AS relationBackReceiptDate,
                 renewed_back_logistics_company AS relationBackLogisticsCompany,
                 renewed_back_logistics_no AS relationBackLogisticsNo,
                 renewed_back_postage AS relationBackPostage,
@@ -48,6 +49,7 @@
                 repair_back_name AS  relationBackName,
                 repair_back_tel AS  relationBackTel,
                 repair_back_status  AS relationBackStatus,
+                repair_back_receipt_date  AS relationBackReceiptDate,
                 repair_back_logistics_company AS relationBackLogisticsCompany,
                 repair_back_logistics_no AS relationBackLogisticsNo,
                 repair_back_postage AS relationBackPostage,
@@ -79,6 +81,7 @@
                 NULL AS  relationBackName,
                 NULL AS  relationBackTel,
                 NULL  AS relationBackStatus,
+                NULL  AS relationBackReceiptDate,
                 NULL AS relationBackLogisticsCompany,
                 NULL AS relationBackLogisticsNo,
                 NULL AS relationBackPostage,
@@ -110,6 +113,7 @@
                 back_goods_back_name AS  relationBackName,
                 back_goods_back_tel AS  relationBackTel,
                 back_goods_back_status  AS relationBackStatus,
+                back_goods_back_receipt_date  AS relationBackReceiptDate,
                 back_goods_back_logistics_company AS relationBackLogisticsCompany,
                 back_goods_back_logistics_no AS relationBackLogisticsNo,
                 back_goods_back_postage AS relationBackPostage,
@@ -141,6 +145,7 @@
                 noreason_back_back_name AS  relationBackName,
                 noreason_back_back_tel AS  relationBackTel,
                 noreason_back_back_status  AS relationBackStatus,
+                noreason_back_receipt_date  AS relationBackReceiptDate,
                 noreason_back_back_logistics_company AS relationBackLogisticsCompany,
                 noreason_back_back_logistics_no AS relationBackLogisticsNo,
                 noreason_back_back_postage AS relationBackPostage,

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

@@ -21,7 +21,7 @@
     <result column="noreason_back_create_time" property="noreasonBackCreateTime" jdbcType="TIMESTAMP" />
     <result column="noreason_back_update_time" property="noreasonBackUpdateTime" jdbcType="TIMESTAMP" />
     <result column="noreason_back_alipay_name" property="noreasonBackAlipayName" jdbcType="VARCHAR" />
-    <result column="noreason_back_receipt_date" property="noreasonCackReceiptDate" jdbcType="TIMESTAMP" />
+    <result column="noreason_back_receipt_date" property="noreasonBackReceiptDate" jdbcType="TIMESTAMP" />
   </resultMap>
   <sql id="Base_Column_List" >
     noreason_back_id, customer_id, order_id, signclosed_id, noreason_back_back_status, 
@@ -106,7 +106,7 @@
     <result column="noreason_back_create_time" property="noreasonBackCreateTime" jdbcType="TIMESTAMP" />
     <result column="noreason_back_update_time" property="noreasonBackUpdateTime" jdbcType="TIMESTAMP" />
     <result column="noreason_back_alipay_name" property="noreasonBackAlipayName" jdbcType="VARCHAR" />
-    <result column="noreason_back_receipt_date" property="noreasonCackReceiptDate" jdbcType="TIMESTAMP" />
+    <result column="noreason_back_receipt_date" property="noreasonBackReceiptDate" jdbcType="TIMESTAMP" />
     <collection property="complaintDetectList" column="customer_id" ofType="ComplaintDetectInfo" select="listComplaintDetect"/>
   </resultMap>
 
@@ -156,7 +156,7 @@
       #{noreasonBackBackLogisticsNo,jdbcType=VARCHAR}, #{noreasonBackBackPostage,jdbcType=INTEGER}, 
       #{noreasonBackBackMachineNo,jdbcType=VARCHAR}, #{noreasonBackDesc,jdbcType=VARCHAR}, 
       #{noreasonBackState,jdbcType=BIT}, #{noreasonBackAlipay,jdbcType=VARCHAR},#{noreasonBackAlipayName,jdbcType=VARCHAR}, #{noreasonBackIsTransfer,jdbcType=BIT},
-       #{noreasonCackReceiptDate,jdbcType=TIMESTAMP}
+       #{noreasonBackReceiptDate,jdbcType=TIMESTAMP}
       )
   </insert>
 
@@ -215,8 +215,8 @@
       <if test="noreasonBackAlipayName != null" >
         noreason_back_alipay_name = #{noreasonBackAlipayName},
       </if>
-      <if test="noreasonCackReceiptDate != null" >
-        noreason_back_receipt_date = #{noreasonCackReceiptDate},
+      <if test="noreasonBackReceiptDate != null" >
+        noreason_back_receipt_date = #{noreasonBackReceiptDate},
       </if>
     </set>
     where noreason_back_id = #{noreasonBackId}

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

@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.iamberry.rst.service.cm.mapper.PostageAuthorityMapper">
+    <resultMap  id="BaseResultMap" type="PostageAuthority" >
+        <result    column="authority_id"    property="authorityId" />
+        <result    column="company_id"    property="companyId" />
+        <result    column="authority_customer_manager"    property="authorityCustomerManager" />
+        <result    column="authority_financial_manager"    property="authorityFinancialManager" />
+        <result    column="authority_financial_payment"    property="authorityFinancialPayment" />
+        <result    column="authority_status"    property="authorityStatus" />
+        <result    column="authority_create_time"    property="authorityCreateTime" />
+        <result    column="authority_update_time"    property="authorityUpdateTime" />
+    </resultMap>
+    <sql    id="Base_List" >
+        t.authority_id,
+        t.company_id,
+        t.authority_customer_manager,
+        t.authority_financial_manager,
+        t.authority_financial_payment,
+        t.authority_status,
+        t.authority_create_time,
+        t.authority_update_time
+    </sql>
+    <select id="getPostageAuthorityList" resultMap="BaseResultMap" parameterType="PostageAuthority" >
+        select
+        <include refid="Base_List" />
+        from tb_rst_postage_authority t
+        <where>
+            <if test="authorityId != null ">
+                AND t.authority_id = #{authorityId}
+            </if >
+            <if test="companyId != null ">
+                AND t.company_id = #{companyId}
+            </if >
+            <if test="authorityCustomerManager != null ">
+                AND t.authority_customer_manager = #{authorityCustomerManager}
+            </if >
+            <if test="authorityFinancialManager != null ">
+                AND t.authority_financial_manager = #{authorityFinancialManager}
+            </if >
+            <if test="authorityFinancialPayment != null ">
+                AND t.authority_financial_payment = #{authorityFinancialPayment}
+            </if >
+            <if test="authorityStatus != null ">
+                AND t.authority_status = #{authorityStatus}
+            </if >
+        </where>
+    </select>
+
+    <select id="getPostageAuthorityListByAdminId" resultMap="BaseResultMap" parameterType="Integer" >
+        select
+        <include refid="Base_List" />
+        from tb_rst_postage_authority t
+        WHERE
+          (
+            t.authority_customer_manager = #{adminId}
+            OR
+            t.authority_financial_manager = #{adminId}
+            OR
+            t.authority_financial_payment = #{adminId}
+          )
+            AND t.authority_status = 1
+    </select>
+
+
+    <select id="getPostageAuthorityById" resultMap="BaseResultMap" parameterType="Integer" >
+        select
+        <include refid="Base_List" />
+        from tb_rst_postage_authority t
+        where t.authority_id= #{authorityId}
+    </select>
+    <insert id="save" parameterType="PostageAuthority" >
+        insert into
+        tb_rst_postage_authority
+        (
+        authority_id,
+        company_id,
+        authority_customer_manager,
+        authority_financial_manager,
+        authority_financial_payment,
+        authority_status
+        )
+        values
+        (
+        #{authorityId},
+        #{companyId},
+        #{authorityCustomerManager},
+        #{authorityFinancialManager},
+        #{authorityFinancialPayment},
+        #{authorityStatus}
+        )
+    </insert>
+    <update id="update" parameterType="PostageAuthority" >
+        update
+        tb_rst_postage_authority
+        <set >
+            <if test="authorityId != null ">
+                authority_id = #{authorityId},
+            </if >
+            <if test="companyId != null ">
+                company_id = #{companyId},
+            </if >
+            <if test="authorityCustomerManager != null ">
+                authority_customer_manager = #{authorityCustomerManager},
+            </if >
+            <if test="authorityFinancialManager != null ">
+                authority_financial_manager = #{authorityFinancialManager},
+            </if >
+            <if test="authorityFinancialPayment != null ">
+                authority_financial_payment = #{authorityFinancialPayment},
+            </if >
+            <if test="authorityStatus != null ">
+                authority_status = #{authorityStatus},
+            </if >
+        </set >
+        where authority_id= #{authorityId}
+    </update>
+    <delete id="delete" parameterType="Integer" >
+        delete
+            tb_rst_postage_authority
+        where authority_id=#{authorityId}
+    </delete>
+</mapper>

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

@@ -18,12 +18,13 @@
     <result column="postage_amount" property="postageAmount" jdbcType="INTEGER" />
     <result column="postage_alipay" property="postageAlipay" jdbcType="VARCHAR" />
     <result column="postage_alipay_name" property="postageAlipayName" jdbcType="VARCHAR" />
+    <result column="postage_logistics_img" property="postageLogisticsImg" jdbcType="VARCHAR" />
     <result column="postage_create_time" property="postageCreateTime" jdbcType="TIMESTAMP" />
     <result column="postage_update_time" property="postageUpdateTime" jdbcType="TIMESTAMP" />
   </resultMap>
 
   <sql id="Base_Column_List" >
-    p.postage_id, p.admin_id, p.customer_id,  p.postage_customer_status, p.postage_manager_status, p.postage_finance_status,
+    p.postage_id, p.admin_id, p.customer_id, p.company_id,  p.postage_customer_status, p.postage_manager_status, p.postage_finance_status,p.postage_logistics_img,
     p.postage_order_source, p.postage_treatment_method, p.sales_orderId, p.postage_client_name,
     p.postage_client_tel,p.postage_client_address, p.postage_logistics_company, p.postage_logistics_no, p.postage_amount,
     p.postage_alipay, p.postage_alipay_name, p.postage_create_time, p.postage_update_time
@@ -83,6 +84,12 @@
       <if test="postageAlipayName != null and postageAlipayName != ''">
         AND p.postage_alipay_name like CONCAT('%',#{postageAlipayName},'%')
       </if>
+      <if test="companyIds != null and companyIds != ''">
+        AND p.company_id IN
+          <foreach collection="companyIds" item="item" index="index" separator="," open="(" close=")">
+            #{item}
+          </foreach >
+      </if>
     </where>
     ORDER BY postage_id DESC
   </select>
@@ -99,21 +106,21 @@
   </select>
 
     <insert id="savePostage" parameterType="Postage" >
-    insert into tb_rst_postage (postage_id, admin_id, customer_id, postage_customer_status,
+    insert into tb_rst_postage (postage_id, admin_id, customer_id, company_id, postage_customer_status,
     postage_manager_status, postage_finance_status,
     postage_order_source, postage_treatment_method,
     sales_orderId, postage_client_name, postage_client_tel,
     postage_client_address,
     postage_logistics_company, postage_logistics_no,
-    postage_amount, postage_alipay, postage_alipay_name
+    postage_amount, postage_alipay, postage_alipay_name,postage_logistics_img
     )
-    values (#{postageId,jdbcType=INTEGER}, #{adminId,jdbcType=INTEGER}, #{customerId,jdbcType=INTEGER}, #{postageCustomerStatus,jdbcType=INTEGER},
+    values (#{postageId,jdbcType=INTEGER}, #{adminId,jdbcType=INTEGER}, #{customerId,jdbcType=INTEGER},#{companyId,jdbcType=INTEGER}, #{postageCustomerStatus,jdbcType=INTEGER},
     #{postageManagerStatus,jdbcType=INTEGER}, #{postageFinanceStatus,jdbcType=INTEGER},
     #{postageOrderSource,jdbcType=INTEGER}, #{postageTreatmentMethod,jdbcType=INTEGER},
     #{salesOrderId,jdbcType=VARCHAR}, #{postageClientName,jdbcType=VARCHAR}, #{postageClientTel,jdbcType=VARCHAR},
     #{postageClientAddress,jdbcType=VARCHAR},
     #{postageLogisticsCompany,jdbcType=VARCHAR}, #{postageLogisticsNo,jdbcType=VARCHAR},
-    #{postageAmount,jdbcType=INTEGER}, #{postageAlipay,jdbcType=VARCHAR}, #{postageAlipayName,jdbcType=VARCHAR}
+    #{postageAmount,jdbcType=INTEGER}, #{postageAlipay,jdbcType=VARCHAR}, #{postageAlipayName,jdbcType=VARCHAR}, #{postageLogisticsImg,jdbcType=VARCHAR}
     )
   </insert>
 
@@ -123,6 +130,9 @@
       <if test="adminId != null" >
         admin_id = #{adminId,jdbcType=INTEGER},
       </if>
+      <if test="companyId != null" >
+        company_id = #{companyId,jdbcType=INTEGER},
+      </if>
       <if test="customerId != null" >
         customer_id = #{customerId,jdbcType=INTEGER},
       </if>

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

@@ -1774,6 +1774,62 @@ public class AdminCustomerController {
             return new ResponseJson(500, "请填写邮费信息", 500);
         }
 
+        if(customerInfo.getCompanyId() == null || customerInfo.getCompanyId() == 0 ){
+            return new ResponseJson(500, "未正确选择销售公司", 500);
+        }
+
+        Postage age = new Postage();
+        age.setCustomerId(customerInfo.getCustomerId());    //客诉id
+        List<Postage> postageList = postageService.listPostage(age);
+        if(postageList != null && postageList.size() > 0){
+            return new ResponseJson(500, "该条客诉已在申请邮费中了", 500);
+        }
+
+        ResponseJson rj = new ResponseJson(200, "可以申请邮费", 200);
+        rj.addResponseKeyValue("customerCommon",customerCommon);
+        rj.addResponseKeyValue("customerInfo",customerInfo);
+        return rj;
+    }
+
+    /**
+     * 申请邮费
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("customer:applyPostage:customer")
+    @RequestMapping(value = "/add_postage")
+    public ResponseJson addPostage(HttpServletRequest request, Integer customerId,String postageLogisticsImg) throws Exception {
+        CustomerInfo customerInfo = customerService.getCustomerInfo(customerId);
+        if(customerInfo == null){
+            return new ResponseJson(500, "未获取到客诉", 500);
+        }
+
+        CustomerCommon customerCommon = new CustomerCommon();
+        customerCommon.setCustomerId(customerId);
+        List<CustomerCommon> customerCommonList = customerCommonService.listCustomerCommon(customerCommon);
+        customerCommon = customerCommonList.get(0);
+
+        if(customerCommon.getRelationBackStatus() == 1){    //1:未寄回  2:已寄回  3:已收货  4:已签收待确认
+            return new ResponseJson(500, "请修改寄回状态,并填写寄回信息", 500);
+        }
+
+        if(customerCommon.getRelationBackStatus() == 2){    //1:未寄回  2:已寄回  3:已收货  4:已签收待确认
+            return new ResponseJson(500, "产品正在寄回中!", 500);
+        }
+
+        if(customerCommon.getRelationIsTransfer() == 0){    //relationIsTransfer 是否需要转账邮费  0:不需要 10:需要转账
+            return new ResponseJson(500, "请修改邮费转账状态,并填写邮费信息", 500);
+        }
+
+        if(customerCommon.getRelationBackPostage() == null || customerCommon.getRelationBackPostage() == 0  //relationBackPostage
+                || customerCommon.getRelationAlipay() == null || customerCommon.getRelationAlipayName() == null ){
+            return new ResponseJson(500, "请填写邮费信息", 500);
+        }
+
+        if(customerInfo.getCompanyId() == null || customerInfo.getCompanyId() == 0 ){
+            return new ResponseJson(500, "未正确选择销售公司", 500);
+        }
+
         Postage age = new Postage();
         age.setCustomerId(customerInfo.getCustomerId());    //客诉id
         List<Postage> postageList = postageService.listPostage(age);
@@ -1783,6 +1839,7 @@ public class AdminCustomerController {
 
         Integer flag = 0;
         Postage postage = new Postage();
+        postage.setCompanyId(customerInfo.getCompanyId());      //销售公司
         postage.setAdminId(customerInfo.getAdminId());      //客服
         postage.setCustomerId(customerInfo.getCustomerId());        //客诉id
         postage.setPostageCustomerStatus(2);            //------考虑手动点, 直接变为申请中
@@ -1798,6 +1855,7 @@ public class AdminCustomerController {
         postage.setPostageAmount(customerCommon.getRelationBackPostage());  //寄回邮费
         postage.setPostageAlipay(customerCommon.getRelationAlipay());   //支付宝账户
         postage.setPostageAlipayName(customerCommon.getRelationAlipayName());   //支付宝账号名称
+        postage.setPostageLogisticsImg(postageLogisticsImg);
         flag = postageService.savePostage(postage);
 
         if(flag < 1){

+ 150 - 125
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminPostageController.java

@@ -1,12 +1,10 @@
 package com.iamberry.rst.controllers.cm;
 
-import com.iamberry.rst.core.cm.ComplaintTypeInfo;
-import com.iamberry.rst.core.cm.CustomerInfo;
-import com.iamberry.rst.core.cm.Postage;
-import com.iamberry.rst.core.cm.QuestionDescribe;
+import com.iamberry.rst.core.cm.*;
 import com.iamberry.rst.core.order.ProductType;
 import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.core.sys.Admin;
+import com.iamberry.rst.faces.cm.PostageAuthorityService;
 import com.iamberry.rst.faces.cm.PostageService;
 import com.iamberry.rst.faces.sys.SysService;
 import com.iamberry.rst.utils.AdminUtils;
@@ -23,8 +21,11 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
+import java.lang.reflect.Array;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * Created by wxm
@@ -38,6 +39,8 @@ public class AdminPostageController {
     @Autowired
     private PostageService postageService;
     @Autowired
+    private PostageAuthorityService postageAuthorityService;
+    @Autowired
     private SysService sysService;
 
     /**
@@ -53,166 +56,188 @@ public class AdminPostageController {
                                     @RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
                                     @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum) {
         ModelAndView mv = new ModelAndView("cm/postage/postage_list");
-        List<String> operation = getAdminDept();      //1=客服  2=客服经理 3=财务经理 4=财务打款
-        PagedResult<Postage> pagedResult = postageService.listPostage(pageNO, pageSize, postage, totalNum == 0);
+        Admin loginAdmin = AdminUtils.getLoginAdmin();
+
+        PagedResult<Postage> pagedResult = new PagedResult<>();
+
+        //获取登录人id
+        if(loginAdmin.getAdminDept() == 3 && loginAdmin.getAdminManager() == 1){        //员工
+            postage.setAdminId(loginAdmin.getAdminId());
+        }else if(loginAdmin.getAdminDept() == 3 && loginAdmin.getAdminManager() == 2) {
+
+        }else{
+            /*  获取个人权限所属的销售公司 ,只查询所分的权限的列表 */
+            ArrayList companyIdList = new ArrayList();
+            List<PostageAuthority> postageAuthorityList = postageAuthorityService.getPostageAuthorityListByAdminId(loginAdmin.getAdminId());
+            for (PostageAuthority postageAuthority:postageAuthorityList ) {
+                companyIdList.add(postageAuthority.getCompanyId());
+            }
+            Integer[] companyIds = (Integer[]) companyIdList.toArray(new Integer[companyIdList.size()]);//能正确运行
+            if(companyIds == null || companyIds.length == 0){
+                companyIds = new Integer[]{99};
+            }
+            postage.setCompanyIds(companyIds);
+        }
+        pagedResult = postageService.listPostage(pageNO, pageSize, postage, totalNum == 0);
         if (totalNum != 0) {
             pagedResult.setTotal(totalNum);
         }
-        //查询跟进客服集合
-        Admin admin = new Admin();
-        admin.setAdminStatus(1);
-        List<Admin> adminList = sysService.listSelectAdmin(admin);
 
-        mv.addObject("operation", operation);
-        mv.addObject("adminList", adminList);
+        getManager(loginAdmin,pagedResult);
+
         StitchAttrUtil.setModelAndView(postage, mv, "/admin/postage/postage_list", pagedResult);
         return mv;
     }
 
-    /**
-     * 获取登录用户的权限
-     * @return
-     */
-    private List<String> getAdminDept(){
-        //获取登录人id
-        Admin loginAdmin = AdminUtils.getLoginAdmin();
-        //判断当前登录人权限
-        List<String> operation = sysService.listPermissionShiro(loginAdmin.getAdminId());
-        return operation;
-    }
 
+    private void getManager(Admin loginAdmin,PagedResult<Postage> pagedResult){
+        for (int i=0;i<pagedResult.getDataList().size();i++){
 
-    /**
-     * 客服确认状态
-     * @return
-     */
-    @ResponseBody
-    @RequiresPermissions("postage:update:confirm")
-    @RequestMapping(value = "/updateConfirmPostage")
-    public ResponseJson updateConfirmPostage(HttpServletRequest request, Integer postageId,Integer status) throws Exception {
-        if(postageId == null || postageId == 0){
-            return new ResponseJson(500, "未获取到记录id", 500);
-        }
-        if( status == null || status == 0){
-            return new ResponseJson(500, "修改失败,请重试", 500);
-        }
-        Postage post = postageService.getPostage(postageId);
-        Postage postage = new Postage();
-        postage.setPostageId(postageId);
-        //判断修改类型 1=客服修改申请状态 2=客服经理修改审核状态 3=财务经理修改审核转账状态
-        Integer num = 0;
-        if(post.getPostageCustomerStatus() == 1){
-            if(status == 2){
-                postage.setPostageCustomerStatus(status);   //申请中,
-                postage.setPostageManagerStatus(1);     //审核中
+            Integer companyId = pagedResult.getDataList().get(i).getCompanyId();
+
+            Map<String,Integer> map = new HashMap<>();
+            ArrayList authorityCustomerManagerList =  new ArrayList();
+            ArrayList authorityFinancialManagerList =  new ArrayList();
+            ArrayList authorityFinancialPaymentList =  new ArrayList();
+            List<PostageAuthority> postageAuthorityList = postageAuthorityService.getPostageAuthorityListByAdminId(loginAdmin.getAdminId());
+            for (PostageAuthority postageAuthority:postageAuthorityList ) {
+                if(companyId == postageAuthority.getCompanyId()){
+                    if(loginAdmin.getAdminId() == postageAuthority.getAuthorityCustomerManager()){
+                        authorityCustomerManagerList.add(postageAuthority.getAuthorityCustomerManager());
+                    }
+                    if(loginAdmin.getAdminId() == postageAuthority.getAuthorityFinancialManager()){
+                        authorityFinancialManagerList.add(postageAuthority.getAuthorityFinancialManager());
+                    }
+                    if(loginAdmin.getAdminId() == postageAuthority.getAuthorityFinancialPayment()){
+                        authorityFinancialPaymentList.add(postageAuthority.getAuthorityFinancialPayment());
+                    }
+                }
+            }
+            if(authorityCustomerManagerList != null && authorityCustomerManagerList.size() > 0){
+                pagedResult.getDataList().get(i).setCustomerManager(1);
+            }else{
+                pagedResult.getDataList().get(i).setCustomerManager(0);
             }
-            num = postageService.updatePostage(postage);
-        }
 
-        if(num > 0){
-            return new ResponseJson(200, "修改成功", 200);
-        }else{
-            return new ResponseJson(500, "修改失败", 500);
-        }
-    }
+            if(authorityFinancialManagerList != null && authorityFinancialManagerList.size() > 0){
+                pagedResult.getDataList().get(i).setFinanceManager(1);
+            }else{
+                pagedResult.getDataList().get(i).setFinanceManager(0);
+            }
 
-    /**
-     * 客服经理审核
-     * @return
-     */
-    @ResponseBody
-    @RequiresPermissions("postage:customer:review")
-    @RequestMapping(value = "/updateCustomerReview")
-    public ResponseJson updatePostageStatus(HttpServletRequest request, Integer postageId,Integer status) throws Exception {
-        if(postageId == null || postageId == 0){
-            return new ResponseJson(500, "未获取到记录id", 500);
-        }
-        if(status == null || status == 0){
-            return new ResponseJson(500, "修改失败,请重试", 500);
-        }
-        Postage post = postageService.getPostage(postageId);
-        Integer num = 0;
-        if(post.getPostageManagerStatus() == 1){          //审核中
-            Postage postage = new Postage();
-            postage.setPostageId(postageId);
-            if(status == 2){    //状态(客服经理审核)1:审核中 2:通过  3:驳回
-                postage.setPostageManagerStatus(status);
-                postage.setPostageFinanceStatus(1);     //审核中
+            if(authorityFinancialPaymentList != null && authorityFinancialPaymentList.size() > 0){
+                pagedResult.getDataList().get(i).setFinancePay(1);
             }else{
-                postage.setPostageManagerStatus(status);    //驳回
+                pagedResult.getDataList().get(i).setFinancePay(0);
             }
-            num = postageService.updatePostage(postage);
-        }
 
-        if(num > 0){
-            return new ResponseJson(200, "修改成功", 200);
-        }else{
-            return new ResponseJson(500, "修改失败", 500);
+            if(pagedResult.getDataList().get(i).getAdminId() == loginAdmin.getAdminId()){
+                pagedResult.getDataList().get(i).setCustomerConfirm(1);
+            }else{
+                pagedResult.getDataList().get(i).setCustomerConfirm(0);
+            }
         }
     }
 
     /**
-     * 财务经理审核
+     *  验证审核权限
+     * @param companyId 销售公司
+     * @param reviewNumber  2:客服经理  3:财务审核   4:财务打款
      * @return
      */
-    @ResponseBody
-    @RequiresPermissions("postage:finance:review")
-    @RequestMapping(value = "/updateFinanceReview")
-    public ResponseJson updateFinanceReview(HttpServletRequest request, Integer postageId,Integer status) throws Exception {
-        if(postageId == null || postageId == 0){
-            return new ResponseJson(500, "未获取到记录id", 500);
-        }
-        if(status == null || status == 0){
-            return new ResponseJson(500, "修改失败,请重试", 500);
-        }
-        Postage post = postageService.getPostage(postageId);
-        Integer num = 0;
-
-        if((post.getPostageFinanceStatus() == 1) ){
-            Postage postage = new Postage();
-            postage.setPostageId(postageId);
-            //状态(财务审核) 1:审核中 2:通过(已申请待转账)  3:驳回  4:已转账
-            postage.setPostageFinanceStatus(status);
-            num = postageService.updatePostage(postage);
-        }
+    private boolean verificaAuthority(Integer companyId,Integer reviewNumber){
+        if(companyId == null ) return false;
 
-        if(num > 0){
-            return new ResponseJson(200, "修改成功", 200);
-        }else{
-            return new ResponseJson(500, "修改失败", 500);
+        //获取登录人id
+        Admin loginAdmin = AdminUtils.getLoginAdmin();
+        boolean flag = false;
+        PostageAuthority postageAuthority = new PostageAuthority();
+        postageAuthority.setCompanyId(companyId);
+        List<PostageAuthority> postageAuthorityList =  postageAuthorityService.getPostageAuthorityList(postageAuthority);
+        for (PostageAuthority authority : postageAuthorityList) {
+            switch (reviewNumber){
+                case 2:
+                    if(authority.getAuthorityCustomerManager() == loginAdmin.getAdminId()){
+                        flag = true;
+                    }
+                    break;
+                case 3:
+                    if(authority.getAuthorityFinancialManager() == loginAdmin.getAdminId()){
+                        flag = true;
+                    }
+                    break;
+                case 4:
+                    if(authority.getAuthorityFinancialPayment() == loginAdmin.getAdminId()){
+                        flag = true;
+                    }
+                    break;
+            }
         }
+        return flag;
     }
 
-
     /**
-     * 财务经理打款
+     * 客服确认状态
      * @return
      */
     @ResponseBody
-    @RequiresPermissions("postage:finance:money")
-    @RequestMapping(value = "/updateFinanceMoney")
-    public ResponseJson updateFinanceMoney(HttpServletRequest request, Integer postageId,Integer status) throws Exception {
+    @RequiresPermissions("postage:update:confirm")
+    @RequestMapping(value = "/updateConfirmPostage")
+    public ResponseJson updateConfirmPostage(HttpServletRequest request, Integer postageId,Integer status,Integer type) throws Exception {
         if(postageId == null || postageId == 0){
             return new ResponseJson(500, "未获取到记录id", 500);
         }
-        if(status == null || status == 0){
-            return new ResponseJson(500, "修改失败,请重试", 500);
+        if( status == null || status == 0){
+            return new ResponseJson(500, "修改状态失败,请重试", 500);
         }
         Postage post = postageService.getPostage(postageId);
+
+        Postage postage = new Postage();
+        postage.setPostageId(postageId);
+        //判断修改类型 1=客服修改申请状态 2=客服经理修改审核状态 3=财务经理修改审核转账状态
         Integer num = 0;
+        switch (type){
+            case 1:     ////客服确认
+                if(post.getPostageCustomerStatus() == 1){
+                    if(status == 2){
+                        postage.setPostageCustomerStatus(status);   //申请中,
+                        postage.setPostageManagerStatus(1);     //审核中
+                    }
+                    num = postageService.updatePostage(postage);
+                }
+                break;
+            case 2:     //客服经理审核
+                if(post.getPostageManagerStatus() == 1 && verificaAuthority(post.getCompanyId(),2)){          //审核中
+                    if(status == 2){    //状态(客服经理审核)1:审核中 2:通过  3:驳回
+                        postage.setPostageManagerStatus(status);
+                        postage.setPostageFinanceStatus(1);     //审核中
+                    }else{
+                        postage.setPostageManagerStatus(status);    //驳回
+                    }
+                    num = postageService.updatePostage(postage);
+                }
+                break;
+            case 3:         //财务审核
+                if((post.getPostageFinanceStatus() == 1) && verificaAuthority(post.getCompanyId(),3)){
+                    //状态(财务审核) 1:审核中 2:通过(已申请待转账)  3:驳回  4:已转账
+                    postage.setPostageFinanceStatus(status);
+                    num = postageService.updatePostage(postage);
+                }
+                break;
+            case 4:     //财务打款
 
-        if((post.getPostageFinanceStatus() == 2) ){
-            Postage postage = new Postage();
-            postage.setPostageId(postageId);
-            //状态(财务审核) 1:审核中 2:通过(已申请待转账)  3:驳回  4:已转账
-            postage.setPostageFinanceStatus(status);
-            num = postageService.updatePostage(postage);
+                if((post.getPostageFinanceStatus() == 2) && verificaAuthority(post.getCompanyId(),4)){
+                    //状态(财务审核) 1:审核中 2:通过(已申请待转账)  3:驳回  4:已转账
+                    postage.setPostageFinanceStatus(status);
+                    num = postageService.updatePostage(postage);
+                }
+                break;
         }
 
         if(num > 0){
-            return new ResponseJson(200, "修改成功", 200);
+            return new ResponseJson(200, "修改状态成功", 200);
         }else{
-            return new ResponseJson(500, "修改失败", 500);
+            return new ResponseJson(500, "修改状态失败", 500);
         }
     }
 
@@ -231,9 +256,9 @@ public class AdminPostageController {
         num = postageService.delPostage(postageId);
 
         if(num > 0){
-            return new ResponseJson(200, "修改成功", 200);
+            return new ResponseJson(200, "修改状态成功", 200);
         }else{
-            return new ResponseJson(500, "修改失败", 500);
+            return new ResponseJson(500, "修改状态失败", 500);
         }
     }
 

+ 1 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminSalesOrderController.java

@@ -307,7 +307,7 @@ public class AdminSalesOrderController {
         if (!StringUtils.isNotEmpty(salesDealCode)) {
             return new ResponseJson(500, "订单编号不能为空,请重新输入!", 500);
         }
-        //根据时间排序查询订单信息
+        //根据时间排序查询订单 信息
         SalesOrder salesOrder = new SalesOrder();
         salesOrder.setSalesOrderId(salesDealCode);
         int num = salesOrderService.getOrderInfoCount(salesOrder);

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

@@ -453,4 +453,12 @@ public class MQTask implements InitializingBean {
 	}
 
 
+	/**客诉系统  自动追踪发货信息**/
+//	@Scheduled(cron = "0 0/30 * * * ?")//每30分钟执行一次
+//	//	@Scheduled(cron = "0 0 9 * * ?")//每天上午午9点触发
+//	public void postageRemind()throws Exception{
+//
+//	}
+
+
 }

+ 2 - 0
watero-rst-web/src/main/resources/watero-rst-orm.xml

@@ -82,6 +82,7 @@
 		<typeAlias type="com.iamberry.rst.core.cm.Visit" alias="Visit"/>
 		<typeAlias type="com.iamberry.rst.core.cm.CustomerCommon" alias="CustomerCommon"/>
 		<typeAlias type="com.iamberry.rst.core.cm.Postage" alias="Postage"/>
+		<typeAlias type="com.iamberry.rst.core.cm.PostageAuthority" alias="PostageAuthority"/>
 
 		<typeAlias type="com.iamberry.rst.core.sys.SysConfig" alias="SysConfig"/>
 
@@ -143,6 +144,7 @@
 		<mapper resource="com/iamberry/rst/service/cm/mapper/storeInfoMapper.xml"/>
 		<mapper resource="com/iamberry/rst/service/cm/mapper/customerCommonMapper.xml"/>
 		<mapper resource="com/iamberry/rst/service/cm/mapper/postageMapper.xml"/>
+		<mapper resource="com/iamberry/rst/service/cm/mapper/postageAuthorityMapper.xml"/>
 
 		<mapper resource="com/iamberry/rst/service/address/mapper/addressMapper.xml"/>
 

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

@@ -26,6 +26,7 @@
             white-space: nowrap;
             text-overflow: ellipsis;
         }
+        .postage-table{float: left;width: 150px;height: 30px;line-height: 30px;}
     </style>
 </head>
 <body>
@@ -47,7 +48,7 @@
 
             <#--<input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerInfo.describeTitle!}" placeholder="请输入问题描述" id="describeTitle" name="describeTitle">-->
 
-            <select class="my-select" name="customerIsSolve" id="customerIsSolve" style="height: 36px;width: 100px;margin: 0px;padding: 6px 10px 6px 15px;margin-bottom: 10px;">
+            <select class="my-select" name="customerIsSolve" id="customerIsSolve" style="height: 36px;width: 100px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
                 <option value="">处理结果</option>
                 <option value="1" <#if customerInfo.customerIsSolve??><#if customerInfo.customerIsSolve == 1 >selected="selected"</#if></#if>>已解决</option>
                 <option value="2" <#if customerInfo.customerIsSolve??><#if customerInfo.customerIsSolve == 2 >selected="selected"</#if></#if>>未解决</option>
@@ -58,13 +59,13 @@
                 <option value="7" <#if customerInfo.customerIsSolve??><#if customerInfo.customerIsSolve == 7 >selected="selected"</#if></#if>>无理由退货</option>
             </select>
 
-            <select class="my-select" name="customerSourceType" id="customerSourceType" style="height: 36px;width: 100px;margin: 0px;padding: 6px 10px 6px 15px;margin-bottom: 10px;">
+            <select class="my-select" name="customerSourceType" id="customerSourceType" style="height: 36px;width: 100px;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;margin-bottom: 10px;">
+            <select class="my-select" name="typeId" id="typeId" style="height: 36px;width: 120px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
                 <option value ="">客诉产品</option>
                 <#if typeList?? &&  (typeList?size > 0) >
                     <#list typeList as type>
@@ -73,14 +74,14 @@
                 </#if>
             </select>
 
-            <select class="my-select" name="customerIsVisit" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
+            <select class="my-select" name="customerIsVisit" style="height: 36px;width: 120px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
                 <option value ="">是否需要回访</option>
                 <option value="">是否回访</option>
                 <option value ="1" <#if customerInfo.customerIsVisit??><#if customerInfo.customerIsVisit == "1" >selected="selected"</#if></#if>>不需要回访</option>
                 <option value ="2" <#if customerInfo.customerIsVisit??><#if customerInfo.customerIsVisit == "2" >selected="selected"</#if></#if>>需要回访</option>
             </select>
 
-            <select class="my-select" name="adminId" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
+            <select class="my-select" name="adminId" style="height: 36px;width: 120px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
                 <option value ="">全部跟进客服</option>
                 <#if adminList?? &&  (adminList?size > 0) >
                     <#list adminList as admin>
@@ -374,16 +375,115 @@
                         </tr>
                     </#list>
             <#else>
-                <tr><td colspan="17" class="td-manage text-c" >暂时没有客诉信息,请添加!</td></tr>
+                <tr><td colspan="19" class="td-manage text-c" >暂时没有客诉信息,请添加!</td></tr>
             </#if>
         </tbody>
     </table>
     </div>
 </div>
+
+<!-- 申请邮费状态 -->
+<div class="layui-layer layui-anim layui-layer-iframe" id="layui-postage" times="4" showtime="0" contype="string" style="display:none;z-index: 10; width: 900px; height: 450px; left: 20%;top:20px ">
+    <form action="" method="post" class="form form-horizontal" id="form-admin-SynOrder">
+        <div class="layui-layer-title" style="cursor: move;" move="ok">申请邮费</div>
+        <input type="hidden" id="postageCustomerId" value="">
+        <br>
+
+
+        <div class="row cl" style="margin-top: 0px;">
+            <label class="form-label col-2" style="float: left;">客诉ID:</label>
+            <div class="postage-table" id="postageCustomer"></div>
+            <label class="form-label col-2" style="float: left;">百胜订单号:</label>
+            <div class="postage-table" id="postageOrder"></div>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-2" style="float: left;">寄回快递:</label>
+            <div class="postage-table" id="postageLogisticsCompany"></div>
+            <label class="form-label col-2" style="float: left;">快递单号:</label>
+            <div class="postage-table" id="postageLogisticsNo"></div>
+            <label class="form-label col-2" style="float: left;">寄回状态:</label>
+            <div class="postage-table" id="postageLogisticsStatus"></div>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-2" style="float: left;">寄件人姓名:</label>
+            <div class="postage-table" id="postageName"></div>
+            <label class="form-label col-2" style="float: left;">寄件人电话:</label>
+            <div class="postage-table" id="postagePhone"></div>
+            <label class="form-label col-2" style="float: left;">签收时间:</label>
+            <div class="postage-table" id="postageReceiptDate"></div>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-2" style="float: left;">邮费:</label>
+            <div class="postage-table" id="postageCost"></div>
+            <label class="form-label col-2" style="float: left;">转账账号:</label>
+            <div class="postage-table" id="postageAliPay"></div>
+            <label class="form-label col-2" style="float: left;">转账账号名称:</label>
+            <div class="postage-table" id="postageAliPayName"></div>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-2" style="float: left;">快递单号上传:</label>
+            <button onClick="upImage();" class="btn radius" style="background: #32a3d8;color: #fff;margin-left: 20px;" type="button">点击上传</button>
+            <input type="hidden" id="postageLogisticsImg" value="">
+            <div id="postImgDiv" style="width: 150px;height: 150px;float: left;display: none"><img  style="width: 150px;height: 150px;" id="postImg"/></div>
+        </div>
+
+        <div class="row cl" style="width: 100px;margin: 0 auto;">
+            <input class="btn btn-primary radius" onclick="add_postage()" type="button" value="&nbsp;&nbsp;申请邮费&nbsp;&nbsp;">
+        </div>
+
+    </form>
+    <span class="layui-layer-setwin">
+            <a class="layui-layer-ico layui-layer-close layui-layer-close1" id="closeId" onclick="exitWindowsDiv(this);" href="javascript:;"></a>
+    </span>
+</div>
+
+
 <tfoot>
 <#include "/base/page_util.ftl">
+
+<script type="text/javascript" src="${path}/common/lib/ueditor/1.4.3/ueditor.config.js"></script>
+<script type="text/javascript" src="${path}/common/lib/ueditor/1.4.3/ueditor.all.min.js"> </script>
+<script type="text/javascript" src="${path}/common/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
+<script type="text/plain" id="upload_ue"></script>
 </tfoot>
 <script type="text/javascript">
+    var _editor;
+    $(function() {
+        //重新实例化一个编辑器,防止在上面的editor编辑器中显示上传的图片或者文件
+        _editor = UE.getEditor('upload_ue',{
+            initialFrameWidth : 375,
+            initialFrameHeight: 600
+        });
+        _editor.ready(function () {
+//            _editor.setDisabled("attachment");//设置编辑器不可用
+            _editor.hide();//隐藏编辑器,因为不会用到这个编辑器实例,所以要隐藏
+            //侦听图片上传
+            _editor.addListener('beforeInsertImage', function (t, arg) {
+                console.log(arg[0].src);
+                $("#postageLogisticsImg").attr("value", arg[0].src);//将地址赋值给相应的input,只去第一张图片的路径
+                $("#postImg").attr("src", arg[0].src);  //图片预览
+                $("#postImgDiv").show();  //图片预览
+            });
+        });
+    });
+
+    //弹出图片上传的对话框
+    function upImage() {
+        var myImage = _editor.getDialog("insertimage");
+        myImage.open();
+    }
+    // 关闭窗口
+    function exitWindowsDiv(_this) {
+        $(_this).parent().parent().hide();
+    }
+</script>
+
+
+<script type="text/javascript">
     /**
      * 跳转到添加customer页面
      */
@@ -520,16 +620,80 @@
      * 申请邮费
      */
     function ApplyForPostage(customerId) {
-        layer.confirm('确认要申请吗?',function(index){
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"customerId":customerId},
+            url: "${path}/admin/customer/apply_postage",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    var customerCommon = data.returnMsg.customerCommon;
+                    var customerInfo = data.returnMsg.customerInfo;
+
+                    $("#postageCustomerId").val(customerId);
+
+                    $("#postageCustomer").text(customerId);
+                    $("#postageOrder").text(customerCommon.salesOrderId);
+
+                    var postageLogisticsCompany = "";
+                    postageLogisticsCompany = replace(customerCommon.relationBackLogisticsCompany);
+
+                    $("#postageLogisticsCompany").text(postageLogisticsCompany);
+
+                    $("#postageLogisticsNo").text(customerCommon.relationBackLogisticsNo);
+                    var postageLogisticsStatus = "";
+                    switch (customerCommon.relationBackStatus){ //1:未寄回  2:已寄回  3:已收货  4:已签收待确认
+                        case 1:
+                            postageLogisticsStatus = "未寄回";
+                            break;
+                        case 2:
+                            postageLogisticsStatus = "已寄回";
+                            break;
+                        case 3:
+                            postageLogisticsStatus = "已收货";
+                            break;
+                        case 4:
+                            postageLogisticsStatus = "已签收待确认";
+                            break;
+                    }
+                    $("#postageLogisticsStatus").text(postageLogisticsStatus);
+
+                    $("#postageName").text(customerCommon.relationBackName);
+                    $("#postagePhone").text(customerCommon.relationBackPostage);
+                    $("#postageReceiptDate").text(customerCommon.relationBackReceiptDate);
+
+                    $("#postageCost").text(customerCommon.relationBackPostage);
+                    $("#postageAliPay").text(customerCommon.relationAlipay);
+                    $("#postageAliPayName").text(customerCommon.relationAlipayName);
+
+                    $("#layui-postage").show();
+                } else {
+                    layer.msg(data.resultMsg,{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+    }
+
+    /*
+    *申请邮费
+    * */
+    function add_postage() {
+        var customerId =  $("#postageCustomerId").val();
+        var postageLogisticsImg = $("#postageLogisticsImg").val();
+        layer.confirm('确认要申请邮费吗?',function(index){
             $.ajax({
                 cache: true,
                 type: "POST",
-                data: {"customerId":customerId},
-                url: "${path}/admin/customer/apply_postage",
-                async: false,
+                data: {"customerId":customerId,"postageLogisticsImg":postageLogisticsImg},
+                url: "${path}/admin/customer/add_postage",
+                async: true,
                 success: function(data){
                     if (data.returnCode == 200) {
                         layer.msg(data.resultMsg,{icon: 1,time:1000});
+                        exitWindowsDiv($("#closeId"));
                     } else {
                         layer.msg(data.resultMsg,{icon: 5,time:1000});
                     }
@@ -541,6 +705,11 @@
         });
     }
 
+    // 关闭窗口
+    function exitWindowsDiv(_this) {
+        $(_this).parent().parent().hide();
+    }
+
     /*查看物流*/
     function openLogistics(title, url, w, h) {
         layer_show(title,url,w,h);

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

@@ -117,7 +117,7 @@
                         <strong>签收日期</strong>
                     </div>
                     <div class="formControls col-4 col-sm-4">
-                        <input type="text" placeholder="请选择签收日期" id="noreasonCackReceiptDate"  name="noreasonCackReceiptDate" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',minDate:'%y-%M-%d'})"  readonly="readonly" seleType="send">
+                        <input type="text" placeholder="请选择签收日期" id="noreasonBackReceiptDate"  name="noreasonBackReceiptDate" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',minDate:'%y-%M-%d'})"  readonly="readonly" seleType="send">
                     </div>
                 </div>
                 <div class="row cl">
@@ -432,7 +432,7 @@
                     $('#noreasonBackBackPostage').val(noreasonBack.noreasonBackBackPostage/100);
                     $('#noreasonBackAlipay').val(noreasonBack.noreasonBackAlipay);
                     $('#noreasonBackAlipayName').val(noreasonBack.noreasonBackAlipayName);
-                    $('#noreasonCackReceiptDate').val(formatDate(noreasonBack.noreasonCackReceiptDate));
+                    $('#noreasonBackReceiptDate').val(formatDate(noreasonBack.noreasonBackReceiptDate));
                     $('input[name="noreasonBackIsTransfer"]').each(function(){
                         if (this.value == noreasonBack.noreasonBackIsTransfer) {
                             $(this).iCheck('check');
@@ -587,8 +587,8 @@
 //                }
             }
             if (noreasonBackBackStatus == 3) {
-                var noreasonCackReceiptDate = $('#noreasonCackReceiptDate').val();//签收日期
-                if (noreasonCackReceiptDate == null || noreasonCackReceiptDate == '') {
+                var noreasonBackReceiptDate = $('#noreasonBackReceiptDate').val();//签收日期
+                if (noreasonBackReceiptDate == null || noreasonBackReceiptDate == '') {
                     layer.msg("签收日期不能为空",{icon: 5,time:1000});
                     noreasonBack_flag = false;
                     return noreasonBack_flag;

+ 44 - 66
watero-rst-web/src/main/webapp/WEB-INF/views/cm/postage/postage_list.ftl

@@ -8,7 +8,11 @@
     <meta http-equiv="Cache-Control" content="no-siteapp" />
     <link rel="Bookmark" href="/favicon.ico" >
     <link rel="Shortcut Icon" href="/favicon.ico" />
-<#include "/base/list_base.ftl">
+    <#include "/base/list_base.ftl">
+
+    <link rel="stylesheet" type="text/css" href="${path}/common/lib/lightbox2/2.8.1/css/lightbox.css" />
+
+
     <title>邮费转账列表</title>
     <style>
         *{padding: 0;margin: 0;}
@@ -20,12 +24,7 @@
         .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
         /*input[type=radio]{-webkit-appearance:none;appearance:none;background: url(/rst/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
         input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(/rst/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}*/
-        .txt2{
-            width:60px;
-            overflow: hidden;
-            white-space: nowrap;
-            text-overflow: ellipsis;
-        }
+        .txt2{width:60px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
     </style>
 </head>
 <body>
@@ -42,11 +41,6 @@
             <input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${postage.postageClientName!}" placeholder="请输入客户姓名" id="postageClientName" name="postageClientName">
             <input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${postage.postageClientTel!}" placeholder="请输入电话号码" id="postageClientTel" name="postageClientTel">
 
-            <select class="my-select" name="postageCustomerStatus" id="postageCustomerStatus" style="height: 36px;width: 100px;margin: 0px;padding: 6px 10px 6px 15px;">
-                <option value="">客服确认</option>
-                <option value="1" <#if postage.postageCustomerStatus??><#if postage.postageCustomerStatus == 1 >selected="selected"</#if></#if>>待确认</option>
-                <option value="2" <#if postage.postageCustomerStatus??><#if postage.postageCustomerStatus == 2 >selected="selected"</#if></#if>>申请中</option>
-            </select>
             <select class="my-select" name="postageManagerStatus" id="postageManagerStatus" style="height: 36px;width: 100px;margin: 0px;padding: 6px 10px 6px 15px;">
                 <option value="">客服经理审核</option>
                 <option value="1" <#if postage.postageManagerStatus??><#if postage.postageManagerStatus == 1 >selected="selected"</#if></#if>>待审核</option>
@@ -86,6 +80,7 @@
                 <th width="60">退款金额</th>
                 <th width="60">支付宝账户</th>
                 <th width="80">支付宝姓名</th>
+                <th width="80">快递单号图片</th>
                 <th width="100">操作</th>
             </tr>
             </thead>
@@ -180,47 +175,40 @@
                     <td>${postage.postageAlipay!''}</td>
                     <td>${postage.postageAlipayName!''}</td>
                     <td>
-                        <#if postage.postageCustomerStatus == 1>
-                            <#list operation as open>
-                                <#if open == "postage:update:confirm">
-                                    <a style="text-decoration:none" href="javascript:;" title="确认申请" onclick="updatePostage(${postage.postageId},2,1);">
-                                        <i class="Hui-iconfont">&#xe6a7;</i>
-                                    </a>
-                                </#if>
-                            </#list>
+                        <div>
+                            <a class="example-image-link" href="${path}${postage.postageLogisticsImg!''}" data-lightbox="example-1" data-title="图片标题">
+                                 <img class="example-image" src="${path}${postage.postageLogisticsImg!''}" style="width: 50px;" alt="image-1" />
+                            </a>
+                        </div>
+                    </td>
+                    <td>
+                        <#if postage.postageCustomerStatus == 1 && postage.customerConfirm == 1 >
+                            <a style="text-decoration:none" href="javascript:;" title="确认申请" onclick="updatePostage(${postage.postageId},2,1);">
+                                <i class="Hui-iconfont">&#xe6a7;</i>
+                            </a>
                          </#if>
-                        <#if postage.postageManagerStatus?? && postage.postageManagerStatus == 1>
-                            <#list operation as open>
-                                <#if open == "postage:customer:review">
-                                    <a style="text-decoration:none" href="javascript:;" title="审核通过" onclick="updatePostage(${postage.postageId},2,2);">
-                                        <i class="iconfont icon-pass-2-copy"></i>
-                                    </a>
-                                    <a style="text-decoration:none" href="javascript:;" title="审核不通过" onclick="updatePostage(${postage.postageId},3,2);">
-                                        <i class="iconfont icon-bohui"></i>
-                                    </a>
-                                </#if>
-                            </#list>
+
+                        <#if postage.postageManagerStatus?? && postage.postageManagerStatus == 1 && postage.customerManager == 1>
+                                <a style="text-decoration:none" href="javascript:;" title="审核通过" onclick="updatePostage(${postage.postageId},2,2);">
+                                    <i class="iconfont icon-pass-2-copy"></i>
+                                </a>
+                                <a style="text-decoration:none" href="javascript:;" title="审核不通过" onclick="updatePostage(${postage.postageId},3,2);">
+                                    <i class="iconfont icon-bohui"></i>
+                                </a>
                         </#if>
-                        <#if postage.postageFinanceStatus?? && postage.postageFinanceStatus == 1>
-                            <#list operation as open>
-                                <#if open == "postage:finance:review">
-                                    <a style="text-decoration:none" href="javascript:;" title="审核通过" onclick="updatePostage(${postage.postageId},2,3);">
-                                        <i class="iconfont icon-pass-2-copy"></i>
-                                    </a>
-                                    <a style="text-decoration:none" href="javascript:;" title="审核不通过" onclick="updatePostage(${postage.postageId},2,3);">
-                                        <i class="iconfont icon-bohui"></i>
-                                    </a>
-                                </#if>
-                            </#list>
+
+                        <#if postage.postageFinanceStatus?? && postage.postageFinanceStatus == 1 && postage.financeManager == 1>
+                            <a style="text-decoration:none" href="javascript:;" title="审核通过" onclick="updatePostage(${postage.postageId},2,3);">
+                                <i class="iconfont icon-pass-2-copy"></i>
+                            </a>
+                            <a style="text-decoration:none" href="javascript:;" title="审核不通过" onclick="updatePostage(${postage.postageId},2,3);">
+                                <i class="iconfont icon-bohui"></i>
+                            </a>
                         </#if>
-                        <#if postage.postageFinanceStatus?? && postage.postageFinanceStatus == 2>
-                            <#list operation as open>
-                                <#if open == "postage:finance:review">
-                                    <a style="text-decoration:none" href="javascript:;" title="已转账" onclick="updatePostage(${postage.postageId},4,4);">
-                                        <i class="iconfont icon-zhuanzhang"></i>
-                                    </a>
-                                </#if>
-                            </#list>
+                        <#if postage.postageFinanceStatus?? && postage.postageFinanceStatus == 2 &&  postage.financePay==1 >
+                            <a style="text-decoration:none" href="javascript:;" title="已转账" onclick="updatePostage(${postage.postageId},4,4);">
+                                <i class="iconfont icon-zhuanzhang"></i>
+                            </a>
                         </#if>
                     </td>
                 </tr>
@@ -234,42 +222,32 @@
 </div>
 <tfoot>
 <#include "/base/page_util.ftl">
+<script type="text/javascript" src="${path}/common/lib/lightbox2/2.8.1/js/lightbox.js"></script>
 </tfoot>
 <script type="text/javascript">
     /**
      * 修改状态
      */
     function updatePostage(postageId,status,type) {
-        var url = "";
-        if(type == 1){
-            url = '/admin/postage/updateConfirmPostage';   //客服确认
-        }else if(type == 2){
-            url = '/admin/postage/updateCustomerReview';   //客服经理审核
-        }else if(type == 3){
-            url = '/admin/postage/updateFinanceReview';   //财务审核
-        }else if(type == 4){
-            url = '/admin/postage/updateFinanceMoney';   //财务打款
-        }
         layer.confirm('确认要修改吗?',function(index){
             $.ajax({
                 cache: true,
                 type: "POST",
-                data: {"postageId":postageId,"status" : status},
-                url: "${path}" + url,
+                data: {"postageId":postageId,"status" : status,"type":type},
+                url: "${path}" + "/admin/postage/updateConfirmPostage",
                 async: false,
                 success: function(data){
                     if (data.returnCode == 200) {
-                        layer.msg(data.resultMsg,{icon: 1,time:1000});
+                        //layer.msg(data.resultMsg,{icon: 1,time:3000});
+                        location.replace(location.href);
                     } else {
-                        layer.msg(data.resultMsg,{icon: 5,time:1000});
+                        layer.msg(data.resultMsg,{icon: 5,time:3000});
                     }
-                    location.replace(location.href);
                 },
                 error: function(XmlHttpRequest, textStatus, errorThrown){
                 }
             })
         }, function() {
-
         });
     }
 </script>

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/report/customer_report.ftl

@@ -354,7 +354,7 @@
      * @param employee
      */
     function to_customer_list(title) {
-        window.location.href= "${path}/admin/customer/select_customer_list?questionId="+title+"&isFirst=1";
+        window.location.href= "${path}/admin/customer/select_customer_list?questionId="+title+"&isFirst=2";
     }
 </script>
 

+ 0 - 5
watero-rst-web/src/main/webapp/WEB-INF/views/cm/salesOrder/sales_order_list.ftl

@@ -236,11 +236,6 @@
         myImage.open();
     }
 
-    /*进入订单详情*/
-    function sales_order_detail(salesId) {
-        window.location.href= "${path}/admin/salesOrder/select_sales_order?salesId="+salesId;
-    }
-
     $('#synOrder').click(function (e) {
         $("#layui-SynOrder").show();
     });

+ 1 - 6
watero-rst-web/src/main/webapp/WEB-INF/views/login.ftl

@@ -42,11 +42,6 @@
         <form class="form form-horizontal" method="post">
             <div class="row cl">
                 <div class="formControls col-8 col-offset-3">
-                   <h3>欢迎登录</h3>
-                </div>
-            </div>
-            <div class="row cl">
-                <div class="formControls col-8 col-offset-3">
                     <input id="login_name" autocomplete="off" name="login_name" type="text" placeholder="请输入账户" class="input-text size-L user_count">
                 </div>
             </div>
@@ -68,7 +63,7 @@
             </div>
             <div class="row loginbox_btn">
                 <div class="formControls col-8 col-offset-3">
-                    <input name="" id="login-btn" type="submit" class="btn btn-block size-L my-btn-login" value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;">
+                    <input name="" id="login-btn" type="submit" class="btn btn-block btn-primary radius size-L my-btn-login" value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;">
                 </div>
             </div>
         </form>

+ 4 - 4
watero-rst-web/src/main/webapp/common/css/login/login.css

@@ -1,11 +1,11 @@
-.loginWraper{background: #fff url(../../images/login/admin-login-bg.jpg) no-repeat center top;background-size:100% 100%;}
-.loginBox{padding-top: 0px;padding-bottom: 20px;}
+.loginWraper{background: #fff url(../../images/login/admin-login-bg.png) no-repeat top;}
+.loginBox{padding-top: 88px;background: url(../../images/login/admin-loginform-bg.png) top right no-repeat;background-size:90% 80%;padding-bottom: 50px;}
 .input-text, .textarea {border: 0;border-bottom: solid 1px #ddd;text-indent: 2em;}
 .user_count{background: url(../../images/login/ipt_head.png) left center no-repeat /30px !important;}
 .pass_word{background: url(../../images/login/ipt_suo.png) left center no-repeat /30px !important;}
 .validate{background: url(../../images/login/ipt_img.png) left center no-repeat /30px !important;width:210px !important;}
-.loginbox_btn{margin-top:60px !important;}
-.my-btn-login{width: 90% !important;background-color: #cfb794;border-radius: 25px;color: #fff;}
+.loginbox_btn{margin-top: 80px !important;}
+.my-btn-login{width: 90% !important;}
 @media screen and (orientation:portrait) and (-webkit-min-device-pixel-ratio:2){
 /*mobile竖屏*/
 .loginWraper {background: #fff url(../../images/login/admin-login-bg.png) no-repeat top right;background-size: auto 50%;}

BIN
watero-rst-web/src/main/webapp/common/images/login/admin-login-bg.jpg


BIN
watero-rst-web/src/main/webapp/common/images/login/ipt_head.png


BIN
watero-rst-web/src/main/webapp/common/images/login/ipt_img.png


BIN
watero-rst-web/src/main/webapp/common/images/login/ipt_suo.png


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

@@ -221,7 +221,7 @@ function vailErrorMsg_5(node,msg){
 /**物流名称替换**/
 function replace(code) {
     var name = null;
-    switch (billName){
+    switch (code){
         case "sto":
             name= "申通快递";
             break;

+ 1 - 1
watero-rst-web/src/main/webapp/common/static/h-ui.admin/css/H-ui.login.css

@@ -17,7 +17,7 @@ body{font-size:14px}
 .header{top:0; height:60px; background:#426374 url(../images/logo.png) no-repeat 0 center}
 
 .loginWraper{ position:absolute;width:100%; left:0; top:0; bottom:0; right:0; z-index:1; background:#3283AC url(../images/admin-login-bg.jpg) no-repeat center}
-.loginBox{ position:absolute; width:617px; height:330px; right:12%; top:50%; margin-top:-184px; padding-top:38px}
+.loginBox{ position:absolute; width:617px; height:330px; background:url(../images/admin-loginform-bg.png) no-repeat; left:50%; top:50%; margin-left:-309px; margin-top:-184px; padding-top:38px}
 @media (max-width:617px) {
 	.loginbox{ width:100%; position:static; margin-top:0; margin-left:0;}
 }