Browse Source

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

# Conflicts:
#	watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java
#	watero-rst-web/src/main/resources/watero-rst-orm.xml
wangxiaoming 6 years ago
parent
commit
19beacec0c
31 changed files with 1801 additions and 61 deletions
  1. 9 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ClosedProdcue.java
  2. 91 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/InformationInfo.java
  3. 29 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SalesOrder.java
  4. 9 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SalesOrderItem.java
  5. 192 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/order/AfterrulesInfo.java
  6. 30 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/CustomerService.java
  7. 12 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/SalesOrderService.java
  8. 73 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java
  9. 31 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java
  10. 30 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/CustomerInfoMapper.java
  11. 10 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/SalesOrderMapper.java
  12. 2 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/closedProdcueMapper.xml
  13. 72 5
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml
  14. 24 4
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml
  15. 105 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java
  16. 2 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminProcMethodController.java
  17. 10 7
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminOrderController.java
  18. 143 4
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java
  19. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AwaitSendController.java
  20. 18 0
      watero-rst-web/src/main/java/com/iamberry/rst/utils/KuaiDi100.java
  21. 5 4
      watero-rst-web/src/main/resources/watero-rst-orm.xml
  22. 334 12
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_detail.ftl
  23. 3 3
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/order_list.ftl
  24. 2 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_customer.ftl
  25. 451 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_relation.ftl
  26. 4 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/add_signclosed.ftl
  27. 67 0
      watero-rst-web/src/main/webapp/WEB-INF/views/order/afterrules_info.ftl
  28. 22 3
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_list.ftl
  29. BIN
      watero-rst-web/src/main/webapp/common/images/Conform.jpg
  30. BIN
      watero-rst-web/src/main/webapp/common/images/noConform.jpg
  31. 20 12
      watero-rst-web/src/main/webapp/common/js/customer/customer.js

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

