浏览代码

付费转账记录优化

liujiankang 5 年之前
父节点
当前提交
e45a39b2a3
共有 23 个文件被更改,包括 898 次插入348 次删除
  1. 97 4
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Postage.java
  2. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/PostageAuthorityLog.java
  3. 67 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/PostageInfo.java
  4. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintAfterSalesNum.java
  5. 13 88
      watero-rst-core/src/main/java/com.iamberry.rst.core/tools/KuaiDi100.java
  6. 6 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/PostageService.java
  7. 54 7
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java
  8. 5 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/PostageServiceImpl.java
  9. 14 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/PostageMapper.java
  10. 40 5
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml
  11. 2 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/postageAuthorityLogMapper.xml
  12. 50 7
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/postageMapper.xml
  13. 1 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml
  14. 9 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintSignclosedInfoServiceImpl.java
  15. 2 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/sys/mapper/sysMapper.xml
  16. 5 3
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java
  17. 78 22
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminPostageController.java
  18. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/mq/MQTask.java
  19. 1 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java
  20. 20 14
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl
  21. 403 89
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_relation.ftl
  22. 9 105
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/postage/postage_list.ftl
  23. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_list.ftl

+ 97 - 4
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Postage.java

@@ -30,8 +30,8 @@ public class Postage implements Serializable {
     private Integer postageOrderSource;
     //售后处理方式 3:换新  4:维修  5:补发  6:退货  7:无理由退货
     private Integer postageTreatmentMethod;
-    //efast订单号
-    private String salesOrderId;
+    //客诉关联订单号
+    private Integer salesOrderId;
     //客户姓名
     private String postageClientName;
     //联系电话
@@ -68,9 +68,22 @@ public class Postage implements Serializable {
     private Integer financeManager;    //财务审核权限   1有权限
     private Integer financePay;    //财务转账         1有权限
 
+    private Integer customerPostageId;    //邮费信息id
+
     //邮费转账日志记录
     private List<PostageAuthorityLog> postageAuthorityLogList = new ArrayList<PostageAuthorityLog>();
 
+    private String postageCoding;//审批编码
+    private Date postageCustomerTime;//客服经理审核时间
+    private Date postageFinanceTime;//财务经理审核时间
+    private String questionTitle;//退换货原因
+    private Integer postagePayType;//1支付宝2微信3银行卡
+    private String postagePayWhere;//开户行
+    private String procTypeName; //处理方式类型名称
+    private String procMethodName; //处理方式名称
+
+    private Integer postageIsPrint;//是否已打印1:未打印2:已打印
+
     public Integer getPostageId() {
         return postageId;
     }
@@ -127,11 +140,11 @@ public class Postage implements Serializable {
         this.postageTreatmentMethod = postageTreatmentMethod;
     }
 
-    public String getSalesOrderId() {
+    public Integer getSalesOrderId() {
         return salesOrderId;
     }
 
-    public void setSalesOrderId(String salesOrderId) {
+    public void setSalesOrderId(Integer salesOrderId) {
         this.salesOrderId = salesOrderId;
     }
 
@@ -310,4 +323,84 @@ public class Postage implements Serializable {
     public void setPostageAuthorityLogList(List<PostageAuthorityLog> postageAuthorityLogList) {
         this.postageAuthorityLogList = postageAuthorityLogList;
     }
+
+    public Integer getCustomerPostageId() {
+        return customerPostageId;
+    }
+
+    public void setCustomerPostageId(Integer customerPostageId) {
+        this.customerPostageId = customerPostageId;
+    }
+
+    public String getPostageCoding() {
+        return postageCoding;
+    }
+
+    public void setPostageCoding(String postageCoding) {
+        this.postageCoding = postageCoding;
+    }
+
+    public Date getPostageCustomerTime() {
+        return postageCustomerTime;
+    }
+
+    public void setPostageCustomerTime(Date postageCustomerTime) {
+        this.postageCustomerTime = postageCustomerTime;
+    }
+
+    public Date getPostageFinanceTime() {
+        return postageFinanceTime;
+    }
+
+    public void setPostageFinanceTime(Date postageFinanceTime) {
+        this.postageFinanceTime = postageFinanceTime;
+    }
+
+    public String getQuestionTitle() {
+        return questionTitle;
+    }
+
+    public void setQuestionTitle(String questionTitle) {
+        this.questionTitle = questionTitle;
+    }
+
+    public Integer getPostagePayType() {
+        return postagePayType;
+    }
+
+    public void setPostagePayType(Integer postagePayType) {
+        this.postagePayType = postagePayType;
+    }
+
+    public String getPostagePayWhere() {
+        return postagePayWhere;
+    }
+
+    public void setPostagePayWhere(String postagePayWhere) {
+        this.postagePayWhere = postagePayWhere;
+    }
+
+    public String getProcTypeName() {
+        return procTypeName;
+    }
+
+    public void setProcTypeName(String procTypeName) {
+        this.procTypeName = procTypeName;
+    }
+
+    public String getProcMethodName() {
+        return procMethodName;
+    }
+
+    public void setProcMethodName(String procMethodName) {
+        this.procMethodName = procMethodName;
+    }
+
+    public Integer getPostageIsPrint() {
+        return postageIsPrint;
+    }
+
+    public void setPostageIsPrint(Integer postageIsPrint) {
+        this.postageIsPrint = postageIsPrint;
+    }
 }

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

@@ -20,6 +20,8 @@ public class PostageAuthorityLog  implements  Serializable{
     //审核创建时间'
     private Date authorityLogCreateTime;
 
+    private String adminName;
+
     public Integer getAuthorityLogId(){
         return authorityLogId;
     }
@@ -59,4 +61,12 @@ public class PostageAuthorityLog  implements  Serializable{
     public void setAuthorityLogCreateTime(Date  authorityLogCreateTime){
         this.authorityLogCreateTime=authorityLogCreateTime;
     }
+
+    public String getAdminName() {
+        return adminName;
+    }
+
+    public void setAdminName(String adminName) {
+        this.adminName = adminName;
+    }
 }

+ 67 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/PostageInfo.java

@@ -21,6 +21,17 @@ public class PostageInfo implements Serializable{
     private String postageDesc;//备注
     private Date postageCreateTime;//创建时间
     private Date postageUpdateTime;//修改时间
+    private Integer postagePayType;//1支付宝2微信3银行卡
+    private String postagePayWhere;//开户行
+    //状态(客服操作)1:待申请    2:申请中
+    private Integer postageCustomerStatus;
+    //状态(客服经理审核)1:审核中 2:通过  3:驳回
+    private Integer postageManagerStatus;
+    //状态(财务审核) 1:审核中 2:通过(已申请待转账)  3:驳回
+    private Integer postageFinanceStatus;
+    //转账状态  是否转账:1待转   2:已转
+    private Integer postageTransferStatus;
+    private Integer postId;//审核付费记录id
 
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
@@ -167,4 +178,60 @@ public class PostageInfo implements Serializable{
     public void setCustomerCreateTime(Date customerCreateTime) {
         this.customerCreateTime = customerCreateTime;
     }
+
+    public Integer getPostagePayType() {
+        return postagePayType;
+    }
+
+    public void setPostagePayType(Integer postagePayType) {
+        this.postagePayType = postagePayType;
+    }
+
+    public String getPostagePayWhere() {
+        return postagePayWhere;
+    }
+
+    public void setPostagePayWhere(String postagePayWhere) {
+        this.postagePayWhere = postagePayWhere;
+    }
+
+    public Integer getPostageCustomerStatus() {
+        return postageCustomerStatus;
+    }
+
+    public void setPostageCustomerStatus(Integer postageCustomerStatus) {
+        this.postageCustomerStatus = postageCustomerStatus;
+    }
+
+    public Integer getPostageManagerStatus() {
+        return postageManagerStatus;
+    }
+
+    public void setPostageManagerStatus(Integer postageManagerStatus) {
+        this.postageManagerStatus = postageManagerStatus;
+    }
+
+    public Integer getPostageFinanceStatus() {
+        return postageFinanceStatus;
+    }
+
+    public void setPostageFinanceStatus(Integer postageFinanceStatus) {
+        this.postageFinanceStatus = postageFinanceStatus;
+    }
+
+    public Integer getPostageTransferStatus() {
+        return postageTransferStatus;
+    }
+
+    public void setPostageTransferStatus(Integer postageTransferStatus) {
+        this.postageTransferStatus = postageTransferStatus;
+    }
+
+    public Integer getPostId() {
+        return postId;
+    }
+
+    public void setPostId(Integer postId) {
+        this.postId = postId;
+    }
 }

+ 10 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintAfterSalesNum.java

@@ -27,6 +27,8 @@ public class ComplaintAfterSalesNum implements Serializable{
 
     private Integer completeSent;//待换货发出数量
 
+    private Integer postagePrintedNum;//待打印邮费申请
+
     public Integer getTodaysignNum() {
         return todaysignNum;
     }
@@ -170,4 +172,12 @@ public class ComplaintAfterSalesNum implements Serializable{
     public void setCompleteSent(Integer completeSent) {
         this.completeSent = completeSent;
     }
+
+    public Integer getPostagePrintedNum() {
+        return postagePrintedNum;
+    }
+
+    public void setPostagePrintedNum(Integer postagePrintedNum) {
+        this.postagePrintedNum = postagePrintedNum;
+    }
 }

+ 13 - 88
watero-rst-core/src/main/java/com.iamberry.rst.core/tools/KuaiDi100.java

@@ -31,7 +31,7 @@ public class KuaiDi100 {
     private static Logger LOGGER = LoggerFactory.getLogger(KuaiDi100.class);
 
     private static String key = "29833628d495d7a5";//授权密匙key    百度的
-  /*private static String key = "06d6c2ea1bdb4ee9";//授权密匙key  自己的*/
+  /*private static String key = "06d6c2ea1bdb4ee9";*///授权密匙key  自己的
     //快递鸟 电商ID
     private static final String EBusinessID="1343593";
     //电商加密私钥,快递鸟提供
@@ -136,74 +136,20 @@ public class KuaiDi100 {
      *	邮政国际包裹	youzhengguoji
      *	EMS国际快递	emsguoji
      */
-
     /**
      * 查询快递信息
      * @param com 快递公司代码
      * @param nu 快递单号
      * @return
      */
-    public JSONObject getExpressInfo2(String com , String nu){
-        JSONObject ret = null;
-        try
-        {
-            com = logisticsConversions(com);
-            StringBuilder sb = new StringBuilder();
-            sb.append("https://sp0.baidu.com/9_Q4sjW91Qh3otqbppnN2DJv/pae/channel/data/asyncqury?cb=abc&appid=4001");
-            sb.append("&com=").append(com);
-            sb.append("&nu=").append(nu);
-            URL url= new URL(sb.toString());
-            URLConnection con=url.openConnection();
-            con.setAllowUserInteraction(false);
-            InputStream urlStream = url.openStream();
-            String type = con.guessContentTypeFromStream(urlStream);
-            String charSet=null;
-            if (type == null)
-                type = con.getContentType();
-
-            if (type == null || type.trim().length() == 0)
-                return null;
-
-            if(type.indexOf("charset=") > 0)
-                charSet = type.substring(type.indexOf("charset=") + 8);
-
-            byte b[] = new byte[10000];
-            int numRead = urlStream.read(b);
-            String content = new String(b, 0, numRead, "UTF-8");
-            while (numRead != -1) {
-                numRead = urlStream.read(b);
-                if (numRead != -1) {
-                    //String newContent = new String(b, 0, numRead);
-                    String newContent = new String(b, 0, numRead, "UTF-8");
-                    content += newContent;
-                }
-            }
-            content = content.replaceAll(":null", ":\"\"");
-            ret = JSONObject.fromObject(content);
-            System.out.println(ret);
-            urlStream.close();
-        } catch (MalformedURLException e)
-        {
-            e.printStackTrace();
-        } catch (IOException e)
-        {
-            e.printStackTrace();
-        }
-        return ret;
-    }/**
-     * 查询快递信息
-     * @param com 快递公司代码
-     * @param nu 快递单号
-     * @return
-     */
     public JSONObject getExpressInfo(String com , String nu){
         JSONObject ret = null;
         try
         {
             com = logisticsConversions(com);
             StringBuilder sb = new StringBuilder();
-            sb.append("http://api.kuaidi100.com/api?id=");
-            sb.append(KuaiDi100.key);
+            sb.append("https://sp0.baidu.com/9_Q4sjW91Qh3otqbppnN2DJv/pae/channel/data/asyncqury?cb=jQuery110204759692032715892_1499865778178&appid=4001");
+            /*sb.append(KuaiDi100.key);*/
             sb.append("&com=").append(com);
             sb.append("&nu=").append(nu);
             sb.append("&show=0&muti=1&order=desc");
@@ -462,12 +408,14 @@ public class KuaiDi100 {
         try {
             String result = selectCourierSF(logisticsInfo.getLogisticsRstCode().toUpperCase(), num);
             JSONObject jn = JSONObject.fromObject(result);
+            Map<String,Object> msg = new HashMap<>();
+            Map<String,Map<String,Object>> data = new HashMap<>();
             if (result != null && jn.getInt("State") != 0) {
                 SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                 String state = jn.getString("State");
                 JSONArray context = jn.getJSONArray("Traces");
-                Map<String,Object> msg = new HashMap<>();
-                Map<String,Map<String,Object>> data = new HashMap<>();
+
+
                 Map<String,Object> info = new HashMap<>();
                 List<HashMap> list = new ArrayList<>();
                 for(int i=context.size()-1;i > 0;i--){
@@ -484,7 +432,9 @@ public class KuaiDi100 {
                 msg.put("data",JSONObject.fromObject(data));
                 return JSONObject.fromObject(msg);
             }else{
-                return jn;
+                msg.put("status","-1");
+                msg.put("data",JSONObject.fromObject(data));
+                return JSONObject.fromObject(msg);
             }
         } catch (Exception e) {
             LoggerFactory.getLogger(KuaiDi100.class).error("", e);
@@ -736,33 +686,8 @@ public class KuaiDi100 {
         /*System.out.println(kuaidi.selectCourierCompany2("yuantong","yt9053971537384"));*/
         /*System.out.println(kuaidi.selectCourierSignTime("yuantong","yt9053971537384"));*/
         /*System.out.println(kuaidi.selectCourierSF("106494280800","SF","291003792023"));*/
-        try {
-            String result = kuaidi.selectCourierSF("SF", "288904538945");
-            System.out.print(result);
-            if(result != null){
-                JSONObject jn = JSONObject.fromObject(result);
-                String state = jn.getString("State");
-                JSONArray context = jn.getJSONArray("Traces");
-                Map<String,String> msg = new HashMap<>();
-                Map<String,Map<String,String>> data = new HashMap<>();
-                Map<String,String> info = new HashMap<>();
-                List<HashMap> list = new ArrayList<>();
-                for(int i=context.size()-1;i > 0;i--){
-                    JSONObject job = context.getJSONObject(i);
-                    HashMap<String,String> map = new HashMap<>();
-                    map.put("time",job.getString("AcceptTime"));
-                    map.put("desc",job.getString("AcceptStation"));
-                    list.add(map);
-                    System.out.println(JSON.toJSONString(list)) ;
-                }
-                info.put("state",state);
-                info.put("context",JSON.toJSONString(list));
-                data.put("info",info);
-                msg.put("status","0");
-                msg.put("data",JSON.toJSONString(data));
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+        /*System.out.println(kuaidi.getExpressInfo("shentong","221510432233"));*/
+
+
     }
 }

+ 6 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/PostageService.java

@@ -64,4 +64,10 @@ public interface PostageService {
     Integer getPostageNumber(Postage postage);
 
 
+    /**
+     *  查询待打印条数
+     * @param
+     * @return
+     */
+    Integer getPostagePrintedNum();
 }

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

@@ -19,6 +19,7 @@ import com.iamberry.rst.service.fm.mapper.ComplaintSignclosedProductInfoMapper;
 import com.iamberry.rst.service.product.mapper.ProductMapper;
 import com.iamberry.rst.util.CustomerCommonUtil;
 import com.iamberry.rst.util.PageUtil;
+import com.iamberry.wechat.tools.TenpayUtil;
 import net.sf.json.JSONArray;
 import net.sf.json.JSONObject;
 import org.slf4j.Logger;
@@ -27,10 +28,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 @Service
 public class CustomerServiceImpl implements CustomerService {
@@ -73,6 +72,8 @@ public class CustomerServiceImpl implements CustomerService {
     private RelationOrderMapper relationOrderMapper;
     @Autowired
     private ComplaintSignclosedProductInfoMapper complaintSignclosedProductInfoMapper;
+    @Autowired
+    private PostageMapper postageMapper;
 
     @Override
     public CustomerInfo getCustomerInfo(Integer customerId) {
@@ -1430,10 +1431,51 @@ public class CustomerServiceImpl implements CustomerService {
     public List<PostageInfo> listPostageInfo(Integer relationId) {
         return customerInfoMapper.listPostageInfo(relationId);
     }
-
+    @Transactional
     @Override
     public Integer addPostageInfo(PostageInfo postageInfo) {
-        return customerInfoMapper.addPostageInfo(postageInfo);
+        int msg;
+        msg = customerInfoMapper.addPostageInfo(postageInfo);
+        if( msg > 0){
+            //添加邮费转账列表
+            CmRelation cmRelation = cmRelationMapper.getCmRelationById(postageInfo.getRelationId());
+            CustomerInfo customerInfo = customerService.getCustomerInfo(cmRelation.getCustomerId());
+            RelationOrder relationOrder = new RelationOrder();
+            relationOrder.setRelationId(postageInfo.getRelationId());
+            List<RelationOrder> relationOrderList = relationOrderMapper.getRelationOrderList(relationOrder);
+            Integer orderid = null;
+            if(relationOrderList.size() > 0){
+                orderid = relationOrderList.get(0).getSalesId();
+            }
+            Postage postage = new Postage();
+            postage.setCompanyId(customerInfo.getCompanyId());      //销售公司
+            postage.setAdminId(customerInfo.getAdminId());      //客服
+            postage.setCustomerId(customerInfo.getCustomerId());        //客诉id
+            postage.setPostageCustomerStatus(2);            //------考虑手动点, 直接变为申请中
+            postage.setPostageManagerStatus(1);     //------考虑手动点, 直接变为申请中
+            postage.setPostageOrderSource(customerInfo.getStoreId());   //店铺id
+            postage.setPostageTreatmentMethod(cmRelation.getProcMethodId()); //处理方式
+            postage.setSalesOrderId(orderid);       //客诉关联订单号
+            postage.setPostageClientName(cmRelation.getRelationBackName());
+            postage.setPostageClientTel(cmRelation.getRelationBackTel());
+            postage.setPostageClientAddress(cmRelation.getRelationSendAddress());
+            postage.setPostageLogisticsCompany(cmRelation.getRelationBackLogisticsCompany());
+            postage.setPostageLogisticsNo(cmRelation.getRelationBackLogisticsNo());
+            postage.setPostageAmount(postageInfo.getPostageAmount());  //寄回邮费
+            postage.setPostageAlipay(postageInfo.getPostageAlipay());   //支付宝账户
+            postage.setPostageAlipayName(postageInfo.getPostageAlipayName());   //支付宝账号名称
+           // postage.setPostageLogisticsImg();
+            postage.setCustomerPostageId(postageInfo.getPostageId());//邮费信息id
+            postage.setPostageTransferStatus(1);
+
+            //审批编码
+            postage.setPostageCoding(TenpayUtil.formatDate(new Date()) + new Date().getTime());
+            if(postageMapper.savePostage(postage) < 1){
+                throw new RuntimeException("添加邮费转账失败");
+            }
+        }
+
+        return msg;
     }
 
     @Override
@@ -1443,7 +1485,12 @@ public class CustomerServiceImpl implements CustomerService {
 
     @Override
     public Integer deletePostageInfo(Integer postageId) {
-        return customerInfoMapper.deletePostageInfo(postageId);
+        if(customerInfoMapper.deletePostageInfo(postageId) > 0){
+            postageMapper.delCustomerPostage(postageId);
+        }else{
+            return 0;
+        }
+        return 1;
     }
 
     @Override

+ 5 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/PostageServiceImpl.java

@@ -45,6 +45,11 @@ public class PostageServiceImpl implements PostageService {
     }
 
     @Override
+    public Integer getPostagePrintedNum() {
+        return postageMapper.getPostagePrintedNum();
+    }
+
+    @Override
     public Postage getPostage(Integer postageId) {
         return postageMapper.getPostage(postageId);
     }

+ 14 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/PostageMapper.java

@@ -49,4 +49,18 @@ public interface PostageMapper {
      * @return
      */
     Integer getPostageNumber(Postage postage);
+
+    /**
+     *  根据客诉邮费id删除
+     * @param
+     * @return
+     */
+    Integer delCustomerPostage(Integer postageId);
+
+    /**
+     *  查询待打印条数
+     * @param
+     * @return
+     */
+    Integer getPostagePrintedNum();
 }

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

@@ -421,6 +421,7 @@
       LEFT JOIN tb_rst_complaint_signclosed cs ON cs.signclosed_customer_id = c.customer_id
       LEFT JOIN tb_rst_complaint_detect cd ON c.customer_id = cd.customer_id
       LEFT JOIN tb_rst_cm_tag_info ti ON ti.tag_id = c.customer_tag_id
+      LEFT JOIN tb_rst_postage pag ON pag.customer_id = c.customer_id
     <where>
       <if test="customerName != null and customerName != ''">
         c.customer_name like CONCAT('%',#{customerName},'%')
@@ -526,6 +527,12 @@
       <if test="afterState != null and afterState == 11">
         and  cc.procTypeId = 2  AND cs.signclosed_is_receiving = 2 AND ((soi.sales_shipping_status = 0 and soi.sales_status != 3) OR soi.sales_shipping_status is NULL)
       </if>
+      <if test="afterState != null and afterState == 12">
+          AND pag.postage_manager_status = 2
+          AND pag.postage_finance_status = 2
+          AND pag.postage_transfer_status = 1
+          AND pag.postage_is_print = 1
+      </if>
       <if test="warehouseDate != null">
         and cs.signclosed_date = #{warehouseDate}
       </if>
@@ -1278,11 +1285,29 @@ LEFT JOIN tb_rst_cm_proc_type cpt ON cpt.proc_type_id = cpm.proc_type_id
   </select>
 
   <select id="getPostageInfo" parameterType="Integer" resultType="PostageInfo">
-      SELECT * from tb_rst_postage_info where postage_id = #{postageId}
+      SELECT
+      p.*,
+      pa.postage_customer_status postageCustomerStatus,
+      pa.postage_manager_status postageManagerStatus,
+      pa.postage_finance_status postageFinanceStatus,
+      pa.postage_transfer_status postageTransferStatus,
+      pa.postage_id postId
+       from tb_rst_postage_info p
+      LEFT JOIN tb_rst_postage pa ON pa.customer_postage_id = p.postage_id
+      where p.postage_id = #{postageId}
   </select>
 
   <select id="listPostageInfo" parameterType="Integer" resultType="PostageInfo">
-      SELECT * from tb_rst_postage_info where relation_id = #{relationId}
+      SELECT
+       p.*,
+      pa.postage_customer_status postageCustomerStatus,
+      pa.postage_manager_status postageManagerStatus,
+      pa.postage_finance_status postageFinanceStatus,
+      pa.postage_transfer_status postageTransferStatus,
+      pa.postage_id postId
+       from tb_rst_postage_info p
+      LEFT JOIN tb_rst_postage pa ON pa.customer_postage_id = p.postage_id
+      where p.relation_id = #{relationId}
   </select>
 
   <select id="listPostageInfoByCustomerId" parameterType="Integer" resultType="PostageInfo">
@@ -1300,7 +1325,9 @@ LEFT JOIN tb_rst_cm_proc_type cpt ON cpt.proc_type_id = cpm.proc_type_id
       postage_alipay_name,
       postage_alipay_type,
       postage_desc,
-      postage_create_time
+      postage_create_time,
+      postage_pay_type,
+      postage_pay_where
     )
     VALUES
     ( #{relationId},
@@ -1310,7 +1337,9 @@ LEFT JOIN tb_rst_cm_proc_type cpt ON cpt.proc_type_id = cpm.proc_type_id
       #{postageAlipayName},
       #{postageAlipayType},
       #{postageDesc},
-      NOW()
+      NOW(),
+      #{postagePayType},
+      #{postagePayWhere}
       )
   </insert>
   <update id="updatePostageInfo" parameterType="PostageInfo">
@@ -1332,7 +1361,13 @@ LEFT JOIN tb_rst_cm_proc_type cpt ON cpt.proc_type_id = cpm.proc_type_id
           postage_alipay_type = #{postageAlipayType},
       </if>
       <if test="postageDesc != null and postageDesc != ''">
-        postage_desc = #{postageDesc}
+        postage_desc = #{postageDesc},
+      </if>
+      <if test="postagePayType != null and postagePayType != ''">
+          postage_pay_type = #{postagePayType},
+      </if>
+      <if test="postagePayWhere != null and postagePayWhere != ''">
+          postage_pay_where = #{postagePayWhere}
       </if>
     </set>
     WHERE postage_id = #{postageId}

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

@@ -17,8 +17,9 @@
     </sql>
     <select id="getPostageAuthorityLogList" resultMap="BaseResultMap" parameterType="PostageAuthorityLog" >
         select
-        <include refid="Base_List" />
+        <include refid="Base_List" />, tb_rst_sys_admin.admin_name adminName
         from tb_rst_postage_authority_log t
+        LEFT JOIN tb_rst_sys_admin on tb_rst_sys_admin.admin_id = t.admin_id
         <where>
             <if test="authorityLogId != null ">
                 AND t.authority_log_id = #{authorityLogId}

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

@@ -22,23 +22,33 @@
     <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" />
+    <result column="postage_coding" property="postageCoding" jdbcType="VARCHAR" />
+    <result column="postage_customer_time" property="postageCustomerTime" jdbcType="TIMESTAMP" />
+    <result column="postage_finance_time" property="postageFinanceTime" jdbcType="TIMESTAMP" />
   </resultMap>
 
   <sql id="Base_Column_List" >
     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_transfer_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
+    p.postage_alipay, p.postage_alipay_name, p.postage_create_time, p.postage_update_time,postage_coding,postage_customer_time,postage_finance_time,postage_is_print
   </sql>
 
   <select id="listPostage" resultMap="BaseResultMap" parameterType="Postage" >
     select
     <include refid="Base_Column_List" />,
     sa.admin_name AS adminName,
-    si.store_name AS storeName
+    si.store_name AS storeName,
+    pi.postage_pay_type postagePayType,
+    pi.postage_pay_where postagePayWhere,
+    pt.proc_type_name procTypeName,
+    pm.proc_method_name procMethodName
     from tb_rst_postage p
     LEFT JOIN tb_rst_sys_admin sa ON p.admin_id = sa.admin_id
     LEFT JOIN tb_rst_store_info si ON p.postage_order_source = si.store_id
+    LEFT JOIN tb_rst_postage_info pi on pi.postage_id = p.customer_postage_id
+    LEFT JOIN tb_rst_cm_proc_method pm ON pm.proc_method_id = p.postage_treatment_method
+    LEFT JOIN tb_rst_cm_proc_type pt ON pt.proc_type_id = pm.proc_type_id
     <where>
       <if test="adminId != null and adminId != ''">
         p.admin_id = #{adminId}
@@ -88,6 +98,9 @@
       <if test="postageAlipayName != null and postageAlipayName != ''">
         AND p.postage_alipay_name like CONCAT('%',#{postageAlipayName},'%')
       </if>
+      <if test="postageIsPrint != null and postageIsPrint != ''">
+        AND p.postage_is_print = #{postageIsPrint}
+      </if>
       <if test="companyIds != null and companyIds != ''">
         AND p.company_id IN
           <foreach collection="companyIds" item="item" index="index" separator="," open="(" close=")">
@@ -102,10 +115,15 @@
     select
     <include refid="Base_Column_List" />,
     sa.admin_name AS adminName,
-    si.store_name AS storeName
+    si.store_name AS storeName,
+    qd.describe_title questionTitle,
+    pi.postage_pay_type postagePayType,
+    pi.postage_pay_where postagePayWhere
     from tb_rst_postage p
     LEFT JOIN tb_rst_sys_admin sa ON p.admin_id = sa.admin_id
     LEFT JOIN tb_rst_store_info si ON p.postage_order_source = si.store_id
+    LEFT JOIN tb_rst_cm_question_describe qd on p.customer_id = qd.customer_id
+    LEFT JOIN tb_rst_postage_info pi on pi.postage_id = p.customer_postage_id
    WHERE  p.postage_id = #{postageId}
   </select>
 
@@ -116,7 +134,7 @@
     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_logistics_img
+    postage_amount, postage_alipay, postage_alipay_name,postage_logistics_img,customer_postage_id,postage_coding,postage_is_print
     )
     values (#{postageId,jdbcType=INTEGER}, #{adminId,jdbcType=INTEGER}, #{customerId,jdbcType=INTEGER},#{companyId,jdbcType=INTEGER}, #{postageCustomerStatus,jdbcType=INTEGER},
     #{postageManagerStatus,jdbcType=INTEGER}, #{postageFinanceStatus,jdbcType=INTEGER},  #{postageTransferStatus,jdbcType=INTEGER},
@@ -124,7 +142,8 @@
     #{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}, #{postageLogisticsImg,jdbcType=VARCHAR}
+    #{postageAmount,jdbcType=INTEGER}, #{postageAlipay,jdbcType=VARCHAR}, #{postageAlipayName,jdbcType=VARCHAR}, #{postageLogisticsImg,jdbcType=VARCHAR},
+    #{customerPostageId,jdbcType=INTEGER},#{postageCoding,jdbcType=VARCHAR},1
     )
   </insert>
 
@@ -189,7 +208,16 @@
             postage_update_time = #{postageUpdateTime,jdbcType=TIMESTAMP},
         </if>
         <if test="postageClientAddress != null" >
-            postage_client_address = #{postageClientAddress,jdbcType=TIMESTAMP}
+            postage_client_address = #{postageClientAddress,jdbcType=TIMESTAMP},
+        </if>
+        <if test="postageCustomerTime != null" >
+          postage_customer_time = #{postageCustomerTime,jdbcType=TIMESTAMP},
+        </if>
+        <if test="postageFinanceTime != null" >
+          postage_finance_time = #{postageFinanceTime,jdbcType=TIMESTAMP},
+        </if>
+        <if test="postageIsPrint != null" >
+          postage_is_print = #{postageIsPrint,jdbcType=INTEGER}
         </if>
     </set>
     where postage_id = #{postageId,jdbcType=INTEGER}
@@ -235,5 +263,20 @@
     </where>
     ORDER BY postage_id DESC
   </select>
-
+  <delete id="delCustomerPostage" parameterType="java.lang.Integer" >
+    delete from tb_rst_postage
+    <where>
+      customer_postage_id = #{postageId}
+    </where>
+  </delete>
+  <select id="getPostagePrintedNum" resultType="Integer" >
+    SELECT
+    count(1)
+    from tb_rst_postage p
+    where
+    p.postage_manager_status = 2
+    AND p.postage_finance_status = 2
+    AND p.postage_transfer_status = 1
+    AND p.postage_is_print = 1
+  </select>
 </mapper>

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

@@ -2161,6 +2161,7 @@
         AND sales_address_tel = #{salesAddressTel}
         AND sales_address_name = #{salesAddressName}
         AND sales_post_firm = #{salesPostFirm}
+        AND sales_id != #{salesId}
     </select>
 <!--查询子订单数量-->
     <select id="listSublistCount" parameterType="Integer" resultType="SalesOrder">

+ 9 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintSignclosedInfoServiceImpl.java

@@ -666,6 +666,15 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
             sendbackInfo.setSendbackSignTime(new Date());
             if(record.getSendbackIsUse() != null){
                 sendbackInfo.setSendbackIsUse(record.getSendbackIsUse());
+                if(record.getSendbackIsUse() == 1){
+                    puoductbuffer.append(",状态:未使用");
+                }else if(record.getSendbackIsUse() == 2){
+                    puoductbuffer.append(",状态:已使用");
+                }
+
+            }
+            if(record.getSignclosedDesc() != null && !record.getSignclosedDesc().equals("")){
+                puoductbuffer.append(",备注:"+record.getSignclosedDesc());
             }
             customerInfoMapper.updateSendbackInfo(sendbackInfo);
 

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

@@ -234,7 +234,8 @@
 	</select>
 	<!-- 获取管理员信息 -->
 	<select id="getAdminInfo" parameterType="Admin" resultType="Admin">
-		SELECT * FROM tb_rst_sys_admin
+		SELECT *,tb_rst_sys_admin_depart.depart_name departName FROM tb_rst_sys_admin
+		LEFT JOIN tb_rst_sys_admin_depart on tb_rst_sys_admin.admin_dept = tb_rst_sys_admin_depart.depart_id
 		<where>
 			<if test="adminOpenId != null">
 				admin_open_id = #{adminOpenId}

+ 5 - 3
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -1635,14 +1635,14 @@ public class AdminCustomerController {
             return new ResponseJson(500, "该条客诉已在申请邮费中了", 500);
         }
 
-        String orderId = "";
+        /*String orderId = "";
         for (SalesOrder salesOrder : cmRelation.getSalesOrderList()) {
             if ("".equals(orderId)) {
                 orderId = salesOrder.getSalesOrderId();
             } else {
                 orderId += "," + salesOrder.getSalesOrderId();
             }
-        }
+        }*/
 
         Integer flag = 0;
         Postage postage = new Postage();
@@ -1653,7 +1653,7 @@ public class AdminCustomerController {
         postage.setPostageManagerStatus(1);     //------考虑手动点, 直接变为申请中
         postage.setPostageOrderSource(customerInfo.getStoreId());   //店铺id
 //        postage.setPostageTreatmentMethod(cmRelation.getProcMethodId()); //处理方式
-        postage.setSalesOrderId(orderId);       //efast订单号
+       // postage.setSalesOrderId(orderId);       //efast订单号
         postage.setPostageClientName(cmRelation.getRelationBackName());
         postage.setPostageClientTel(cmRelation.getRelationBackTel());
         postage.setPostageClientAddress(cmRelation.getRelationSendAddress());
@@ -2726,6 +2726,8 @@ public class AdminCustomerController {
         }
         complaintAfterSalesNum.setCompleteSent(complaintSignclosedInfoService.getCompleteSent(signcloseds));
         /*查询签收数据 end*/
+        //待打印邮费申请
+        complaintAfterSalesNum.setPostagePrintedNum(postageService.getPostagePrintedNum());
         rj.addResponseKeyValue("complaintAfterSalesNum",complaintAfterSalesNum);
         rj.addResponseKeyValue("isOneself",isOneself);
         return rj;

+ 78 - 22
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminPostageController.java

@@ -4,10 +4,9 @@ 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.CompanyInfoService;
-import com.iamberry.rst.faces.cm.PostageAuthorityLogService;
-import com.iamberry.rst.faces.cm.PostageAuthorityService;
-import com.iamberry.rst.faces.cm.PostageService;
+import com.iamberry.rst.core.sys.SysConfig;
+import com.iamberry.rst.faces.cm.*;
+import com.iamberry.rst.faces.sys.SysConfigService;
 import com.iamberry.rst.faces.sys.SysService;
 import com.iamberry.rst.utils.AdminUtils;
 import com.iamberry.rst.utils.StitchAttrUtil;
@@ -24,10 +23,7 @@ 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;
+import java.util.*;
 
 /**
  * Created by wxm
@@ -48,6 +44,14 @@ public class AdminPostageController {
     private CompanyInfoService companyInfoService;
     @Autowired
     private PostageAuthorityLogService postageAuthorityLogService;
+    @Autowired
+    private SalesOrderService salesOrderService;
+    @Autowired
+    private ProcMethodService procMethodService;
+    @Autowired
+    private SysConfigService sysConfigService;
+    @Autowired
+    private CustomerService customerService;
 
     /**
      * 获取客诉列表
@@ -67,9 +71,9 @@ public class AdminPostageController {
         PagedResult<Postage> pagedResult = new PagedResult<>();
 
         List<CompanyInfo> companyInfoList = companyInfoService.listCompanyInfo(new CompanyInfo());
-
+        String adminid = sysConfigService.getSysConfig(8);//客服经理配置id
         //获取登录人id
-        if(loginAdmin.getAdminDept() == 3){        //客服
+        if(loginAdmin.getAdminDept() == 3 && !loginAdmin.getAdminId().equals(Integer.valueOf(adminid))){//客服
             postage.setAdminId(loginAdmin.getAdminId());
 
             if(companyInfoList != null && companyInfoList.size() > 0){
@@ -99,7 +103,8 @@ public class AdminPostageController {
 
         getManager(loginAdmin,pagedResult);
 
-         StitchAttrUtil.getSa().setModelAndView(postage, mv, "/admin/postage/postage_list", pagedResult);
+         StitchAttrUtil.getSa().addNoPro("companyIds").addNoPro("postageAuthorityLogList")
+                 .setModelAndView(postage, mv, "/admin/postage/postage_list", pagedResult);
         return mv;
     }
 
@@ -115,14 +120,15 @@ public class AdminPostageController {
             ArrayList authorityFinancialPaymentList =  new ArrayList();
             List<PostageAuthority> postageAuthorityList = postageAuthorityService.getPostageAuthorityListByAdminId(loginAdmin.getAdminId());
             for (PostageAuthority postageAuthority:postageAuthorityList ) {
-                if(companyId == postageAuthority.getCompanyId()){
-                    if(loginAdmin.getAdminId() == postageAuthority.getAuthorityCustomerManager()){
+                if(companyId.intValue() == postageAuthority.getCompanyId().intValue()){
+
+                    if(loginAdmin.getAdminId().intValue() == postageAuthority.getAuthorityCustomerManager().intValue()){
                         authorityCustomerManagerList.add(postageAuthority.getAuthorityCustomerManager());
                     }
-                    if(loginAdmin.getAdminId() == postageAuthority.getAuthorityFinancialManager()){
+                    if(loginAdmin.getAdminId().intValue() == postageAuthority.getAuthorityFinancialManager().intValue()){
                         authorityFinancialManagerList.add(postageAuthority.getAuthorityFinancialManager());
                     }
-                    if(loginAdmin.getAdminId() == postageAuthority.getAuthorityFinancialPayment()){
+                    if(loginAdmin.getAdminId().intValue() == postageAuthority.getAuthorityFinancialPayment().intValue()){
                         authorityFinancialPaymentList.add(postageAuthority.getAuthorityFinancialPayment());
                     }
                 }
@@ -145,7 +151,7 @@ public class AdminPostageController {
                 pagedResult.getDataList().get(i).setFinancePay(0);
             }
 
-            if(pagedResult.getDataList().get(i).getAdminId() == loginAdmin.getAdminId()){
+            if(pagedResult.getDataList().get(i).getAdminId().intValue() ==  loginAdmin.getAdminId().intValue()){
                 pagedResult.getDataList().get(i).setCustomerConfirm(1);
             }else{
                 pagedResult.getDataList().get(i).setCustomerConfirm(0);
@@ -171,17 +177,17 @@ public class AdminPostageController {
         for (PostageAuthority authority : postageAuthorityList) {
             switch (reviewNumber){
                 case 2:
-                    if(authority.getAuthorityCustomerManager() == loginAdmin.getAdminId()){
+                    if(authority.getAuthorityCustomerManager().intValue() == loginAdmin.getAdminId().intValue()){
                         flag = true;
                     }
                     break;
                 case 3:
-                    if(authority.getAuthorityFinancialManager() == loginAdmin.getAdminId()){
+                    if(authority.getAuthorityFinancialManager().intValue() == loginAdmin.getAdminId().intValue()){
                         flag = true;
                     }
                     break;
                 case 4:
-                    if(authority.getAuthorityFinancialPayment() == loginAdmin.getAdminId()){
+                    if(authority.getAuthorityFinancialPayment().intValue() == loginAdmin.getAdminId().intValue()){
                         flag = true;
                     }
                     break;
@@ -229,8 +235,10 @@ public class AdminPostageController {
                     if(status == 2){    //状态(客服经理审核)1:审核中 2:通过  3:驳回
                         postage.setPostageManagerStatus(status);
                         postage.setPostageFinanceStatus(1);     //审核中
+                        postage.setPostageCustomerTime(new Date());     //审核时间
                     }else{
                         postage.setPostageManagerStatus(status);    //驳回
+                        postage.setPostageCustomerTime(new Date());     //审核时间
                     }
                     num = postageService.updatePostage(postage);
                     if(num > 0){        //客服经理审核
@@ -248,11 +256,13 @@ public class AdminPostageController {
                     if(status == 2){
                         postage.setPostageFinanceStatus(status);
                         postage.setPostageTransferStatus(1);
+                        postage.setPostageFinanceTime(new Date());     //审核时间
                     }else{
                         postage.setPostageFinanceStatus(status);
+                        postage.setPostageFinanceTime(new Date());     //审核时间
                     }
                     num = postageService.updatePostage(postage);
-                    if(num > 0){        //客服经理审核
+                    if(num > 0){        //财务审核记录
                         PostageAuthorityLog postageAuthorityLog = new PostageAuthorityLog();
                         postageAuthorityLog.setAdminId(loginAdmin.getAdminId());
                         postageAuthorityLog.setPostageId(postageId);
@@ -266,12 +276,18 @@ public class AdminPostageController {
                     //转账状态 是否转账:1已转   2:未转
                     postage.setPostageTransferStatus(status);
                     num = postageService.updatePostage(postage);
-                    if(num > 0){        //客服经理审核
+                    if(num > 0){        //财务打款记录
                         PostageAuthorityLog postageAuthorityLog = new PostageAuthorityLog();
                         postageAuthorityLog.setAdminId(loginAdmin.getAdminId());
                         postageAuthorityLog.setPostageId(postageId);
                         postageAuthorityLog.setAuthorityLogType(4);
                         postageAuthorityLogService.save(postageAuthorityLog);       //增加日志
+
+                        //同步客诉邮费记录为已转账
+                        PostageInfo postageInfo= new PostageInfo();
+                        postageInfo.setPostageId(post.getCustomerPostageId());
+                        postageInfo.setPostageStatus(3);
+                        customerService.updatePostageInfo(postageInfo);
                     }
                 }
                 break;
@@ -294,15 +310,33 @@ public class AdminPostageController {
         if(postageId == null || postageId == 0){
             return new ResponseJson(500, "未获取到记录id", 500);
         }
+        Admin loginAdmin = AdminUtils.getLoginAdmin();
+        ResponseJson responseJson = new ResponseJson(200, "查询成功", 200);
         Postage  postage = postageService.getPostage(postageId);
 
         PostageAuthorityLog postageAuthorityLog = new PostageAuthorityLog();
         postageAuthorityLog.setPostageId(postageId);
         List<PostageAuthorityLog> postageAuthorityLogList = postageAuthorityLogService.getPostageAuthorityLogList(postageAuthorityLog);
         postage.setPostageAuthorityLogList(postageAuthorityLogList);
+        if(postage.getSalesOrderId() != null){
+            SalesOrder salesOrder = salesOrderService.getSalesOrderById(postage.getSalesOrderId());
+            responseJson.addResponseKeyValue("salesOrder",salesOrder);
+            SalesOrderItem salesOrderItem = new SalesOrderItem();
+            salesOrderItem.setItemOrderId(salesOrder.getSalesId());
+            List<SalesOrderItem> itemList = salesOrderService.listSalesOrderItem(salesOrderItem);
+            responseJson.addResponseKeyValue("itemList",itemList);
 
+        }
+        ProcMethod procMethod = procMethodService.getProcMethodById(postage.getPostageTreatmentMethod());
+        responseJson.addResponseKeyValue("procMethod",procMethod);
+        Admin admin = new Admin();
+        admin.setAdminId(postage.getAdminId());
+        admin = sysService.getAdminInfo(admin);
+        responseJson.addResponseKeyValue("admin",admin);//申请人信息
+        responseJson.addResponseKeyValue("loginAdmin",loginAdmin);//登录人信息
         if(postage != null){
-            return new ResponseJson(200, "修改状态成功", 200);
+            responseJson.addResponseKeyValue("postage",postage);
+            return responseJson;
         }else{
             return new ResponseJson(500, "修改状态失败", 500);
         }
@@ -323,6 +357,28 @@ public class AdminPostageController {
         num = postageService.delPostage(postageId);
 
         if(num > 0){
+            return new ResponseJson(200, "删除成功", 200);
+        }else{
+            return new ResponseJson(500, "删除失败", 500);
+        }
+    }
+
+    /**
+     * 修改打印状态
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "/updatePostagePrint")
+    public ResponseJson updatePostagePrint(HttpServletRequest request, Integer postageId) throws Exception {
+        if(postageId == null || postageId == 0){
+            return new ResponseJson(500, "未获取到记录id", 500);
+        }
+        Integer num = 0;
+        Postage postage = new Postage();
+        postage.setPostageId(postageId);
+        postage.setPostageIsPrint(2);
+        num = postageService.updatePostage(postage);
+        if(num > 0){
             return new ResponseJson(200, "修改状态成功", 200);
         }else{
             return new ResponseJson(500, "修改状态失败", 500);

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

@@ -589,7 +589,7 @@ public class MQTask implements InitializingBean {
 	//@Scheduled(cron = "*/10 * * * * ?")
 	//@Scheduled(cron = "0 0 9,11,14,16,18,20 * * ? ")//推送时间分别为每天早上九点、中午十一点、下午三点、下午六点、晚上八点
 	//@Scheduled(cron = "0 0 */1 * * ?")//每小时执行一次
-//	@Scheduled(cron = "0 0/3 * * * ?")//每三分钟执行一次
+	/*@Scheduled(cron = "0 0/3 * * * ?")//每三分钟执行一次*/
 	@Scheduled(cron = "0 0/30 * * * ?")//每半个小时执行一次
 	public void orderCaseDate(){
 		logger.info("查询订单揽件时间");

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

@@ -1163,6 +1163,7 @@ public class AdminSalesOrderController {
             isOrder.setSalesAddressTel(order.getSalesAddressTel());
             isOrder.setSalesAddressName(order.getSalesAddressName());
             isOrder.setSalesPostFirm(order.getSalesPostFirm());
+            isOrder.setSalesId(order.getSalesId());
             List<SalesOrder> listOrder = salesOrderService.listSalesOrderByAddr(isOrder);
             if(listOrder != null &&  listOrder.size() > 0){
                 salesOrder.setSalesIsSublist(2);

文件差异内容过多而无法显示
+ 20 - 14
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl


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

@@ -51,7 +51,7 @@
         <div class="tabBar clearfix">
         <#if procMethod.procMethodIsBack == 1>
                     <span>寄回信息</span>
-                    <span>费信息</span>
+                    <span>费信息</span>
         </#if>
         <#if procMethod.procMethodIsSend == 1>
                     <span>寄送信息</span>
@@ -453,12 +453,15 @@
                 <table class="table table-border table-bg table-bordered" >
                     <thead>
                     <tr>
-                        <th>邮费id</th>
-                        <th>邮费金额</th>
-                        <th>支付宝姓名</th>
-                        <th>支付宝账号</th>
+                        <th>付费id</th>
+                        <th>付费金额</th>
+                        <th>支付方式</th>
+                        <th>账户姓名</th>
+                        <th>支付账号</th>
+                        <th>开户行</th>
                         <th>付款类型</th>
-                        <th>状态</th>
+                        <th>付费状态</th>
+                        <th>审核状态</th>
                         <th>备注</th>
                         <th>操作</th>
                     </tr>
@@ -469,8 +472,16 @@
                         <tr id="deleteId${(postageInfo.postageId)!''}">
                             <td>${(postageInfo.postageId)!''}</td>
                             <td>${(postageInfo.postageAmount/100)!''}</td>
+                            <td>
+                                <#if postageInfo.postagePayType??>
+                                    <#if postageInfo.postagePayType == 1>支付宝</#if>
+                                    <#if postageInfo.postagePayType == 2>微信</#if>
+                                    <#if postageInfo.postagePayType == 3>银行卡</#if>
+                                </#if>
+                            </td>
                             <td>${(postageInfo.postageAlipayName)!''}</td>
                             <td>${(postageInfo.postageAlipay)!''}</td>
+                            <td>${(postageInfo.postagePayWhere)!''}</td>
                             <td>
                                 <#if postageInfo.postageAlipayType??>
                                     <#if postageInfo.postageAlipayType == 1>用户付款</#if>
@@ -481,22 +492,46 @@
                             <#if postageInfo.postageStatus??>
                                 <#if postageInfo.postageStatus == 0><td>未申请</td></#if>
                                 <#if postageInfo.postageStatus == 1><td>未申请</td></#if>
-                                <#if postageInfo.postageStatus == 2><td>已申请(待转账)</td></#if>
+                                <#if postageInfo.postageStatus == 2><td>已申请</td></#if>
                                 <#if postageInfo.postageStatus == 3><td>已转账</td></#if>
                                 <#if postageInfo.postageStatus == 4><td>未知</td></#if>
                             <#else>
-                                <td></td>
+                            <td></td>
+                            </#if>
+                            <#if postageInfo.postageTransferStatus??>
+                                <#if postageInfo.postageTransferStatus == 1>
+                                    <#if postageInfo.postageFinanceStatus??>
+                                    <#if postageInfo.postageFinanceStatus == 1><td>待审核</td></#if>
+                                    <#if postageInfo.postageFinanceStatus == 2><td>已审核(待转账)</td></#if>
+                                    <#else>
+                                        <td></td>
+                                    </#if>
+                                <#else>
+                                        <td>已转账</td>
+                                </#if>
                             </#if>
                             <td>${postageInfo.postageDesc!''}</td>
-                            <td><a onclick="deletePostage(${(postageInfo.postageId)!});">删除</a>&nbsp;&nbsp;<a onclick="getPostage(${(postageInfo.postageId)!});">修改</a></td>
+                            <td><a onclick="deletePostage(${(postageInfo.postageId)!});">删除</a>
+                                &nbsp;&nbsp;<a onclick="getPostage(${(postageInfo.postageId)!});">修改</a>&nbsp;&nbsp;
+                                <#if postageInfo.postageTransferStatus??>
+                                    <#if postageInfo.postageTransferStatus == 1>
+                                        <#if postageInfo.postageFinanceStatus??>
+                                            <#if postageInfo.postageFinanceStatus == 2>
+                                                <a onclick="printPostage(${postageInfo.postId});">打印</a>
+                                            </#if>
+                                        </#if>
+                                    </#if>
+                                </#if>
+
+                            </td>
                         </tr>
                         </#list>
                     <#else>
-                    <tr id="colspanId"><td colspan="8" class="td-manage text-c" >暂时没有邮费信息,请添加!</td></tr>
+                    <tr id="colspanId"><td colspan="8" class="td-manage text-c" >暂时没有费信息,请添加!</td></tr>
                     </#if>
                     </tbody>
                 </table>
-                    <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="showPostageDiv();">录入邮费转账</button>
+                    <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="showPostageDiv();">录入费转账</button>
                 </div>
             </div>
             <div class="row cl" id="addPostageId" style="display: none;">
@@ -505,17 +540,17 @@
             </div>
             <div class="formControls col-12 col-sm-12">
             <div >
-                <div class="row cl">
+                <div class="row cl" style="display:none;">
                     <div class="formControls col-2 col-sm-2 text-r">
                         <strong>状态</strong>
                     </div>
                     <div class="formControls col-12 col-sm-12">
-                        <div class="radio-box">
+                        <#--<div class="radio-box">
                             <input type="radio" id="tel-66" name="postageStatus" checked value="1">
                             <label for="tel-66">未申请</label>
-                        </div>
+                        </div>-->
                         <div class="radio-box">
-                            <input type="radio" id="tel-77" name="postageStatus" value="2">
+                            <input type="radio" id="tel-77" name="postageStatus" value="2" checked>
                             <label for="tel-77">已申请(待转账)</label>
                         </div>
 
@@ -535,13 +570,30 @@
                 </div>
                 <div class="row cl">
                     <div class="formControls col-2 col-sm-2 text-r">
-                        <strong>支付宝</strong>
+                        <strong>支付方式</strong>
+                    </div>
+                    <div class="formControls col-5 col-sm-5">
+                        <span class="select-box" >
+                            <select class="select" name="postagePayType" id="postagePayType">
+                                <option value="1">支付宝</option>
+                                <option value="2">微信</option>
+                                <option value="3">银行卡</option>
+                            </select>
+                        </span>
+                    </div>
+                    <div class="formControls col-5 col-sm-5" style="display: none;" id="postagePayWhereDiv">
+                        <input type="text" class="input-text" placeholder="开户行" id="postagePayWhere" name="postagePayWhere">
+                    </div>
+                </div>
+                <div class="row cl">
+                    <div class="formControls col-2 col-sm-2 text-r">
+                        <strong>账户信息</strong>
                     </div>
                     <div class="formControls col-5 col-sm-5">
-                        <input type="text" class="input-text" placeholder="填写支付宝姓名" id="postageAlipayName" name="postageAlipayName">
+                        <input type="text" class="input-text" placeholder="填写账户姓名" id="postageAlipayName" name="postageAlipayName">
                     </div>
                     <div class="formControls col-5 col-sm-5">
-                        <input type="text" class="input-text" placeholder="填写支付宝账号" id="postageAlipay" name="postageAlipay">
+                        <input type="text" class="input-text" placeholder="填写支付账号" id="postageAlipay" name="postageAlipay">
                     </div>
                 </div>
                 <div class="row cl">
@@ -571,7 +623,7 @@
                         <strong></strong>
                     </div>
                     <div class="formControls col-5 col-sm-5">
-                        <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="addPostage()">确定录入费转账</button>
+                        <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="addPostage()">确定录入费转账</button>
                     </div>
                 </div>
             </div>
@@ -583,17 +635,17 @@
                   </div>
             <div class="formControls col-12 col-sm-12">
             <div>
-                <div class="row cl">
+                <div class="row cl" style="display:none;">
                     <div class="formControls col-2 col-sm-2 text-r">
                         <strong>状态</strong>
                     </div>
                     <div class="formControls col-12 col-sm-12 skin-minimal">
-                        <div class="radio-box">
+                        <#--<div class="radio-box">
                             <input type="radio" id="tel-666" name="postageStatuss" value="1">
                             <label for="tel-666">未申请</label>
-                        </div>
+                        </div>-->
                         <div class="radio-box">
-                            <input type="radio" id="tel-777" name="postageStatuss" value="2">
+                            <input type="radio" id="tel-777" name="postageStatuss" value="2" checked>
                             <label for="tel-777">已申请(待转账)</label>
                         </div>
 
@@ -613,13 +665,30 @@
                 </div>
                 <div class="row cl">
                     <div class="formControls col-2 col-sm-2 text-r">
-                        <strong>支付宝</strong>
+                        <strong>支付方式</strong>
+                    </div>
+                    <div class="formControls col-5 col-sm-5">
+                        <span class="select-box" >
+                            <select class="select" name="postagePayTypes" id="postagePayTypes">
+                                <option value="1">支付宝</option>
+                                <option value="2">微信</option>
+                                <option value="3">银行卡</option>
+                            </select>
+                        </span>
+                    </div>
+                    <div class="formControls col-5 col-sm-5" style="display: none;" id="postagePayWhereDivs">
+                        <input type="text" class="input-text" placeholder="开户行" id="postagePayWheres" name="postagePayWheres">
+                    </div>
+                </div>
+                <div class="row cl">
+                    <div class="formControls col-2 col-sm-2 text-r">
+                        <strong>账户信息</strong>
                     </div>
                     <div class="formControls col-5 col-sm-5">
-                        <input type="text" class="input-text" placeholder="填写支付宝姓名" id="postageAlipayNames" name="postageAlipayNames">
+                        <input type="text" class="input-text" placeholder="填写账户姓名" id="postageAlipayNames" name="postageAlipayNames">
                     </div>
                     <div class="formControls col-5 col-sm-5">
-                        <input type="text" class="input-text" placeholder="填写支付宝账号" id="postageAlipays" name="postageAlipays">
+                        <input type="text" class="input-text" placeholder="填写支付账号" id="postageAlipays" name="postageAlipays">
                     </div>
                 </div>
                 <div class="row cl">
@@ -650,7 +719,7 @@
                         <strong></strong>
                     </div>
                     <div class="formControls col-5 col-sm-5">
-                        <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="updatePostage()">确定修改费信息</button>
+                        <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="updatePostage()">确定修改费信息</button>
                     </div>
                 </div>
             </div>
@@ -1350,10 +1419,103 @@
         <input type="hidden" id="customerId" name="customerId" value="${customerId!''}" seleType="primary">
         <a name="Targetname" id="Targetname"></a>
     </form>
+    <div  style="padding: 0px;margin: 0px;display: none;" >
+        <div id="printlist" style="">
+            <ul style=" height: 460px;margin-left: 20px;margin-right: 20px;">
+                <li style="font-size: 22px;height: 25px;display: block;text-align: center;font-weight: bold;margin-top: 15px">商品换货退货退款审批</li>
+                <li style="font-size: 12px;height: 30px;display: block;text-align: left;margin-top: 15px">深圳爱贝源科技有限公司&nbsp;&nbsp;&nbsp;&nbsp;申请日期:<span id="applyTime"></span></li>
+                <table class="table table-border table-bg table-bordered" style="border: 1px solid #000;border-collapse: collapse;text-align: left;">
+                    <thead>
+                    <tr>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;width: 3.5cm;">审批编码</td>
+                        <td id="postageCoding" colspan="15" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+
+                    </tr>
+
+                    <tr>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">申请人</td>
+                        <td  id="applicantPeople" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;" colspan="15"></td>
+                    </tr>
+                    <tr>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;h">申请人部门</td>
+                        <td id="applicantDepa" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;" colspan="15"></td>
+                    </tr>
+                    <#--<tr style="font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">-->
+                    <tr class="text-c">
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">客户成交入口</td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">售后类型</td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">销售时间及退换货原因</td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">交易号</td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">客户名称</td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">联系电话</td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">快递公司</td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">详细地址</td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">快递单号</td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">快递费用承担方</td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">退回商品名称/型号</td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">销售员</td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">数量(台)</td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">退款金额</td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">退款账户</td>
+                    </tr>
+                    <tr>
+                        <td  style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">客户明细1</td>
+                        <td id="postinfo1" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td id="postinfo2" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td id="postinfo3" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td id="postinfo4" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td id="postinfo5" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td id="postinfo6" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td id="postinfo7" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td id="postinfo8" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td id="postinfo9" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td id="postinfo10" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td id="postinfo11" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td id="postinfo12" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td id="postinfo13" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td id="postinfo14" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td id="postinfo15" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                    </tr>
+                    <tr>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td id="totalNum" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td id="totalAmount" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;"></td>
+                    </tr>
+                    <tr style="height: 40px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
+                        <td rowspan="2" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">审批人</td>
+                        <td id="customerApproval" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;" colspan="15"></td>
+                    </tr>
+                    <tr style="height: 40px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
+                        <td id="financialApproval" style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;" colspan="15"></td>
+                    </tr>
+                    <tr style="height: 40px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;">抄送人</td>
+                        <td style="font-size: 0.75rem;padding:0.5rem 0;text-indent: 0.5rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;" colspan="15">沈秋梅</td>
+                    </tr>
+                </table>
+                <li style="font-size: 12px;height: 30px;display: block;text-align: left;margin-top: 15px">打印时间:<span id="printTime"></span>&nbsp;&nbsp;&nbsp;&nbsp;打印人:<span id="printPeople"></span></li>
+            </ul>
+        </div>
+    </div>
 </article>
 <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
 <script type="text/javascript" src="${path}/common/lib/icheck/jquery.icheck.min.js"></script>
 <script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/ajaxfileupload.js"></script>
+<script type="text/javascript" src="${path}/common/lib/jquery.PrintArea/jquery.PrintArea.js"></script>
 <script type="text/javascript">
     var type= "${type }";
     //产品类型
@@ -1769,6 +1931,8 @@
         var postageAlipay = $("#postageAlipay").val();
         var postageDesc = $("#postageDesc").val();
         var postageAlipayType = $("#postageAlipayType").val();
+        var postagePayType = $("#postagePayType").val();
+        var postagePayWhere = $("#postagePayWhere").val();
         if(postageStatus == null || postageStatus == ""){
             layer.msg("请选择邮费状态!",{icon: 5,time:1000});
             return;
@@ -1798,7 +1962,9 @@
                        "postageAlipayName" : postageAlipayName,
                        "postageAlipay" : postageAlipay,
                        "postageAlipayType" : postageAlipayType,
-                       "postageDesc" : postageDesc},
+                       "postageDesc" : postageDesc,
+                       "postagePayType" : postagePayType,
+                       "postagePayWhere" : postagePayWhere},
                 url: "${path}/admin/customer/add_PostageInfo",
                 async: false,
                 success: function(data){
@@ -1810,7 +1976,7 @@
                             postageStatuss = "未申请";
                         }
                         if(postageInfo.postageStatus == 2){
-                            postageStatuss = "已申请(待转账)";
+                            postageStatuss = "已申请";
                         }
                         if(postageInfo.postageStatus == 3){
                             postageStatuss = "已转账";
@@ -1819,7 +1985,7 @@
                             postageStatuss = "未知";
                         }
                         //付款类型  1:用户付款  2:客户付款  3:公司付款
-                        var postageAlipayType = ''
+                        var postageAlipayType = '';
                         if(postageInfo.postageAlipayType == 1){
                             postageAlipayType = '用户付款';
                         }else if(postageInfo.postageAlipayType == 2){
@@ -1827,12 +1993,36 @@
                         }else if(postageInfo.postageAlipayType == 3){
                             postageAlipayType = '公司付款';
                         }
+                        //支付类型
+                        var postagePayType = '';
+                        if(postageInfo.postagePayType == 1){
+                            postagePayType = '支付宝';
+                        }else if(postageInfo.postagePayType == 2){
+                            postagePayType = '微信';
+                        }else if(postageInfo.postagePayType == 3){
+                            postagePayType = '银行卡';
+                        }
+                        //审核状态
+                        var postageTransferStatus = '';
+                        if(postageInfo.postageTransferStatus == 1){
+                            if(postageInfo.postageFinanceStatus == null || postageInfo.postageFinanceStatus == 1){
+                                postageTransferStatus = '待审核';
+                            }
+                            if(postageInfo.postageFinanceStatus == 2){
+                                postageTransferStatus = '已审核(待转账)';
+                            }
+                        }else if(postageInfo.postageTransferStatus == 2){
+                            postageTransferStatus = '已转账';
+                        }
                         $("#trbodyId").append('<tr id="deleteId'+postageInfo.postageId+'"><td>'+postageInfo.postageId+'</td>' +
                                 '<td>'+(postageInfo.postageAmount)/100+'</td>' +
+                                '<td>'+postagePayType+'</td>' +
                                 '<td>'+postageInfo.postageAlipayName+'</td>' +
                                 '<td>'+postageInfo.postageAlipay+'</td>' +
+                                '<td>'+postageInfo.postagePayWhere+'</td>' +
                                 '<td>'+postageAlipayType+'</td>' +
                                 '<td>'+postageStatuss+'</td>' +
+                                '<td>'+postageTransferStatus+'</td>' +
                                 '<td>'+postageInfo.postageDesc+'</td>' +
                                 '<td><a onclick="deletePostage('+postageInfo.postageId+');">删除</a>&nbsp&nbsp<a onclick="getPostage('+postageInfo.postageId+');">修改</a></td></tr>');
                         layer.msg("添加成功!",{icon: 1,time:1000});
@@ -1890,7 +2080,13 @@
                     $("#postageAlipayNames").val(postageInfo.postageAlipayName);
                     $("#postageAlipayTypes").val(postageInfo.postageAlipayTypes);
                     $("#postageDescs").val(postageInfo.postageDesc);
-
+                    $("#postagePayTypes").val(postageInfo.postagePayType);
+                    $("#postagePayWheres").val(postageInfo.postagePayWhere);
+                    if(postageInfo.postagePayType != null && postageInfo.postagePayType === 3){
+                        $("#postagePayWhereDivs").show();
+                    }else{
+                        $("#postagePayWhereDivs").hide();
+                    }
                 } else {
                     layer.msg("修改失败!",{icon: 5,time:1000});
                 }
@@ -1911,6 +2107,8 @@
         var postageAlipay = $("#postageAlipays").val();
         var postageAlipayTypes = $("#postageAlipayTypes").val();
         var postageDesc = $("#postageDescs").val();
+        var postagePayTypes = $("#postagePayTypes").val();
+        var postagePayWheres = $("#postagePayWheres").val();
         if(postageStatus == null || postageStatus == ""){
             layer.msg("请选择邮费状态!",{icon: 5,time:1000});
             return;
@@ -1924,11 +2122,11 @@
             return;
         }
         if(postageAlipayName == null || postageAlipayName == ""){
-            layer.msg("请输入支付宝姓名!",{icon: 5,time:1000});
+            layer.msg("请输入账户姓名!",{icon: 5,time:1000});
             return;
         }
         if(postageAlipay == null || postageAlipay == ""){
-            layer.msg("请输入支付账号!",{icon: 5,time:1000});
+            layer.msg("请输入支付账号!",{icon: 5,time:1000});
             return;
         }
         $.ajax({
@@ -1941,18 +2139,21 @@
                 "postageAlipayName" : postageAlipayName,
                 "postageAlipay" : postageAlipay,
                 "postageAlipayType" : postageAlipayTypes,
-                "postageDesc" : postageDesc},
+                "postagePayWhere" : postagePayWheres,
+                "postagePayType" : postagePayTypes,
+                "postageDesc" : postageDesc
+            },
             url: "${path}/admin/customer/update_PostageInfo",
             async: false,
             success: function(data){
                 if (data.returnCode == 200) {
                     postageInfo = data.returnMsg.postageInfo;
-                    var postageStatuss
+                    var postageStatuss;
                     if(postageInfo.postageStatus == 1){
                         postageStatuss = "未申请";
                     }
                     if(postageInfo.postageStatus == 2){
-                        postageStatuss = "已申请(待转账)";
+                        postageStatuss = "已申请";
                     }
                     if(postageInfo.postageStatus == 3){
                         postageStatuss = "已转账";
@@ -1960,12 +2161,47 @@
                     if(postageInfo.postageStatus == 4){
                         postageStatuss = "未知";
                     }
+                    //付款类型  1:用户付款  2:客户付款  3:公司付款
+                    var postageAlipayType = '';
+                    if(postageInfo.postageAlipayType == 1){
+                        postageAlipayType = '用户付款';
+                    }else if(postageInfo.postageAlipayType == 2){
+                        postageAlipayType = '客户付款';
+                    }else if(postageInfo.postageAlipayType == 3){
+                        postageAlipayType = '公司付款';
+                    }
+                    //支付类型
+                    var postagePayType = '';
+                    if(postageInfo.postagePayType == 1){
+                        postagePayType = '支付宝';
+                    }else if(postageInfo.postagePayType == 2){
+                        postagePayType = '微信';
+                    }else if(postageInfo.postagePayType == 3){
+                        postagePayType = '银行卡';
+                    }
+                    //审核状态
+                    var postageTransferStatus = '';
+                    if(postageInfo.postageTransferStatus == 1){
+                        if(postageInfo.postageFinanceStatus == null ||postageInfo.postageFinanceStatus == 1){
+                            postageTransferStatus = '待审核';
+                        }
+                        if(postageInfo.postageFinanceStatus == 2){
+                            postageTransferStatus = '已审核(待转账)';
+                        }
+                    }else if(postageInfo.postageTransferStatus == 2){
+                        postageTransferStatus = '已转账';
+                    }
+
                     $("#deleteId"+postageId).html("");
                     $("#deleteId"+postageId).append('<td>'+postageInfo.postageId+'</td>' +
                             '<td>'+(postageInfo.postageAmount)/100+'</td>' +
+                            '<td>'+postagePayType+'</td>' +
                             '<td>'+postageInfo.postageAlipayName+'</td>' +
                             '<td>'+postageInfo.postageAlipay+'</td>' +
+                            '<td>'+postageInfo.postagePayWhere+'</td>' +
+                            '<td>'+postageAlipayType+'</td>' +
                             '<td>'+postageStatuss+'</td>' +
+                            '<td>'+postageTransferStatus+'</td>' +
                             '<td>'+postageInfo.postageDesc+'</td>' +
                             '<td><a onclick="deletePostage('+postageInfo.postageId+');">删除</a>&nbsp&nbsp<a onclick="getPostage('+postageInfo.postageId+');">修改</a></td>');
 
@@ -2239,62 +2475,9 @@
         get_product_type();
 
         get_customer();
-        /*/!* 监听寄回状态按钮 *!/
-        $("input[name='renewedBackStatus']").change(function (){
-            initBackInfo($(this).val());
-        })
-
-        /!* 监听寄出状态按钮 *!/
-        $("input[name='renewedSendStatus']").change(function (){
-            initSendInfo($(this).val());
-        })
 
-        /!* 监听邮费状态按钮 *!/
-        $("input[name='renewedIsTransfer']").change(function (){
-            initPostageInfo($(this).val());
-        })*/
     });
 
-    /*/!*初始化寄回信息*!/
-    function initBackInfo(statusCode){
-        if(statusCode == 1){
-            $("#backLogisticsInfo").hide();
-            /!*$("#backTransferInfo").hide();*!/
-            $("#backUserInfo").hide();
-        }else{
-            $("#backLogisticsInfo").show();
-            $("#backTransferInfo").show();
-            $("#backUserInfo").show();
-        }
-    }
-
-    /!*显示隐藏邮费信息*!/
-    function initPostageInfo(statusCode){
-        if(statusCode == 1){
-            $("#postageInformation").show();
-        }else{
-            $("#postageInformation").hide();
-        }
-    }
-
-    /!*初始化寄出信息*!/
-    function initSendInfo(statusCode){
-        if(statusCode == 1){
-            $("#sendUserInfo").hide();
-            $("#sendAddressInfo").hide();
-            $("#sendaddressDescInfo").hide();
-            $("#sendLogisticsInfo").hide();
-            $("#sendDescInfo").hide();
-        }else{
-            $("#sendUserInfo").show();
-            $("#sendAddressInfo").show();
-            $("#sendaddressDescInfo").show();
-            $("#sendLogisticsInfo").show();
-            $("#sendDescInfo").show();
-        }
-    }*/
-
-
     /*显示所有产品及配件信息*/
     function showUpdateSendProduct() {
         var productList = getProduct() ; //所有产品
@@ -3443,6 +3626,137 @@
           $("#sendbackPresaleAdminDiv2").hide();
         }
     }
+    $("#postagePayType").change(function(){
+        var postagePayType = parseInt($("#postagePayType").val());
+        if(postagePayType === 3){
+            $("#postagePayWhereDiv").show();
+        }else{
+            $("#postagePayWhereDiv").hide();
+        }
+    });
+    $("#postagePayTypes").change(function(){
+        var postagePayType = parseInt($("#postagePayTypes").val());
+        if(postagePayType === 3){
+            $("#postagePayWhereDivs").show();
+        }else{
+            $("#postagePayWhereDivs").hide();
+        }
+    });
+    /**
+     * 打印
+     */
+    function printPostage(postageId) {
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"postageId":postageId},
+            url: "${path}" + "/admin/postage/print_postage",
+            async: true,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    var salesOrder = data.returnMsg.salesOrder;
+                    var procMethod = data.returnMsg.procMethod;
+                    var admin = data.returnMsg.admin;
+                    var postage = data.returnMsg.postage;
+                    var itemList = data.returnMsg.itemList;
+                    var loginAdmin = data.returnMsg.loginAdmin;
+                    var product = "";
+                    var productNum = 0;
+                    for(var i=0;i<itemList.length;i++){
+                        product += itemList[i].itemProductName +"("+itemList[i].itemProductColor+");"
+                        productNum += itemList[i].itemNum;
+                    }
+                    var postageCreateTime = formatDate(new Date(postage.postageCreateTime),"yyyy-MM-dd");
+                    var account = "";
+                    if(postage.postagePayType === 3){
+                        account = "银行卡"+"("+postage.postagePayWhere+")"+postage.postageAlipay+" "+postage.postageAlipayName;
+                    }else if(postage.postagePayType === 2){
+                        account = "微信"+postage.postageAlipay+" "+postage.postageAlipayName;
+                    }else if(postage.postagePayType === 1){
+                        account = "支付宝"+postage.postageAlipay+" "+postage.postageAlipayName;
+                    }
+
+                    $("#applyTime").html(postageCreateTime);
+                    $("#postageCoding").html(postage.postageCoding);
+                    $("#applicantPeople").html(admin.adminName);
+                    $("#applicantDepa").html(admin.departName);
+                    $("#postinfo1").html(salesOrder.companyName);
+                    $("#postinfo2").html(procMethod.procTypeName);
+                    $("#postinfo3").html(salesOrder.salesPayTime+postage.questionTitle);
+                    $("#postinfo4").html(salesOrder.salesDealCode);
+                    $("#postinfo5").html(postage.postageClientName);
+                    $("#postinfo6").html(postage.postageClientTel);
+                    $("#postinfo7").html(salesOrder.salesPostFirmName);
+                    $("#postinfo8").html(salesOrder.salesAddressInfo);
+                    $("#postinfo9").html(salesOrder.salesPostNum);
+                    $("#postinfo10").html("爱贝源");
+                    $("#postinfo11").html(product);
+                    $("#postinfo12").html(salesOrder.storeName);
+                    $("#postinfo13").html(productNum);
+                    $("#postinfo14").html(postage.postageAmount /100);
+                    $("#postinfo15").html(account);
+
+                    var postageAuthorityLogList = postage.postageAuthorityLogList;
+                    var customerApproval = "";
+                    var customerApprovalTime = "";
+                    var financialApproval = "";
+                    var financialApprovalTime = "";
+                    for(var i=0;i<postageAuthorityLogList.length;i++){
+                        var log = postageAuthorityLogList[i];
+                        if(log.authorityLogType === 2){
+                            customerApproval = log.adminName;
+                            customerApprovalTime = formatDate(new Date(log.authorityLogCreateTime),"yyyy-MM-dd HH:mm:ss");
+                        }
+                        if(log.authorityLogType === 3){
+                            financialApproval = log.adminName;
+                            financialApprovalTime = formatDate(new Date(log.authorityLogCreateTime),"yyyy-MM-dd HH:mm:ss");
+                        }
+
+                    }
+                    $("#customerApproval").html(customerApproval + "  已同意" +"   "+customerApprovalTime);
+                    $("#financialApproval").html(financialApproval + "  已同意" +"   "+financialApprovalTime);
+                    $("#printTime").html(formatDate(new Date(),"yyyy-MM-dd HH:mm:ss"));
+                    $("#printPeople").html(loginAdmin.adminName);
+                    $("#totalNum").html("总数量:"+productNum);
+                    $("#totalAmount").html("总退款金额(元):"+postage.postageAmount /100 + "("+swapper(postage.postageAmount /100));
+
+                    //修改打印状态
+                    updateprint(postageId);
+                     $("#printlist").printArea();
+                } else {
+                    layer.msg(data.resultMsg,{icon: 5,time:3000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+    }
+    function updateprint(postageId) {
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"postageId":postageId},
+            url: "${path}/admin/postage/updatePostagePrint",
+            async: false,
+            success: function(data){
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        });
+    }
+    function swapper(n) {
+        if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n))
+            return "数据非法";
+        var unit = "千百拾亿千百拾万千百拾元角分", str = "";
+        n += "00";
+        var p = n.indexOf('.');
+        if (p >= 0)
+            n = n.substring(0, p) + n.substr(p+1, 2);
+        unit = unit.substr(unit.length - n.length);
+        for (var i=0; i < n.length; i++)
+            str += '零壹贰叁肆伍陆柒捌玖'.charAt(n.charAt(i)) + unit.charAt(i);
+        return str.replace(/零(千|百|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
+    }
 </script>
 </body>
 </html>

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

@@ -85,8 +85,9 @@
                 <th width="60">退回快递名称</th>
                 <th width="80">快递单号</th>
                 <th width="60">退款金额</th>
-                <th width="60">支付宝账户</th>
-                <th width="80">支付宝姓名</th>
+                <th width="60">支付账户</th>
+                <th width="80">账户姓名</th>
+                <th width="80">开户行</th>
                 <th width="80">快递单号图片</th>
                 <th width="100">操作</th>
             </tr>
@@ -142,18 +143,7 @@
                         </#if>
                     </td>
                     <td>${postage.storeName!''}</td>
-                    <td>
-                        <#if postage.postageTreatmentMethod == 3>
-                            换新
-                        <#elseif postage.postageTreatmentMethod == 4>
-                            维修
-                        <#elseif postage.postageTreatmentMethod == 5>
-                            补发
-                        <#elseif postage.postageTreatmentMethod == 6>
-                            退货
-                        <#elseif postage.postageTreatmentMethod == 7>
-                            无理由退货
-                        </#if></td>
+                    <td>${postage.procTypeName!''}</td>
                     <td>${postage.salesOrderId!''}</td>
                     <td>${postage.postageClientName!''}</td>
                     <td>
@@ -167,21 +157,7 @@
                     <td>${postage.postageClientAddress!''}</td>
                     <td>
                         <#if postage.postageLogisticsCompany??>
-                            <#if postage.postageLogisticsCompany == "sto">申通快递</#if>
-                            <#if postage.postageLogisticsCompany == "yto">圆通快递</#if>
-                            <#if postage.postageLogisticsCompany == "sf">顺丰快递</#if>
-                            <#if postage.postageLogisticsCompany == "ems">邮政EMS</#if>
-                            <#if postage.postageLogisticsCompany == "zto">中通快递</#if>
-                            <#if postage.postageLogisticsCompany == "zjs">宅急送</#if>
-                            <#if postage.postageLogisticsCompany == "yunda">韵达快递</#if>
-                            <#if postage.postageLogisticsCompany == "cces">cces快递</#if>
-                            <#if postage.postageLogisticsCompany == "pick">上门提货</#if>
-                            <#if postage.postageLogisticsCompany == "htky">汇通快递</#if>
-                            <#if postage.postageLogisticsCompany == "ttkdex">天天快递</#if>
-                            <#if postage.postageLogisticsCompany == "stars">星晨急便</#if>
-                            <#if postage.postageLogisticsCompany == "jd">京东快递</#if>
-                            <#if postage.postageLogisticsCompany == "01">其他</#if>
-                            <#if postage.postageLogisticsCompany == "02">上门送货</#if>
+                            ${postage.postageLogisticsCompany!''}
                         <#else>
                             未知
                         </#if>
@@ -190,6 +166,7 @@
                     <td>${postage.postageAmount/100!''}</td>
                     <td>${postage.postageAlipay!''}</td>
                     <td>${postage.postageAlipayName!''}</td>
+                    <td>${postage.postagePayWhere!''}</td>
                     <td>
                         <#if (postage.postageLogisticsImg) ??>
                             <#if (postage.postageLogisticsImg) != "">
@@ -209,7 +186,6 @@
                                 <i class="Hui-iconfont">&#xe6a7;</i>
                             </a>
                          </#if>
-
                         <#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>
@@ -252,59 +228,6 @@
     </div>
 </div>
 
-<div  style="padding: 0px;margin: 0px;display: none;" >
-    <div id="printlist" style="">
-        <ul style=" height: 460px;margin-left: 20px;margin-right: 20px;">
-            <li style="font-size: 23px;height: 25px;display: block;text-align: center;font-weight: bold;margin-top: 15px">商品换货退货退款审批</li>
-            <li style="font-size: 15px;height: 30px;display: block;text-align: left;margin-top: 15px">深圳爱贝源科技有限公司&nbsp;&nbsp;&nbsp;&nbsp;申请日期:<span>2018-12-11</span></li>
-            <li style="height: 40px;font-size: 12px;font-weight: normal;border: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">审批编码</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">2018xxxxxxxxxxxxxxxx</div>
-            </li>
-            <li style="height: 40px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">申请人</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">wxm</div>
-            </li>
-            <li style="height: 40px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">申请部门</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">运营部</div>
-            </li>
-            <li style="height: 40px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;"></div>
-                <div style="float:left;display:block;width:99px;line-height: 15px;height: 40px;border-right: 1px solid #000000;text-align: center;">客户成交入口</div>
-                <div style="float:left;display:block;width:50px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">售后类型</div>
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">销售时间及退换货原因</div>
-                <div style="float:left;display:block;width:50px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">交易号</div>
-                <div style="float:left;display:block;width:89px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">客户名称</div>
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">联系电话</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">详细地址</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">快递公司</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">快递单号</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">快递费用承担方</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">退回商品名称/型号</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">销售员</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">数量</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">退款金额</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">退款账户</div>
-            </li>
-
-            <li style="height: 40px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">客服经理审批</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">xxx</div>
-            </li>
-            <li style="height: 40px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">财务经理审批</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">xxx</div>
-            </li>
-            <li style="height: 40px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">财务打款</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">xxx</div>
-            </li>
-
-            <li style="font-size: 15px;height: 30px;display: block;text-align: left;margin-top: 15px">打印时间:<span>2018-12-11</span>&nbsp;&nbsp;&nbsp;&nbsp;打印人:<span>xxx</span></li>
-        </ul>
-    </div>
-</div>
 
 
 <tfoot>
@@ -326,7 +249,7 @@
                 async: false,
                 success: function(data){
                     if (data.returnCode == 200) {
-                        //layer.msg(data.resultMsg,{icon: 1,time:3000});
+                        layer.msg(data.resultMsg,{icon: 1,time:3000});
                         location.replace(location.href);
                     } else {
                         layer.msg(data.resultMsg,{icon: 5,time:3000});
@@ -339,27 +262,8 @@
         });
     }
 
-    /**
-     * 打印
-     */
-    function printPostage(postageId) {
-            $.ajax({
-                cache: true,
-                type: "POST",
-                data: {"postageId":postageId},
-                url: "${path}" + "/admin/postage/print_postage",
-                async: true,
-                success: function(data){
-                    if (data.returnCode == 200) {
-                        $("#printlist").printArea();
-                    } else {
-                        layer.msg(data.resultMsg,{icon: 5,time:3000});
-                    }
-                },
-                error: function(XmlHttpRequest, textStatus, errorThrown){
-                }
-            })
-    }
+
+
 </script>
 </body>
 </html>

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

@@ -240,7 +240,7 @@
                         <#elseif order.salesStatus == 2>
                             挂起
                         <#elseif order.salesStatus == 3>
-                            作废
+                            <span style="color: #dd0000">作废</span>
                         </#if>
                     </td>
                     <td>