@@ -27,6 +27,7 @@ public class ClosedProdcue  implements Serializable {
     private Integer productType;        //商品类型
     private String productNumber;       //产品型号
     private ProductColor productColor;      //颜色
+    private Integer itemId;      //订单项id
 
     private String colorBar;        //69码
 
@@ -135,4 +136,12 @@ public class ClosedProdcue  implements Serializable {
     public void setColorBar(String colorBar) {
         this.colorBar = colorBar;
     }
+
+    public Integer getItemId() {
+        return itemId;
+    }
+
+    public void setItemId(Integer itemId) {
+        this.itemId = itemId;
+    }
 }

+ 91 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/InformationInfo.java

@@ -0,0 +1,91 @@
+package com.iamberry.rst.core.cm;
+
+import java.io.Serializable;
+
+/**
+ * Created by Administrator on 2019/3/8.
+ */
+public class InformationInfo implements Serializable{
+    private static final long serialVersionUID = 2422002050608696730L;
+    private Integer feeId;//
+    private Integer relationId;//处理id
+    private Integer feeCharges;//收费金额
+    private Integer feeOriginally;//收费原由1:以旧换新   2:机器维修 3:机器运费
+    private Integer feePayChannel;//支付渠道1:微信   2:支付宝 3:银行卡
+    private Integer feePayAccount;//支付账号
+    private Integer feeStatus;//状态1代付款,2已收款
+    private Integer feeDesc;//
+    private Integer feeCreateTime;
+
+    public Integer getFeeId() {
+        return feeId;
+    }
+
+    public void setFeeId(Integer feeId) {
+        this.feeId = feeId;
+    }
+
+    public Integer getRelationId() {
+        return relationId;
+    }
+
+    public void setRelationId(Integer relationId) {
+        this.relationId = relationId;
+    }
+
+    public Integer getFeeCharges() {
+        return feeCharges;
+    }
+
+    public void setFeeCharges(Integer feeCharges) {
+        this.feeCharges = feeCharges;
+    }
+
+    public Integer getFeeOriginally() {
+        return feeOriginally;
+    }
+
+    public void setFeeOriginally(Integer feeOriginally) {
+        this.feeOriginally = feeOriginally;
+    }
+
+    public Integer getFeePayChannel() {
+        return feePayChannel;
+    }
+
+    public void setFeePayChannel(Integer feePayChannel) {
+        this.feePayChannel = feePayChannel;
+    }
+
+    public Integer getFeePayAccount() {
+        return feePayAccount;
+    }
+
+    public void setFeePayAccount(Integer feePayAccount) {
+        this.feePayAccount = feePayAccount;
+    }
+
+    public Integer getFeeStatus() {
+        return feeStatus;
+    }
+
+    public void setFeeStatus(Integer feeStatus) {
+        this.feeStatus = feeStatus;
+    }
+
+    public Integer getFeeDesc() {
+        return feeDesc;
+    }
+
+    public void setFeeDesc(Integer feeDesc) {
+        this.feeDesc = feeDesc;
+    }
+
+    public Integer getFeeCreateTime() {
+        return feeCreateTime;
+    }
+
+    public void setFeeCreateTime(Integer feeCreateTime) {
+        this.feeCreateTime = feeCreateTime;
+    }
+}

+ 29 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SalesOrder.java

@@ -135,6 +135,11 @@ public class SalesOrder implements Serializable {
     private String procMethodName;
 
    private Integer salesWarehouseId;//所属仓库id
+
+   private Integer isDevelop;//产品项是否包含有水机 1是 2否
+
+    private Integer salesReturnStatus;//退货状态 1未退货、2已退货、3部分退货
+    private Integer itemReturnNum;   //退货数量
  public Integer getStartOrderNO() {
        return startOrderNO;
     }
@@ -781,4 +786,28 @@ public class SalesOrder implements Serializable {
     public void setIsSalesCustomerId(Integer isSalesCustomerId) {
         this.isSalesCustomerId = isSalesCustomerId;
     }
+
+    public Integer getIsDevelop() {
+        return isDevelop;
+    }
+
+    public void setIsDevelop(Integer isDevelop) {
+        this.isDevelop = isDevelop;
+    }
+
+    public Integer getSalesReturnStatus() {
+        return salesReturnStatus;
+    }
+
+    public void setSalesReturnStatus(Integer salesReturnStatus) {
+        this.salesReturnStatus = salesReturnStatus;
+    }
+
+    public Integer getItemReturnNum() {
+        return itemReturnNum;
+    }
+
+    public void setItemReturnNum(Integer itemReturnNum) {
+        this.itemReturnNum = itemReturnNum;
+    }
 }

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

@@ -33,6 +33,7 @@ public class SalesOrderItem implements Serializable {
     private Integer colorIsMachine; //是否是水机 1:水机 2;其它产品
 
     private String salesDealCode;   //交易号
+    private Integer itemReturnNum;   //退货数量
 
     public Integer getItemIsSource() {
         return itemIsSource;
@@ -185,4 +186,12 @@ public class SalesOrderItem implements Serializable {
     public void setSalesDealCode(String salesDealCode) {
         this.salesDealCode = salesDealCode;
     }
+
+    public Integer getItemReturnNum() {
+        return itemReturnNum;
+    }
+
+    public void setItemReturnNum(Integer itemReturnNum) {
+        this.itemReturnNum = itemReturnNum;
+    }
 }

+ 192 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/order/AfterrulesInfo.java

@@ -0,0 +1,192 @@
+package com.iamberry.rst.core.order;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Created by Administrator on 2019/2/28.
+ */
+public class AfterrulesInfo implements Serializable{
+    private static final long serialVersionUID = 2162990744480531865L;
+    private Integer afterrulesId;
+    private String storeId;//店铺id
+    private String returnReason;//无理由退货
+    private String qualityPeriod;//质量问题退货期
+    private String warrantyProblem;//质量问题包换期
+    private String governancePeriod;//质量问题-免费维修期
+    private String payRepair;//付费维修
+    private String returnReasonInfo;//无理由退货展示信息
+    private String qualityPeriodInfo;//质量问题退货期展示信息
+    private String warrantyProblemInfo;//质量问题包换期展示信息
+    private String governancePeriodInfo;//质量问题-免费维修期展示信息
+    private String payRepairInfo;//付费维修展示信息
+    private Integer afterrulesStatus;//启用状态1.正在使用,2停止使用
+    private Integer afterrulesType;//规则类型1.正常规则 2.特殊规则
+    private Date afterrulesCreateTime;
+
+    private Integer isReturnReason;//是否符合无理由退货 1是 2否
+    private Integer isQualityPeriod;//是否符合质量问题退货期1是 2否
+    private Integer isWarrantyProblem;//是否符合质量问题包换期1是 2否
+    private Integer isGovernancePeriod;//是否符合质量问题-免费维修期1是 2否
+    private Integer isPayRepair;//是否符合付费维修1是 2否
+
+    public Integer getAfterrulesId() {
+        return afterrulesId;
+    }
+
+    public void setAfterrulesId(Integer afterrulesId) {
+        this.afterrulesId = afterrulesId;
+    }
+
+    public String getStoreId() {
+        return storeId;
+    }
+
+    public void setStoreId(String storeId) {
+        this.storeId = storeId;
+    }
+
+    public String getReturnReason() {
+        return returnReason;
+    }
+
+    public void setReturnReason(String returnReason) {
+        this.returnReason = returnReason;
+    }
+
+    public String getQualityPeriod() {
+        return qualityPeriod;
+    }
+
+    public void setQualityPeriod(String qualityPeriod) {
+        this.qualityPeriod = qualityPeriod;
+    }
+
+    public String getWarrantyProblem() {
+        return warrantyProblem;
+    }
+
+    public void setWarrantyProblem(String warrantyProblem) {
+        this.warrantyProblem = warrantyProblem;
+    }
+
+    public String getGovernancePeriod() {
+        return governancePeriod;
+    }
+
+    public void setGovernancePeriod(String governancePeriod) {
+        this.governancePeriod = governancePeriod;
+    }
+
+    public String getPayRepair() {
+        return payRepair;
+    }
+
+    public void setPayRepair(String payRepair) {
+        this.payRepair = payRepair;
+    }
+
+    public String getReturnReasonInfo() {
+        return returnReasonInfo;
+    }
+
+    public void setReturnReasonInfo(String returnReasonInfo) {
+        this.returnReasonInfo = returnReasonInfo;
+    }
+
+    public String getQualityPeriodInfo() {
+        return qualityPeriodInfo;
+    }
+
+    public void setQualityPeriodInfo(String qualityPeriodInfo) {
+        this.qualityPeriodInfo = qualityPeriodInfo;
+    }
+
+    public String getWarrantyProblemInfo() {
+        return warrantyProblemInfo;
+    }
+
+    public void setWarrantyProblemInfo(String warrantyProblemInfo) {
+        this.warrantyProblemInfo = warrantyProblemInfo;
+    }
+
+    public String getGovernancePeriodInfo() {
+        return governancePeriodInfo;
+    }
+
+    public void setGovernancePeriodInfo(String governancePeriodInfo) {
+        this.governancePeriodInfo = governancePeriodInfo;
+    }
+
+    public String getPayRepairInfo() {
+        return payRepairInfo;
+    }
+
+    public void setPayRepairInfo(String payRepairInfo) {
+        this.payRepairInfo = payRepairInfo;
+    }
+
+    public Integer getAfterrulesStatus() {
+        return afterrulesStatus;
+    }
+
+    public void setAfterrulesStatus(Integer afterrulesStatus) {
+        this.afterrulesStatus = afterrulesStatus;
+    }
+
+    public Integer getAfterrulesType() {
+        return afterrulesType;
+    }
+
+    public void setAfterrulesType(Integer afterrulesType) {
+        this.afterrulesType = afterrulesType;
+    }
+
+    public Date getAfterrulesCreateTime() {
+        return afterrulesCreateTime;
+    }
+
+    public void setAfterrulesCreateTime(Date afterrulesCreateTime) {
+        this.afterrulesCreateTime = afterrulesCreateTime;
+    }
+
+    public Integer getIsReturnReason() {
+        return isReturnReason;
+    }
+
+    public void setIsReturnReason(Integer isReturnReason) {
+        this.isReturnReason = isReturnReason;
+    }
+
+    public Integer getIsQualityPeriod() {
+        return isQualityPeriod;
+    }
+
+    public void setIsQualityPeriod(Integer isQualityPeriod) {
+        this.isQualityPeriod = isQualityPeriod;
+    }
+
+    public Integer getIsWarrantyProblem() {
+        return isWarrantyProblem;
+    }
+
+    public void setIsWarrantyProblem(Integer isWarrantyProblem) {
+        this.isWarrantyProblem = isWarrantyProblem;
+    }
+
+    public Integer getIsGovernancePeriod() {
+        return isGovernancePeriod;
+    }
+
+    public void setIsGovernancePeriod(Integer isGovernancePeriod) {
+        this.isGovernancePeriod = isGovernancePeriod;
+    }
+
+    public Integer getIsPayRepair() {
+        return isPayRepair;
+    }
+
+    public void setIsPayRepair(Integer isPayRepair) {
+        this.isPayRepair = isPayRepair;
+    }
+}

+ 30 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/CustomerService.java

@@ -335,4 +335,34 @@ public interface CustomerService {
      * 查询寄回产品集合
      */
     List<ClosedProdcue> listclosedProdcue(ClosedProdcue closedProdcue);
+
+    /**
+     * 根据收费信息id查询收费信息
+     */
+    InformationInfo getInformationInfo(Integer feeId);
+
+    /**
+     * 根据处理id查询收费信息
+     */
+    List<InformationInfo> listInformationInfo(Integer relationId);
+
+    /**
+     * 添加收费信息
+     */
+    Integer addInformationInfo(InformationInfo informationInfo);
+
+    /**
+     * 修改收费信息
+     */
+    Integer updateInformationInfo(InformationInfo informationInfo);
+
+    /**
+     * 删除收费信息
+     */
+    Integer delInformationInfo(Integer feeId);
+
+    /**
+     * 修改订单项所有退货数量为0
+     */
+    Integer updateItemreturnNumByorderid(Integer itemOrderId);
 }

+ 12 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/SalesOrderService.java

@@ -425,4 +425,16 @@ public interface SalesOrderService {
      * @return
      */
     Integer splitOrder(String mainOrderId, List<SalesOrder> salesOrderList);
+
+    /**
+     * 根据店铺id获取售后规则
+     */
+    AfterrulesInfo getAfterrulesInfo(Integer storeId);
+
+    /**
+     * 修改订单项退货数据
+     */
+    Integer updateOrderItemReturnNum(SalesOrderItem salesOrderItem);
+
+
 }

+ 73 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java

@@ -205,6 +205,10 @@ public class CustomerServiceImpl implements CustomerService {
         CustomerCommonUtil.setProduce(cmRelation);
         if(cmRelation.getClosedProdcues() != null && cmRelation.getClosedProdcues().size()>0){
             closedProdcueMapper.insert(cmRelation.getClosedProdcues());
+            //修改退货数据 2019 03 13
+             if(customerInfo.getProcTypeId() == 4){
+                 updateOrderReturninfo(cmRelation.getClosedProdcues());
+             }
         }
         if(cmRelation.getSendProdcues() != null && cmRelation.getSendProdcues().size() > 0){
             sendProdcueMapper.insert(cmRelation.getSendProdcues());
@@ -347,6 +351,11 @@ public class CustomerServiceImpl implements CustomerService {
         CustomerCommonUtil.setProduce(cr);
         if(cr.getClosedProdcues() != null && cr.getClosedProdcues().size()>0){
             closedProdcueMapper.insert(cr.getClosedProdcues());
+            //修改退货数据 2019 03 13
+            if(customerInfo.getProcTypeId() == 4){
+                updateOrderReturninfo(cr.getClosedProdcues());
+            }
+
         }
         if(cr.getSendProdcues() != null && cr.getSendProdcues().size() > 0){
             sendProdcueMapper.insert(cr.getSendProdcues());
@@ -356,6 +365,38 @@ public class CustomerServiceImpl implements CustomerService {
         return flag;
     }
 
+    public void updateOrderReturninfo(List<ClosedProdcue> listClosedProdcue){
+        for (ClosedProdcue closedProdcue : listClosedProdcue){
+            if(closedProdcue.getItemId() != null){
+                SalesOrderItem item = salesOrderMapper.getSalesOrderItem(closedProdcue.getItemId());
+
+                if(item.getItemReturnNum()+closedProdcue.getClosedProdcueNumber() <= item.getItemNum()){//已退货数量+当前退货数量小于或等于订单项数量
+                    SalesOrderItem orderitem = new SalesOrderItem();
+                    orderitem.setItemId(closedProdcue.getItemId());
+                    orderitem.setItemReturnNum(item.getItemReturnNum()+closedProdcue.getClosedProdcueNumber());
+                    salesOrderMapper.updateOrderItemReturnNum(orderitem);
+                    List<SalesOrderItem> items = salesOrderMapper.listSalesOrderItem(item);
+                    Integer num1 = 0;//订单总数量
+                    Integer num2 = 0;//订单已退货数量
+                    for(SalesOrderItem it : items){
+                        num1 = num1+it.getItemNum();
+                        num2 = num2+it.getItemReturnNum();
+                    }
+                    SalesOrder order = new SalesOrder();
+                    order.setSalesId(item.getItemOrderId());
+                    if(num2 < num1){
+                        order.setSalesReturnStatus(3);//1未退货、2已退货、3部分退货
+                    }else{
+                        order.setSalesReturnStatus(2);//1未退货、2已退货、3部分退货
+                    }
+                    salesOrderMapper.updateSalesOrder(order);
+
+                }
+            }
+
+        }
+    }
+
     /**
      * 删除旧的售后数据
      * @param customer
@@ -390,9 +431,10 @@ public class CustomerServiceImpl implements CustomerService {
             SalesOrder newOrder = new SalesOrder(); //salesOrderStatus
             newOrder.setSalesId(relationOrderList.get(k).getSalesId());
             newOrder.setSalesOrderStatus(1);    //恢复订单到之前的状态
+            newOrder.setSalesReturnStatus(1);//恢复为未退货状态
             salesOrderMapper.updateSalesOrder(newOrder);
+            customerInfoMapper.updateItemreturnNumByorderid(relationOrderList.get(k).getSalesId());//修改订单项所有退货数量为0
         }
-
         /* 删除掉订单与处理的关联表 */
         relationOrderService.deleteByRelationId(cmRelation.getRelationId());
     }
@@ -1765,4 +1807,34 @@ public class CustomerServiceImpl implements CustomerService {
     public List<ClosedProdcue> listclosedProdcue(ClosedProdcue closedProdcue) {
         return closedProdcueMapper.listclosedProdcue(closedProdcue);
     }
+
+    @Override
+    public InformationInfo getInformationInfo(Integer feeId) {
+        return customerInfoMapper.getInformationInfo(feeId);
+    }
+
+    @Override
+    public List<InformationInfo> listInformationInfo(Integer relationId) {
+        return customerInfoMapper.listInformationInfo(relationId);
+    }
+
+    @Override
+    public Integer addInformationInfo(InformationInfo informationInfo) {
+        return customerInfoMapper.addInformationInfo(informationInfo);
+    }
+
+    @Override
+    public Integer updateInformationInfo(InformationInfo informationInfo) {
+        return customerInfoMapper.updateInformationInfo(informationInfo);
+    }
+
+    @Override
+    public Integer delInformationInfo(Integer feeId) {
+        return customerInfoMapper.delInformationInfo(feeId);
+    }
+
+    @Override
+    public Integer updateItemreturnNumByorderid(Integer itemOrderId) {
+        return customerInfoMapper.updateItemreturnNumByorderid(itemOrderId);
+    }
 }

+ 31 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java

@@ -138,6 +138,29 @@ public class SalesOrderServiceImpl implements SalesOrderService {
             SalesOrderItem salesOrderItem = new SalesOrderItem();
             salesOrderItem.setItemOrderId(so.getSalesId());
             List<SalesOrderItem> salesOrderItemList = salesOrderMapper.listSalesOrderItem(salesOrderItem);
+            //去除已退货的订单项
+            int num = salesOrderItemList.size();
+            for(int i = 0;i< num;){
+                SalesOrderItem item = salesOrderItemList.get(i);
+                if(item.getItemNum().intValue() == item.getItemReturnNum().intValue()){
+                    salesOrderItemList.remove(i);
+                    num = salesOrderItemList.size();
+                    i = 0;
+                }else{
+                    i++;
+                }
+            }
+            for(SalesOrderItem item : salesOrderItemList){//判断是否包含净水机 1是 2否
+                if(item.getColorIsMachine() != null){
+                    if(item.getColorIsMachine() == 1){
+                        so.setIsDevelop(1);
+                    }else{
+                        so.setIsDevelop(2);
+                    }
+                }else{
+                    so.setIsDevelop(1);
+                }
+            }
             so.setSalesOrderItemList(salesOrderItemList);
         }
         PagedResult<SalesOrder> result = PageUtil.getPage(orderList);
@@ -1179,6 +1202,13 @@ public class SalesOrderServiceImpl implements SalesOrderService {
         return flag;
     }
 
+    @Override
+    public AfterrulesInfo getAfterrulesInfo(Integer storeId) {
+        return salesOrderMapper.getAfterrulesInfo(storeId);
+    }
 
-
+    @Override
+    public Integer updateOrderItemReturnNum(SalesOrderItem salesOrderItem) {
+        return salesOrderMapper.updateOrderItemReturnNum(salesOrderItem);
+    }
 }

+ 30 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/CustomerInfoMapper.java

@@ -196,4 +196,34 @@ public interface CustomerInfoMapper {
      */
     Integer deleteSendbackItemBySendbackId(Integer sendbackId);
 
+    /**
+     * 根据收费信息id查询收费信息
+     */
+    InformationInfo getInformationInfo(Integer feeId);
+
+    /**
+     * 根据处理id查询收费信息
+     */
+    List<InformationInfo> listInformationInfo(Integer relationId);
+
+    /**
+     * 添加收费信息
+     */
+    Integer addInformationInfo(InformationInfo informationInfo);
+
+    /**
+     * 修改收费信息
+     */
+    Integer updateInformationInfo(InformationInfo informationInfo);
+
+    /**
+     * 删除收费信息
+     */
+    Integer delInformationInfo(Integer feeId);
+
+    /**
+     * 修改订单项所有退货数量为0
+     */
+    Integer updateItemreturnNumByorderid(Integer itemOrderId);
+
 }

+ 10 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/SalesOrderMapper.java

@@ -350,4 +350,14 @@ public interface SalesOrderMapper {
      * @return
      */
     List<SalesOrder> salesOrderAndItemStat(SalesOrder salesOrder);
+
+    /**
+     * 根据店铺id获取售后规则
+     */
+    AfterrulesInfo getAfterrulesInfo(Integer storeId);
+
+    /**
+     * 修改订单项退货数据
+     */
+    Integer updateOrderItemReturnNum(SalesOrderItem salesOrderItem);
 }

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

@@ -21,12 +21,12 @@
 
   <insert id="insert" parameterType="ClosedProdcue" >
     insert into tb_rst_cm_closed_prodcue ( relation_id, product_id, closed_prodcue_machine_no,
-      color_id, closed_prodcue_number,color_bar)
+      color_id, closed_prodcue_number,color_bar,item_id)
     values
     <foreach collection="list" item="node" index="index" separator="," open="" close="">
       (
         #{node.relationId}, #{node.productId}, #{node.closedProdcueMachineNo},
-       #{node.colorId}, #{node.closedProdcueNumber},#{node.colorBar}
+       #{node.colorId}, #{node.closedProdcueNumber},#{node.colorBar},#{node.itemId}
       )
     </foreach>
   </insert>

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

@@ -749,9 +749,9 @@ ELSE
 	'未知'
 END) AS customerSecondaryCustomer,
 sa.admin_name AS adminName,
-cr.relation_back_logistics_company AS relationBackLogisticsCompany,
-cr.relation_back_logistics_no AS relationBackLogisticsNo,
-cr.relation_back_receipt_date AS relationBackReceiptDate,
+csi.sendback_logistics_company AS relationBackLogisticsCompany,
+csi.sendback_logistics_no AS relationBackLogisticsNo,
+csi.sendback_sign_time AS relationBackReceiptDate,
 cr.relation_send_status AS relationBackStatus,
 cr.relation_send_logistics_company AS relationSendLogisticsCompany,
 cr.relation_send_logistics_no AS relationSendLogisticsNo,
@@ -771,8 +771,7 @@ LEFT JOIN tb_rst_sys_admin sa ON c.admin_id = sa.admin_id
 LEFT JOIN tb_rst_cm_relation cr ON cr.customer_id = c.customer_id
 LEFT JOIN tb_rst_cm_proc_method cpm ON cpm.proc_method_id = cr.proc_method_id
 LEFT JOIN tb_rst_cm_proc_type cpt ON cpt.proc_type_id = cpm.proc_type_id
-/*where cr.relation_id in (select relation_id from tb_rst_postage_info where postage_status = 1 and postage_create_time > '2019-02-12 00:00:00')
-and cr.relation_is_transfer = 10*/
+LEFT JOIN tb_rst_cm_sendback_info csi ON csi.relation_id = cr.relation_id
 </select>
   <!-- 退换货统计sql start -->
   <!-- 总销量 -->
@@ -1328,4 +1327,72 @@ and cr.relation_is_transfer = 10*/
     DELETE FROM tb_rst_cm_sendback_item WHERE sendback_id = #{sendbackId}
   </delete>
 
+  <!--收费信息sql start -->
+  <select id="getInformationInfo" parameterType="Integer" resultType="InformationInfo">
+    select * from tb_rst_fee_information_info where fee_id = #{feeId};
+  </select>
+  <select id="listInformationInfo" parameterType="Integer" resultType="InformationInfo">
+    select * from tb_rst_fee_information_info where relation_id = #{relationId};
+  </select>
+  <insert id="addInformationInfo" parameterType="InformationInfo" keyProperty="feeId" useGeneratedKeys="true">
+    insert into tb_rst_fee_information_info
+    (
+      relation_id,
+      fee_charges,
+      fee_originally,
+      fee_pay_channel,
+      fee_pay_account,
+      fee_status,
+      fee_desc,
+      fee_create_time
+    )
+    VALUES
+    (
+      #{relationId},
+      #{feeCharges},
+      #{feeOriginally},
+      #{feePayChannel},
+      #{feePayAccount},
+      #{feeStatus},
+      #{feeDesc},
+      NOW()
+    )
+  </insert>
+
+  <update id="updateInformationInfo" parameterType="InformationInfo">
+    UPDATE tb_rst_fee_information_info
+    <set>
+      <if test="feeCharges != null and feeCharges != ''">
+        fee_charges = #{feeCharges},
+      </if>
+      <if test="feeOriginally != null and feeOriginally != ''">
+        fee_originally = #{feeOriginally},
+      </if>
+      <if test="feePayChannel != null and feePayChannel != ''">
+        fee_pay_channel = #{feePayChannel},
+      </if>
+      <if test="feePayAccount != null and feePayAccount != ''">
+        fee_pay_account = #{feePayAccount},
+      </if>
+      <if test="feeStatus != null and feeStatus != ''">
+        fee_status = #{feeStatus},
+      </if>
+      <if test="feeDesc != null and feeDesc != ''">
+        fee_desc = #{feeDesc},
+      </if>
+    </set>
+    WHERE
+      fee_id = #{feeId}
+  </update>
+  <delete id="delInformationInfo" parameterType="Integer">
+    DELETE from tb_rst_fee_information_info where fee_id = #{feeId}
+  </delete>
+  <!--收费信息sql end -->
+
+  <update id="updateItemreturnNumByorderid" parameterType="Integer">
+      update tb_rst_sales_order_item
+      set
+        item_return_num = 0
+    where item_order_id = #{itemOrderId}
+  </update>
 </mapper>

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

@@ -68,7 +68,8 @@
             trsi.store_name  storeName,
             pt.proc_type_name procTypeName,
             od.batch_create_time  batchCreateTime,
-            ao.admin_name  salesAdminName
+            ao.admin_name  salesAdminName,
+            pt.proc_type_id procTypeId
         FROM
         (
             SELECT
@@ -479,7 +480,9 @@
             item_create_time,
             pi.product_abbreviation,
             pc.color_abbreviation,
-            pc.color_is_weight
+            pc.color_is_weight,
+            pc.color_is_machine,
+            item_return_num
         FROM
             tb_rst_sales_order_item
       LEFT JOIN tb_rst_product_info pi ON tb_rst_sales_order_item.item_product_id = pi.product_id
@@ -892,7 +895,10 @@
         sales_admin_id = #{salesAdminId},
       </if >
       <if test="salesCustomerId != null ">
-          sales_customer_id = #{salesCustomerId}
+          sales_customer_id = #{salesCustomerId},
+      </if >
+      <if test="salesReturnStatus != null ">
+          sales_return_status = #{salesReturnStatus}
       </if >
     </set >
     where sales_id= #{salesId}
@@ -931,7 +937,7 @@
           sales_post_firm = #{item.salesPostFirm},
         </if>
         <if test="item.salesPostNum != null" >
-          sales_post_num = #{item.salesPostNum},
+          sales_post_num = #{item.salesPostNum}
         </if>
       </set>
       where sales_id = #{item.salesId}
@@ -956,6 +962,16 @@
     AND item_color_bar = #{itemColorBar}
   </update>
 
+  <update id="updateOrderItemReturnNum" parameterType="SalesOrderItem">
+    UPDATE tb_rst_sales_order_item
+    <set>
+        <if test="itemReturnNum != null" >
+            item_return_num = #{itemReturnNum}
+        </if>
+    </set>
+    where item_id = #{itemId}
+  </update>
+
 
   <!-- 根据外部商城订单号查询订单信息 -->
   <select id="getSalesOrderByLogistics" resultType="SalesOrder" parameterType="SalesOrder" >
@@ -1675,4 +1691,8 @@
         ORDER BY soi.sales_create_time DESC
     </select>
 
+    <select id="getAfterrulesInfo" parameterType="Integer" resultType="AfterrulesInfo">
+        select * from tb_rst_afterrules_info
+        WHERE store_id = #{storeId}
+    </select>
 </mapper>

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

@@ -528,6 +528,22 @@ public class AdminCustomerController {
     public ModelAndView toCustomerInfo(HttpServletRequest request) throws Exception {
         ModelAndView mv = new ModelAndView("cm/customer/custome_detail");
         String customerId = request.getParameter("customerId");
+        CmRelation cmRelation = new CmRelation();
+        cmRelation.setCustomerId(Integer.valueOf(customerId));
+        cmRelation = customerService.getCmRelationInfo(cmRelation);
+        ProcMethod procMethod = customerService.getProcMethod(cmRelation.getProcMethodId());
+        List<LogisticsInfo>logisticsInfoList =  logisticsInfoService.getLogisticsInfoList(new LogisticsInfo());
+        List<PostageInfo> listPostageInfo = customerService.listPostageInfo(cmRelation.getRelationId());
+        List<SendbackInfo> listSendbackInfo = customerService.listSendbackInfo(cmRelation.getRelationId());
+        //查询寄回产品
+        ClosedProdcue record = new ClosedProdcue();
+        record.setRelationId(cmRelation.getRelationId());
+        List <ClosedProdcue> listClosedProdcue = customerService.listclosedProdcue(record);
+        mv.addObject("listClosedProdcue",listClosedProdcue);
+        mv.addObject("listSendbackInfo",listSendbackInfo);
+        mv.addObject("logisticsInfoList",logisticsInfoList);
+        mv.addObject("listPostageInfo", listPostageInfo);
+        mv.addObject("procMethod", procMethod);
         mv.addObject("customerId", customerId);
         return mv;
     }
@@ -1201,10 +1217,12 @@ public class AdminCustomerController {
         List<LogisticsInfo>logisticsInfoList =  logisticsInfoService.getLogisticsInfoList(new LogisticsInfo());
         List<PostageInfo> listPostageInfo = customerService.listPostageInfo(cmRelation.getRelationId());
         List<SendbackInfo> listSendbackInfo = customerService.listSendbackInfo(cmRelation.getRelationId());
+        List<InformationInfo> listInformationInfo = customerService.listInformationInfo(cmRelation.getRelationId());
         //查询寄回产品
         ClosedProdcue record = new ClosedProdcue();
         record.setRelationId(cmRelation.getRelationId());
         List <ClosedProdcue> listClosedProdcue = customerService.listclosedProdcue(record);
+        mv.addObject("listInformationInfo",listInformationInfo);
         mv.addObject("listClosedProdcue",listClosedProdcue);
         mv.addObject("listSendbackInfo",listSendbackInfo);
         mv.addObject("logisticsInfoList",logisticsInfoList);
@@ -2210,5 +2228,92 @@ public class AdminCustomerController {
            String msg = customerService.synchronizeSendbackInfo();
         return new ResponseJson(200, msg, 200);
     }
+
+    /**
+     * 添加收费
+     * @param request
+     * @param informationInfo
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping("/add_informationInfo")
+    public ResponseJson addInformationInfo(HttpServletRequest request,InformationInfo informationInfo){
+        ResponseJson rj = new ResponseJson(200, "添加成功", 200);
+        if(informationInfo == null){
+            return new ResponseJson(500, "添加失败,请检查参数!", 500);
+        }
+        /*signTime*/
+        Integer msg = customerService.addInformationInfo(informationInfo);
+        if(msg < 1){
+            return new ResponseJson(500, "添加失败", 500);
+        }
+        InformationInfo info = customerService.getInformationInfo(informationInfo.getFeeId());
+        rj.addResponseKeyValue("informationInfo",info);
+        return rj;
+    }
+
+    /**
+     * 修改收费
+     * @param request
+     * @param informationInfo
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping("/update_informationInfo")
+    public ResponseJson updateInformationInfo(HttpServletRequest request,InformationInfo informationInfo){
+        ResponseJson rj = new ResponseJson(200, "修改成功", 200);
+        if(informationInfo == null){
+            return new ResponseJson(500, "修改失败,请检查参数!", 500);
+        }
+        /*signTime*/
+        Integer msg = customerService.updateInformationInfo(informationInfo);
+        if(msg < 1){
+            return new ResponseJson(500, "修改失败", 500);
+        }
+        InformationInfo info = customerService.getInformationInfo(informationInfo.getFeeId());
+        rj.addResponseKeyValue("informationInfo",info);
+        return rj;
+    }
+
+    /**
+     * 删除单个收费信息
+     * @param request
+     * @param feeId
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping("/delete_informationInfo")
+    public ResponseJson deleteInformationInfo(HttpServletRequest request,Integer feeId){
+        ResponseJson rj = new ResponseJson(200, "删除成功", 200);
+        if(feeId == null){
+            return new ResponseJson(500, "删除失败,请检查参数!", 500);
+        }
+        Integer msg = customerService.delInformationInfo(feeId);
+        if(msg < 1){
+            return new ResponseJson(500, "删除失败", 500);
+        }
+        return rj;
+    }
+
+    /**
+     * 查询单个收费信息
+     * @param request
+     * @param feeId
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping("/get_informationInfo")
+    public ResponseJson getInformationInfo(HttpServletRequest request,Integer feeId){
+        ResponseJson rj = new ResponseJson(200, "查询成功", 200);
+        if(feeId == null){
+            return new ResponseJson(500, "查询成功,请检查参数!", 500);
+        }
+        InformationInfo informationInfo = customerService.getInformationInfo(feeId);
+        if(informationInfo == null){
+            return new ResponseJson(500, "查询成功", 500);
+        }
+        rj.addResponseKeyValue("informationInfo",informationInfo);
+        return rj;
+    }
 }
 

+ 2 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminProcMethodController.java

@@ -40,6 +40,7 @@ public class AdminProcMethodController {
     @RequestMapping("/type")
     public ResponseJson type(HttpServletRequest request,ProcType procType) {
          List<ProcType> procTypeList = new ArrayList<>();    ////因为在前端不判断,所以需要直接初始化
+        procType.setProcTypeStatus(1);
         procTypeList = procTypeService.getProcTypeList(procType);
         ResponseJson rj = new ResponseJson(200, "查询成功", 200);
         rj.addResponseKeyValue("list",procTypeList);
@@ -55,6 +56,7 @@ public class AdminProcMethodController {
     @RequestMapping("/method")
     public ResponseJson method(HttpServletRequest request,ProcMethod procMethod) {
         List<ProcMethod> procMethodList = new ArrayList<>();    //因为在前端不判断,所以需要直接初始化
+        procMethod.setProcMethodStatus(1);
         procMethodList = procMethodService.getProcMethodList(procMethod);
         ResponseJson rj = new ResponseJson(200, "查询成功", 200);
         rj.addResponseKeyValue("list",procMethodList);

+ 10 - 7
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminOrderController.java

@@ -24,15 +24,14 @@ import com.iamberry.rst.faces.product.ProductService;
 import com.iamberry.rst.faces.sms.MessageService;
 import com.iamberry.rst.faces.sms.SmsService;
 import com.iamberry.rst.faces.sys.SysService;
-import com.iamberry.rst.utils.AdminUtils;
-import com.iamberry.rst.utils.ExcelUtil;
-import com.iamberry.rst.utils.GenerateKeyUtil;
-import com.iamberry.rst.utils.OrderNoUtil;
+import com.iamberry.rst.utils.*;
 import com.iamberry.wechat.tools.DateTimeUtil;
 import com.iamberry.wechat.tools.ObjectExcelView;
 import com.iamberry.wechat.tools.ResponseJson;
 import com.iamberry.wechat.tools.payUtil.DatetimeUtil;
 import com.iamberry.wechat.tools.payUtil.StringUtil;
+import net.sf.json.JSONArray;
+import net.sf.json.JSONObject;
 import org.apache.commons.lang.StringUtils;
 import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.authz.annotation.Logical;
@@ -95,7 +94,7 @@ public class AdminOrderController {
     @Autowired
     private ExcelUtil excelUtil;
     @Autowired
-    private GenerateKeyUtil generateKeyUtil ;
+    private GenerateKeyUtil generateKeyUtil;
 
     /**
      * 进入更换滤芯页面
@@ -827,11 +826,15 @@ public class AdminOrderController {
                 row.add(salesOrder.getSalesPostNum() == null ? null:salesOrder.getSalesPostNum());
                 row.add(salesOrder.getItemProductName() == null ? null:salesOrder.getItemProductName()+(salesOrder.getItemProductColor() == null ? null:"-"+salesOrder.getItemProductColor()));
                 //row.add(salesOrder.getItemProductColor() == null ? null:salesOrder.getItemProductColor());
-                row.add(salesOrder.getItemNum() == null ? null:salesOrder.getItemNum());
+                row.add((salesOrder.getItemNum() - salesOrder.getItemReturnNum()));
                 row.add(salesOrder.getCompanyName() == null ? null:salesOrder.getCompanyName());
                 row.add(salesOrder.getStoreName() == null ? null:salesOrder.getStoreName());
                 row.add(salesOrder.getSalesDeliverTime() == null ? null:formatter.format(salesOrder.getSalesDeliverTime()));
-                row.add(salesOrder.getSalesDistributionTime() == null ? null:formatter.format(salesOrder.getSalesDistributionTime()));
+                if(salesOrder.getSalesDistributionTime() == null){
+                    row.add(formatter.format(salesOrder.getSalesSendTime()));
+                }else{
+                    row.add(formatter.format(salesOrder.getSalesDistributionTime()));
+                }
                 row.add(salesOrder.getProcMethodName() == null ? null:salesOrder.getProcMethodName());
                 countexts.add(row);
             }

+ 143 - 4
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java

@@ -4,6 +4,7 @@ import com.iamberry.rst.core.cm.CompanyInfo;
 import com.iamberry.rst.core.cm.SalesOrder;
 import com.iamberry.rst.core.cm.SalesOrderItem;
 import com.iamberry.rst.core.cm.StoreInfo;
+import com.iamberry.rst.core.order.AfterrulesInfo;
 import com.iamberry.rst.core.order.OrderBatch;
 import com.iamberry.rst.core.order.OrderCorrectInfo;
 import com.iamberry.rst.core.order.ProductColor;
@@ -18,12 +19,10 @@ import com.iamberry.rst.faces.order.EfastOrderService;
 import com.iamberry.rst.faces.order.LogisticsInfoService;
 import com.iamberry.rst.faces.order.OrderBatchService;
 import com.iamberry.rst.faces.product.ProductService;
-import com.iamberry.rst.utils.AdminUtils;
-import com.iamberry.rst.utils.ExcelUtil;
-import com.iamberry.rst.utils.GenerateKeyUtil;
-import com.iamberry.rst.utils.StitchAttrUtil;
+import com.iamberry.rst.utils.*;
 import com.iamberry.wechat.tools.ResponseJson;
 import net.sf.json.JSONArray;
+import net.sf.json.JSONObject;
 import org.apache.commons.lang.StringUtils;
 import org.apache.poi.hssf.usermodel.*;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -71,6 +70,8 @@ public class AdminSalesOrderController {
     private GenerateKeyUtil generateKeyUtil ;
     @Autowired
     private LogisticsInfoService logisticsInfoService;
+    @Autowired
+    private KuaiDi100 kuaidi100;
     /**
      * 分页查询订单列表信息
      * @param request
@@ -1410,5 +1411,143 @@ public class AdminSalesOrderController {
         }
         return ResponseJson.getSUCCESS();
     }
+    /**
+     * 根据店铺id查询售后规则
+     *
+     * @param request
+     * @return
+     */
+    @RequiresPermissions("salesOrder:select:salesOrder")
+    @ResponseBody
+    @RequestMapping("/getAfterrulesInfo")
+    public ModelAndView getAfterrulesInfo(HttpServletRequest request, Integer salesId) {
+        ModelAndView mv = new ModelAndView("order/afterrules_info");
+        if(salesId == null){
+            return mv;
+        }
+        //查询订单信息
+        SalesOrder salesOrder = salesOrderService.getSalesOrderById(salesId);
+        if(salesOrder == null){
+            return mv;
+        }
+        if(salesOrder.getSalesStoreId() == null){
+            return mv;
+        }
+        //查询售后规则
+        AfterrulesInfo afterrulesInfo = salesOrderService.getAfterrulesInfo(salesOrder.getSalesStoreId());
+        if(afterrulesInfo == null){//等于空则查询通用售后规则
+            afterrulesInfo = salesOrderService.getAfterrulesInfo(0);
+        }
+        //获取签收时间(如果当前日期距离下单日期 未超过7天,则将下单日期当做签收日期;如果当前日期距离下单日期 超过7天,将通过快递100拉取物流单号的签收日期,如果获取到了,就按照快递100的签收日期计算;若未获取到签收日期,则通过:出库日期(若出库日期为空,则取下单日期)+3天当做签收日期。)
+        //当前时间减订购时间
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Date dateReceipt = new Date();
+        long diff = new Date().getTime() - salesOrder.getSalesSalesTime().getTime();
+        long diffDays = diff / (24 * 60 * 60 * 1000);
+        if(diffDays < 7){
+            dateReceipt = salesOrder.getSalesSalesTime();
+        }else{
+            //通过快递100获取签收时间
+            /*if(!StringUtils.isEmpty(salesOrder.getSalesPostFirm()) && !StringUtils.isEmpty(salesOrder.getSalesPostNum())) {*/
+                JSONObject rst = kuaidi100.getExpressInfo(salesOrder.getSalesPostFirm(), salesOrder.getSalesPostNum());
+                if (rst.has("state") && rst.getInt("state") == 3) {    //当快递状态为已签收的时候
+                    JSONArray JSONArray = rst.getJSONArray("data");
+                    JSONObject JSONObjects = JSONArray.getJSONObject(0);
+                    try {
+                        dateReceipt = format.parse(JSONObjects.getString("time"));
+                    }catch (Exception e){
+                        e.printStackTrace();
+                    }
+                }else{//若未获取到签收日期,则通过出库日期(若出库日期为空,则取下单日期)+3天当做签收日期
+                    Calendar rightNow = Calendar.getInstance();
+                    if(salesOrder.getSalesDeliverTime() == null){
+                        rightNow.setTime(salesOrder.getSalesSalesTime());
+                    }else{
+                        rightNow.setTime(salesOrder.getSalesDeliverTime());
+                    }
+                    rightNow.add(Calendar.DAY_OF_YEAR,3);
+                    dateReceipt = rightNow.getTime();
+                }
+            /*}*/
+        }
+        //判断是否符合售后条件
+        //当前时间减去签收时间获取使用天数
+        long signTime = new Date().getTime() - dateReceipt.getTime();
+        long useTime = signTime / (24 * 60 * 60 * 1000);
+        Integer state;
+        Integer end;
+        //是否符合无理由退货
+        JSONObject returnReason = JSONObject.fromObject(afterrulesInfo.getReturnReason());
+        state = returnReason.getInt("state");
+        end = returnReason.getInt("end");
+        if(state+end == 0){
+            afterrulesInfo.setIsGovernancePeriod(2);
+        }else if(end == 0){//如果结束时间等于0,表示没有结束时间,默认为大于使用时间;
+            end = (int)useTime+1;
+        }
+        if(/*useTime >= state &&*/ useTime < end){
+            afterrulesInfo.setIsReturnReason(1);
+        }else{
+            afterrulesInfo.setIsReturnReason(2);
+        }
+        //是否符合质量问题退货期
+        JSONObject qualityPeriod = JSONObject.fromObject(afterrulesInfo.getQualityPeriod());
+        state = qualityPeriod.getInt("state");
+        end = qualityPeriod.getInt("end");
+        if(state+end == 0){
+            afterrulesInfo.setIsGovernancePeriod(2);
+        }else if(end == 0){//如果结束时间等于0,表示没有结束时间,默认为大于使用时间;
+            end = (int)useTime+1;
+        }
+        if(/*useTime >= state &&*/ useTime < end){
+            afterrulesInfo.setIsQualityPeriod(1);
+        }else{
+            afterrulesInfo.setIsQualityPeriod(2);
+        }
+        //是否符合质量问题退货期
+        JSONObject warrantyProblem = JSONObject.fromObject(afterrulesInfo.getWarrantyProblem());
+        state = warrantyProblem.getInt("state");
+        end = warrantyProblem.getInt("end");
+        if(state+end == 0){
+            afterrulesInfo.setIsGovernancePeriod(2);
+        }else if(end == 0){//如果结束时间等于0,表示没有结束时间,默认为大于使用时间;
+            end = (int)useTime+1;
+        }
+        if(/*useTime >= state &&*/ useTime < end){
+            afterrulesInfo.setIsWarrantyProblem(1);
+        }else{
+            afterrulesInfo.setIsWarrantyProblem(2);
+        }
+        //是否符合质量问题-免费维修期
+        JSONObject governancePeriod = JSONObject.fromObject(afterrulesInfo.getGovernancePeriod());
+        state = governancePeriod.getInt("state");
+        end = governancePeriod.getInt("end");
+        if(state+end == 0){
+            afterrulesInfo.setIsGovernancePeriod(2);
+        }else if(end == 0){//如果结束时间等于0,表示没有结束时间,默认为大于使用时间;
+            end = (int)useTime+1;
+        }
+        if(/*useTime >= state &&*/ useTime < end){
+            afterrulesInfo.setIsGovernancePeriod(1);
+        }else{
+            afterrulesInfo.setIsGovernancePeriod(2);
+        }
+        //是否符合付费维修
+        JSONObject payRepair = JSONObject.fromObject(afterrulesInfo.getPayRepair());
+        state = payRepair.getInt("state");
+        end = payRepair.getInt("end");
+        if(state+end == 0){
+            afterrulesInfo.setIsGovernancePeriod(2);
+        }else if(end == 0){//如果结束时间等于0,表示没有结束时间,默认为大于使用时间;
+            end = (int)useTime+1;
+        }
+        if(/*useTime >= state &&*/ useTime < end){
+            afterrulesInfo.setIsPayRepair(1);
+        }else{
+            afterrulesInfo.setIsPayRepair(2);
+        }
 
+        mv.addObject("afterrulesInfo", afterrulesInfo);
+        return mv;
+    }
 }

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

@@ -972,7 +972,7 @@ public class AwaitSendController {
                     }
                 }
                 row.add(salesShoppingStatus);
-                row.add(salesOrder.getSalesDistributionTime() == null ? null:formatter.format(salesOrder.getSalesDistributionTime()));  //salesDistributionTime
+                row.add(salesOrder.getSalesDistributionTime() == null ? formatter.format(salesOrder.getSalesSendTime()):formatter.format(salesOrder.getSalesDistributionTime()));  //salesDistributionTime
                 row.add(salesOrder.getSalesSendTime() == null ? null:formatter.format(salesOrder.getSalesSendTime()));
 
                 String salesDeliver = "";

+ 18 - 0
watero-rst-web/src/main/java/com/iamberry/rst/utils/KuaiDi100.java

@@ -52,21 +52,39 @@ public class KuaiDi100 {
           case "sto":
               code = "shentong";
               break;
+          case "STO":
+              code = "shentong";
+              break;
           case "yto":
               code = "yuantong";
               break;
+          case "YTO":
+              code = "yuantong";
+              break;
           case "sf":
               code = "shunfeng";
               break;
+          case "SF":
+              code = "shunfeng";
+              break;
           case "ems":
               code = "ems";
               break;
+          case "EMS":
+              code = "ems";
+              break;
           case "eyb":
               code = "ems";
               break;
+          case "EYB":
+              code = "ems";
+              break;
           case "zto":
               code = "zhongtong";
               break;
+          case "ZTO":
+              code = "zhongtong";
+              break;
           case "zjs":
               code = "zhaijisong";
               break;

+ 5 - 4
watero-rst-web/src/main/resources/watero-rst-orm.xml

@@ -191,10 +191,11 @@
 		<typeAlias type="com.iamberry.rst.core.cm.PostageInfo" alias="PostageInfo"/>
 		<typeAlias type="com.iamberry.rst.core.cm.SendbackInfo" alias="SendbackInfo"/>
 		<typeAlias type="com.iamberry.rst.core.cm.SendbackItem" alias="SendbackItem"/>
-
-		<!-- scm - 上朵定制 -->
-		<typeAlias type="com.iamberry.rst.core.scm.ScmOrderInfo" alias="ScmOrderInfo"/>
-		<typeAlias type="com.iamberry.rst.core.scm.ScmOrderItem" alias="ScmOrderItem"/>
+		<typeAlias type="com.iamberry.rst.core.order.AfterrulesInfo" alias="AfterrulesInfo"/>
+		<typeAlias type="com.iamberry.rst.core.cm.InformationInfo" alias="InformationInfo"/>
+        <!-- scm - 上朵定制 -->
+        <typeAlias type="com.iamberry.rst.core.scm.ScmOrderInfo" alias="ScmOrderInfo"/>
+        <typeAlias type="com.iamberry.rst.core.scm.ScmOrderItem" alias="ScmOrderItem"/>
 	</typeAliases>
 	<!-- PageHelper -->
 	<plugins>

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

@@ -48,6 +48,11 @@
         .my-search-input{padding-left: 30px;background: url(${path}/common/images/cm/search.png) 6px center no-repeat;background-size: auto 60%; }
         .txt-red{color:red}
         .thString {font-weight: normal;}
+        .clearfix:after{content:"\20";display:block;height:0;clear:both;visibility:hidden}.clearfix{zoom:1}
+        .tabBar {border-bottom: 2px solid #222}
+        .tabBar span {background-color: #e8e8e8;cursor: pointer;display: inline-block;float: left;font-weight: bold;height: 30px;line-height: 30px;padding: 0 15px}
+        .tabBar span.current{background-color: #222;color: #fff}
+        .tabCon {display: none}
     </style>
     <title>客诉基本信息</title>
 </head>
@@ -193,20 +198,10 @@
                     处理结果(<span id="customerIsSolve" style="color: red"></span>)
                     <span id="postage" style="color: red"></span>
                 </th>
-                <#--<th width="40" style="font-weight: normal;">
-                    <div class="row cl">
-                        <label class="form-label col-1 col-sm-1"></label>
-                        <div class="formControls col-10 col-sm-10">
-                            <ul class="time-line-list">
-
-                            </ul>
-                        </div>
-                    </div>
-                </th>-->
             </tr>
             </thead>
         </table>
-        <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
+        <#--<table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
             <thead>
             <tr>
                 <th width="10">寄回产品:</th>
@@ -230,7 +225,233 @@
                 <td width="10" style="font-weight: normal;"></td>
             </tr>
             </thead>
-        </table>
+        </table>-->
+
+        <div id="tab_demo" class="HuiTab">
+            <div class="tabBar clearfix">
+            <#if procMethod.procMethodIsBack == 1>
+                <span>寄回信息</span>
+                <span>邮费信息</span>
+            </#if>
+            <#if procMethod.procMethodIsSend == 1>
+                <span>寄送信息</span>
+            </#if>
+            <#--<#if procMethod.procMethodIsBack == 1>
+                <span>工厂检查信息</span>
+                <span>工厂返修进度</span>
+            </#if>-->
+            </div>
+            <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if> style="display: none;">
+                <div class="row cl">
+                    <div class="formControls col-10 col-sm-10">
+                        <table class="table table-border table-bg table-bordered" >
+                            <thead>
+                            <tr>
+                                <th>物流公司</th>
+                                <th>物流单号</th>
+                                <th>寄回人信息</th>
+                                <th>状态</th>
+                                <th>产品</th>
+                            </tr>
+                            </thead>
+                            <tbody id="SendbackbodyId">
+                            <#if listSendbackInfo?? &&  (listSendbackInfo?size > 0) >
+                                <#list listSendbackInfo as sendbackInfo>
+                                <tr id="deleteSendbackId${(sendbackInfo.sendbackId)!''}">
+                                    <td>${(sendbackInfo.sendbackLogisticsName)!''}</td>
+                                    <td>${(sendbackInfo.sendbackLogisticsNo)!''}</td>
+                                    <td>${(sendbackInfo.sendbackName)!''}<br>${(sendbackInfo.sendbackTel)!''}</td>
+                                    <td>
+                                        <#if sendbackInfo.sendbackStatus == 1>未配送</#if>
+                                        <#if sendbackInfo.sendbackStatus == 2>配送中</#if>
+                                        <#if sendbackInfo.sendbackStatus == 3>已签收</#if>
+                                    </td>
+                                    <td>
+                                        <#if sendbackInfo.listSendbackItem?? &&  (sendbackInfo.listSendbackItem?size > 0) >
+                                            <#list sendbackInfo.listSendbackItem as sendbackItem>
+                                            ${sendbackItem.sendbackProductName}(${sendbackItem.sendbackColorName})* ${sendbackItem.sendbackProdcueNumber}<br>
+                                            </#list>
+                                        </#if>
+                                    </td>
+                                </tr>
+                                </#list>
+                            <#else>
+                            <tr id="colspanSendbackId"><td colspan="7" class="td-manage text-c" >暂时没有寄回信息,请添加!</td></tr>
+                            </#if>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            </div>
+            <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if> style="display: none;">
+
+                <div class="row cl" id="postageInformation">
+                    <div class="formControls col-10 col-sm-10">
+                        <table class="table table-border table-bg table-bordered" >
+                            <thead>
+                            <tr>
+                                <th>邮费id</th>
+                                <th>邮费金额</th>
+                                <th>支付宝姓名</th>
+                                <th>支付宝账号</th>
+                                <th>状态</th>
+                                <th>备注</th>
+                            </tr>
+                            </thead>
+                            <tbody id="trbodyId">
+                            <#if listPostageInfo?? &&  (listPostageInfo?size > 0) >
+                                <#list listPostageInfo as postageInfo>
+                                <tr id="deleteId${(postageInfo.postageId)!''}">
+                                    <td>${(postageInfo.postageId)!''}</td>
+                                    <td>${(postageInfo.postageAmount)!''}</td>
+                                    <td>${(postageInfo.postageAlipayName)!''}</td>
+                                    <td>${(postageInfo.postageAlipay)!''}</td>
+                                    <#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 == 3><td>已转账</td></#if>
+                                        <#if postageInfo.postageStatus == 4><td>未知</td></#if>
+                                    <#else>
+                                        <td></td>
+                                    </#if>
+                                    <td>${postageInfo.postageDesc!''}</td>
+                                </tr>
+                                </#list>
+                            <#else>
+                            <tr id="colspanId"><td colspan="7" class="td-manage text-c" >暂时没有邮费信息!</td></tr>
+                            </#if>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            </div>
+            <div <#if procMethod.procMethodIsSend == 1>class="tabCon"</#if>style="display: none;">
+                <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
+                    <thead>
+                    <tr>
+                        <th width="20">是否寄出:</th>
+                        <td width="10" style="font-weight: normal;">
+                            <div class="radio-box">
+                                <input type="radio" id="tel-10" name="relationSendStatus" value="1" seleType="sendInformation">
+                                <label for="tel-10">未寄出</label>
+                            </div>
+                            <div class="radio-box">
+                                <input type="radio" id="tel-11" name="relationSendStatus" value="2" seleType="sendInformation">
+                                <label for="tel-11">已寄出</label>
+                            </div>
+                            <div class="radio-box">
+                                <input type="radio" id="tel-12" name="relationSendStatus" value="3" seleType="sendInformation">
+                                <label for="tel-12">已收货</label>
+                            </div>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th width="10">Efast订单号:</th>
+                        <td width="10" style="font-weight: normal;">
+                            <span id="relationBackEfastOrderId"></span>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th width="10">收件人姓名:</th>
+                        <td width="10" style="font-weight: normal;">
+                            <span id="relationSendName"></span>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th width="10">收件人手机号:</th>
+                        <td width="10" style="font-weight: normal;">
+                            <span id="relationSendTel"></span>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th width="10">省市县:</th>
+                        <td width="10" style="font-weight: normal;">
+                            <div style="width: 188px;display: inline-block;margin-right: 20px;">
+                                <span class="select-box" style="padding-right: 0px;">
+                                    <select name="provinceNumber" id="provinceNumber" class="select" seleType="sendInformation"></select>
+                                </span>
+                            </div>
+                            <div style="width: 188px;display: inline-block;margin-right: 20px;">
+                                <span class="select-box" style="padding-right: 0px;">
+                                    <select name="cityNumber" id="cityNumber" class="select" seleType="sendInformation"></select>
+                                </span>
+                            </div>
+                            <div style="width: 189px;display: inline-block;">
+                                <span class="select-box" style="padding-right: 0px;">
+                                    <select name="areaNumber" id="areaNumber" class="select" seleType="sendInformation"></select>
+                                    <input type="hidden" id="merge_address" name="merge_address" seleType="sendInformation">
+                                </span>
+                            </div>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th width="10">详细地址:</th>
+                        <td width="10" style="font-weight: normal;">
+                            <span id="relationSendAddress"></span>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th width="10">寄出信息:</th>
+                        <td width="10" style="font-weight: normal;">
+                            <div style="width: 300px;display: inline-block;margin-right: 10px;">
+                                <span class="select-box">
+                                    <select name="relationSendLogisticsCompany" id="relationSendLogisticsCompany" class="select" seleType="sendInformation">
+                                        <#if logisticsInfoList?? &&  (logisticsInfoList?size > 0) >
+                                            <#list logisticsInfoList as logisticsInfo>
+                                                <option value="${logisticsInfo.logisticsRstCode!''}">${logisticsInfo.logisticsName!''}(${logisticsInfo.logisticsRstCode!''})</option>
+                                            </#list>
+                                        </#if>
+                                    </select>
+                                </span>
+                            </div>
+                            <span id="relationSendLogisticsNo"></span>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th width="10">寄出备注:</th>
+                        <td width="10" style="font-weight: normal;">
+                            <span id="relationDesc"></span>
+                        </td>
+                    </tr>
+                    </thead>
+                </table>
+                <div class="row cl">
+                    <div class="formControls col-2 col-sm-2">
+                    </div>
+                </div>
+            </div>
+        <#--<#if procMethod.procMethodIsBack == 1>
+            <div class="tabCon">
+                <div class="row cl" style="margin-left: -70px;">
+                    <div class="formControls col-2 col-sm-2 text-r">
+                        <strong>QC进度</strong>
+                    </div>
+                    <div class="formControls col-10 col-sm-10">
+                        <table class="table table-border table-bg table-bordered">
+                            <tbody class="text-c" id="detect_table"><tr>
+                                <th>工厂检测现象</th><th>故障分类</th><th>故障原因</th><th>判定结果</th><th>故障指向</th><th>原因分析</th><th>生产维修</th>
+                            </tr>
+                            </tbody></table>
+                    </div>
+                </div>
+            </div>
+            <div class="tabCon">
+                <div class="row cl" style="margin-left: -70px;">
+                    <div class="formControls col-2 col-sm-2 text-r">
+                        <strong>返修进度</strong>
+                    </div>
+                    <div class="formControls col-10 col-sm-10">
+                        <table class="table table-border table-bg table-bordered">
+                            <tbody class="text-c" id="maintenance_table"><tr>
+                                <th>是否可返修</th><th>返修内容</th><th>返修日期</th>
+                            </tr>
+                            </tbody></table>
+                    </div>
+                </div>
+            </div>
+        </#if>-->
+        </div>
 
     </form>
     </div>
@@ -248,6 +469,9 @@
 <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
 <script type="text/javascript">
     $(function(){
+        $.Huitab("#tab_demo .tabBar span","#tab_demo .tabCon","current","click","0")});
+    $(function(){
+        get_cmRelation_info();
         $('.skin-minimal input').iCheck({
             checkboxClass: 'icheckbox-blue',
             radioClass: 'iradio-blue',
@@ -668,6 +892,104 @@
         }
     }
 
+
+    /*获取换新信息*/
+    function get_cmRelation_info() {
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"customerId":${customerId}},
+            url: "${path}/admin/customer/get_cmRelation_info",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    var relation = data.returnMsg.cmRelation;
+                    console.log(relation);
+                    getProvince('provinceNumber');
+                    getCity('cityNumber',relation.provinceNumber);
+                    getDistrict('areaNumber',relation.cityNumber);
+                    $("#relationSendLogisticsCompany option[value='" + relation.relationSendLogisticsCompany + "']").attr("selected","true");
+
+                    $("#provinceNumber option[value='" + relation.provinceNumber + "']").attr("selected","true");
+                    $("#cityNumber option[value='" + relation.cityNumber + "']").attr("selected","true");
+                    $("#areaNumber option[value='" + relation.areaNumber + "']").attr("selected","true");
+                    $('input[name="relationSendStatus"]').each(function(){
+                        if (this.value == relation.relationSendStatus) {
+                            $(this).iCheck('check');
+                        }
+                    });
+                    $('#relationBackEfastOrderId').html(relation.relationBackEfastOrderId);
+                    $('#relationSendName').html(relation.relationSendName);
+                    $('#relationSendTel').html(relation.relationSendTel);
+                    $('#relationSendAddress').html(relation.relationSendAddress);
+                    $('#relationSendLogisticsNo').html(relation.relationSendLogisticsNo);
+                    $('#relationDesc').html(relation.relationDesc);
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+    }
+
+
+    /**
+     * 获取省
+     */
+    function getProvince(provinceNum) {
+        var province = listProvince();
+        if(province!=null){
+            var provinceHtml = '';
+            for(var i=0;i<province.length;i++){
+                provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
+            }
+            $('#'+provinceNum).append(provinceHtml);
+        }
+    }
+
+    /**
+     * 获取市
+     */
+    function getCity(cityNum,provineceId) {
+        var city = listCity(provineceId,'');
+        if(city!=null){
+            var cityHtml = '';
+            for(var i=0;i<city.length;i++){
+                cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
+            }
+            $('#'+cityNum).append(cityHtml);
+        }
+    }
+
+    /**
+     * 获取区
+     */
+    function getDistrict(districtNum,cityId) {
+        var district = listDistrict(cityId,'');
+        if(district!=null){
+            var districtHtml = '';
+            for(var i=0;i<district.length;i++){
+                districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
+            }
+            $('#'+districtNum).append(districtHtml);
+        }
+    }
+
+    /*监听市选择事件*/
+    $(document).on('change', '#cityNumber', function() {
+        var city = $("#cityNumber").val();
+        $('#areaNumber option').remove();
+        getDistrict('areaNumber',city);
+    });
+
+    /*监听省选择事件*/
+    $(document).on('change', '#provinceNumber', function() {
+        var proId = $("#provinceNumber").val();
+        $('#cityNumber option').remove();
+        getCity('cityNumber',proId);
+        var cityId = $("#cityNumber").val();
+        $('#areaNumber option').remove();
+        getDistrict('areaNumber',cityId);
+    });
 </script>
 </body>
 </html>

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

@@ -369,16 +369,16 @@
                         }
                         var time = formatDate(new Date(salesOrder.salesPayTime),"yyyy-MM-dd");
                         var orderStatus = null;
-                        if(salesOrder.salesOrderStatus == 0){
+                        if(salesOrder.procTypeId == 0 || salesOrder.procTypeId == null || salesOrder.procTypeId == ""){
                             orderStatus = "正常";
                         }else{
-                            orderStatus = salesOrder.salesOrderStatusProcTypeName;
+                            orderStatus = salesOrder.procTypeName;
                         }
 
                         <#--1:正常 2:换货 3:退货  4:维修  5:补发-->
 
                         var disHtml =  "";
-                        if(salesOrder.salesOrderId == null || salesOrder.salesOrderId == "" || typeof (salesOrder.salesOrderId) == 'undefined'){
+                        if(salesOrder.salesOrderId == null || salesOrder.salesOrderId == "" || typeof (salesOrder.salesOrderId) == 'undefined' || salesOrder.salesReturnStatus == 2){
                             disHtml = 'disabled="disabled"';
                         }
                         html += '<tr class="text-c">' +

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

@@ -556,9 +556,10 @@
                                 ${closedProdcues.closedColorName!""}
                                 </td>
                                 <td style="text-align: center;">
-                                    <input type="text" style="width: 100%;border: none;text-align: center;" class="input-text input-number input-itemNum" value="${closedProdcues.closedProdcueNumber!"0"}"  placeholder="产品数量" onkeyup="keyFun($(this),999,1)" onpaste="keyFun($(this),999,1)">
+                                    <input type="text" style="width: 100%;border: none;text-align: center;" class="input-text input-number input-itemNum" value="${closedProdcues.closedProdcueNumber!"0"}"  placeholder="产品数量" onkeyup="keyFun($(this),999,0)" onpaste="keyFun($(this),999,0)">
                                 </td>
                                 <td style="text-align: center;">
+                                    <input type="hidden" class="input-item-id" value="${closedProdcues.itemId!''}">
                                     <input type="hidden" class="input-produce-id" value="${closedProdcues.productId}">
                                     <input type="hidden" class="input-fc-id" value="${closedProdcues.colorId}">
                                     <input type="hidden" class="input-69code" value="${closedProdcues.colorBar}">

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

@@ -50,7 +50,9 @@
 <#if procMethod.procMethodIsSend == 1>
             <span>寄送信息</span>
 </#if>
+
 <#if procMethod.procMethodIsBack == 1>
+            <span>收费信息</span>
             <span>工厂检查信息</span>
             <span>工厂返修进度</span>
 </#if>
@@ -627,6 +629,228 @@
                     </div>
                 </div>
             </div>
+        <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if>>
+                <div class="row cl" id="informationInformation">
+                    <div class="formControls col-2 col-sm-2 text-r">
+                        <strong>收费信息</strong>
+                    </div>
+                    <div class="formControls col-10 col-sm-10">
+                        <table class="table table-border table-bg table-bordered" >
+                            <thead>
+                            <tr>
+                                <th>id</th>
+                                <th>收费金额</th>
+                                <th>收费原由</th>
+                                <th>支付渠道</th>
+                                <th>支付账号</th>
+                                <th>状态</th>
+                                <th>备注</th>
+                                <th>操作</th>
+                            </tr>
+                            </thead>
+                            <tbody id="trbodyInformationInfoId">
+                            <#if listInformationInfo?? &&  (listInformationInfo?size > 0) >
+                                <#list listInformationInfo as informationInfo>
+                                <tr id="deleteInfoId${(informationInfo.feeId)!''}">
+                                    <td>${(informationInfo.feeId)!''}</td>
+                                    <td>
+                                        <#if informationInfo.feeCharges??>
+                                            ${(informationInfo.feeCharges)/100}
+                                        </#if>
+                                    </td>
+                                <td>
+                                    <#if informationInfo.feePayChannel??>
+                                        <#if informationInfo.feeOriginally == 1>以旧换新</#if>
+                                        <#if informationInfo.feeOriginally == 2>机器维修</#if>
+                                        <#if informationInfo.feeOriginally == 3>机器运费</#if>
+                                    </#if>
+                                </td>
+                                <td>
+                                    <#if informationInfo.feePayChannel??>
+                                        <#if informationInfo.feePayChannel == 1>微信</#if>
+                                        <#if informationInfo.feePayChannel == 2>支付宝</#if>
+                                        <#if informationInfo.feePayChannel == 3>银行卡</#if>
+                                    </#if>
+                                    </td>
+                                    <td>${informationInfo.feePayAccount!''}</td>
+                                <td>
+                                    <#if informationInfo.feeStatus??>
+                                        <#if informationInfo.feeStatus == 1>代付款</#if>
+                                        <#if informationInfo.feeStatus == 2>已收款</#if>
+                                    </#if>
+                                </td>
+                                    <td>${informationInfo.feeDesc!''}</td>
+                                    <td><a onclick="deleteInformationInfo(${(informationInfo.feeId)!});">删除</a>&nbsp;&nbsp;<a onclick="getInformationInfo(${(informationInfo.feeId)!});">修改</a></td>
+                                </tr>
+                                </#list>
+                            <#else>
+                            <tr id="colspanInformationId"><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="showInformationInfoDiv();">录入收费信息</button>
+                    </div>
+                </div>
+                <div class="row cl" id="addInformationInfoId" style="display: none;">
+                    <div class="formControls col-2 col-sm-2 text-r">
+                        <strong></strong>
+                    </div>
+                    <div class="formControls col-10 col-sm-10">
+                        <div >
+                            <div class="row cl">
+                                <div class="formControls col-2 col-sm-2 text-r">
+                                    <strong>状态</strong>
+                                </div>
+                                <div class="formControls col-10 col-sm-10">
+                                    <div class="radio-box">
+                                        <input type="radio" id="tel-333" name="feeStatus" checked value="1">
+                                        <label for="tel-333">待付款</label>
+                                    </div>
+                                    <div class="radio-box">
+                                        <input type="radio" id="tel-334" name="feeStatus" value="2">
+                                        <label for="tel-334">已付款</label>
+                                    </div>
+                                </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="feeCharges" name="feeCharges">
+                                </div>
+                                <div class="formControls col-5 col-sm-5">
+                                    <div style="width: 100%;display: inline-block;margin-right: 10px;">
+                                        <span class="select-box">
+                                                <select name="feeOriginally" id="feeOriginally" class="select">
+                                                    <option value="1">以旧换新</option>
+                                                    <option value="2">机器维修</option>
+                                                    <option value="3">机器运费</option>
+                                                </select>
+                                        </span>
+                                    </div>
+                                </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">
+                                    <div style="width: 100%;display: inline-block;margin-right: 10px;">
+                                        <span class="select-box">
+                                                <select name="feePayChannel" id="feePayChannel" class="select">
+                                                    <option value="1">支付宝</option>
+                                                    <option value="2">微信</option>
+                                                    <option value="3">银行卡</option>
+                                                </select>
+                                        </span>
+                                    </div>
+                                </div>
+                                <div class="formControls col-5 col-sm-5">
+                                    <input type="text" class="input-text" placeholder="填写支付账号" id="feePayAccount" name="feePayAccount">
+                                </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">
+                                    <textarea type="text" placeholder="" id="feeDesc" name="feeDesc" style="width: 100%;height: 80px;"></textarea>
+                                </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">
+                                    <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="addInformationInfo()">确定录入收费信息</button>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="row cl" id="updateInformationInfoId" style="display: none;">
+                    <div class="formControls col-2 col-sm-2 text-r">
+                        <strong></strong>
+                    </div>
+                    <div class="formControls col-10 col-sm-10">
+                        <div >
+                            <div class="row cl">
+                                <div class="formControls col-2 col-sm-2 text-r">
+                                    <strong>状态</strong>
+                                </div>
+                                <div class="formControls col-10 col-sm-10">
+                                    <div class="radio-box">
+                                        <input type="radio" id="tel-333s" name="feeStatuss" checked value="1">
+                                        <label for="tel-333s">待付款</label>
+                                    </div>
+                                    <div class="radio-box">
+                                        <input type="radio" id="tel-334s" name="feeStatuss" value="2">
+                                        <label for="tel-334s">已付款</label>
+                                    </div>
+                                </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="feeChargess" name="feeChargess">
+                                </div>
+                                <div class="formControls col-5 col-sm-5">
+                                    <div style="width: 100%;display: inline-block;margin-right: 10px;">
+                                        <span class="select-box">
+                                                <select name="feeOriginallys" id="feeOriginallys" class="select">
+                                                    <option value="1">以旧换新</option>
+                                                    <option value="2">机器维修</option>
+                                                    <option value="3">机器运费</option>
+                                                </select>
+                                        </span>
+                                    </div>
+                                </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">
+                                    <div style="width: 100%;display: inline-block;margin-right: 10px;">
+                                        <span class="select-box">
+                                                <select name="feePayChannels" id="feePayChannels" class="select">
+                                                    <option value="1">支付宝</option>
+                                                    <option value="2">微信</option>
+                                                    <option value="3">银行卡</option>
+                                                </select>
+                                        </span>
+                                    </div>
+                                </div>
+                                <div class="formControls col-5 col-sm-5">
+                                    <input type="text" class="input-text" placeholder="填写支付账号" id="feePayAccounts" name="feePayAccounts">
+                                </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">
+                                    <textarea type="text" placeholder="" id="feeDescs" name="feeDescs" style="width: 100%;height: 80px;"></textarea>
+                                </div>
+                            </div>
+                            <div class="row cl">
+                                <div class="formControls col-2 col-sm-2 text-r">
+                                    <strong></strong>
+                                </div>
+                                <input type="hidden" value="" id="feeIds">
+                                <div class="formControls col-5 col-sm-5">
+                                    <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="updateInformationInfo()">确定修改收费信息</button>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
 <#if procMethod.procMethodIsBack == 1>
         <div class="tabCon">
             <div class="row cl" style="margin-left: -70px;">
@@ -701,6 +925,10 @@
             $("#postageInformation").show();
         }
     }
+    function showInformationInfoDiv(){
+        $("#updateInformationInfoId").hide();
+        $("#addInformationInfoId").show();
+    }
 
     /*查询寄回信息*/
     function getSendbackInfo(sendbackId) {
@@ -1215,6 +1443,229 @@
         })
     }
 
+
+    /*添加收费信息*/
+    function addInformationInfo() {
+        var informationInfo;
+        var relationId = $("#relationId").val();
+        var feeStatus = parseInt($("input[name='feeStatus']:checked").val());
+        var feeOriginally = $("#feeOriginally").val();
+        var feePayChannel = $("#feePayChannel").val();
+        var feeCharges = $("#feeCharges").val()*100;
+        var feePayAccount = $("#feePayAccount").val();
+        var feeDesc = $("#feeDesc").val();
+        if(feeStatus == null || feeStatus == ""){
+            layer.msg("请选择状态!",{icon: 5,time:1000});
+            return;
+        }
+        if (!money.test(feeCharges)) {
+            layer.msg("邮费格式不正确,请重新输入!",{icon: 5,time:1000});
+            return;
+        }
+        if(feePayAccount == null || feePayAccount == ""){
+            layer.msg("请输入支付账号!",{icon: 5,time:1000});
+            return;
+        }
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"relationId" : relationId,
+                "feeStatus" : feeStatus,
+                "feeOriginally" : feeOriginally,
+                "feePayChannel" : feePayChannel,
+                "feeCharges" : feeCharges,
+                "feePayAccount" : feePayAccount,
+                "feeDesc" : feeDesc},
+            url: "${path}/admin/customer/add_informationInfo",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    $("#colspanInformationId").remove();
+                    informationInfo = data.returnMsg.informationInfo;
+                    var feeStatus;
+                    if(informationInfo.feeStatus == 1){
+                        feeStatus = "待付款";
+                    }
+                    if(informationInfo.feeStatus == 2){
+                        feeStatus = "已付款";
+                    }
+                    var feeOriginally;
+                    if(informationInfo.feeOriginally == 1){
+                        feeOriginally = "以旧换新";
+                    }
+                    if(informationInfo.feeOriginally == 2){
+                        feeOriginally = "机器维修";
+                    }
+                    if(informationInfo.feeOriginally == 3){
+                        feeOriginally = "机器运费";
+                    }
+                    var feePayChannel;
+                    if(informationInfo.feePayChannel == 1){
+                        feePayChannel = "支付宝";
+                    }
+                    if(informationInfo.feePayChannel == 2){
+                        feePayChannel = "微信";
+                    }
+                    if(informationInfo.feePayChannel == 3){
+                        feePayChannel = "银行卡";
+                    }
+                    $("#trbodyInformationInfoId").append('<tr id="deleteInfoId'+informationInfo.feeId+'"><td>'+informationInfo.feeId+'</td>' +
+                            '<td>'+(informationInfo.feeCharges)/100+'</td>' +
+                            '<td>'+feeOriginally+'</td>' +
+                            '<td>'+feePayChannel+'</td>' +
+                            '<td>'+informationInfo.feePayAccount+'</td>' +
+                            '<td>'+feeStatus+'</td>' +
+                            '<td>'+informationInfo.feeDesc+'</td>' +
+                            '<td><a onclick="deleteInformationInfo('+informationInfo.feeId+');">删除</a>&nbsp&nbsp<a onclick="getInformationInfo('+informationInfo.feeId+');">修改</a></td></tr>');
+                    layer.msg("添加成功!",{icon: 1,time:1000});
+                } else {
+                    layer.msg("添加失败!",{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                window.parent.admin_result("添加失败!",5);
+            }
+        })
+    }
+
+    /*查询邮费信息*/
+    function getInformationInfo(feeId) {
+        var informationInfo;
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"feeId" : feeId},
+            url: "${path}/admin/customer/get_informationInfo",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    $("#addInformationInfoId").hide();
+                    $("#updateInformationInfoId").show();
+                    informationInfo = data.returnMsg.informationInfo;
+                    $("#feeDescs").val("");
+                    $("#feeIds").val(informationInfo.feeId);
+                    $("input[type=radio][name=feeStatuss][value='"+informationInfo.feeStatus+"']").prop("checked",true);
+                    $("#feeChargess").val(informationInfo.feeCharges/100);
+                    $("#feeOriginallys").val(informationInfo.feeOriginally);
+                    $("#feePayChannels").val(informationInfo.feePayChannel);
+                    $("#feePayAccounts").val(informationInfo.feePayAccount);
+                    $("#feeDescs").val(informationInfo.feeDesc);
+
+                } else {
+                    layer.msg("修改失败!",{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                window.parent.admin_result("修改失败!",5);
+            }
+        })
+    }
+
+    /*修改收费信息*/
+    function updateInformationInfo() {
+        var informationInfo;
+        var feeId = $("#feeIds").val();
+        var feeStatus = parseInt($("input[name='feeStatuss']:checked").val());
+        var feeOriginally = $("#feeOriginallys").val();
+        var feePayChannel = $("#feePayChannels").val();
+        var feeCharges = $("#feeChargess").val()*100;
+        var feePayAccount = $("#feePayAccounts").val();
+        var feeDesc = $("#feeDescs").val();
+        if (!money.test(feeCharges)) {
+            layer.msg("邮费格式不正确,请重新输入!",{icon: 5,time:1000});
+            return;
+        }
+        if(feePayAccount == null || feePayAccount == ""){
+            layer.msg("请输入支付账号!",{icon: 5,time:1000});
+            return;
+        }
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"feeId" : feeId,
+                "feeStatus" : feeStatus,
+                "feeOriginally" : feeOriginally,
+                "feePayChannel" : feePayChannel,
+                "feeCharges" : feeCharges,
+                "feePayAccount" : feePayAccount,
+                "feeDesc" : feeDesc},
+            url: "${path}/admin/customer/update_informationInfo",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    $("#colspanInformationId").remove();
+                    informationInfo = data.returnMsg.informationInfo;
+                    var feeStatus;
+                    if(informationInfo.feeStatus == 1){
+                        feeStatus = "待付款";
+                    }
+                    if(informationInfo.feeStatus == 2){
+                        feeStatus = "已付款";
+                    }
+                    var feeOriginally;
+                    if(informationInfo.feeOriginally == 1){
+                        feeOriginally = "以旧换新";
+                    }
+                    if(informationInfo.feeOriginally == 2){
+                        feeOriginally = "机器维修";
+                    }
+                    if(informationInfo.feeOriginally == 3){
+                        feeOriginally = "机器运费";
+                    }
+                    var feePayChannel;
+                    if(informationInfo.feePayChannel == 1){
+                        feePayChannel = "支付宝";
+                    }
+                    if(informationInfo.feePayChannel == 2){
+                        feePayChannel = "微信";
+                    }
+                    if(informationInfo.feePayChannel == 3){
+                        feePayChannel = "银行卡";
+                    }
+                    $("#deleteInfoId"+feeId).html("");
+                    $("#deleteInfoId"+feeId).append('<td>'+informationInfo.feeId+'</td>' +
+                            '<td>'+(informationInfo.feeCharges)/100+'</td>' +
+                            '<td>'+feeOriginally+'</td>' +
+                            '<td>'+feePayChannel+'</td>' +
+                            '<td>'+informationInfo.feePayAccount+'</td>' +
+                            '<td>'+feeStatus+'</td>' +
+                            '<td>'+informationInfo.feeDesc+'</td>' +
+                            '<td><a onclick="deleteInformationInfo('+informationInfo.feeId+');">删除</a>&nbsp&nbsp<a onclick="getInformationInfo('+informationInfo.feeId+');">修改</a></td>');
+                    layer.msg("添加成功!",{icon: 1,time:1000});
+                } else {
+                    layer.msg("添加失败!",{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                window.parent.admin_result("添加失败!",5);
+            }
+        })
+    }
+
+    /*删除收费信息*/
+    function deleteInformationInfo(feeId) {
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"feeId" : feeId},
+            url: "${path}/admin/customer/delete_informationInfo",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    $("#deleteInfoId"+feeId).remove();
+                    layer.msg("删除成功!",{icon: 1,time:1000});
+                } else {
+                    layer.msg("删除失败!",{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                window.parent.admin_result("修改失败!",5);
+            }
+        })
+    }
+
+
+
     $(function(){
 
         get_cmRelation_info();

+ 4 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/add_signclosed.ftl

@@ -289,6 +289,7 @@
 <script type="text/javascript" src="${path}/common/lib/cm.lib/airCity.js"></script>
 <#--<script type="text/javascript" src="${path}/common/lib/cm.lib/dimensions.js"></script>-->
 <script type="text/javascript" src="${path}/common/lib/cm.lib/suggest.js"></script>
+<script type="text/javascript" src="${path}/common/js/common/address.js"></script>
 <script type="text/javascript">
 
     /*初始化单选框样式*/
@@ -300,7 +301,9 @@
         });
     });
     /*初始化省市区*/
-    $(".address_info").initAddress();
+    /*$(".address_info").initAddress();*/
+    var ulc = initAddress($(".address_info"));
+    var sc = initSalesChannel($(".sales_channel"));
     function hide() {
         $("#objectsStateId").hide();
     }

+ 67 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/order/afterrules_info.ftl

@@ -0,0 +1,67 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+    <link rel="Bookmark" href="/favicon.ico" >
+    <link rel="Shortcut Icon" href="/favicon.ico" />
+<#include "/base/list_base.ftl">
+    <title>售后信息</title>
+</head>
+<body>
+<div class="page-container">
+    <div class="text-c">
+        <table class="table table-border table-bordered table-bg table-hover table-sort">
+            <thead>
+            <tr class="text-c">
+                <th width="50"><strong>售后方式</strong></th>
+                <td width="50">无理由退货</td>
+                <td width="50">质量问题退货期</td>
+                <td width="100">质量问题包换期</td>
+                <td width="100">质量问题-免费维修期</td>
+                <td width="100">付费维修期</td>
+            </tr>
+
+            </thead>
+            <tbody id="orderAll">
+            <tr class="text-c">
+                <th width="100">售后期限</strong></th>
+                <td width="100">${afterrulesInfo.returnReasonInfo!}</td>
+                <td width="100">${afterrulesInfo.qualityPeriodInfo!}</td>
+                <td width="100">${afterrulesInfo.warrantyProblemInfo!}</td>
+                <td width="100">${afterrulesInfo.governancePeriodInfo!}</td>
+                <td width="100">${afterrulesInfo.payRepairInfo!}</td>
+            </tr>
+            <tr class="text-c">
+                <th width="100"><strong>是否符合</strong></th>
+                <td width="100">
+                <#if afterrulesInfo.isReturnReason == 1><img src="/common/images/Conform.jpg"/></#if>
+                <#if afterrulesInfo.isReturnReason == 2><img src="/common/images/noConform.jpg"/></#if>
+                </td>
+                <td width="100">
+                <#if afterrulesInfo.isQualityPeriod == 1><img src="/common/images/Conform.jpg"/></#if>
+                <#if afterrulesInfo.isQualityPeriod == 2><img src="/common/images/noConform.jpg"/></#if>
+                </td>
+                <td width="100">
+                <#if afterrulesInfo.isWarrantyProblem == 1><img src="/common/images/Conform.jpg"/></#if>
+                <#if afterrulesInfo.isWarrantyProblem == 2><img src="/common/images/noConform.jpg"/></#if>
+                </td>
+                <td width="100">
+                <#if afterrulesInfo.isGovernancePeriod == 1><img src="/common/images/Conform.jpg"/></#if>
+                <#if afterrulesInfo.isGovernancePeriod == 2><img src="/common/images/noConform.jpg"/></#if>
+                </td>
+                <td width="100">
+                <#if afterrulesInfo.isPayRepair == 1><img src="/common/images/Conform.jpg"/></#if>
+                <#if afterrulesInfo.isPayRepair == 2><img src="/common/images/noConform.jpg"/></#if>
+                </td>
+            </tr>
+            </tbody>
+        </table>
+    </div>
+    <br/>
+</div>
+</body>
+</html>

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

@@ -252,6 +252,23 @@
                            onclick="acorrect_order(${order.salesId!''});">
                             <i class="Hui-iconfont">&#xe6f7;</i>
                         </a>
+                        <#if order.procTypeId??>
+                            <#if order.procTypeId != '3'>
+                                <#if order.isDevelop == 1>
+                                    <a style="text-decoration:none" href="javascript:;" title="查看售后信息"
+                                       onclick="getAfterrulesInfo(${order.salesId!''});">
+                                        <i class="Hui-iconfont">&#xe63c;</i>
+                                    </a>
+                                </#if>
+                            </#if>
+                        <#else>
+                            <#if order.isDevelop == 1>
+                                <a style="text-decoration:none" href="javascript:;" title="查看售后信息"
+                                   onclick="getAfterrulesInfo(${order.salesId!''});">
+                                    <i class="Hui-iconfont">&#xe63c;</i>
+                                </a>
+                            </#if>
+                        </#if>
                     </td>
                 </tr>
                 </#list>
@@ -873,11 +890,13 @@ function isConfirm(salesOrderIds,isSplit) {
          *跳转到更正订单页面
          * @param employee
          */
-        function acorrect_order(salesId) {
-
-           /* layer_show("客诉详情","${path}/admin/customer/_customer_info?salesId="+salesId,800,600);*/
+        function showAfterrulesInfo(salesId) {
              window.location.href= "${path}/admin/salesOrder/to_acorrect_order?salesId="+salesId;
         }
+
+        function getAfterrulesInfo(salesId){
+            layer_show("查看售后信息","${path}/admin/salesOrder/getAfterrulesInfo?salesId="+salesId,'570','450');
+        }
     </script>
 </body>
 </html>

BIN
watero-rst-web/src/main/webapp/common/images/Conform.jpg


BIN
watero-rst-web/src/main/webapp/common/images/noConform.jpg


+ 20 - 12
watero-rst-web/src/main/webapp/common/js/customer/customer.js

@@ -375,6 +375,10 @@ function initProduceType(){
             /*绑定产品类型选择事件*/
             $("input[name='typeId']").change(function (){
                 var typeId = parseInt($(this).val());
+                var typeCompany = parseInt($("input:radio[name='typeId']:checked").attr("typeCompany"));
+                $("#selectCompany").val(typeCompany);
+                $("#companyId").val(typeCompany);
+                setStore(typeCompany,$("#selectStore"));       //获取店铺
                 var isOrder = 1;
                 switch (typeId){    //1:Soodo电动牙刷   6:WaterO净水机    7:Aiberle净水机    9 :YULIA净水机
                     case 1:
@@ -1160,18 +1164,20 @@ function setProduce(orderItemList) {
     for(var k=0;k<orderItemList.length;k++){
         var item = orderItemList[k];
         var fiHtml = "-";
-        colorHtml += '<tr >'
-            + '<td style="text-align: center;" >' + item.itemProductName + '</td>'
-            + '<td style="text-align: center;" >' + item.itemProductColor + '</td>'
-            + '<td style="text-align: center;"><input type="text" style="width: 100%;border: none;text-align: center;" class="input-text input-number input-itemNum" value="' + item.itemNum + '"  placeholder="产品数量" onkeyup="keyFun($(this),999,1)" onpaste="keyFun($(this),999,1)"></td>'
-            + '<td style="text-align: center;" >'
-            + '<input type="hidden" class="input-produce-id" value="' + item.itemProductId + '">'
-            + '<input type="hidden" class="input-fc-id" value="' + item.itemColorId +'">'
-            + '<input type="hidden" class="input-69code" value="' + item.itemColorBar +'">'
-            + '<input type="" class="input-text input-number input-code" style="width: 100%;border: none;text-align: center;" value="" placeholder="机器编号" name="" id="item-' + item.itemProductId + '-' + item.itemColorId +'" number="'+ item.itemNum +'" "  onkeyup="keyFunString($(this),30)" onpaste="keyFunString($(this),30)" >'
-            + '</td>'
-            + '<td style="text-align: center;" ><a href="javascript:void(0)" onclick="delColor(this)" >删除</a></td>'
-            + '</tr>';
+            colorHtml += '<tr >'
+                + '<td style="text-align: center;" >' + item.itemProductName + '</td>'
+                + '<td style="text-align: center;" >' + item.itemProductColor + '</td>'
+                + '<td style="text-align: center;"><input type="text" style="width: 100%;border: none;text-align: center;" class="input-text input-number input-itemNum" value="' + (item.itemNum-item.itemReturnNum) + '"  placeholder="产品数量" onkeyup="keyFun($(this),999,0)" onpaste="keyFun($(this),999,0)"></td>'
+                + '<td style="text-align: center;" >'
+                + '<input type="hidden" class="input-item-id" value="' + item.itemId + '">'
+                + '<input type="hidden" class="input-produce-id" value="' + item.itemProductId + '">'
+                + '<input type="hidden" class="input-fc-id" value="' + item.itemColorId +'">'
+                + '<input type="hidden" class="input-69code" value="' + item.itemColorBar +'">'
+                + '<input type="" class="input-text input-number input-code" style="width: 100%;border: none;text-align: center;" value="" placeholder="机器编号" name="" id="item-' + item.itemProductId + '-' + item.itemColorId +'" number="'+ (item.itemNum-item.itemReturnNum) +'" "  onkeyup="keyFunString($(this),30)" onpaste="keyFunString($(this),30)" >'
+                + '</td>'
+                + '<td style="text-align: center;" ><a href="javascript:void(0)" onclick="delColor(this)" >删除</a></td>'
+                + '</tr>';
+
     }
     if(allProcMethodIsBack == 1 ){ //需要寄回
         $("#addBackProduct").html(colorHtml);
@@ -1482,12 +1488,14 @@ function addCustomerReady(){
         $("#addBackProduct").find(".input-code").each(function () {
             var machineNo = $(this).val();    //机器编号
             var number = $(this).parents("tr").find(".input-itemNum").eq(0).val();    //数量
+            var itemId = $(this).parents("tr").find(".input-item-id").val();    //数量
             if (number != null && number != "" && number != 0) {
                 var product = new Object();
                 product.colorBar = $(this).parent().find(".input-69code").val();
                 product.sendProdcueNumber = number;
                 product.closedProdcueNumber = number;
                 product.closedProdcueMachineNo = machineNo;
+                product.itemId = itemId;
                 closedProdcues.push(product);
             }
         });