Browse Source

Merge remote-tracking branch 'remotes/origin/developer' into developerC

Aslee 3 years ago
parent
commit
99e788e93a
87 changed files with 4635 additions and 719 deletions
  1. 13 0
      src/main/java/com/caimei/modules/newhome/entity/NewPageFloorImage.java
  2. 0 17
      src/main/java/com/caimei/modules/newhome/web/NewPageFloorController.java
  3. 3 0
      src/main/java/com/caimei/modules/order/dao/CmPayShopDao.java
  4. 12 2
      src/main/java/com/caimei/modules/order/dao/CmRefundShopRecordDao.java
  5. 28 1
      src/main/java/com/caimei/modules/order/entity/ReceiptOrderInfoVo.java
  6. 20 5
      src/main/java/com/caimei/modules/order/service/CmDiscernReceiptService.java
  7. 13 3
      src/main/java/com/caimei/modules/order/service/CmRefundShopService.java
  8. 1 1
      src/main/java/com/caimei/modules/order/service/CmReturnedPurchaseService.java
  9. 17 3
      src/main/java/com/caimei/modules/order/service/NewOrderService.java
  10. 17 0
      src/main/java/com/caimei/modules/order/service/NewShopOrderService.java
  11. 6 0
      src/main/java/com/caimei/modules/order/web/CmShopOrderController.java
  12. 6 0
      src/main/java/com/caimei/modules/permission/web/ReceiptUserPermissionController.java
  13. 18 16
      src/main/java/com/caimei/modules/product/dao/ProductDao.java
  14. 5 0
      src/main/java/com/caimei/modules/product/dao/ProductNewDao.java
  15. 27 0
      src/main/java/com/caimei/modules/product/entity/Product.java
  16. 76 0
      src/main/java/com/caimei/modules/product/entity/ProductStatusRecord.java
  17. 27 0
      src/main/java/com/caimei/modules/product/service/ProductNewService.java
  18. 4 4
      src/main/java/com/caimei/modules/product/service/ProductService.java
  19. 20 6
      src/main/java/com/caimei/modules/product/web/ProductNewController.java
  20. 23 0
      src/main/java/com/caimei/modules/user/dao/ClubTemporaryDao.java
  21. 2 0
      src/main/java/com/caimei/modules/user/dao/CmSpDao.java
  22. 4 0
      src/main/java/com/caimei/modules/user/dao/CmUserBalanceRecordDao.java
  23. 1 1
      src/main/java/com/caimei/modules/user/dao/CmUserBalanceWithdrawalsDao.java
  24. 5 0
      src/main/java/com/caimei/modules/user/dao/CmUserDao.java
  25. 3 0
      src/main/java/com/caimei/modules/user/dao/NewCmClubDao.java
  26. 85 0
      src/main/java/com/caimei/modules/user/entity/ClubConfirmRecord.java
  27. 291 0
      src/main/java/com/caimei/modules/user/entity/ClubTemporary.java
  28. 18 0
      src/main/java/com/caimei/modules/user/entity/CmUser.java
  29. 210 105
      src/main/java/com/caimei/modules/user/entity/CmUserBalanceWithdrawals.java
  30. 236 0
      src/main/java/com/caimei/modules/user/service/ClubTemporaryService.java
  31. 56 49
      src/main/java/com/caimei/modules/user/service/CmUserBalanceRecordService.java
  32. 150 36
      src/main/java/com/caimei/modules/user/service/CmUserBalanceWithdrawalsService.java
  33. 119 0
      src/main/java/com/caimei/modules/user/web/ClubTemporaryController.java
  34. 4 4
      src/main/java/com/caimei/modules/user/web/CmUserBalanceRecordController.java
  35. 142 91
      src/main/java/com/caimei/modules/user/web/CmUserBalanceWithdrawalsController.java
  36. 5 1
      src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java
  37. 20 17
      src/main/resources/mappings/modules/cmpage/CmPageCentreMapper.xml
  38. 18 16
      src/main/resources/mappings/modules/newhome/NewPageFloorMapper.xml
  39. 2 0
      src/main/resources/mappings/modules/order/CmDiscernReceiptMapper.xml
  40. 20 0
      src/main/resources/mappings/modules/order/CmPayShopMapper.xml
  41. 15 0
      src/main/resources/mappings/modules/order/CmRefundShopRecordMapper.xml
  42. 1 0
      src/main/resources/mappings/modules/order/OrderMapper.xml
  43. 22 7
      src/main/resources/mappings/modules/product/ProductMapper.xml
  44. 37 0
      src/main/resources/mappings/modules/product/ProductNewMapper.xml
  45. 234 0
      src/main/resources/mappings/modules/user/ClubTemporaryMapper.xml
  46. 8 0
      src/main/resources/mappings/modules/user/CmSpMapper.xml
  47. 8 0
      src/main/resources/mappings/modules/user/CmUserBalanceRecordMapper.xml
  48. 44 36
      src/main/resources/mappings/modules/user/CmUserBalanceWithdrawalsMapper.xml
  49. 22 0
      src/main/resources/mappings/modules/user/CmUserMapper.xml
  50. 4 0
      src/main/resources/mappings/modules/user/NewCmClubMapper.xml
  51. 1 0
      src/main/webapp/WEB-INF/views/modules/newhome/addProductImage.jsp
  52. 7 0
      src/main/webapp/WEB-INF/views/modules/newhome/newPageFloorContentForm.jsp
  53. 10 4
      src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptForm.jsp
  54. 5 3
      src/main/webapp/WEB-INF/views/modules/order/cmPayFormList.jsp
  55. 7 6
      src/main/webapp/WEB-INF/views/modules/order/cmRefundRecordList.jsp
  56. 1 1
      src/main/webapp/WEB-INF/views/modules/order/cmRefundShopDetail.jsp
  57. 23 19
      src/main/webapp/WEB-INF/views/modules/order/cmRefundShopForm.jsp
  58. 1 1
      src/main/webapp/WEB-INF/views/modules/order/differencePriceForm.jsp
  59. 34 2
      src/main/webapp/WEB-INF/views/modules/order/payedAndRefundRecordList.jsp
  60. 34 2
      src/main/webapp/WEB-INF/views/modules/order/refundRecord.jsp
  61. 1 1
      src/main/webapp/WEB-INF/views/modules/order/shopOtherFeeForm.jsp
  62. 1 1
      src/main/webapp/WEB-INF/views/modules/permission/rebateManagePermissionForm.jsp
  63. 1 0
      src/main/webapp/WEB-INF/views/modules/permission/rebateManagePermissionList.jsp
  64. 1 0
      src/main/webapp/WEB-INF/views/modules/permission/receiptConfirmPermissionList.jsp
  65. 2 2
      src/main/webapp/WEB-INF/views/modules/permission/receiptNoticePermissionForm.jsp
  66. 1 0
      src/main/webapp/WEB-INF/views/modules/permission/receiptNoticePermissionList.jsp
  67. 1 0
      src/main/webapp/WEB-INF/views/modules/permission/receiptReviewPermissionList.jsp
  68. 75 0
      src/main/webapp/WEB-INF/views/modules/permission/shopRefundPermissionForm.jsp
  69. 95 0
      src/main/webapp/WEB-INF/views/modules/permission/shopRefundPermissionList.jsp
  70. 39 1
      src/main/webapp/WEB-INF/views/modules/product-new/productEdit.jsp
  71. 129 69
      src/main/webapp/WEB-INF/views/modules/product-new/productList.jsp
  72. 186 134
      src/main/webapp/WEB-INF/views/modules/product-new/recommend.jsp
  73. 140 0
      src/main/webapp/WEB-INF/views/modules/product-new/statusRemarksList.jsp
  74. 111 0
      src/main/webapp/WEB-INF/views/modules/user/clubConfirmRecordList.jsp
  75. 541 0
      src/main/webapp/WEB-INF/views/modules/user/clubTemporaryForm.jsp
  76. 106 0
      src/main/webapp/WEB-INF/views/modules/user/clubTemporaryList.jsp
  77. 9 3
      src/main/webapp/WEB-INF/views/modules/user/cmUserBalanceList.jsp
  78. 2 1
      src/main/webapp/WEB-INF/views/modules/user/cmUserBalanceRecordList.jsp
  79. 7 19
      src/main/webapp/WEB-INF/views/modules/user/cmUserBalanceWithdrawalsForm.jsp
  80. 122 0
      src/main/webapp/WEB-INF/views/modules/user/cmUserBalanceWithdrawalsList.jsp
  81. 272 0
      src/main/webapp/WEB-INF/views/modules/user/registerPage.jsp
  82. 2 2
      src/main/webapp/WEB-INF/views/modules/user/toCmWithdrawalsForm.jsp
  83. 156 0
      src/main/webapp/WEB-INF/views/modules/user/userBalanceWithdrawalsDetails.jsp
  84. 144 0
      src/main/webapp/WEB-INF/views/modules/user/userBalanceWithdrawalsEdit.jsp
  85. 235 0
      src/main/webapp/WEB-INF/views/modules/user/userBalanceWithdrawalsReview.jsp
  86. 0 25
      src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyForm.jsp
  87. 11 2
      src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyList.jsp

+ 13 - 0
src/main/java/com/caimei/modules/newhome/entity/NewPageFloorImage.java

@@ -81,6 +81,11 @@ public class NewPageFloorImage implements Serializable {
      */
      */
     private String createDate;
     private String createDate;
 
 
+    /**
+     * 商品状态,见表c_productstatus或枚举ProductStatus,0逻辑删除 1待审核 2已上架 3已下架 8审核未通过 9已隐身 10已冻结
+     */
+    private String validFlag;
+
     public Integer getId() {
     public Integer getId() {
         return id;
         return id;
     }
     }
@@ -200,4 +205,12 @@ public class NewPageFloorImage implements Serializable {
     public void setAppletsImage(String appletsImage) {
     public void setAppletsImage(String appletsImage) {
         this.appletsImage = appletsImage;
         this.appletsImage = appletsImage;
     }
     }
+
+    public String getValidFlag() {
+        return validFlag;
+    }
+
+    public void setValidFlag(String validFlag) {
+        this.validFlag = validFlag;
+    }
 }
 }

+ 0 - 17
src/main/java/com/caimei/modules/newhome/web/NewPageFloorController.java

@@ -140,23 +140,6 @@ public class NewPageFloorController extends BaseController {
     public String goContentPage(NewPageFloorContent floorContent, Model model) {
     public String goContentPage(NewPageFloorContent floorContent, Model model) {
         floorContent = newPageFloorService.findFloorContent(floorContent.getFloorId());
         floorContent = newPageFloorService.findFloorContent(floorContent.getFloorId());
         model.addAttribute("floorContent", floorContent);
         model.addAttribute("floorContent", floorContent);
-        /*String returnUrl = "";
-        if (newPageFloor.getId() != null && newPageFloor.getId() != "") {
-            if (newPageFloor.getId().equals("1")) {
-                returnUrl = "/newhome/newActivity/?repage";
-            } else if (newPageFloor.getId().equals("2")) {
-                returnUrl = "/newhome/newActivity/groupList?repage";
-            } else if (newPageFloor.getId().equals("3")) {
-                returnUrl = "/newhome/newPageQualitySupplier/?repage";
-            } else if (newPageFloor.getId().equals("4")) {
-                returnUrl = "/newhome/newPageCommodityTopic/?repage";
-            } else if (newPageFloor.getId().equals("5")) {
-                returnUrl = "/newhome/newPageSmallTopic/?repage";
-            } else if (newPageFloor.getId().equals("6")) {
-                returnUrl = "/cmpage/cmPageBigTopic/?repage";
-            }
-        }
-        return "redirect:" + Global.getAdminPath() + returnUrl;*/
         return "modules/newhome/newPageFloorContentForm";
         return "modules/newhome/newPageFloorContentForm";
     }
     }
 
 

+ 3 - 0
src/main/java/com/caimei/modules/order/dao/CmPayShopDao.java

@@ -1,5 +1,6 @@
 package com.caimei.modules.order.dao;
 package com.caimei.modules.order.dao;
 
 
+import com.caimei.modules.order.entity.CmDiscernReceipt;
 import com.caimei.modules.order.entity.CmPayShop;
 import com.caimei.modules.order.entity.CmPayShop;
 import com.caimei.modules.order.entity.NewShopOrder;
 import com.caimei.modules.order.entity.NewShopOrder;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
@@ -27,4 +28,6 @@ public interface CmPayShopDao extends CrudDao<CmPayShop> {
     CmPayShop getPayShopByShopOrderId(@Param("shopOrderID") String shopOrderID);
     CmPayShop getPayShopByShopOrderId(@Param("shopOrderID") String shopOrderID);
 
 
     List<Integer> getShopOrderIdsList(@Param("payShopID") String payShopID);
     List<Integer> getShopOrderIdsList(@Param("payShopID") String payShopID);
+
+    List<CmDiscernReceipt> getDiscernReceipts(Integer shopOrderId);
 }
 }

+ 12 - 2
src/main/java/com/caimei/modules/order/dao/CmRefundShopRecordDao.java

@@ -1,15 +1,17 @@
 package com.caimei.modules.order.dao;
 package com.caimei.modules.order.dao;
 
 
 import com.caimei.modules.order.entity.CmPayShopRecord;
 import com.caimei.modules.order.entity.CmPayShopRecord;
+import com.caimei.modules.order.entity.CmRefundShopRecord;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
-import com.caimei.modules.order.entity.CmRefundShopRecord;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 
 
+import java.math.BigDecimal;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
  * 退款记录表DAO接口
  * 退款记录表DAO接口
+ *
  * @author lwt
  * @author lwt
  * @version 2019-07-01
  * @version 2019-07-01
  */
  */
@@ -18,7 +20,7 @@ public interface CmRefundShopRecordDao extends CrudDao<CmRefundShopRecord> {
 
 
     List<String> findByRefundShopID(@Param("refundShopID") String refundShopID);
     List<String> findByRefundShopID(@Param("refundShopID") String refundShopID);
 
 
-    List<CmRefundShopRecord> getRefundedRecords(@Param("shopOrderID")  String shopOrderID);
+    List<CmRefundShopRecord> getRefundedRecords(@Param("shopOrderID") String shopOrderID);
 
 
     List<CmRefundShopRecord> getByRefundShopID(@Param("refundShopID") String id);
     List<CmRefundShopRecord> getByRefundShopID(@Param("refundShopID") String id);
 
 
@@ -29,4 +31,12 @@ public interface CmRefundShopRecordDao extends CrudDao<CmRefundShopRecord> {
     void updateByDelFlag(Integer refundShopId);
     void updateByDelFlag(Integer refundShopId);
 
 
     Integer findByPaymentType(Integer shopOrderID);
     Integer findByPaymentType(Integer shopOrderID);
+
+    /**
+     * 查询收款供应商退款金额
+     *
+     * @param shopOrderId
+     * @return
+     */
+    BigDecimal findShopRefund(Integer shopOrderId);
 }
 }

+ 28 - 1
src/main/java/com/caimei/modules/order/entity/ReceiptOrderInfoVo.java

@@ -16,7 +16,7 @@ public class ReceiptOrderInfoVo {
     private String receiptStatus;//(收款买家)收款状态:1待收款、2部分收款、3已收款
     private String receiptStatus;//(收款买家)收款状态:1待收款、2部分收款、3已收款
     private String orderType;//订单类型 协销订单 0 普通订单 1
     private String orderType;//订单类型 协销订单 0 普通订单 1
     private String orderTime;//下单时间
     private String orderTime;//下单时间
-    private String relationType;		// 关系类型:1返佣订单(返佣款)、2非返佣订单(订单款或者非订单款)
+    private String relationType;        // 关系类型:1返佣订单(返佣款)、2非返佣订单(订单款或者非订单款)
     private Integer userID;     //订单用户id
     private Integer userID;     //订单用户id
 
 
     //----------------返佣款项   是根据子订单再去关联的主订单
     //----------------返佣款项   是根据子订单再去关联的主订单
@@ -27,6 +27,9 @@ public class ReceiptOrderInfoVo {
     private List<ReceiptRecordVo> receiptRecordVo;
     private List<ReceiptRecordVo> receiptRecordVo;
     private double payableAmount;
     private double payableAmount;
     private boolean receiptOrderFlag;// 判断订单中抹平的订单是否是和多个订单一起支付的,
     private boolean receiptOrderFlag;// 判断订单中抹平的订单是否是和多个订单一起支付的,
+    private Double shouldPayShopAmount;     //应付金额
+    private Double payedShopAmount;     //已付供应商金额
+    private Double refundsAmount;       //已退款供应商金额
 
 
 
 
     public String getOrganizeID() {
     public String getOrganizeID() {
@@ -172,4 +175,28 @@ public class ReceiptOrderInfoVo {
     public void setUserID(Integer userID) {
     public void setUserID(Integer userID) {
         this.userID = userID;
         this.userID = userID;
     }
     }
+
+    public Double getShouldPayShopAmount() {
+        return shouldPayShopAmount;
+    }
+
+    public void setShouldPayShopAmount(Double shouldPayShopAmount) {
+        this.shouldPayShopAmount = shouldPayShopAmount;
+    }
+
+    public Double getPayedShopAmount() {
+        return payedShopAmount;
+    }
+
+    public void setPayedShopAmount(Double payedShopAmount) {
+        this.payedShopAmount = payedShopAmount;
+    }
+
+    public Double getRefundsAmount() {
+        return refundsAmount;
+    }
+
+    public void setRefundsAmount(Double refundsAmount) {
+        this.refundsAmount = refundsAmount;
+    }
 }
 }

+ 20 - 5
src/main/java/com/caimei/modules/order/service/CmDiscernReceiptService.java

@@ -1,13 +1,11 @@
 package com.caimei.modules.order.service;
 package com.caimei.modules.order.service;
 
 
 import com.caimei.modules.hehe.dao.HeHeNewOrderDao;
 import com.caimei.modules.hehe.dao.HeHeNewOrderDao;
-import com.caimei.modules.order.dao.CmDiscernReceiptDao;
-import com.caimei.modules.order.dao.CmRebateRecordDao;
-import com.caimei.modules.order.dao.NewOrderDao;
-import com.caimei.modules.order.dao.NewShopOrderDao;
+import com.caimei.modules.order.dao.*;
 import com.caimei.modules.order.entity.*;
 import com.caimei.modules.order.entity.*;
 import com.caimei.modules.user.dao.NewCmShopDao;
 import com.caimei.modules.user.dao.NewCmShopDao;
 import com.caimei.modules.user.entity.NewCmShop;
 import com.caimei.modules.user.entity.NewCmShop;
+import com.caimei.utils.MathUtil;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.utils.DateUtils;
 import com.thinkgem.jeesite.common.utils.DateUtils;
@@ -19,6 +17,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.Date;
 import java.util.List;
 import java.util.List;
@@ -48,6 +47,8 @@ public class CmDiscernReceiptService extends CrudService<CmDiscernReceiptDao, Cm
     private NewShopOrderDao newShopOrderDao;
     private NewShopOrderDao newShopOrderDao;
     @Resource
     @Resource
     private HeHeNewOrderDao heHeNewOrderDao;
     private HeHeNewOrderDao heHeNewOrderDao;
+    @Resource
+    private CmRefundShopRecordDao cmRefundShopRecordDao;
 
 
     public CmDiscernReceipt get(String id) {
     public CmDiscernReceipt get(String id) {
         return super.get(id);
         return super.get(id);
@@ -63,7 +64,7 @@ public class CmDiscernReceiptService extends CrudService<CmDiscernReceiptDao, Cm
             logger.info("-----------------:::::" + bean.getId());
             logger.info("-----------------:::::" + bean.getId());
             String type = "";
             String type = "";
             String no = "";
             String no = "";
-            if ("1".equals(bean.getReceiptType()) || "3".equals(bean.getReceiptType())) {
+            if ("1".equals(bean.getReceiptType()) || "3".equals(bean.getReceiptType()) || "5".equals(bean.getReceiptType())) {
                 List<Map<String, Object>> orderIDs = cmDiscernReceiptDao.getOrderIDStr(bean.getId());
                 List<Map<String, Object>> orderIDs = cmDiscernReceiptDao.getOrderIDStr(bean.getId());
                 for (Map<String, Object> map : orderIDs) {
                 for (Map<String, Object> map : orderIDs) {
                     if ("".equals(type)) {
                     if ("".equals(type)) {
@@ -121,6 +122,20 @@ public class CmDiscernReceiptService extends CrudService<CmDiscernReceiptDao, Cm
             if ("1".equals(relation.getRelationType())) { // relation.orderID 指的是子订单id
             if ("1".equals(relation.getRelationType())) { // relation.orderID 指的是子订单id
                 roi = cmDiscernReceiptDao.getOrderInfoByShopOrderID(relation.getOrderID());
                 roi = cmDiscernReceiptDao.getOrderInfoByShopOrderID(relation.getOrderID());
                 roi.setRelationType("1");
                 roi.setRelationType("1");
+                if ("5".equals(vo.getReceiptType())) {
+                    //供应商退款,已退金额
+                    List<CmRefundShopRecord> records = cmRefundShopRecordDao.getRefundedRecords(roi.getShopOrderID());
+                    if (records != null && records.size() > 0) {
+                        Double collect = records.stream().mapToDouble(CmRefundShopRecord::getRefundAmount).sum();
+                        roi.setRefundsAmount(collect);
+                    } else {
+                        roi.setRefundsAmount(0d);
+                    }
+                    //查询收款供应商退款金额
+                    BigDecimal shopRefundAmount = cmRefundShopRecordDao.findShopRefund(Integer.valueOf(roi.getShopOrderID()));
+                    BigDecimal refundsAmount = MathUtil.add(roi.getRefundsAmount(), shopRefundAmount);
+                    roi.setRefundsAmount(refundsAmount.doubleValue());
+                }
             }
             }
             if ("2".equals(relation.getRelationType())) { // relation.orderID 指的是主订单id
             if ("2".equals(relation.getRelationType())) { // relation.orderID 指的是主订单id
                 roi = cmDiscernReceiptDao.getOrderInfoByOrderID(relation.getOrderID());
                 roi = cmDiscernReceiptDao.getOrderInfoByOrderID(relation.getOrderID());

+ 13 - 3
src/main/java/com/caimei/modules/order/service/CmRefundShopService.java

@@ -131,7 +131,11 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
                 } else {
                 } else {
                     so.setRefundsAmount(0d);
                     so.setRefundsAmount(0d);
                 }
                 }
-                BigDecimal payAmount = MathUtil.sub(so.getPayedShopAmount(), MathUtil.add(so.getRefundsAmount(), so.getShouldPayShopAmount()));
+                //查询收款供应商退款金额
+                BigDecimal shopRefundAmount = cmRefundShopRecordDao.findShopRefund(so.getShopOrderID());
+                BigDecimal refundsAmount = MathUtil.add(so.getRefundsAmount(), shopRefundAmount);
+                so.setRefundsAmount(refundsAmount.doubleValue());
+                BigDecimal payAmount = MathUtil.sub(so.getPayedShopAmount(), refundsAmount);
                 refundAmount = MathUtil.add(refundAmount, payAmount).doubleValue();
                 refundAmount = MathUtil.add(refundAmount, payAmount).doubleValue();
                 List<NewOrderProduct> orderProductList = newOrderProductDao.findByShopOrderID(so.getShopOrderID());
                 List<NewOrderProduct> orderProductList = newOrderProductDao.findByShopOrderID(so.getShopOrderID());
                 /*
                 /*
@@ -219,7 +223,7 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
     }
     }
 
 
     @Transactional(readOnly = false)
     @Transactional(readOnly = false)
-    public void refund(CmRefundShop cmRefundShop, String[] refundInfo) {
+    public void refund(CmRefundShop cmRefundShop, String[] refundInfo) throws Exception {
         //保存退款记录   里面还有一些参数是从页面上已经传过来 封装好了的
         //保存退款记录   里面还有一些参数是从页面上已经传过来 封装好了的
         String time = DateUtils.formatDateTime(new Date());
         String time = DateUtils.formatDateTime(new Date());
         User currentUser = UserUtils.getUser();
         User currentUser = UserUtils.getUser();
@@ -254,8 +258,14 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
             } else {
             } else {
                 shopOrder.setRefundsAmount(0d);
                 shopOrder.setRefundsAmount(0d);
             }
             }
+            //查询收款供应商退款金额
+            BigDecimal shopRefundAmount = cmRefundShopRecordDao.findShopRefund(shopOrder.getShopOrderID());
+            BigDecimal refundsAmount = MathUtil.add(shopOrder.getRefundsAmount(), shopRefundAmount);
             // 已付 - (已退+本次退款)
             // 已付 - (已退+本次退款)
-            BigDecimal tempFee = MathUtil.sub(shopOrder.getPayedShopAmount(), MathUtil.add(shopOrder.getRefundsAmount(), refundAmount));
+            BigDecimal tempFee = MathUtil.sub(shopOrder.getPayedShopAmount(), MathUtil.add(refundsAmount, refundAmount));
+            if (MathUtil.compare(tempFee, 0) < 0) {
+                throw new Exception("退款金额异常");
+            }
             // 已付 - 已退 >= 应付
             // 已付 - 已退 >= 应付
             if (MathUtil.compare(tempFee, shopOrder.getShouldPayShopAmount()) >= 0) {
             if (MathUtil.compare(tempFee, shopOrder.getShouldPayShopAmount()) >= 0) {
                 shopOrder.setPaying("0"); //退出付款进行状态
                 shopOrder.setPaying("0"); //退出付款进行状态

+ 1 - 1
src/main/java/com/caimei/modules/order/service/CmReturnedPurchaseService.java

@@ -620,7 +620,7 @@ public class CmReturnedPurchaseService extends CrudService<CmReturnedPurchaseDao
             }
             }
             //退款短信推送
             //退款短信推送
             try {
             try {
-                if (user != null && StringUtils.isNotBlank(user.getBindMobile())) {
+                if (user != null && StringUtils.isNotBlank(user.getBindMobile()) && "0".equals(newOrder.getRebateFlag())) {
                     String wwwServer = Global.getConfig("wwwServer");
                     String wwwServer = Global.getConfig("wwwServer");
                     boolean sendSms = false;
                     boolean sendSms = false;
                     if ("1".equals(newOrder.getRefundType())) {
                     if ("1".equals(newOrder.getRefundType())) {

+ 17 - 3
src/main/java/com/caimei/modules/order/service/NewOrderService.java

@@ -649,7 +649,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
 
 
             //下单短信推送
             //下单短信推送
             try {
             try {
-                if (flag) {
+                if (flag && "0".equals(newOrder.getRebateFlag())) {
                     CmUser user = cmUserDao.get(newOrder.getUserID().toString());
                     CmUser user = cmUserDao.get(newOrder.getUserID().toString());
                     if (user != null && StringUtils.isNotBlank(user.getBindMobile())) {
                     if (user != null && StringUtils.isNotBlank(user.getBindMobile())) {
                         String wwwServer = Global.getConfig("wwwServer");
                         String wwwServer = Global.getConfig("wwwServer");
@@ -1249,7 +1249,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
         }
         }
         //取消订单短信推送
         //取消订单短信推送
         try {
         try {
-            if (user != null && StringUtils.isNotBlank(user.getBindMobile())) {
+            if (user != null && StringUtils.isNotBlank(user.getBindMobile()) && "0".equals(order.getRebateFlag())) {
                 String wwwServer = Global.getConfig("wwwServer");
                 String wwwServer = Global.getConfig("wwwServer");
                 String shortLink = getShortLink(8, 11, wwwServer + "user/order/detail.html?orderId=" + orderID);
                 String shortLink = getShortLink(8, 11, wwwServer + "user/order/detail.html?orderId=" + orderID);
                 String content = "您已成功取消订单(订单编号:" + order.getOrderNo() + "),订单金额¥" + order.getPayTotalFee() + "。您可关注采美公众号或者访问采美微信小程序和网站查看订单。" +
                 String content = "您已成功取消订单(订单编号:" + order.getOrderNo() + "),订单金额¥" + order.getPayTotalFee() + "。您可关注采美公众号或者访问采美微信小程序和网站查看订单。" +
@@ -1262,6 +1262,20 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
         } catch (Exception e) {
         } catch (Exception e) {
             e.printStackTrace();
             e.printStackTrace();
         }
         }
+        //客服确认注册机构,一天内取消有效
+        if (user != null && "94".equals(user.getClubStatus())) {
+            Integer userId = user.getUserID();
+            Date confirmTime = cmUserDao.findByConfirmTime(userId);
+            if (confirmTime != null) {
+                Calendar calendar = Calendar.getInstance();
+                calendar.setTime(confirmTime);
+                calendar.add(Calendar.DATE, 1);
+                if (calendar.getTime().compareTo(new Date()) > 0) {
+                    cmUserDao.updateByClubStatus(93, userId);
+                    newCmClubDao.updateByStatus(93, userId);
+                }
+            }
+        }
     }
     }
 
 
     /**
     /**
@@ -1425,7 +1439,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
         try {
         try {
             //发货短信推送
             //发货短信推送
             CmUser user = cmUserDao.get(order.getUserID().toString());
             CmUser user = cmUserDao.get(order.getUserID().toString());
-            if (user != null && StringUtils.isNotBlank(user.getBindMobile())) {
+            if (user != null && StringUtils.isNotBlank(user.getBindMobile()) && "0".equals(order.getRebateFlag())) {
                 String wwwServer = Global.getConfig("wwwServer");
                 String wwwServer = Global.getConfig("wwwServer");
                 boolean sendSms = false;
                 boolean sendSms = false;
                 if ("2".equals(order.getSendOutStatus()) && "1".equals(sendOutStatus)) {
                 if ("2".equals(order.getSendOutStatus()) && "1".equals(sendOutStatus)) {

+ 17 - 0
src/main/java/com/caimei/modules/order/service/NewShopOrderService.java

@@ -10,6 +10,7 @@ import com.caimei.modules.order.utils.ProductType;
 import com.caimei.modules.product.dao.CmPromotionDao;
 import com.caimei.modules.product.dao.CmPromotionDao;
 import com.caimei.modules.product.dao.ProductDao;
 import com.caimei.modules.product.dao.ProductDao;
 import com.caimei.modules.product.entity.CmPromotion;
 import com.caimei.modules.product.entity.CmPromotion;
+import com.caimei.utils.MathUtil;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.common.utils.StringUtils;
@@ -332,6 +333,18 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
             if (id != null && id > 0) {
             if (id != null && id > 0) {
                 so.setPayShopOtherFee(false);
                 so.setPayShopOtherFee(false);
             }
             }
+            //已退金额
+            List<CmRefundShopRecord> records = cmRefundShopRecordDao.getRefundedRecords(String.valueOf(so.getShopOrderID()));
+            if (records != null && records.size() > 0) {
+                Double collect = records.stream().mapToDouble(CmRefundShopRecord::getRefundAmount).sum();
+                so.setRefundsAmount(collect);
+            } else {
+                so.setRefundsAmount(0d);
+            }
+            //查询收款供应商退款金额
+            BigDecimal shopRefundAmount = cmRefundShopRecordDao.findShopRefund(so.getShopOrderID());
+            BigDecimal refundsAmount = MathUtil.add(so.getRefundsAmount(), shopRefundAmount);
+            so.setRefundsAmount(refundsAmount.doubleValue());
         }
         }
         return page;
         return page;
     }
     }
@@ -628,4 +641,8 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
         }
         }
         return differenceList;
         return differenceList;
     }
     }
+
+    public List<CmDiscernReceipt> getDiscernReceipts(Integer shopOrderId) {
+        return cmPayShopDao.getDiscernReceipts(shopOrderId);
+    }
 }
 }

+ 6 - 0
src/main/java/com/caimei/modules/order/web/CmShopOrderController.java

@@ -166,10 +166,12 @@ public class CmShopOrderController extends BaseController {
     public String payedAndRefundRecordList(String shopOrderID, HttpServletRequest request, HttpServletResponse response, Model model, Integer operatingMode) {
     public String payedAndRefundRecordList(String shopOrderID, HttpServletRequest request, HttpServletResponse response, Model model, Integer operatingMode) {
         List<CmPayShopRecord> pr = newShopOrderService.getPayedRecords(shopOrderID);
         List<CmPayShopRecord> pr = newShopOrderService.getPayedRecords(shopOrderID);
         List<CmRefundShopRecord> rr = newShopOrderService.getRefundedRecords(shopOrderID);
         List<CmRefundShopRecord> rr = newShopOrderService.getRefundedRecords(shopOrderID);
+        List<CmDiscernReceipt> receipt = newShopOrderService.getDiscernReceipts(Integer.valueOf(shopOrderID));
         NewShopOrder shopOrder = newShopOrderService.getShopOrderInfo(shopOrderID);
         NewShopOrder shopOrder = newShopOrderService.getShopOrderInfo(shopOrderID);
         model.addAttribute("pr", pr);
         model.addAttribute("pr", pr);
         model.addAttribute("rr", rr);
         model.addAttribute("rr", rr);
         model.addAttribute("s", shopOrder);
         model.addAttribute("s", shopOrder);
+        model.addAttribute("receipt", receipt);
         model.addAttribute("operatingMode", operatingMode);
         model.addAttribute("operatingMode", operatingMode);
         return "modules/order/payedAndRefundRecordList";
         return "modules/order/payedAndRefundRecordList";
     }
     }
@@ -203,15 +205,19 @@ public class CmShopOrderController extends BaseController {
         List<Integer> shopOrderIDs = newShopOrderService.findIDsByOrderID(orderID);
         List<Integer> shopOrderIDs = newShopOrderService.findIDsByOrderID(orderID);
         List<CmPayShopRecord> pr = new ArrayList<>();
         List<CmPayShopRecord> pr = new ArrayList<>();
         List<CmRefundShopRecord> rr = new ArrayList<>();
         List<CmRefundShopRecord> rr = new ArrayList<>();
+        List<CmDiscernReceipt> receipts = new ArrayList<>();
         for (Integer shopOrderID : shopOrderIDs) {
         for (Integer shopOrderID : shopOrderIDs) {
             List<CmPayShopRecord> payShopRecordList = newShopOrderService.getPayedRecords(shopOrderID.toString());
             List<CmPayShopRecord> payShopRecordList = newShopOrderService.getPayedRecords(shopOrderID.toString());
             pr.addAll(payShopRecordList);
             pr.addAll(payShopRecordList);
             List<CmRefundShopRecord> refundShopRecordList = newShopOrderService.getRefundedRecords(shopOrderID.toString());
             List<CmRefundShopRecord> refundShopRecordList = newShopOrderService.getRefundedRecords(shopOrderID.toString());
             rr.addAll(refundShopRecordList);
             rr.addAll(refundShopRecordList);
+            List<CmDiscernReceipt> receiptList = newShopOrderService.getDiscernReceipts(shopOrderID);
+            receipts.addAll(receiptList);
         }
         }
         model.addAttribute("pr", pr);
         model.addAttribute("pr", pr);
         model.addAttribute("rr", rr);
         model.addAttribute("rr", rr);
         model.addAttribute("order", order);
         model.addAttribute("order", order);
+        model.addAttribute("receipts", receipts);
         return "modules/order/refundRecord";
         return "modules/order/refundRecord";
     }
     }
 
 

+ 6 - 0
src/main/java/com/caimei/modules/permission/web/ReceiptUserPermissionController.java

@@ -58,6 +58,9 @@ public class ReceiptUserPermissionController extends BaseController {
 			return "modules/permission/receiptReviewPermissionList";
 			return "modules/permission/receiptReviewPermissionList";
 		if ("4".equals(receiptUserPermission.getUserType()))
 		if ("4".equals(receiptUserPermission.getUserType()))
 			return "modules/permission/rebateManagePermissionList";
 			return "modules/permission/rebateManagePermissionList";
+		if ("5".equals(receiptUserPermission.getUserType())){
+			return "modules/permission/shopRefundPermissionList";
+		}
 		return "";
 		return "";
 	}
 	}
 
 
@@ -73,6 +76,9 @@ public class ReceiptUserPermissionController extends BaseController {
 			return "modules/permission/receiptReviewPermissionForm";
 			return "modules/permission/receiptReviewPermissionForm";
 		if ("4".equals(receiptUserPermission.getUserType()))
 		if ("4".equals(receiptUserPermission.getUserType()))
 			return "modules/permission/rebateManagePermissionForm";
 			return "modules/permission/rebateManagePermissionForm";
+		if ("5".equals(receiptUserPermission.getUserType())){
+			return "modules/permission/shopRefundPermissionForm";
+		}
 		return "";
 		return "";
 	}
 	}
 
 

+ 18 - 16
src/main/java/com/caimei/modules/product/dao/ProductDao.java

@@ -3,13 +3,9 @@ package com.caimei.modules.product.dao;
 import com.caimei.modules.brand.entity.BrandAndProductType;
 import com.caimei.modules.brand.entity.BrandAndProductType;
 import com.caimei.modules.product.entity.*;
 import com.caimei.modules.product.entity.*;
 import com.caimei.po.ProductLadderPrice;
 import com.caimei.po.ProductLadderPrice;
-import com.caimei.po.TinyType;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
-import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
-import jdk.nashorn.internal.ir.IdentNode;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
-import org.springframework.transaction.annotation.Transactional;
 
 
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
@@ -20,12 +16,13 @@ public interface ProductDao extends CrudDao<Product> {
     List<ActType> getAllActType();
     List<ActType> getAllActType();
 
 
 
 
-    int saveSort(@Param("sort") String sort ,@Param("id") String id );
+    int saveSort(@Param("sort") String sort, @Param("id") String id);
 
 
     int findLadderPriceByNum(@Param("productID") String productID);
     int findLadderPriceByNum(@Param("productID") String productID);
 
 
     /**
     /**
      * 获取供应商旗下的商品
      * 获取供应商旗下的商品
+     *
      * @param product
      * @param product
      * @return
      * @return
      */
      */
@@ -33,6 +30,7 @@ public interface ProductDao extends CrudDao<Product> {
 
 
     /**
     /**
      * 获取所有已添加存在的小程序商品集合
      * 获取所有已添加存在的小程序商品集合
+     *
      * @return
      * @return
      */
      */
     public List<Integer> getAllExistsProductList(@Param("organizeID") String organizeID);
     public List<Integer> getAllExistsProductList(@Param("organizeID") String organizeID);
@@ -40,14 +38,15 @@ public interface ProductDao extends CrudDao<Product> {
     List<Product> findListBuyMall(Product product);
     List<Product> findListBuyMall(Product product);
 
 
 
 
-    void deleteProduct(@Param("id") String id ,@Param("DateTime") Long DateTime );
+    void deleteProduct(@Param("id") String id, @Param("DateTime") Long DateTime);
 
 
-    public  List<Product> getrecommendProductList(Product product);
+    public List<Product> getrecommendProductList(Product product);
 
 
-    int insertAddProduct(@Param("productID") Integer productID,@Param("tinyTypeID") Integer tinyTypeID);
+    int insertAddProduct(@Param("productID") Integer productID, @Param("tinyTypeID") Integer tinyTypeID);
 
 
     /**
     /**
      * 获取商品购买信息
      * 获取商品购买信息
+     *
      * @param giftProduct
      * @param giftProduct
      * @return
      * @return
      */
      */
@@ -55,19 +54,22 @@ public interface ProductDao extends CrudDao<Product> {
 
 
     /**
     /**
      * 后去商品购买库存
      * 后去商品购买库存
+     *
      * @param productId
      * @param productId
      * @return
      * @return
      */
      */
-    public Sku getProductSku(@Param("productId")Integer productId);
+    public Sku getProductSku(@Param("productId") Integer productId);
 
 
     /**
     /**
      * 更新赠送
      * 更新赠送
+     *
      * @return
      * @return
      */
      */
     public int updateGiftProudct(GiftProduct giftProduct);
     public int updateGiftProudct(GiftProduct giftProduct);
 
 
     /**
     /**
      * 删除赠送
      * 删除赠送
+     *
      * @return
      * @return
      */
      */
     public int insertGiftProudct(GiftProduct giftProduct);
     public int insertGiftProudct(GiftProduct giftProduct);
@@ -83,7 +85,7 @@ public interface ProductDao extends CrudDao<Product> {
 
 
     List<ProductBigType> getBigTypeList(@Param("bigTypeID") Integer bigTypeID);
     List<ProductBigType> getBigTypeList(@Param("bigTypeID") Integer bigTypeID);
 
 
-    List<ProductSmallType> getSmallTypeList(@Param("bigTypeID")Integer bigTypeID, @Param("smallTypeID") Integer smallTypeID);
+    List<ProductSmallType> getSmallTypeList(@Param("bigTypeID") Integer bigTypeID, @Param("smallTypeID") Integer smallTypeID);
 
 
     List<ProducTinyType> getTinyTypeList(@Param("smallTypeID") Integer smallTypeID, @Param("tinyTypeID") Integer tinyTypeID);
     List<ProducTinyType> getTinyTypeList(@Param("smallTypeID") Integer smallTypeID, @Param("tinyTypeID") Integer tinyTypeID);
 
 
@@ -119,9 +121,9 @@ public interface ProductDao extends CrudDao<Product> {
 
 
     void updateTinyType(Product product);
     void updateTinyType(Product product);
 
 
-    void  updateProductByBrandId(@Param("brandId") Integer brandId);
+    void updateProductByBrandId(@Param("brandId") Integer brandId);
 
 
-    List<BrandAndProductType> getProductByTypeName(@Param("name")String name,@Param("name1")String name1,@Param("name2")String name2);
+    List<BrandAndProductType> getProductByTypeName(@Param("name") String name, @Param("name1") String name1, @Param("name2") String name2);
 
 
     List<Product> findRecommendPage(Product product);
     List<Product> findRecommendPage(Product product);
 
 
@@ -131,9 +133,9 @@ public interface ProductDao extends CrudDao<Product> {
 
 
     List<CmProductRecommend> findProductRecommendList(@Param("productID") Integer productID);
     List<CmProductRecommend> findProductRecommendList(@Param("productID") Integer productID);
 
 
-    List<CmProductRecommend> findProductList(@Param("bigTypeID")Integer bigTypeID, @Param("smallTypeID")Integer smallTypeID,
-                                             @Param("tinyTypeID")Integer tinyTypeID,
-                                             @Param("productName")String productName, @Param("shopName")String shopName);
+    List<CmProductRecommend> findProductList(@Param("commodityType") Integer commodityType, @Param("bigTypeID") Integer bigTypeID,
+                                             @Param("smallTypeID") Integer smallTypeID, @Param("tinyTypeID") Integer tinyTypeID,
+                                             @Param("productName") String productName, @Param("shopName") String shopName);
 
 
     void updateRecommendType(@Param("productID") String productID, @Param("recommendType") String recommendType);
     void updateRecommendType(@Param("productID") String productID, @Param("recommendType") String recommendType);
 
 
@@ -143,7 +145,7 @@ public interface ProductDao extends CrudDao<Product> {
 
 
     CmSecondHandRecommendVo getSecondHandRecommend(@Param("productID") String productID);
     CmSecondHandRecommendVo getSecondHandRecommend(@Param("productID") String productID);
 
 
-    List<CmSecondHandRecommendVo> querySecondHandRecommend(@Param("productID")String queryProductID, @Param("productName")String queryProductName,@Param("queryProductType")String queryProductType);
+    List<CmSecondHandRecommendVo> querySecondHandRecommend(@Param("productID") String queryProductID, @Param("productName") String queryProductName, @Param("queryProductType") String queryProductType);
 
 
     ProductDetailInfo queryProductDetailInfo(@Param("productID") Integer productID);
     ProductDetailInfo queryProductDetailInfo(@Param("productID") Integer productID);
 
 

+ 5 - 0
src/main/java/com/caimei/modules/product/dao/ProductNewDao.java

@@ -2,6 +2,7 @@ package com.caimei.modules.product.dao;
 
 
 import com.caimei.modules.product.entity.Product;
 import com.caimei.modules.product.entity.Product;
 import com.caimei.modules.product.entity.ProductParameters;
 import com.caimei.modules.product.entity.ProductParameters;
+import com.caimei.modules.product.entity.ProductStatusRecord;
 import com.caimei.po.ProductImage;
 import com.caimei.po.ProductImage;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
@@ -51,4 +52,8 @@ public interface ProductNewDao extends CrudDao<Product> {
     String getValidFlagByProductId(Integer productID);
     String getValidFlagByProductId(Integer productID);
 
 
     String getBeforeValidFlagByProductId(Integer productID);
     String getBeforeValidFlagByProductId(Integer productID);
+
+    void insertStatusRecord(ProductStatusRecord statusRecord);
+
+    List<ProductStatusRecord> findAllStatusRemarks(Integer productId);
 }
 }

+ 27 - 0
src/main/java/com/caimei/modules/product/entity/Product.java

@@ -179,6 +179,9 @@ public class Product extends DataEntity<Product> {
     private String commodityType;//商品属性:1产品,2仪器
     private String commodityType;//商品属性:1产品,2仪器
     private Integer organizeId; //组织Id
     private Integer organizeId; //组织Id
     private String productIdStr;//商品Id字符串格式
     private String productIdStr;//商品Id字符串格式
+    private Integer trainingMethod; //仪器培训方式:1线上培训,2线下培训
+    private Integer trainingType; //售价是否包含:1售价未包含,2售价已包含
+    private BigDecimal trainingFee; //培训费用(售价未包含)
 
 
 
 
     //以下参数是搜索回显参数
     //以下参数是搜索回显参数
@@ -1854,4 +1857,28 @@ public class Product extends DataEntity<Product> {
     public void setFloorId(Integer floorId) {
     public void setFloorId(Integer floorId) {
         this.floorId = floorId;
         this.floorId = floorId;
     }
     }
+
+    public Integer getTrainingMethod() {
+        return trainingMethod;
+    }
+
+    public void setTrainingMethod(Integer trainingMethod) {
+        this.trainingMethod = trainingMethod;
+    }
+
+    public Integer getTrainingType() {
+        return trainingType;
+    }
+
+    public void setTrainingType(Integer trainingType) {
+        this.trainingType = trainingType;
+    }
+
+    public BigDecimal getTrainingFee() {
+        return trainingFee;
+    }
+
+    public void setTrainingFee(BigDecimal trainingFee) {
+        this.trainingFee = trainingFee;
+    }
 }
 }

+ 76 - 0
src/main/java/com/caimei/modules/product/entity/ProductStatusRecord.java

@@ -0,0 +1,76 @@
+package com.caimei.modules.product.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * product_status_record
+ *
+ * @author : plf
+ * @date : 2021/7/9
+ */
+public class ProductStatusRecord implements Serializable {
+    private Integer id;
+    private Integer productId; //商品id
+    private Integer modifyUserId; //系统修改人id
+    private String validFlag;   //商品状态,见表c_productstatus或枚举ProductStatus,0逻辑删除 1待审核 2已上架 3已下架 8审核未通过 9已隐身 10已冻结
+    private String remarks;     //备注
+    private Date addTime;        //添加时间
+    private String systemName;      //系统用户名称
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Integer productId) {
+        this.productId = productId;
+    }
+
+    public Integer getModifyUserId() {
+        return modifyUserId;
+    }
+
+    public void setModifyUserId(Integer modifyUserId) {
+        this.modifyUserId = modifyUserId;
+    }
+
+    public String getValidFlag() {
+        return validFlag;
+    }
+
+    public void setValidFlag(String validFlag) {
+        this.validFlag = validFlag;
+    }
+
+    public String getRemarks() {
+        return remarks;
+    }
+
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+
+    public Date getAddTime() {
+        return addTime;
+    }
+
+    public void setAddTime(Date addTime) {
+        this.addTime = addTime;
+    }
+
+    public String getSystemName() {
+        return systemName;
+    }
+
+    public void setSystemName(String systemName) {
+        this.systemName = systemName;
+    }
+}

+ 27 - 0
src/main/java/com/caimei/modules/product/service/ProductNewService.java

@@ -8,6 +8,7 @@ import com.caimei.modules.product.dao.ProductNewDao;
 import com.caimei.modules.product.entity.CmPromotion;
 import com.caimei.modules.product.entity.CmPromotion;
 import com.caimei.modules.product.entity.Product;
 import com.caimei.modules.product.entity.Product;
 import com.caimei.modules.product.entity.ProductParameters;
 import com.caimei.modules.product.entity.ProductParameters;
+import com.caimei.modules.product.entity.ProductStatusRecord;
 import com.caimei.modules.sys.utils.UploadImageUtils;
 import com.caimei.modules.sys.utils.UploadImageUtils;
 import com.caimei.po.ProductImage;
 import com.caimei.po.ProductImage;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.config.Global;
@@ -15,6 +16,8 @@ import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.utils.Encodes;
 import com.thinkgem.jeesite.common.utils.Encodes;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.thinkgem.jeesite.modules.sys.entity.User;
+import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
@@ -237,4 +240,28 @@ public class ProductNewService extends CrudService<ProductNewDao, Product> {
         }
         }
         return map;
         return map;
     }
     }
+
+    public void statusRecordSave(Integer productID, String validFlag, String remarks) {
+        ProductStatusRecord statusRecord = new ProductStatusRecord();
+        User user = UserUtils.getUser();
+        statusRecord.setModifyUserId(Integer.valueOf(user.getId()));
+        statusRecord.setProductId(productID);
+        statusRecord.setValidFlag(validFlag);
+        statusRecord.setRemarks(remarks);
+        statusRecord.setAddTime(new Date());
+        productNewDao.insertStatusRecord(statusRecord);
+    }
+
+    public List<ProductStatusRecord> findStatusRemarks(Integer productId) {
+        List<ProductStatusRecord> recordList = productNewDao.findAllStatusRemarks(productId);
+        if (recordList != null && recordList.size() > 0) {
+            recordList.forEach(record -> {
+                User user = UserUtils.get(String.valueOf(record.getModifyUserId()));
+                if (user != null) {
+                    record.setSystemName(user.getName());
+                }
+            });
+        }
+        return recordList;
+    }
 }
 }

+ 4 - 4
src/main/java/com/caimei/modules/product/service/ProductService.java

@@ -305,14 +305,14 @@ public class ProductService extends CrudService<ProductDao, Product> {
         return productDao.findProductRecommendList(productID);
         return productDao.findProductRecommendList(productID);
     }
     }
 
 
-    public List<CmProductRecommend> findProductList(Integer bigTypeID, Integer smallTypeID, Integer tinyTypeID,
+    public List<CmProductRecommend> findProductList(Integer commodityType, Integer bigTypeID, Integer smallTypeID, Integer tinyTypeID,
                                                     String productName, String shopName) {
                                                     String productName, String shopName) {
-        if (bigTypeID == null && smallTypeID == null && tinyTypeID == null
+        if (commodityType == null && bigTypeID == null && smallTypeID == null && tinyTypeID == null
                 && StringUtils.isEmpty(productName) && StringUtils.isEmpty(shopName)) //没有输入搜索条件时 展示一个空列表
                 && StringUtils.isEmpty(productName) && StringUtils.isEmpty(shopName)) //没有输入搜索条件时 展示一个空列表
         {
         {
             return new ArrayList<>();
             return new ArrayList<>();
         }
         }
-        return productDao.findProductList(bigTypeID, smallTypeID, tinyTypeID, productName, shopName);
+        return productDao.findProductList(commodityType, bigTypeID, smallTypeID, tinyTypeID, productName, shopName);
     }
     }
 
 
     public void updateRecommendType(String productID, String recommendType) {
     public void updateRecommendType(String productID, String recommendType) {
@@ -388,7 +388,7 @@ public class ProductService extends CrudService<ProductDao, Product> {
         ProductDetailInfo queryProductDetailInfo = productDao.queryProductDetailInfo(product.getProductID());
         ProductDetailInfo queryProductDetailInfo = productDao.queryProductDetailInfo(product.getProductID());
         if (queryProductDetailInfo != null) {
         if (queryProductDetailInfo != null) {
             productDao.updateproductDetailInfo(productDetailInfo);
             productDao.updateproductDetailInfo(productDetailInfo);
-        }else {
+        } else {
             productDao.insertProductDetailInfo(productDetailInfo);
             productDao.insertProductDetailInfo(productDetailInfo);
         }
         }
         User user = UserUtils.getUser();
         User user = UserUtils.getUser();

+ 20 - 6
src/main/java/com/caimei/modules/product/web/ProductNewController.java

@@ -4,8 +4,8 @@ import com.caimei.modules.brand.entity.CmBrand;
 import com.caimei.modules.brand.service.CmBrandService;
 import com.caimei.modules.brand.service.CmBrandService;
 import com.caimei.modules.common.entity.Province;
 import com.caimei.modules.common.entity.Province;
 import com.caimei.modules.common.service.AreaService;
 import com.caimei.modules.common.service.AreaService;
-import com.caimei.modules.opensearch.GenerateUtils;
 import com.caimei.modules.opensearch.CoreServiceUitls;
 import com.caimei.modules.opensearch.CoreServiceUitls;
+import com.caimei.modules.opensearch.GenerateUtils;
 import com.caimei.modules.product.dao.ProductNewDao;
 import com.caimei.modules.product.dao.ProductNewDao;
 import com.caimei.modules.product.entity.*;
 import com.caimei.modules.product.entity.*;
 import com.caimei.modules.product.service.*;
 import com.caimei.modules.product.service.*;
@@ -667,10 +667,10 @@ public class ProductNewController extends BaseController {
 
 
     @RequestMapping("auditProduct")
     @RequestMapping("auditProduct")
     @ResponseBody
     @ResponseBody
-    public Map<String, Object> auditProduct(String validFlag, Integer productID) {
+    public Map<String, Object> auditProduct(String validFlag, Integer productID, String remarks) {
         Map<String, Object> map = Maps.newLinkedHashMap();
         Map<String, Object> map = Maps.newLinkedHashMap();
         try {
         try {
-            if (null == validFlag || "".equals(validFlag) || null == productID) {
+            if (StringUtils.isBlank(validFlag) || null == productID) {
                 throw new Exception("参数错误!");
                 throw new Exception("参数错误!");
             }
             }
             //冻结,删除,隐身需判断促销活动
             //冻结,删除,隐身需判断促销活动
@@ -681,6 +681,10 @@ public class ProductNewController extends BaseController {
                     return map;
                     return map;
                 }
                 }
             }
             }
+            if (StringUtils.isNotBlank(remarks)) {
+                //保存商品状态修改记录
+                productNewService.statusRecordSave(productID, validFlag, remarks);
+            }
             // 当进行冻结操作时,保存冻结前的状态,解除冻结时需要恢复为之前的状态
             // 当进行冻结操作时,保存冻结前的状态,解除冻结时需要恢复为之前的状态
             String beforeValidFlag = null;
             String beforeValidFlag = null;
             if ("10".equals(validFlag)) {
             if ("10".equals(validFlag)) {
@@ -807,7 +811,7 @@ public class ProductNewController extends BaseController {
      */
      */
     @RequiresPermissions("product:product:view")
     @RequiresPermissions("product:product:view")
     @RequestMapping(value = "recommend")
     @RequestMapping(value = "recommend")
-    public String recommend(Product product, Integer bigTypeID, Integer smallTypeID, Integer tinyTypeID,
+    public String recommend(Product product, Integer commodityType, Integer bigTypeID, Integer smallTypeID, Integer tinyTypeID,
                             String productName, String shopName, String recommendType,
                             String productName, String shopName, String recommendType,
                             HttpServletRequest request, HttpServletResponse response, Model model) {
                             HttpServletRequest request, HttpServletResponse response, Model model) {
         List<CmProductRecommend> recommendList;
         List<CmProductRecommend> recommendList;
@@ -819,8 +823,7 @@ public class ProductNewController extends BaseController {
             recommendList = productService.findRecommendBySys(product);
             recommendList = productService.findRecommendBySys(product);
             manualRecommend = productService.findProductRecommendCount(product.getProductID());
             manualRecommend = productService.findProductRecommendCount(product.getProductID());
         }
         }
-        List<CmProductRecommend> list = productService.findProductList(bigTypeID, smallTypeID,
-                tinyTypeID, productName, shopName);
+        List<CmProductRecommend> list = productService.findProductList(commodityType, bigTypeID, smallTypeID, tinyTypeID, productName, shopName);
         for (CmProductRecommend l : list) {
         for (CmProductRecommend l : list) {
             l.setImg(AppUtils.getImageURL("product", l.getImg(), 0, ""));
             l.setImg(AppUtils.getImageURL("product", l.getImg(), 0, ""));
             for (CmProductRecommend cpr : recommendList) {
             for (CmProductRecommend cpr : recommendList) {
@@ -904,5 +907,16 @@ public class ProductNewController extends BaseController {
         generateUtils.generateProductType(286);
         generateUtils.generateProductType(286);
         generateUtils.generateProductType(287);
         generateUtils.generateProductType(287);
     }
     }
+
+    /**
+     * 状态备注
+     */
+    @RequestMapping("statusRemarks")
+    public String statusRemarks(Integer productId, Model model) {
+        List<ProductStatusRecord> records = productNewService.findStatusRemarks(productId);
+        model.addAttribute("records", records);
+        model.addAttribute("productId", productId);
+        return "modules/product-new/statusRemarksList";
+    }
 }
 }
 
 

+ 23 - 0
src/main/java/com/caimei/modules/user/dao/ClubTemporaryDao.java

@@ -0,0 +1,23 @@
+package com.caimei.modules.user.dao;
+
+import com.caimei.modules.user.entity.ClubConfirmRecord;
+import com.thinkgem.jeesite.common.persistence.CrudDao;
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+import com.caimei.modules.user.entity.ClubTemporary;
+
+import java.util.List;
+
+/**
+ * 未确认机构DAO接口
+ * @author plf
+ * @version 2021-07-13
+ */
+@MyBatisDao
+public interface ClubTemporaryDao extends CrudDao<ClubTemporary> {
+
+    void insertClubConfirmRecord(ClubConfirmRecord confirmRecord);
+
+    List<ClubConfirmRecord> findConfirmRecord(Integer userId);
+
+    ClubTemporary findByConfirmUserId(Integer userId);
+}

+ 2 - 0
src/main/java/com/caimei/modules/user/dao/CmSpDao.java

@@ -21,4 +21,6 @@ public interface CmSpDao extends CrudDao<NewCmSp> {
     int updateSpManager(@Param("spManagerID") Integer spManagerID);
     int updateSpManager(@Param("spManagerID") Integer spManagerID);
 
 
     List<NewCmSp> findSelectList(NewCmSp newCmSp);
     List<NewCmSp> findSelectList(NewCmSp newCmSp);
+
+    NewCmSp findByUserId(Integer userId);
 }
 }

+ 4 - 0
src/main/java/com/caimei/modules/user/dao/CmUserBalanceRecordDao.java

@@ -30,4 +30,8 @@ public interface CmUserBalanceRecordDao extends CrudDao<CmUserBalanceRecord> {
     int updateByID(CmUserBalanceRecord cmUserBalanceRecord);
     int updateByID(CmUserBalanceRecord cmUserBalanceRecord);
 
 
     CmUserBalanceRecord findReturnedBalance(String returnedId);
     CmUserBalanceRecord findReturnedBalance(String returnedId);
+
+    void updateByWithdrawalsId(String withdrawalsId);
+
+    Integer findBalanceWithdrawals(Integer userId);
 }
 }

+ 1 - 1
src/main/java/com/caimei/modules/user/dao/CmUserBalanceWithdrawalsDao.java

@@ -1,8 +1,8 @@
 package com.caimei.modules.user.dao;
 package com.caimei.modules.user.dao;
 
 
+import com.caimei.modules.user.entity.CmUserBalanceWithdrawals;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
-import com.caimei.modules.user.entity.CmUserBalanceWithdrawals;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 
 
 /**
 /**

+ 5 - 0
src/main/java/com/caimei/modules/user/dao/CmUserDao.java

@@ -7,6 +7,7 @@ import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 
 
+import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -75,4 +76,8 @@ public interface CmUserDao extends CrudDao<CmUser> {
     CmUser findUserByOrganizeId(Integer organizeId);
     CmUser findUserByOrganizeId(Integer organizeId);
 
 
     String getOrganizeStoreName(Integer organizeStoreId);
     String getOrganizeStoreName(Integer organizeStoreId);
+
+    void updateByClubStatus(@Param("clubStatus") int clubStatus, @Param("confirmUserId") Integer confirmUserId);
+
+    Date findByConfirmTime(Integer userId);
 }
 }

+ 3 - 0
src/main/java/com/caimei/modules/user/dao/NewCmClubDao.java

@@ -4,6 +4,7 @@ import com.caimei.modules.user.entity.NewCmClub;
 import com.caimei.modules.user.entity.UserBeansHistory;
 import com.caimei.modules.user.entity.UserBeansHistory;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+import org.apache.ibatis.annotations.Param;
 
 
 import java.util.List;
 import java.util.List;
 
 
@@ -23,4 +24,6 @@ public interface NewCmClubDao extends CrudDao<NewCmClub> {
     Integer findSpId(Integer spID);
     Integer findSpId(Integer spID);
 
 
     void insertBeansHistory(UserBeansHistory beansHistory);
     void insertBeansHistory(UserBeansHistory beansHistory);
+
+    void updateByStatus(@Param("clubStatus") int clubStatus, @Param("confirmUserId") Integer confirmUserId);
 }
 }

+ 85 - 0
src/main/java/com/caimei/modules/user/entity/ClubConfirmRecord.java

@@ -0,0 +1,85 @@
+package com.caimei.modules.user.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Description
+ *
+ * @author : plf
+ * @date : 2021/7/14
+ */
+public class ClubConfirmRecord implements Serializable {
+    private Integer id;
+    private Integer userId;     //机构用户id
+    private Integer systemUserId;       //系统确认人id
+    private String images;      //图片备注,以","隔开
+    private String remarks;     //文字备注
+    private Date confirmTime;   //确认时间
+    private String systemName;      //系统名称
+    private String[] remarkImages;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    public Integer getSystemUserId() {
+        return systemUserId;
+    }
+
+    public void setSystemUserId(Integer systemUserId) {
+        this.systemUserId = systemUserId;
+    }
+
+    public String getImages() {
+        return images;
+    }
+
+    public void setImages(String images) {
+        this.images = images;
+    }
+
+    public String getRemarks() {
+        return remarks;
+    }
+
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+
+    public Date getConfirmTime() {
+        return confirmTime;
+    }
+
+    public void setConfirmTime(Date confirmTime) {
+        this.confirmTime = confirmTime;
+    }
+
+    public String getSystemName() {
+        return systemName;
+    }
+
+    public void setSystemName(String systemName) {
+        this.systemName = systemName;
+    }
+
+    public String[] getRemarkImages() {
+        return remarkImages;
+    }
+
+    public void setRemarkImages(String[] remarkImages) {
+        this.remarkImages = remarkImages;
+    }
+}

+ 291 - 0
src/main/java/com/caimei/modules/user/entity/ClubTemporary.java

@@ -0,0 +1,291 @@
+package com.caimei.modules.user.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.Date;
+
+/**
+ * 未确认机构Entity
+ *
+ * @author plf
+ * @version 2021-07-13
+ */
+public class ClubTemporary extends DataEntity<ClubTemporary> {
+
+    private static final long serialVersionUID = 1L;
+    private Integer userId;        // 协销用户Id
+    private String name;        // 机构名称
+    private Integer confirmUserId;      //确认注册机构userId
+    private String shortName;        // 机构简称
+    private String bindMobile;        // 企业绑定手机号
+    private String contractEmail;        // 联系邮箱
+    private String linkMan;        // 联系人
+    private Integer provinceId;        // 省id
+    private Integer cityId;        // 市id
+    private Integer townId;        // 地址Id
+    private String address;        // 地址
+    private String shopPhoto;        // 门头照
+    private String businessLicense;        // 营业执照
+    private String socialCreditCode;        // 统一社会信用代码
+    private String firstClubType;        //  一级分类为医美=1和生美=2
+    private String secondClubType;        // 医美的二级分类为诊所=1、门诊=2、医院=3。  生美没有二级分类
+    private String department;        // 若为医美分类下的门诊和医院则可能需要填写科室
+    private String medicalPracticeLicense;        // 医美分类必须上传医疗执业许可证
+    private String mainProduct;        // 主打项目
+    private String isAgreed;        // 是否同意勾选同意协议,1是,其他否
+    private Date addTime;        // 添加时间
+    private String startTime;     //添加时间开始 查询条件
+    private String endTime;        //添加时间结束  查询条件
+    private String spName;          //协销名称
+    private String town; // 区
+    private String city; // 市
+    private String province; //省
+    private String[] images;      //图片备注
+
+    public ClubTemporary() {
+        super();
+    }
+
+    public ClubTemporary(String id) {
+        super(id);
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    @Length(min = 0, max = 50, message = "机构名称长度必须介于 0 和 50 之间")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Integer getConfirmUserId() {
+        return confirmUserId;
+    }
+
+    public void setConfirmUserId(Integer confirmUserId) {
+        this.confirmUserId = confirmUserId;
+    }
+
+    @Length(min = 0, max = 20, message = "机构简称长度必须介于 0 和 20 之间")
+    public String getShortName() {
+        return shortName;
+    }
+
+    public void setShortName(String shortName) {
+        this.shortName = shortName;
+    }
+
+    @Length(min = 0, max = 20, message = "企业绑定手机号长度必须介于 0 和 20 之间")
+    public String getBindMobile() {
+        return bindMobile;
+    }
+
+    public void setBindMobile(String bindMobile) {
+        this.bindMobile = bindMobile;
+    }
+
+    @Length(min = 0, max = 50, message = "联系邮箱长度必须介于 0 和 50 之间")
+    public String getContractEmail() {
+        return contractEmail;
+    }
+
+    public void setContractEmail(String contractEmail) {
+        this.contractEmail = contractEmail;
+    }
+
+    @Length(min = 0, max = 50, message = "联系人长度必须介于 0 和 50 之间")
+    public String getLinkMan() {
+        return linkMan;
+    }
+
+    public void setLinkMan(String linkMan) {
+        this.linkMan = linkMan;
+    }
+
+    public Integer getProvinceId() {
+        return provinceId;
+    }
+
+    public void setProvinceId(Integer provinceId) {
+        this.provinceId = provinceId;
+    }
+
+    public Integer getCityId() {
+        return cityId;
+    }
+
+    public void setCityId(Integer cityId) {
+        this.cityId = cityId;
+    }
+
+    public Integer getTownId() {
+        return townId;
+    }
+
+    public void setTownId(Integer townId) {
+        this.townId = townId;
+    }
+
+    @Length(min = 0, max = 100, message = "地址长度必须介于 0 和 100 之间")
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getShopPhoto() {
+        return shopPhoto;
+    }
+
+    public void setShopPhoto(String shopPhoto) {
+        this.shopPhoto = shopPhoto;
+    }
+
+    public String getBusinessLicense() {
+        return businessLicense;
+    }
+
+    public void setBusinessLicense(String businessLicense) {
+        this.businessLicense = businessLicense;
+    }
+
+    @Length(min = 0, max = 18, message = "统一社会信用代码长度必须介于 0 和 18 之间")
+    public String getSocialCreditCode() {
+        return socialCreditCode;
+    }
+
+    public void setSocialCreditCode(String socialCreditCode) {
+        this.socialCreditCode = socialCreditCode;
+    }
+
+    @Length(min = 0, max = 2, message = " 一级分类为医美=1和生美=2长度必须介于 0 和 2 之间")
+    public String getFirstClubType() {
+        return firstClubType;
+    }
+
+    public void setFirstClubType(String firstClubType) {
+        this.firstClubType = firstClubType;
+    }
+
+    @Length(min = 0, max = 2, message = "医美的二级分类为诊所=1、门诊=2、医院=3。  生美没有二级分类长度必须介于 0 和 2 之间")
+    public String getSecondClubType() {
+        return secondClubType;
+    }
+
+    public void setSecondClubType(String secondClubType) {
+        this.secondClubType = secondClubType;
+    }
+
+    @Length(min = 0, max = 200, message = "若为医美分类下的门诊和医院则可能需要填写科室长度必须介于 0 和 200 之间")
+    public String getDepartment() {
+        return department;
+    }
+
+    public void setDepartment(String department) {
+        this.department = department;
+    }
+
+    public String getMedicalPracticeLicense() {
+        return medicalPracticeLicense;
+    }
+
+    public void setMedicalPracticeLicense(String medicalPracticeLicense) {
+        this.medicalPracticeLicense = medicalPracticeLicense;
+    }
+
+    @Length(min = 0, max = 200, message = "主打项目长度必须介于 0 和 200 之间")
+    public String getMainProduct() {
+        return mainProduct;
+    }
+
+    public void setMainProduct(String mainProduct) {
+        this.mainProduct = mainProduct;
+    }
+
+    @Length(min = 0, max = 2, message = "是否同意勾选同意协议,1是,其他否长度必须介于 0 和 2 之间")
+    public String getIsAgreed() {
+        return isAgreed;
+    }
+
+    public void setIsAgreed(String isAgreed) {
+        this.isAgreed = isAgreed;
+    }
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    public Date getAddTime() {
+        return addTime;
+    }
+
+    public void setAddTime(Date addTime) {
+        this.addTime = addTime;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getSpName() {
+        return spName;
+    }
+
+    public void setSpName(String spName) {
+        this.spName = spName;
+    }
+
+    public String getTown() {
+        return town;
+    }
+
+    public void setTown(String town) {
+        this.town = town;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getProvince() {
+        return province;
+    }
+
+    public void setProvince(String province) {
+        this.province = province;
+    }
+
+    public String[] getImages() {
+        return images;
+    }
+
+    public void setImages(String[] images) {
+        this.images = images;
+    }
+}

+ 18 - 0
src/main/java/com/caimei/modules/user/entity/CmUser.java

@@ -21,6 +21,7 @@ public class CmUser extends DataEntity<CmUser> {
     private Integer userPermission;        // 用户权限
     private Integer userPermission;        // 用户权限
     private String email;        // 邮箱
     private String email;        // 邮箱
     private String userName;        // 用户名
     private String userName;        // 用户名
+    private Integer source;         //注册来源: 0网站 1小程序
     private String image;        // image
     private String image;        // image
     private String password;        // 密码
     private String password;        // 密码
     private String userLevelID;        // 用户会员等级,见表c_userlevel或枚举UserLevel
     private String userLevelID;        // 用户会员等级,见表c_userlevel或枚举UserLevel
@@ -105,6 +106,7 @@ public class CmUser extends DataEntity<CmUser> {
     private String city; // 市
     private String city; // 市
     private String province; //省
     private String province; //省
     private String address;        // 详细地址
     private String address;        // 详细地址
+    private boolean pending = false; //是否有待审核提现
 
 
     public CmUser() {
     public CmUser() {
         super();
         super();
@@ -816,4 +818,20 @@ public class CmUser extends DataEntity<CmUser> {
     public void setOperatorMobile(String operatorMobile) {
     public void setOperatorMobile(String operatorMobile) {
         this.operatorMobile = operatorMobile;
         this.operatorMobile = operatorMobile;
     }
     }
+
+    public Integer getSource() {
+        return source;
+    }
+
+    public void setSource(Integer source) {
+        this.source = source;
+    }
+
+    public boolean isPending() {
+        return pending;
+    }
+
+    public void setPending(boolean pending) {
+        this.pending = pending;
+    }
 }
 }

+ 210 - 105
src/main/java/com/caimei/modules/user/entity/CmUserBalanceWithdrawals.java

@@ -1,114 +1,219 @@
 package com.caimei.modules.user.entity;
 package com.caimei.modules.user.entity;
 
 
-import org.hibernate.validator.constraints.Length;
-import java.util.Date;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
-
 import com.thinkgem.jeesite.common.persistence.DataEntity;
 import com.thinkgem.jeesite.common.persistence.DataEntity;
+import org.hibernate.validator.constraints.Length;
+
+import java.math.BigDecimal;
+import java.util.Date;
 
 
 /**
 /**
- * 会所余额提现Entity
- * @author lijun
- * @version 2019-11-12
+ * 审核列表Entity
+ *
+ * @author plf
+ * @version 2021-07-06
  */
  */
 public class CmUserBalanceWithdrawals extends DataEntity<CmUserBalanceWithdrawals> {
 public class CmUserBalanceWithdrawals extends DataEntity<CmUserBalanceWithdrawals> {
-	
-	private static final long serialVersionUID = 1L;
-	private Integer userID;		// 用户ID(买家)
-	private String withdrawalsFee;		// 提现金额
-	private String bankAccountName;		// 银行账户名
-	private String bankAccountNo;		// 开户银行账户
-	private String openBank;		// 开户银行
-	private String bankAccountType;		// 账户类型:1公账,2私账
-	private String payType;		// 付款方式 1建设银行7297, 2中信银行0897, 3中信银行7172, 4广发银行0115, 5广发银行5461
-	private Date addDate;		// 提现时间
-	private String remark;		// 备注
-	
-	public CmUserBalanceWithdrawals() {
-		super();
-	}
-
-	public CmUserBalanceWithdrawals(String id){
-		super(id);
-	}
-
-	public Integer getUserID() {
-		return userID;
-	}
-
-	public void setUserID(Integer userID) {
-		this.userID = userID;
-	}
-	
-	public String getWithdrawalsFee() {
-		return withdrawalsFee;
-	}
-
-	public void setWithdrawalsFee(String withdrawalsFee) {
-		this.withdrawalsFee = withdrawalsFee;
-	}
-	
-	@Length(min=0, max=30, message="银行账户名长度必须介于 0 和 30 之间")
-	public String getBankAccountName() {
-		return bankAccountName;
-	}
-
-	public void setBankAccountName(String bankAccountName) {
-		this.bankAccountName = bankAccountName;
-	}
-	
-	@Length(min=0, max=30, message="开户银行账户长度必须介于 0 和 30 之间")
-	public String getBankAccountNo() {
-		return bankAccountNo;
-	}
-
-	public void setBankAccountNo(String bankAccountNo) {
-		this.bankAccountNo = bankAccountNo;
-	}
-	
-	@Length(min=0, max=30, message="开户银行长度必须介于 0 和 30 之间")
-	public String getOpenBank() {
-		return openBank;
-	}
-
-	public void setOpenBank(String openBank) {
-		this.openBank = openBank;
-	}
-	
-	@Length(min=0, max=1, message="账户类型:1公账,2私账长度必须介于 0 和 1 之间")
-	public String getBankAccountType() {
-		return bankAccountType;
-	}
-
-	public void setBankAccountType(String bankAccountType) {
-		this.bankAccountType = bankAccountType;
-	}
-	
-	@Length(min=0, max=20, message="付款方式 1建设银行7297, 2中信银行0897, 3中信银行7172, 4广发银行0115, 5广发银行5461长度必须介于 0 和 20 之间")
-	public String getPayType() {
-		return payType;
-	}
-
-	public void setPayType(String payType) {
-		this.payType = payType;
-	}
-	
-	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-	public Date getAddDate() {
-		return addDate;
-	}
-
-	public void setAddDate(Date addDate) {
-		this.addDate = addDate;
-	}
-	
-	@Length(min=0, max=250, message="备注长度必须介于 0 和 250 之间")
-	public String getRemark() {
-		return remark;
-	}
-
-	public void setRemark(String remark) {
-		this.remark = remark;
-	}
-	
+
+    private static final long serialVersionUID = 1L;
+    private Long userID;        // 用户ID(买家)
+    private BigDecimal withdrawalsFee;        // 提现金额
+    private String bankAccountName;        // 银行账户名
+    private String bankAccountNo;        // 开户银行账户
+    private String openBank;        // 开户银行
+    private String bankAccountType;        // 账户类型:1公账,2私账
+    private String payType;        // 付款方式 1建设银行7297, 2中信银行0897, 3中信银行7172, 4广发银行0115, 5广发银行5461
+    private String applicant;        // 申请人ID
+    private Date addDate;        // 申请时间
+    private String reviewer;        // 审核人ID
+    private Date reviewTime;        // 审核时间
+    private Date payTime;        // 转账时间
+    private String status;        // 审核状态 0待审核, 1审核通过 2审核不通过
+    private String reason;        // 审核不通过原因
+    private String remark;        // 备注
+    private String clubName;    //机构名称
+    private String startTime;    //开始时间
+    private String endTime;        //结束时间
+    private String applicantName;    //申请人名称
+    private String reviewerName;    //审核人名称
+
+
+    public CmUserBalanceWithdrawals() {
+        super();
+    }
+
+    public CmUserBalanceWithdrawals(String id) {
+        super(id);
+    }
+
+    public Long getUserID() {
+        return userID;
+    }
+
+    public void setUserID(Long userID) {
+        this.userID = userID;
+    }
+
+    public BigDecimal getWithdrawalsFee() {
+        return withdrawalsFee;
+    }
+
+    public void setWithdrawalsFee(BigDecimal withdrawalsFee) {
+        this.withdrawalsFee = withdrawalsFee;
+    }
+
+    @Length(min = 0, max = 30, message = "银行账户名长度必须介于 0 和 30 之间")
+    public String getBankAccountName() {
+        return bankAccountName;
+    }
+
+    public void setBankAccountName(String bankAccountName) {
+        this.bankAccountName = bankAccountName;
+    }
+
+    @Length(min = 0, max = 30, message = "开户银行账户长度必须介于 0 和 30 之间")
+    public String getBankAccountNo() {
+        return bankAccountNo;
+    }
+
+    public void setBankAccountNo(String bankAccountNo) {
+        this.bankAccountNo = bankAccountNo;
+    }
+
+    @Length(min = 0, max = 30, message = "开户银行长度必须介于 0 和 30 之间")
+    public String getOpenBank() {
+        return openBank;
+    }
+
+    public void setOpenBank(String openBank) {
+        this.openBank = openBank;
+    }
+
+    @Length(min = 0, max = 1, message = "账户类型:1公账,2私账长度必须介于 0 和 1 之间")
+    public String getBankAccountType() {
+        return bankAccountType;
+    }
+
+    public void setBankAccountType(String bankAccountType) {
+        this.bankAccountType = bankAccountType;
+    }
+
+    @Length(min = 0, max = 20, message = "付款方式 1建设银行7297, 2中信银行0897, 3中信银行7172, 4广发银行0115, 5广发银行5461长度必须介于 0 和 20 之间")
+    public String getPayType() {
+        return payType;
+    }
+
+    public void setPayType(String payType) {
+        this.payType = payType;
+    }
+
+    public String getApplicant() {
+        return applicant;
+    }
+
+    public void setApplicant(String applicant) {
+        this.applicant = applicant;
+    }
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    public Date getAddDate() {
+        return addDate;
+    }
+
+    public void setAddDate(Date addDate) {
+        this.addDate = addDate;
+    }
+
+    public String getReviewer() {
+        return reviewer;
+    }
+
+    public void setReviewer(String reviewer) {
+        this.reviewer = reviewer;
+    }
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    public Date getReviewTime() {
+        return reviewTime;
+    }
+
+    public void setReviewTime(Date reviewTime) {
+        this.reviewTime = reviewTime;
+    }
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    public Date getPayTime() {
+        return payTime;
+    }
+
+    public void setPayTime(Date payTime) {
+        this.payTime = payTime;
+    }
+
+    @Length(min = 1, max = 1, message = "审核状态 0待审核, 1审核通过 2审核不通过长度必须介于 1 和 1 之间")
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    @Length(min = 0, max = 20, message = "审核不通过原因长度必须介于 0 和 20 之间")
+    public String getReason() {
+        return reason;
+    }
+
+    public void setReason(String reason) {
+        this.reason = reason;
+    }
+
+    @Length(min = 0, max = 250, message = "备注长度必须介于 0 和 250 之间")
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getClubName() {
+        return clubName;
+    }
+
+    public void setClubName(String clubName) {
+        this.clubName = clubName;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getApplicantName() {
+        return applicantName;
+    }
+
+    public void setApplicantName(String applicantName) {
+        this.applicantName = applicantName;
+    }
+
+    public String getReviewerName() {
+        return reviewerName;
+    }
+
+    public void setReviewerName(String reviewerName) {
+        this.reviewerName = reviewerName;
+    }
 }
 }

+ 236 - 0
src/main/java/com/caimei/modules/user/service/ClubTemporaryService.java

@@ -0,0 +1,236 @@
+package com.caimei.modules.user.service;
+
+import com.caimei.modules.miniprogram.utils.UploadPicUtils;
+import com.caimei.modules.user.dao.ClubTemporaryDao;
+import com.caimei.modules.user.dao.CmSpDao;
+import com.caimei.modules.user.dao.CmUserDao;
+import com.caimei.modules.user.dao.NewCmClubDao;
+import com.caimei.modules.user.entity.*;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.service.CrudService;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.thinkgem.jeesite.modules.sys.entity.User;
+import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 未确认机构Service
+ *
+ * @author plf
+ * @version 2021-07-13
+ */
+@Service
+@Transactional(readOnly = true)
+public class ClubTemporaryService extends CrudService<ClubTemporaryDao, ClubTemporary> {
+    @Autowired
+    private ClubTemporaryDao clubTemporaryDao;
+    @Autowired
+    private CmUserDao cmUserDao;
+    @Autowired
+    private CmSpDao cmSpDao;
+    @Autowired
+    private NewCmClubDao newCmClubDao;
+
+    public ClubTemporary get(String id) {
+        return super.get(id);
+    }
+
+    public List<ClubTemporary> findList(ClubTemporary clubTemporary) {
+        return super.findList(clubTemporary);
+    }
+
+    public Page<ClubTemporary> findPage(Page<ClubTemporary> page, ClubTemporary clubTemporary) {
+        return super.findPage(page, clubTemporary);
+    }
+
+    @Transactional(readOnly = false)
+    public void save(ClubTemporary clubTemporary) {
+        super.save(clubTemporary);
+    }
+
+    @Transactional(readOnly = false)
+    public void delete(ClubTemporary clubTemporary) {
+        super.delete(clubTemporary);
+    }
+
+    @Transactional(readOnly = false)
+    public void registerSave(ClubTemporary clubTemporary) throws Exception {
+        Date date = new Date();
+        String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);
+        if (clubTemporary.getConfirmUserId() == null) {
+            List<CmUser> userList = cmUserDao.selectByMobileOrEmail(clubTemporary.getBindMobile(), "crm");
+            if (userList != null && userList.size() > 0) {
+                throw new Exception("机构手机号已存在");
+            }
+            NewCmSp cmSp = cmSpDao.findByUserId(clubTemporary.getUserId());
+            CmUser user = new CmUser();
+            // 机构拉上线统称为此IP方便后面直接标记为协销代注册
+            user.setRegisterIP("192.168.1.10");
+            // 注册来源: 0网站 1小程序(拉机构上线小程序注册)
+            user.setSource(1);
+            // 采美默认组织机构0
+            user.setUserOrganizeID(0);
+            // 组织名称
+            user.setName(clubTemporary.getLinkMan());
+            // 用户名
+            user.setUserName(clubTemporary.getLinkMan());
+            // 绑定手机号
+            user.setBindMobile(clubTemporary.getBindMobile());
+            // 设置已确认(客服确认机构)
+            user.setClubStatus("93");
+            // 默认密码
+            user.setPassword("12345678");
+            // 同意协议
+            user.setAgreeFlag(clubTemporary.getIsAgreed());
+            // 用户状态,1正常,0冻结
+            user.setValidFlag("1");
+            // 协销Id
+            user.setServiceProviderID(cmSp.getServiceProviderID().toString());
+            // 协销状态
+            user.setServiceProviderStatus(cmSp.getStatus().toString());
+            // 会员机构,填写升级资料
+            if (StringUtils.isNotBlank(clubTemporary.getBusinessLicense())) {
+                // 用户类型,供应商1,会员机构3,普通机构4
+                user.setRegisterUserTypeID("3");
+                // 用户身份: 1协销 2会员机构 3供应商 4普通机构
+                user.setUserIdentity(2);
+                // 用户权限: 2会员机构 3供应商 4协销 5普通机构
+                user.setUserPermission(2);
+                // 组织名称
+                user.setName(clubTemporary.getName());
+                // 邮箱
+                user.setEmail(clubTemporary.getContractEmail());
+                // 是否已经引导过(机构升级:0否,1是)
+                user.setGuideFlag("1");
+                //后台客服确认注册默认审核通过
+                user.setAuditTime(time);
+                user.setAuditStatus("1");
+                user.setAuditNote("后台客服确认注册默认审核通过");
+            } else {
+                // 用户类型,供应商1,会员机构3,普通机构4
+                user.setRegisterUserTypeID("4");
+                // 用户身份: 1协销 2会员机构 3供应商 4普通机构
+                user.setUserIdentity(4);
+                // 用户权限: 2会员机构 3供应商 4协销 5普通机构
+                user.setUserPermission(5);
+                // 是否已经引导过(机构升级:0否,1是)
+                user.setGuideFlag("0");
+            }
+            cmUserDao.insert(user);
+
+            NewCmClub club = new NewCmClub();
+            // 联系手机
+            club.setContractMobile(clubTemporary.getBindMobile());
+            // 联系人
+            club.setLinkMan(clubTemporary.getLinkMan());
+            // 用户Id
+            club.setUserID(user.getUserID());
+            // 设置协销ID
+            club.setSpID(cmSp.getServiceProviderID());
+            // 待扫描
+            club.setScanFlag("0");
+            // 设置已确认(客服确认机构)
+            club.setStatus(93);
+            // 会员机构,填写升级资料
+            if (StringUtils.isNotBlank(clubTemporary.getBusinessLicense())) {
+                // 机构名称
+                club.setName(clubTemporary.getName());
+                // 机构简称
+                club.setSname(clubTemporary.getShortName());
+                // 邮箱
+                club.setContractEmail1(clubTemporary.getContractEmail());
+                // 地址
+                club.setProvinceID(clubTemporary.getProvinceId());
+                club.setCityID(clubTemporary.getCityId());
+                club.setTownID(clubTemporary.getTownId());
+                club.setAddress(clubTemporary.getAddress());
+                // 门头照
+                club.setHeadpic(clubTemporary.getShopPhoto());
+                // 营业执照
+                club.setBusinessLicenseImage(clubTemporary.getBusinessLicense());
+                // 统一社会信用代码
+                club.setSocialCreditCode(clubTemporary.getSocialCreditCode());
+                // 分类: 1医美, 2生美
+                club.setFirstClubType(clubTemporary.getFirstClubType());
+                if ("1".equals(clubTemporary.getFirstClubType())) {
+                    // 医美二级分类: 1诊所、2门诊、3医院
+                    club.setSecondClubType(clubTemporary.getSecondClubType());
+                    // 门诊和医院则需要填写科室
+                    club.setDepartment(clubTemporary.getDepartment());
+                    // 医美分类必须上传医疗执业许可证
+                    club.setMedicalPracticeLicenseImg(clubTemporary.getMedicalPracticeLicense());
+                }
+                // 主打项目(mainpro)
+                club.setMainpro(clubTemporary.getMainProduct());
+                //后台客服确认注册默认审核通过
+                club.setAuditTime(time);
+                club.setAuditNote("后台客服确认注册默认审核通过");
+            } else {
+                // 机构名称
+                club.setName(clubTemporary.getLinkMan());
+                // 机构简称
+                club.setSname(clubTemporary.getLinkMan());
+            }
+            newCmClubDao.insert(club);
+            // user更新clubId
+            user.setClubID(club.getClubID().toString());
+            cmUserDao.update(user);
+            clubTemporary.setConfirmUserId(user.getUserID());
+            clubTemporaryDao.update(clubTemporary);
+        } else {
+            //客服二次确认注册
+            cmUserDao.updateByClubStatus(93, clubTemporary.getConfirmUserId());
+            newCmClubDao.updateByStatus(93, clubTemporary.getConfirmUserId());
+        }
+        User user = UserUtils.getUser();
+        ClubConfirmRecord confirmRecord = new ClubConfirmRecord();
+        confirmRecord.setSystemUserId(Integer.valueOf(user.getId()));
+        confirmRecord.setUserId(clubTemporary.getConfirmUserId());
+        //备注图片
+        String[] images = clubTemporary.getImages();
+        if (images != null && images.length > 0) {
+            StringBuilder remarkImage = new StringBuilder();
+            for (String image : images) {
+                if (StringUtils.isNotBlank(image)) {
+                    String url = UploadPicUtils.saveImageToServer(image);
+                    remarkImage.append(url).append(",");
+                }
+            }
+            confirmRecord.setImages(String.valueOf(remarkImage));
+        }
+        confirmRecord.setRemarks(clubTemporary.getRemarks());
+        confirmRecord.setConfirmTime(date);
+        clubTemporaryDao.insertClubConfirmRecord(confirmRecord);
+    }
+
+    public List<ClubConfirmRecord> confirmRecord(ClubTemporary clubTemporary) {
+        List<ClubConfirmRecord> recordList = null;
+        Integer userId = clubTemporary.getConfirmUserId();
+        if (userId != null) {
+            recordList = clubTemporaryDao.findConfirmRecord(userId);
+            if (recordList != null && recordList.size() > 0) {
+                recordList.forEach(record -> {
+                    User user = UserUtils.get(record.getSystemUserId().toString());
+                    if (user != null) {
+                        record.setSystemName(user.getName());
+                    }
+                    if (StringUtils.isNotBlank(record.getImages())) {
+                        String[] split = record.getImages().split(",");
+                        record.setRemarkImages(split);
+                    }
+                });
+            }
+        }
+        return recordList;
+    }
+
+    public ClubTemporary findByConfirmUserId(Integer userId) {
+        return clubTemporaryDao.findByConfirmUserId(userId);
+    }
+}

+ 56 - 49
src/main/java/com/caimei/modules/user/service/CmUserBalanceRecordService.java

@@ -1,20 +1,19 @@
 package com.caimei.modules.user.service;
 package com.caimei.modules.user.service;
 
 
-import java.util.List;
-
+import com.caimei.modules.user.dao.CmUserBalanceRecordDao;
 import com.caimei.modules.user.entity.CmUser;
 import com.caimei.modules.user.entity.CmUser;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
+import com.caimei.modules.user.entity.CmUserBalanceRecord;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.service.CrudService;
-import com.caimei.modules.user.entity.CmUserBalanceRecord;
-import com.caimei.modules.user.dao.CmUserBalanceRecordDao;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
+import java.util.List;
 
 
 /**
 /**
  * 用户余额收支记录Service
  * 用户余额收支记录Service
+ *
  * @author lijun
  * @author lijun
  * @version 2019-10-18
  * @version 2019-10-18
  */
  */
@@ -22,61 +21,69 @@ import javax.annotation.Resource;
 @Transactional(readOnly = true)
 @Transactional(readOnly = true)
 public class CmUserBalanceRecordService extends CrudService<CmUserBalanceRecordDao, CmUserBalanceRecord> {
 public class CmUserBalanceRecordService extends CrudService<CmUserBalanceRecordDao, CmUserBalanceRecord> {
 
 
-	@Resource
-	private  CmUserBalanceRecordDao cmUserBalanceRecordDao;
-	public CmUserBalanceRecord get(String id) {
-		return super.get(id);
-	}
+    @Resource
+    private CmUserBalanceRecordDao cmUserBalanceRecordDao;
 
 
-	public List<CmUserBalanceRecord> findList(CmUserBalanceRecord cmUserBalanceRecord) {
-		return super.findList(cmUserBalanceRecord);
-	}
+    public CmUserBalanceRecord get(String id) {
+        return super.get(id);
+    }
+
+    public List<CmUserBalanceRecord> findList(CmUserBalanceRecord cmUserBalanceRecord) {
+        return super.findList(cmUserBalanceRecord);
+    }
 
 
-	public Page<CmUserBalanceRecord> findPage(Page<CmUserBalanceRecord> page, CmUserBalanceRecord cmUserBalanceRecord) {
-		return super.findPage(page, cmUserBalanceRecord);
-	}
+    public Page<CmUserBalanceRecord> findPage(Page<CmUserBalanceRecord> page, CmUserBalanceRecord cmUserBalanceRecord) {
+        return super.findPage(page, cmUserBalanceRecord);
+    }
 
 
-	public List<CmUserBalanceRecord> getBalanceRecord(CmUserBalanceRecord cmUserBalanceRecord){
-		return  cmUserBalanceRecordDao.getBalanceRecord(cmUserBalanceRecord);
-	}
+    public List<CmUserBalanceRecord> getBalanceRecord(CmUserBalanceRecord cmUserBalanceRecord) {
+        return cmUserBalanceRecordDao.getBalanceRecord(cmUserBalanceRecord);
+    }
 
 
-	@Transactional(readOnly = false)
-	public void save(CmUserBalanceRecord cmUserBalanceRecord) {
-		super.save(cmUserBalanceRecord);
-	}
+    @Transactional(readOnly = false)
+    public void save(CmUserBalanceRecord cmUserBalanceRecord) {
+        super.save(cmUserBalanceRecord);
+    }
 
 
-	@Transactional(readOnly = false)
-	public void delete(CmUserBalanceRecord cmUserBalanceRecord) {
-		super.delete(cmUserBalanceRecord);
-	}
+    @Transactional(readOnly = false)
+    public void delete(CmUserBalanceRecord cmUserBalanceRecord) {
+        super.delete(cmUserBalanceRecord);
+    }
 
 
 
 
-	public List<CmUser> findUserBalanceList(CmUser cmuser){
-		return cmUserBalanceRecordDao.findUserBalanceList(cmuser);
-	}
+    public List<CmUser> findUserBalanceList(CmUser cmuser) {
+        List<CmUser> balanceList = cmUserBalanceRecordDao.findUserBalanceList(cmuser);
+        balanceList.forEach(balance -> {
+            Integer id = cmUserBalanceRecordDao.findBalanceWithdrawals(balance.getUserID());
+            if (id != null && id > 0) {
+                balance.setPending(true);
+            }
+        });
+        return balanceList;
+    }
 
 
-	@Transactional(readOnly = false)
-	 public int insertUserBalanceRecord(CmUserBalanceRecord cmUserBalanceRecord){
-		 return cmUserBalanceRecordDao.insertUserBalanceRecord(cmUserBalanceRecord);
-	 }
+    @Transactional(readOnly = false)
+    public int insertUserBalanceRecord(CmUserBalanceRecord cmUserBalanceRecord) {
+        return cmUserBalanceRecordDao.insertUserBalanceRecord(cmUserBalanceRecord);
+    }
 
 
-	@Transactional(readOnly = false)
-	 public int updateBalanceRecord(CmUserBalanceRecord cmUserBalanceRecord){
-		 return cmUserBalanceRecordDao.updateBalanceRecord(cmUserBalanceRecord);
-	 }
+    @Transactional(readOnly = false)
+    public int updateBalanceRecord(CmUserBalanceRecord cmUserBalanceRecord) {
+        return cmUserBalanceRecordDao.updateBalanceRecord(cmUserBalanceRecord);
+    }
 
 
-	@Transactional(readOnly = false)
-	public int updateBalanceRecordBuyReturned(CmUserBalanceRecord cmUserBalanceRecord){
-		return cmUserBalanceRecordDao.updateBalanceRecordBuyReturned(cmUserBalanceRecord);
-	}
+    @Transactional(readOnly = false)
+    public int updateBalanceRecordBuyReturned(CmUserBalanceRecord cmUserBalanceRecord) {
+        return cmUserBalanceRecordDao.updateBalanceRecordBuyReturned(cmUserBalanceRecord);
+    }
 
 
     @Transactional(readOnly = false)
     @Transactional(readOnly = false)
-    public int updateBalanceRecordBuyReceipt(CmUserBalanceRecord cmUserBalanceRecord){
+    public int updateBalanceRecordBuyReceipt(CmUserBalanceRecord cmUserBalanceRecord) {
         return cmUserBalanceRecordDao.updateBalanceRecordBuyReceipt(cmUserBalanceRecord);
         return cmUserBalanceRecordDao.updateBalanceRecordBuyReceipt(cmUserBalanceRecord);
     }
     }
 
 
-	@Transactional(readOnly = false)
-	public int updateByID(CmUserBalanceRecord cmUserBalanceRecord){
-		return cmUserBalanceRecordDao.updateByID(cmUserBalanceRecord);
-	}
+    @Transactional(readOnly = false)
+    public int updateByID(CmUserBalanceRecord cmUserBalanceRecord) {
+        return cmUserBalanceRecordDao.updateByID(cmUserBalanceRecord);
+    }
 }
 }

+ 150 - 36
src/main/java/com/caimei/modules/user/service/CmUserBalanceWithdrawalsService.java

@@ -1,19 +1,28 @@
 package com.caimei.modules.user.service;
 package com.caimei.modules.user.service;
 
 
-import java.util.List;
-
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
+import com.caimei.modules.user.dao.CmUserBalanceWithdrawalsDao;
+import com.caimei.modules.user.entity.CmUserBalanceWithdrawals;
+import com.caimei.modules.user.dao.CmUserBalanceRecordDao;
+import com.caimei.modules.user.dao.CmUserDao;
+import com.caimei.modules.user.entity.CmUser;
+import com.caimei.modules.user.entity.CmUserBalanceRecord;
+import com.caimei.utils.MathUtil;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.service.CrudService;
-import com.caimei.modules.user.entity.CmUserBalanceWithdrawals;
-import com.caimei.modules.user.dao.CmUserBalanceWithdrawalsDao;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.thinkgem.jeesite.modules.sys.entity.User;
+import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
 
 
 /**
 /**
  * 会所余额提现Service
  * 会所余额提现Service
+ *
  * @author lijun
  * @author lijun
  * @version 2019-11-12
  * @version 2019-11-12
  */
  */
@@ -21,33 +30,138 @@ import javax.annotation.Resource;
 @Transactional(readOnly = true)
 @Transactional(readOnly = true)
 public class CmUserBalanceWithdrawalsService extends CrudService<CmUserBalanceWithdrawalsDao, CmUserBalanceWithdrawals> {
 public class CmUserBalanceWithdrawalsService extends CrudService<CmUserBalanceWithdrawalsDao, CmUserBalanceWithdrawals> {
 
 
-	@Resource
-	CmUserBalanceWithdrawalsDao cmUserBalanceWithdrawalsDao;
-	public CmUserBalanceWithdrawals get(String id) {
-		return super.get(id);
-	}
-	
-	public List<CmUserBalanceWithdrawals> findList(CmUserBalanceWithdrawals cmUserBalanceWithdrawals) {
-		return super.findList(cmUserBalanceWithdrawals);
-	}
-	
-	public Page<CmUserBalanceWithdrawals> findPage(Page<CmUserBalanceWithdrawals> page, CmUserBalanceWithdrawals cmUserBalanceWithdrawals) {
-		return super.findPage(page, cmUserBalanceWithdrawals);
-	}
-	
-	@Transactional(readOnly = false)
-	public void save(CmUserBalanceWithdrawals cmUserBalanceWithdrawals) {
-		super.save(cmUserBalanceWithdrawals);
-	}
-	
-	@Transactional(readOnly = false)
-	public void delete(CmUserBalanceWithdrawals cmUserBalanceWithdrawals) {
-		super.delete(cmUserBalanceWithdrawals);
-	}
-
-	@Transactional(readOnly = false)
-	public void deleteById(Integer id) {
-		cmUserBalanceWithdrawalsDao.deleteById(id);
-	}
-	
+    @Resource
+    CmUserBalanceWithdrawalsDao cmUserBalanceWithdrawalsDao;
+    @Resource
+    private CmUserDao cmUserDao;
+    @Resource
+    private CmUserBalanceRecordDao cmUserBalanceRecordDao;
+
+    public CmUserBalanceWithdrawals get(String id) {
+        CmUserBalanceWithdrawals withdrawals = super.get(id);
+        setUserName(withdrawals);
+        return withdrawals;
+    }
+
+    private void setUserName(CmUserBalanceWithdrawals withdrawals) {
+        if (withdrawals != null) {
+            if (StringUtils.isNotBlank(withdrawals.getApplicant())) {
+                User user = UserUtils.get(withdrawals.getApplicant());
+                if (user != null) {
+                    withdrawals.setApplicantName(user.getName());
+                }
+            }
+            if (StringUtils.isNotBlank(withdrawals.getReviewer())) {
+                User user = UserUtils.get(withdrawals.getReviewer());
+                if (user != null) {
+                    withdrawals.setReviewerName(user.getName());
+                }
+            }
+        }
+    }
+
+    public List<CmUserBalanceWithdrawals> findList(CmUserBalanceWithdrawals cmUserBalanceWithdrawals) {
+        return super.findList(cmUserBalanceWithdrawals);
+    }
+
+    public Page<CmUserBalanceWithdrawals> findPage(Page<CmUserBalanceWithdrawals> page, CmUserBalanceWithdrawals cmUserBalanceWithdrawals) {
+        Page<CmUserBalanceWithdrawals> withdrawalsPage = super.findPage(page, cmUserBalanceWithdrawals);
+        List<CmUserBalanceWithdrawals> withdrawalsList = withdrawalsPage.getList();
+        if (withdrawalsList != null && withdrawalsList.size() > 0) {
+            for (CmUserBalanceWithdrawals withdrawals : withdrawalsList) {
+                setUserName(withdrawals);
+            }
+
+        }
+        return withdrawalsPage;
+    }
+
+    @Transactional(readOnly = false)
+    public void save(CmUserBalanceWithdrawals cmUserBalanceWithdrawals) {
+        CmUser cmUser = cmUserDao.get(String.valueOf(cmUserBalanceWithdrawals.getUserID()));
+        if (MathUtil.compare(cmUser.getAbleUserMoney(), cmUserBalanceWithdrawals.getWithdrawalsFee()) > -1) {
+            //余额必须大于等于提现金额
+            User user = UserUtils.getUser();
+            Date date = new Date();
+            cmUserBalanceWithdrawals.setAddDate(date);
+            cmUserBalanceWithdrawals.setApplicant(user.getId());
+            cmUserBalanceWithdrawals.setStatus("0");
+            cmUserBalanceWithdrawals.setDelFlag("0");
+            cmUserBalanceWithdrawalsDao.insert(cmUserBalanceWithdrawals);
+        }
+    }
+
+    @Transactional(readOnly = false)
+    public void delete(CmUserBalanceWithdrawals cmUserBalanceWithdrawals) {
+        cmUserBalanceWithdrawalsDao.deleteById(Integer.valueOf(cmUserBalanceWithdrawals.getId()));
+    }
+
+    @Transactional(readOnly = false)
+    public void deleteById(Integer id) {
+        cmUserBalanceWithdrawalsDao.deleteById(id);
+    }
+
+    @Transactional(readOnly = false)
+    public void withdrawalReviewData(CmUserBalanceWithdrawals cmUserBalanceWithdrawals) {
+        User user = UserUtils.getUser();
+        Date time = new Date();
+        if (StringUtils.isNotBlank(cmUserBalanceWithdrawals.getReason())) {
+            //审核不通过
+            cmUserBalanceWithdrawals.setStatus("2");
+            cmUserBalanceWithdrawals.setReviewer(user.getId());
+            cmUserBalanceWithdrawals.setReviewTime(time);
+            cmUserBalanceWithdrawalsDao.update(cmUserBalanceWithdrawals);
+        } else {
+            //审核通过
+            cmUserBalanceWithdrawals.setStatus("1");
+            cmUserBalanceWithdrawals.setReviewer(user.getId());
+            cmUserBalanceWithdrawals.setReviewTime(time);
+            cmUserBalanceWithdrawals.setPayTime(time);
+            cmUserBalanceWithdrawalsDao.update(cmUserBalanceWithdrawals);
+
+            //添加余额收支记录
+            CmUserBalanceRecord cmUserBalanceRecord = new CmUserBalanceRecord();
+            cmUserBalanceRecord.setUserId(cmUserBalanceWithdrawals.getUserID().intValue());
+            cmUserBalanceRecord.setType("2");
+            cmUserBalanceRecord.setBalanceType("5");
+            cmUserBalanceRecord.setAddDate(time);
+            //提现金额
+            BigDecimal withdrawalsFee = cmUserBalanceWithdrawals.getWithdrawalsFee();
+            cmUserBalanceRecord.setAmount(String.valueOf(withdrawalsFee));
+            cmUserBalanceRecord.setWithdrawalsId(Integer.parseInt(cmUserBalanceWithdrawals.getId()));//提现信息ID
+            cmUserBalanceRecord.setDelFlag("0");
+            cmUserBalanceRecordDao.insertUserBalanceRecord(cmUserBalanceRecord);
+
+            //更新用户余额总金额
+            CmUser cmUser = cmUserDao.get(String.valueOf(cmUserBalanceWithdrawals.getUserID()));
+            cmUser.setUserID(cmUserBalanceWithdrawals.getUserID().intValue());
+            BigDecimal sub = MathUtil.sub(cmUser.getAbleUserMoney(), withdrawalsFee);
+            cmUser.setAbleUserMoney(sub.doubleValue());
+            cmUser.setUserMoney(sub.doubleValue());
+            cmUserDao.updateMoney(cmUser);
+        }
+    }
+
+    @Transactional(readOnly = false)
+    public void withdrawalEditSave(CmUserBalanceWithdrawals cmUserBalanceWithdrawals) {
+        cmUserBalanceWithdrawalsDao.update(cmUserBalanceWithdrawals);
+    }
+
+    @Transactional(readOnly = false)
+    public void rollBackApply(CmUserBalanceWithdrawals cmUserBalanceWithdrawals) {
+        //撤销提现记录
+        cmUserBalanceRecordDao.updateByWithdrawalsId(cmUserBalanceWithdrawals.getId());
+        //撤销用户余额金额
+        CmUser cmUser = cmUserDao.get(String.valueOf(cmUserBalanceWithdrawals.getUserID()));
+        BigDecimal userMoney = MathUtil.add(cmUser.getAbleUserMoney(), cmUserBalanceWithdrawals.getWithdrawalsFee());
+        cmUser.setAbleUserMoney(userMoney.doubleValue());
+        cmUser.setUserMoney(userMoney.doubleValue());
+        cmUserDao.updateMoney(cmUser);
+        //撤销提现记录
+        cmUserBalanceWithdrawals.setStatus("0");
+        cmUserBalanceWithdrawals.setReviewTime(null);
+        cmUserBalanceWithdrawals.setReviewer(null);
+        cmUserBalanceWithdrawals.setPayTime(null);
+        cmUserBalanceWithdrawalsDao.update(cmUserBalanceWithdrawals);
+    }
 }
 }

+ 119 - 0
src/main/java/com/caimei/modules/user/web/ClubTemporaryController.java

@@ -0,0 +1,119 @@
+package com.caimei.modules.user.web;
+
+import com.caimei.modules.user.entity.ClubConfirmRecord;
+import com.caimei.modules.user.entity.ClubTemporary;
+import com.caimei.modules.user.service.ClubTemporaryService;
+import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.thinkgem.jeesite.common.web.BaseController;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 未确认机构Controller
+ *
+ * @author plf
+ * @version 2021-07-13
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/user/clubTemporary")
+public class ClubTemporaryController extends BaseController {
+
+    @Autowired
+    private ClubTemporaryService clubTemporaryService;
+
+    @ModelAttribute
+    public ClubTemporary get(@RequestParam(required = false) String id) {
+        ClubTemporary entity = null;
+        if (StringUtils.isNotBlank(id)) {
+            entity = clubTemporaryService.get(id);
+        }
+        if (entity == null) {
+            entity = new ClubTemporary();
+        }
+        return entity;
+    }
+
+    @RequiresPermissions("club:clubTemporary:view")
+    @RequestMapping(value = {"list", ""})
+    public String list(ClubTemporary clubTemporary, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<ClubTemporary> page = clubTemporaryService.findPage(new Page<ClubTemporary>(request, response), clubTemporary);
+        model.addAttribute("page", page);
+        model.addAttribute("clubTemporary", clubTemporary);
+        return "modules/user/clubTemporaryList";
+    }
+
+    @RequiresPermissions("club:clubTemporary:view")
+    @RequestMapping(value = "form")
+    public String form(ClubTemporary clubTemporary, Model model) {
+        model.addAttribute("clubTemporary", clubTemporary);
+        return "modules/user/clubTemporaryForm";
+    }
+
+
+    @RequestMapping(value = "save")
+    public String save(ClubTemporary clubTemporary, Model model, RedirectAttributes redirectAttributes) {
+        if (!beanValidator(model, clubTemporary)) {
+            return form(clubTemporary, model);
+        }
+        clubTemporaryService.save(clubTemporary);
+        addMessage(redirectAttributes, "保存未确认机构成功");
+        return "redirect:" + Global.getAdminPath() + "/user/clubTemporary/?repage";
+    }
+
+    @RequestMapping(value = "delete")
+    public String delete(ClubTemporary clubTemporary, RedirectAttributes redirectAttributes) {
+        clubTemporaryService.delete(clubTemporary);
+        addMessage(redirectAttributes, "删除未确认机构成功");
+        return "redirect:" + Global.getAdminPath() + "/user/clubTemporary/?repage";
+    }
+
+    /**
+     * 去确认注册页面
+     */
+    @RequestMapping("registerPage")
+    public String registerPage(ClubTemporary clubTemporary, Model model) {
+        model.addAttribute("clubTemporary", clubTemporary);
+        return "modules/user/registerPage";
+    }
+
+    /**
+     * 保存确认注册信息
+     */
+    @RequestMapping("registerSave")
+    public String registerSave(ClubTemporary clubTemporary, RedirectAttributes redirectAttributes) {
+        addMessage(redirectAttributes, "确认注册成功");
+        try {
+            clubTemporaryService.registerSave(clubTemporary);
+        } catch (Exception e) {
+            addMessage(redirectAttributes, e.getMessage());
+            e.printStackTrace();
+        }
+        return "redirect:" + Global.getAdminPath() + "/user/clubTemporary/?repage";
+    }
+
+    /**
+     * 确认记录
+     */
+    @RequestMapping("confirmRecord")
+    public String confirmRecord(ClubTemporary clubTemporary, Model model) {
+        if (StringUtils.isBlank(clubTemporary.getId())) {
+            clubTemporary = clubTemporaryService.findByConfirmUserId(clubTemporary.getConfirmUserId());
+        }
+        List<ClubConfirmRecord> recordList = clubTemporaryService.confirmRecord(clubTemporary);
+        model.addAttribute("recordList", recordList);
+        model.addAttribute("clubTemporary", clubTemporary);
+        return "modules/user/clubConfirmRecordList";
+    }
+}

+ 4 - 4
src/main/java/com/caimei/modules/user/web/CmUserBalanceRecordController.java

@@ -123,7 +123,7 @@ public class CmUserBalanceRecordController extends BaseController {
         return "redirect:" + Global.getAdminPath() + "/user/cmUserBalanceRecord/?repage";
         return "redirect:" + Global.getAdminPath() + "/user/cmUserBalanceRecord/?repage";
     }
     }
 
 
-    @RequiresPermissions("user:cmUserBalanceRecord:recharge")
+    @RequiresPermissions("balance:cmUserBalanceRecord:recharge")
     @RequestMapping(value = "recharge")
     @RequestMapping(value = "recharge")
     public String recharge(Integer userId, Model model) {
     public String recharge(Integer userId, Model model) {
         CmUser cmUser = cmNormalUserService.get(String.valueOf(userId));
         CmUser cmUser = cmNormalUserService.get(String.valueOf(userId));
@@ -175,7 +175,7 @@ public class CmUserBalanceRecordController extends BaseController {
         return "modules/user/toCmRechargeForm";
         return "modules/user/toCmRechargeForm";
     }
     }
 
 
-    @RequiresPermissions("user:cmUserBalanceRecord:edit")
+    @RequiresPermissions("balance:cmUserBalanceWithdrawals:withdrawalReview")
     @RequestMapping(value = "userWithdrawals")
     @RequestMapping(value = "userWithdrawals")
     public String userWithdrawals(CmUser cmuser, HttpServletRequest request, HttpServletResponse response, Model model) {
     public String userWithdrawals(CmUser cmuser, HttpServletRequest request, HttpServletResponse response, Model model) {
         CmUser cmUser = cmNormalUserService.get(String.valueOf(cmuser.getUserID()));
         CmUser cmUser = cmNormalUserService.get(String.valueOf(cmuser.getUserID()));
@@ -193,7 +193,7 @@ public class CmUserBalanceRecordController extends BaseController {
         return "modules/user/toCmWithdrawalsForm";
         return "modules/user/toCmWithdrawalsForm";
     }
     }
 
 
-    @RequestMapping(value = "cancelWithdrawals")
+    /*@RequestMapping(value = "cancelWithdrawals")
     public String cancelWithdrawals(String id, HttpServletRequest request, HttpServletResponse response, Model model) {
     public String cancelWithdrawals(String id, HttpServletRequest request, HttpServletResponse response, Model model) {
         CmUserBalanceRecord cmUserBalanceRecord = cmUserBalanceRecordService.get(id);
         CmUserBalanceRecord cmUserBalanceRecord = cmUserBalanceRecordService.get(id);
         //撤销提现记录
         //撤销提现记录
@@ -211,7 +211,7 @@ public class CmUserBalanceRecordController extends BaseController {
         Integer withdrawalsId = cmUserBalanceRecord.getWithdrawalsId();
         Integer withdrawalsId = cmUserBalanceRecord.getWithdrawalsId();
         cmUserBalanceWithdrawalsService.deleteById(withdrawalsId);
         cmUserBalanceWithdrawalsService.deleteById(withdrawalsId);
         return "redirect:" + Global.getAdminPath() + "/user/cmUserBalanceRecord/userBalanceRecord?userId=" + userId;
         return "redirect:" + Global.getAdminPath() + "/user/cmUserBalanceRecord/userBalanceRecord?userId=" + userId;
-    }
+    }*/
 
 
     @RequestMapping(value = "cancelRecharg")
     @RequestMapping(value = "cancelRecharg")
     public String cancelRecharg(String id, HttpServletRequest request, HttpServletResponse response, Model model) {
     public String cancelRecharg(String id, HttpServletRequest request, HttpServletResponse response, Model model) {

+ 142 - 91
src/main/java/com/caimei/modules/user/web/CmUserBalanceWithdrawalsController.java

@@ -1,13 +1,11 @@
 package com.caimei.modules.user.web;
 package com.caimei.modules.user.web;
 
 
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import com.caimei.modules.user.dao.CmUserDao;
-import com.caimei.modules.user.entity.CmUser;
-import com.caimei.modules.user.entity.CmUserBalanceRecord;
-import com.caimei.modules.user.service.CmUserBalanceRecordService;
+import com.caimei.modules.user.entity.CmUserBalanceWithdrawals;
+import com.caimei.modules.user.service.CmUserBalanceWithdrawalsService;
+import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.thinkgem.jeesite.common.web.BaseController;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
@@ -17,17 +15,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 
-import com.thinkgem.jeesite.common.config.Global;
-import com.thinkgem.jeesite.common.persistence.Page;
-import com.thinkgem.jeesite.common.web.BaseController;
-import com.thinkgem.jeesite.common.utils.StringUtils;
-import com.caimei.modules.user.entity.CmUserBalanceWithdrawals;
-import com.caimei.modules.user.service.CmUserBalanceWithdrawalsService;
-
-import java.util.Date;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
 
 
 /**
 /**
  * 会所余额提现Controller
  * 会所余额提现Controller
+ *
  * @author lijun
  * @author lijun
  * @version 2019-11-12
  * @version 2019-11-12
  */
  */
@@ -35,80 +29,137 @@ import java.util.Date;
 @RequestMapping(value = "${adminPath}/user/cmUserBalanceWithdrawals")
 @RequestMapping(value = "${adminPath}/user/cmUserBalanceWithdrawals")
 public class CmUserBalanceWithdrawalsController extends BaseController {
 public class CmUserBalanceWithdrawalsController extends BaseController {
 
 
-	@Autowired
-	private CmUserBalanceWithdrawalsService cmUserBalanceWithdrawalsService;
-	@Autowired
-	private CmUserBalanceRecordService cmUserBalanceRecordService;
-	@Resource
-	private CmUserDao cmUserDao;
-	
-	@ModelAttribute
-	public CmUserBalanceWithdrawals get(@RequestParam(required=false) String id) {
-		CmUserBalanceWithdrawals entity = null;
-		if (StringUtils.isNotBlank(id)){
-			entity = cmUserBalanceWithdrawalsService.get(id);
-		}
-		if (entity == null){
-			entity = new CmUserBalanceWithdrawals();
-		}
-		return entity;
-	}
-	
-	@RequiresPermissions("user:cmUserBalanceWithdrawals:view")
-	@RequestMapping(value = {"list", ""})
-	public String list(CmUserBalanceWithdrawals cmUserBalanceWithdrawals, HttpServletRequest request, HttpServletResponse response, Model model) {
-		Page<CmUserBalanceWithdrawals> page = cmUserBalanceWithdrawalsService.findPage(new Page<CmUserBalanceWithdrawals>(request, response), cmUserBalanceWithdrawals); 
-		model.addAttribute("page", page);
-		return "modules/user/cmUserBalanceWithdrawalsList";
-	}
-
-	@RequiresPermissions("user:cmUserBalanceWithdrawals:view")
-	@RequestMapping(value = "form")
-	public String form(CmUserBalanceWithdrawals cmUserBalanceWithdrawals, Model model) {
-		model.addAttribute("cmUserBalanceWithdrawals", cmUserBalanceWithdrawals);
-		return "modules/user/cmUserBalanceWithdrawalsForm";
-	}
-
-	@RequiresPermissions("user:cmUserBalanceWithdrawals:edit")
-	@RequestMapping(value = "save")
-	public String save(CmUserBalanceWithdrawals cmUserBalanceWithdrawals, Model model, RedirectAttributes redirectAttributes) {
-		if (!beanValidator(model, cmUserBalanceWithdrawals)){
-			return form(cmUserBalanceWithdrawals, model);
-		}
-		Date date = new Date();
-		Integer userID = cmUserBalanceWithdrawals.getUserID();
-		cmUserBalanceWithdrawals.setAddDate(date);
-		cmUserBalanceWithdrawalsService.save(cmUserBalanceWithdrawals);//保存提现记录
-		//添加余额收支记录
-		CmUserBalanceRecord cmUserBalanceRecord = new CmUserBalanceRecord();
-		cmUserBalanceRecord.setUserId(userID);
-		cmUserBalanceRecord.setType("2");
-		cmUserBalanceRecord.setBalanceType("5");
-		cmUserBalanceRecord.setAddDate(date);
-		cmUserBalanceRecord.setAmount(cmUserBalanceWithdrawals.getWithdrawalsFee());
-		cmUserBalanceRecord.setWithdrawalsId(Integer.parseInt(cmUserBalanceWithdrawals.getId()));//提现信息ID
-		cmUserBalanceRecord.setDelFlag("0");
-		cmUserBalanceRecordService.insertUserBalanceRecord(cmUserBalanceRecord);
-
-		//更新用户余额总金额
-		CmUser cmUser = cmUserDao.get(String.valueOf(userID));
-		String amount = cmUserBalanceWithdrawals.getWithdrawalsFee();//提现金额
-		double amountDouble = Double.parseDouble(amount);
-		cmUser.setUserID(userID);
-		cmUser.setAbleUserMoney(cmUser.getAbleUserMoney() - amountDouble );
-		cmUser.setUserMoney(cmUser.getUserMoney() - amountDouble);
-		cmUserDao.updateMoney(cmUser);
-
-		addMessage(redirectAttributes, "提现成功");
-		return "redirect:"+Global.getAdminPath()+"/user/cmUserBalanceRecord/userBalanceRecord?userId="+userID;
-	}
-	
-	@RequiresPermissions("user:cmUserBalanceWithdrawals:delete")
-	@RequestMapping(value = "delete")
-	public String delete(CmUserBalanceWithdrawals cmUserBalanceWithdrawals, RedirectAttributes redirectAttributes) {
-		cmUserBalanceWithdrawalsService.delete(cmUserBalanceWithdrawals);
-		addMessage(redirectAttributes, "删除成功");
-		return "redirect:"+Global.getAdminPath()+"/user/cmUserBalanceWithdrawals/";
-	}
+    @Autowired
+    private CmUserBalanceWithdrawalsService cmUserBalanceWithdrawalsService;
+
+    @ModelAttribute
+    public CmUserBalanceWithdrawals get(@RequestParam(required = false) String id) {
+        CmUserBalanceWithdrawals entity = null;
+        if (StringUtils.isNotBlank(id)) {
+            entity = cmUserBalanceWithdrawalsService.get(id);
+        }
+        if (entity == null) {
+            entity = new CmUserBalanceWithdrawals();
+        }
+        return entity;
+    }
+
+    @RequiresPermissions("balance:cmUserBalanceWithdrawals:view")
+    @RequestMapping(value = {"list", ""})
+    public String list(CmUserBalanceWithdrawals cmUserBalanceWithdrawals, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<CmUserBalanceWithdrawals> page = cmUserBalanceWithdrawalsService.findPage(new Page<CmUserBalanceWithdrawals>(request, response), cmUserBalanceWithdrawals);
+        model.addAttribute("page", page);
+        return "modules/user/cmUserBalanceWithdrawalsList";
+    }
+
+    @RequiresPermissions("balance:cmUserBalanceWithdrawals:view")
+    @RequestMapping(value = "form")
+    public String form(CmUserBalanceWithdrawals cmUserBalanceWithdrawals, Model model) {
+        model.addAttribute("cmUserBalanceWithdrawals", cmUserBalanceWithdrawals);
+        return "modules/user/cmUserBalanceWithdrawalsForm";
+    }
+
+    /**
+     * 申请提现
+     */
+    @RequiresPermissions("balance:cmUserBalanceWithdrawals:withdrawals")
+    @RequestMapping(value = "save")
+    public String save(CmUserBalanceWithdrawals cmUserBalanceWithdrawals, Model model, RedirectAttributes redirectAttributes) {
+        if (!beanValidator(model, cmUserBalanceWithdrawals)) {
+            return form(cmUserBalanceWithdrawals, model);
+        }
+        cmUserBalanceWithdrawalsService.save(cmUserBalanceWithdrawals);//保存提现记录
+        addMessage(redirectAttributes, "提交申请成功");
+        return "redirect:" + Global.getAdminPath() + "/user/cmUserBalanceWithdrawals";
+    }
+
+    /**
+     * 取消提现
+     */
+    @RequiresPermissions("balance:cmUserBalanceWithdrawals:delete")
+    @RequestMapping(value = "delete")
+    public String delete(CmUserBalanceWithdrawals cmUserBalanceWithdrawals, RedirectAttributes redirectAttributes) {
+        cmUserBalanceWithdrawalsService.delete(cmUserBalanceWithdrawals);
+        addMessage(redirectAttributes, "取消成功");
+        return "redirect:" + Global.getAdminPath() + "/user/cmUserBalanceWithdrawals/";
+    }
+
+    /**
+     * 查看详情
+     */
+    @RequiresPermissions("balance:cmUserBalanceWithdrawals:view")
+    @RequestMapping("viewDetails")
+    public String viewDetails(CmUserBalanceWithdrawals cmUserBalanceWithdrawals, Model model) {
+        model.addAttribute("balanceWithdrawals", cmUserBalanceWithdrawals);
+        return "modules/user/userBalanceWithdrawalsDetails";
+    }
+
+    /**
+     * 去提现审核页面
+     */
+    @RequiresPermissions("balance:cmUserBalanceWithdrawals:withdrawalReview")
+    @RequestMapping("withdrawalReview")
+    public String withdrawalReview(CmUserBalanceWithdrawals cmUserBalanceWithdrawals, Model model) {
+        model.addAttribute("balanceWithdrawals", cmUserBalanceWithdrawals);
+        return "modules/user/userBalanceWithdrawalsReview";
+    }
+
+    /**
+     * 提现审核
+     */
+    @RequiresPermissions("balance:cmUserBalanceWithdrawals:withdrawalReview")
+    @RequestMapping("withdrawalReviewData")
+    public String withdrawalReviewData(CmUserBalanceWithdrawals cmUserBalanceWithdrawals, RedirectAttributes redirectAttributes) {
+        if (!"0".equals(cmUserBalanceWithdrawals.getStatus())) {
+            addMessage(redirectAttributes, "请重新刷新页面");
+            return "redirect:" + Global.getAdminPath() + "/user/cmUserBalanceWithdrawals";
+        }
+        cmUserBalanceWithdrawalsService.withdrawalReviewData(cmUserBalanceWithdrawals);
+        addMessage(redirectAttributes, "审核成功");
+        return "redirect:" + Global.getAdminPath() + "/user/cmUserBalanceWithdrawals/viewDetails?id=" + cmUserBalanceWithdrawals.getId();
+    }
+
+    /**
+     * 去编辑页面
+     */
+    @RequiresPermissions("balance:cmUserBalanceWithdrawals:edit")
+    @RequestMapping("withdrawalEdit")
+    public String withdrawalEdit(CmUserBalanceWithdrawals cmUserBalanceWithdrawals, Model model) {
+        cmUserBalanceWithdrawals.setStartTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(cmUserBalanceWithdrawals.getPayTime()));
+        model.addAttribute("balanceWithdrawals", cmUserBalanceWithdrawals);
+        return "modules/user/userBalanceWithdrawalsEdit";
+    }
+
+    /**
+     * 编辑保存
+     */
+    @RequiresPermissions("balance:cmUserBalanceWithdrawals:edit")
+    @RequestMapping("withdrawalEditSave")
+    public String withdrawalEditSave(CmUserBalanceWithdrawals cmUserBalanceWithdrawals, RedirectAttributes redirectAttributes) {
+        cmUserBalanceWithdrawalsService.withdrawalEditSave(cmUserBalanceWithdrawals);
+        addMessage(redirectAttributes, "修改成功");
+        return "redirect:" + Global.getAdminPath() + "/user/cmUserBalanceWithdrawals";
+    }
+
+    /**
+     * 打印
+     */
+    @RequiresPermissions("balance:cmUserBalanceWithdrawals:printDetail")
+    @RequestMapping("printDetail")
+    public String printDetail(CmUserBalanceWithdrawals cmUserBalanceWithdrawals, Model model) {
+        model.addAttribute("balanceWithdrawals", cmUserBalanceWithdrawals);
+        return "modules/user/userBalanceWithdrawalsDetails";
+    }
+
+    /**
+     * 撤销重来
+     */
+    @RequiresPermissions("balance:cmUserBalanceWithdrawals:rollBackApply")
+    @RequestMapping("rollBackApply")
+    public String rollBackApply(CmUserBalanceWithdrawals cmUserBalanceWithdrawals, RedirectAttributes redirectAttributes) {
+        cmUserBalanceWithdrawalsService.rollBackApply(cmUserBalanceWithdrawals);
+        addMessage(redirectAttributes, "撤销成功");
+        return "redirect:" + Global.getAdminPath() + "/user/cmUserBalanceWithdrawals";
+    }
 
 
 }
 }

+ 5 - 1
src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java

@@ -385,7 +385,11 @@ public class AgencyController extends BaseController {
         newCmClub.setDepartment(cmClubinfo.getDepartment());
         newCmClub.setDepartment(cmClubinfo.getDepartment());
         newCmClub.setMainpro(cmClubinfo.getMainpro());
         newCmClub.setMainpro(cmClubinfo.getMainpro());
         newCmClub.setContractEmail1(cmClubinfo.getContractEmail1());
         newCmClub.setContractEmail1(cmClubinfo.getContractEmail1());
-        newCmClub.setLinkMan1(bindMobile);
+        newCmClub.setContractMobile(bindMobile);
+        newCmClub.setLinkMan(userName);
+        newCmClub.setLinkMan1(userName);
+        newCmClub.setName(name);
+        newCmClub.setSname(cmClubinfo.getSname());
         CmUser user = new CmUser();
         CmUser user = new CmUser();
         user.setUserID(newCmClub.getUserID());
         user.setUserID(newCmClub.getUserID());
         user.setEmail(cmClubinfo.getContractEmail1());
         user.setEmail(cmClubinfo.getContractEmail1());

+ 20 - 17
src/main/resources/mappings/modules/cmpage/CmPageCentreMapper.xml

@@ -176,26 +176,29 @@
 
 
 	<select id="findFloorImage" resultType="com.caimei.modules.newhome.entity.NewPageFloorImage">
 	<select id="findFloorImage" resultType="com.caimei.modules.newhome.entity.NewPageFloorImage">
 		SELECT
 		SELECT
-		  id,
-		  floorId,
-		  centreId,
-		  productId,
-		  `name`,
-		  content,
-		  link,
-		  image,
-		  appletsImage,
-		  adsImage,
-		  `label`,
-		  pcStatus,
-		  appletsStatus,
-		  sort,
-		  DATE_FORMAT(createDate,'%Y-%m-%d %H:%i:%S') AS createDate
+		  a.id,
+		  a.floorId,
+		  a.centreId,
+		  a.productId,
+		  IF(a.productId IS NULL, a.name, p.name) AS name,
+		  a.content,
+		  a.link,
+		  IF(a.productId IS NULL, a.image, p.mainImage) AS image,
+		  a.appletsImage,
+		  a.adsImage,
+		  a.`label`,
+		  a.pcStatus,
+		  a.appletsStatus,
+		  a.sort,
+		  DATE_FORMAT(a.createDate, '%Y-%m-%d %H:%i:%S') AS createDate,
+		  p.validFlag
 		FROM
 		FROM
-		  new_page_floor_image
+		  new_page_floor_image a
+		  LEFT JOIN product p ON a.productId = p.productID
 		WHERE
 		WHERE
-		  centreId = #{centreId}
+		  a.centreId = #{centreId}
 	</select>
 	</select>
+
 	<select id="findPageTitle" resultType="java.lang.String">
 	<select id="findPageTitle" resultType="java.lang.String">
 		select title from cm_page where id = #{pageId}
 		select title from cm_page where id = #{pageId}
 	</select>
 	</select>

+ 18 - 16
src/main/resources/mappings/modules/newhome/NewPageFloorMapper.xml

@@ -149,24 +149,26 @@
 
 
 	<select id="findFloorImage" resultType="com.caimei.modules.newhome.entity.NewPageFloorImage">
 	<select id="findFloorImage" resultType="com.caimei.modules.newhome.entity.NewPageFloorImage">
 		SELECT
 		SELECT
-		  id,
-		  floorId,
-		  productId,
-		  `name`,
-		  content,
-		  link,
-		  image,
-		  appletsImage,
-		  adsImage,
-		  `label`,
-		  pcStatus,
-		  appletsStatus,
-		  sort,
-		  DATE_FORMAT(createDate,'%Y-%m-%d %H:%i:%S') AS createDate
+		  a.id,
+		  a.floorId,
+		  a.productId,
+		  IF(a.productId IS NULL, a.name, p.name) AS name,
+		  a.content,
+		  a.link,
+		  IF(a.productId IS NULL, a.image, p.mainImage) AS image,
+		  a.appletsImage,
+		  a.adsImage,
+		  a.`label`,
+		  a.pcStatus,
+		  a.appletsStatus,
+		  a.sort,
+		  DATE_FORMAT(a.createDate, '%Y-%m-%d %H:%i:%S') AS createDate,
+		  p.validFlag
 		FROM
 		FROM
-		  new_page_floor_image
+		  new_page_floor_image a
+		  LEFT JOIN product p ON a.productId = p.productID
 		WHERE
 		WHERE
-		  floorId = #{floorId}
+		  a.floorId = #{floorId}
 	</select>
 	</select>
 
 
 	<insert id="insertFloorContent">
 	<insert id="insertFloorContent">

+ 2 - 0
src/main/resources/mappings/modules/order/CmDiscernReceiptMapper.xml

@@ -566,6 +566,8 @@
 			cso.shopOrderNo AS shopOrderNo,
 			cso.shopOrderNo AS shopOrderNo,
 			cso.shopOrderID AS shopOrderID,
 			cso.shopOrderID AS shopOrderID,
 			cso.needPayAmount AS shopOrderAmount,
 			cso.needPayAmount AS shopOrderAmount,
+			cso.shouldPayShopAmount AS shouldPayShopAmount,
+			cso.payedShopAmount AS payedShopAmount,
 			s.name AS shopName
 			s.name AS shopName
 		from cm_shop_order cso
 		from cm_shop_order cso
 		left join cm_order co on cso.orderID = co.orderID
 		left join cm_order co on cso.orderID = co.orderID

+ 20 - 0
src/main/resources/mappings/modules/order/CmPayShopMapper.xml

@@ -258,4 +258,24 @@
 		where id=1
 		where id=1
 	</update>
 	</update>
 
 
+	<select id="getDiscernReceipts" resultType="com.caimei.modules.order.entity.CmDiscernReceipt">
+		SELECT
+		  cdr.id,
+		  cdr.payType,
+		  cdr.receiptType,
+		  cdr.receiptAmount,
+		  cdr.receiptDate
+		FROM
+		  cm_discern_receipt cdr
+		  LEFT JOIN cm_receipt_order_relation cror ON cdr.id = cror.receiptID
+		WHERE
+		  cror.relationType = 1
+		  AND cror.delFlag = 0
+		  AND cror.orderID = #{shopOrderId}
+		  AND cdr.receiptType = 5
+		  AND cdr.receiptStatus = 2
+		ORDER BY
+		  receiptDate DESC
+	</select>
+
 </mapper>
 </mapper>

+ 15 - 0
src/main/resources/mappings/modules/order/CmRefundShopRecordMapper.xml

@@ -162,4 +162,19 @@
 		LIMIT
 		LIMIT
 		  1
 		  1
 	</select>
 	</select>
+
+	<select id="findShopRefund" resultType="java.math.BigDecimal">
+        SELECT
+          SUM(cdr.receiptAmount)
+        FROM
+          cm_receipt_order_relation cror
+          LEFT JOIN cm_discern_receipt cdr ON cdr.id = cror.receiptID
+        WHERE
+          cror.relationType = 1
+          AND cror.delFlag = 0
+          AND cror.orderID = #{shopOrderId}
+          AND cdr.delFlag = 0
+          AND cdr.receiptType = 5
+          AND cdr.receiptStatus = 2
+    </select>
 </mapper>
 </mapper>

+ 1 - 0
src/main/resources/mappings/modules/order/OrderMapper.xml

@@ -706,6 +706,7 @@
         WHERE cso.orderID = #{orderID}
         WHERE cso.orderID = #{orderID}
             AND cosr.delFlag = '0'
             AND cosr.delFlag = '0'
             AND cosr.status = '1'
             AND cosr.status = '1'
+            AND cosr.paymentType IN (1,2)
         GROUP BY cso.orderID
         GROUP BY cso.orderID
     </select>
     </select>
     <select id="findPromotionsByIds" resultType="com.caimei.modules.product.entity.CmPromotion">
     <select id="findPromotionsByIds" resultType="com.caimei.modules.product.entity.CmPromotion">

+ 22 - 7
src/main/resources/mappings/modules/product/ProductMapper.xml

@@ -141,14 +141,17 @@
 		a.taxPoint as "taxPoint",
 		a.taxPoint as "taxPoint",
 		a.priceType as "priceType",
 		a.priceType as "priceType",
 		a.tags as "tags",
 		a.tags as "tags",
-		a.machineType as "machineType"
+		a.machineType as "machineType",
+		a.trainingMethod as "trainingMethod",
+		a.trainingType as "trainingType",
+		a.trainingFee as "trainingFee"
 	</sql>
 	</sql>
 
 
 	<sql id="productJoins">
 	<sql id="productJoins">
 		LEFT JOIN shop s on s.shopID = a.shopID
 		LEFT JOIN shop s on s.shopID = a.shopID
 	</sql>
 	</sql>
 	<sql id="ActivityJoins">
 	<sql id="ActivityJoins">
-		LEFT JOIN shop s on s.shopID = a.shopID INNER JOIN tinytype AS b ON a.`tinyTypeID` = b.`tinyTypeID` INNER JOIN smalltype AS c ON b.`smallTypeID` = c.`smallTypeID` INNER JOIN bigtype AS d ON c.`bigTypeID` = d.`bigTypeID`
+		LEFT JOIN shop s on s.shopID = a.shopID
 	</sql>
 	</sql>
 
 
 	<update id="saveSort">
 	<update id="saveSort">
@@ -1689,14 +1692,17 @@
 		<include refid="ActivityJoins"/>
 		<include refid="ActivityJoins"/>
 		<where>
 		<where>
 			<choose>
 			<choose>
-				<when test="tinyTypeID != null and tinyTypeID != ''">
-					AND b.tinyTypeID = #{tinyTypeID}
+				<when test="commodityType != null and commodityType != ''">
+					AND a.commodityType = #{commodityType}
+				</when>
+				<when test="bigTypeID != null and bigTypeID != ''">
+					AND a.bigTypeID = #{bigTypeID}
 				</when>
 				</when>
 				<when test="smallTypeID != null and smallTypeID != ''">
 				<when test="smallTypeID != null and smallTypeID != ''">
-					AND c.smallTypeID = #{smallTypeID}
+					AND a.smallTypeID = #{smallTypeID}
 				</when>
 				</when>
-				<when test="bigTypeID != null and bigTypeID != ''">
-					AND d.bigTypeID = #{bigTypeID}
+				<when test="tinyTypeID != null and tinyTypeID != ''">
+					AND a.tinyTypeID = #{tinyTypeID}
 				</when>
 				</when>
 			</choose>
 			</choose>
 			<if test="productName != null and productName != ''">
 			<if test="productName != null and productName != ''">
@@ -2135,6 +2141,15 @@
       <if test="commodityType != null and commodityType != ''">
       <if test="commodityType != null and commodityType != ''">
 		  commodityType = #{commodityType},
 		  commodityType = #{commodityType},
 	  </if>
 	  </if>
+	  <if test="trainingMethod != null">
+		trainingMethod = #{trainingMethod},
+	  </if>
+	  <if test="trainingType != null">
+		trainingType = #{trainingType},
+	  </if>
+	  <if test="trainingFee != null">
+		trainingFee = #{trainingFee},
+	  </if>
     </set>
     </set>
     where productID = #{productID}
     where productID = #{productID}
   </update>
   </update>

+ 37 - 0
src/main/resources/mappings/modules/product/ProductNewMapper.xml

@@ -143,6 +143,9 @@
 		a.tags as "tags",
 		a.tags as "tags",
 		a.machineType as "machineType",
 		a.machineType as "machineType",
 		a.commodityType as "commodityType",
 		a.commodityType as "commodityType",
+		a.trainingMethod as "trainingMethod",
+		a.trainingType as "trainingType",
+		a.trainingFee as "trainingFee",
 		cshd.secondHandType as "secondHandType",
 		cshd.secondHandType as "secondHandType",
 		cshd.instrumentType as "instrumentType",
 		cshd.instrumentType as "instrumentType",
 		cshd.sold as "sold",
 		cshd.sold as "sold",
@@ -1128,5 +1131,39 @@
         #{delFlag})
         #{delFlag})
     </insert>
     </insert>
 
 
+    <insert id="insertStatusRecord">
+        INSERT INTO `product_status_record` (
+          `productId`,
+          `modifyUserId`,
+          `validFlag`,
+          `remarks`,
+          `addTime`
+        )
+        VALUES
+          (
+            #{productId},
+            #{modifyUserId},
+            #{validFlag},
+            #{remarks},
+            #{addTime}
+          )
+    </insert>
+
+    <select id="findAllStatusRemarks" resultType="com.caimei.modules.product.entity.ProductStatusRecord">
+        SELECT
+          id,
+          `productId`,
+          `modifyUserId`,
+          `validFlag`,
+          `remarks`,
+          `addTime`
+        FROM
+          `product_status_record`
+        WHERE
+          productId = #{productId}
+        ORDER BY
+          addTime DESC
+    </select>
+
 </mapper>
 </mapper>
 
 

+ 234 - 0
src/main/resources/mappings/modules/user/ClubTemporaryMapper.xml

@@ -0,0 +1,234 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.caimei.modules.user.dao.ClubTemporaryDao">
+    
+	<sql id="clubTemporaryColumns">
+		a.id AS "id",
+		a.userId AS "userId",
+		a.confirmUserId AS "confirmUserId",
+		a.name AS "name",
+		a.shortName AS "shortName",
+		a.bindMobile AS "bindMobile",
+		a.contractEmail AS "contractEmail",
+		a.linkMan AS "linkMan",
+		a.provinceId AS "provinceId",
+		a.cityId AS "cityId",
+		a.townId AS "townId",
+		a.address AS "address",
+		a.shopPhoto AS "shopPhoto",
+		a.businessLicense AS "businessLicense",
+		a.socialCreditCode AS "socialCreditCode",
+		a.firstClubType AS "firstClubType",
+		a.secondClubType AS "secondClubType",
+		a.department AS "department",
+		a.medicalPracticeLicense AS "medicalPracticeLicense",
+		a.mainProduct AS "mainProduct",
+		a.isAgreed AS "isAgreed",
+		a.addTime AS "addTime",
+		IFNULL(s.name,s.linkMan1) AS "spName"
+	</sql>
+	
+	<sql id="clubTemporaryJoins">
+		LEFT JOIN serviceprovider s ON s.userID = a.userId
+	</sql>
+    
+	<select id="get" resultType="ClubTemporary">
+		SELECT 
+			<include refid="clubTemporaryColumns"/>,
+		d.name AS "province",
+		c.name AS "city",
+		b.name AS  "town"
+		FROM club_temporary a
+		<include refid="clubTemporaryJoins"/>
+		LEFT JOIN town b ON b.townID=a.townID
+		LEFT JOIN city c ON c.cityID=b.cityID
+		LEFT JOIN province d ON d.provinceID=c.provinceID
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="ClubTemporary">
+		SELECT 
+			<include refid="clubTemporaryColumns"/>
+		FROM club_temporary a
+		<include refid="clubTemporaryJoins"/>
+		<where>
+			<if test="name != null and name != ''">
+				AND a.name LIKE 
+					<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
+					<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
+					<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
+			</if>
+			<if test="bindMobile != null and bindMobile != ''">
+				AND a.bindMobile LIKE 
+					<if test="dbName == 'oracle'">'%'||#{bindMobile}||'%'</if>
+					<if test="dbName == 'mssql'">'%'+#{bindMobile}+'%'</if>
+					<if test="dbName == 'mysql'">concat('%',#{bindMobile},'%')</if>
+			</if>
+			<if test="contractEmail != null and contractEmail != ''">
+				AND a.contractEmail LIKE 
+					<if test="dbName == 'oracle'">'%'||#{contractEmail}||'%'</if>
+					<if test="dbName == 'mssql'">'%'+#{contractEmail}+'%'</if>
+					<if test="dbName == 'mysql'">concat('%',#{contractEmail},'%')</if>
+			</if>
+			<if test="linkMan != null and linkMan != ''">
+				AND a.linkMan LIKE 
+					<if test="dbName == 'oracle'">'%'||#{linkMan}||'%'</if>
+					<if test="dbName == 'mssql'">'%'+#{linkMan}+'%'</if>
+					<if test="dbName == 'mysql'">concat('%',#{linkMan},'%')</if>
+			</if>
+			<if test="startTime != null and startTime != ''">
+				AND a.addTime <![CDATA[ > ]]> #{startTime}
+			</if>
+			<if test="endTime != null and endTime != ''">
+				AND a.addTime <![CDATA[ < ]]> #{endTime}
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.addTime DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="ClubTemporary">
+		SELECT 
+			<include refid="clubTemporaryColumns"/>
+		FROM club_temporary a
+		<include refid="clubTemporaryJoins"/>
+		<where>
+			
+		</where>		
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+			</otherwise>
+		</choose>
+	</select>
+	
+	<insert id="insert" parameterType="ClubTemporary"  keyProperty="id" useGeneratedKeys="true">
+		INSERT INTO club_temporary(
+			id,
+			userId,
+			name,
+			shortName,
+			bindMobile,
+			contractEmail,
+			linkMan,
+			provinceId,
+			cityId,
+			townId,
+			address,
+			shopPhoto,
+			businessLicense,
+			socialCreditCode,
+			firstClubType,
+			secondClubType,
+			department,
+			medicalPracticeLicense,
+			mainProduct,
+			isAgreed,
+			addTime
+		) VALUES (
+			#{id},
+			#{userId},
+			#{name},
+			#{shortName},
+			#{bindMobile},
+			#{contractEmail},
+			#{linkMan},
+			#{provinceId},
+			#{cityId},
+			#{townId},
+			#{address},
+			#{shopPhoto},
+			#{businessLicense},
+			#{socialCreditCode},
+			#{firstClubType},
+			#{secondClubType},
+			#{department},
+			#{medicalPracticeLicense},
+			#{mainProduct},
+			#{isAgreed},
+			#{addTime}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE club_temporary SET 	
+			userId = #{userId},
+			confirmUserId = #{confirmUserId},
+			name = #{name},
+			shortName = #{shortName},
+			bindMobile = #{bindMobile},
+			contractEmail = #{contractEmail},
+			linkMan = #{linkMan},
+			provinceId = #{provinceId},
+			cityId = #{cityId},
+			townId = #{townId},
+			address = #{address},
+			shopPhoto = #{shopPhoto},
+			businessLicense = #{businessLicense},
+			socialCreditCode = #{socialCreditCode},
+			firstClubType = #{firstClubType},
+			secondClubType = #{secondClubType},
+			department = #{department},
+			medicalPracticeLicense = #{medicalPracticeLicense},
+			mainProduct = #{mainProduct},
+			isAgreed = #{isAgreed},
+			addTime = #{addTime}
+		WHERE id = #{id}
+	</update>
+	
+	<delete id="delete">
+		DELETE FROM club_temporary
+		WHERE id = #{id}
+	</delete>
+
+	<insert id="insertClubConfirmRecord">
+		INSERT INTO `club_confirm_record` (
+		  `userId`,
+		  `systemUserId`,
+		  `images`,
+		  `remarks`,
+		  `confirmTime`
+		)
+		VALUES
+		  (
+			#{userId},
+			#{systemUserId},
+			#{images},
+			#{remarks},
+			#{confirmTime}
+		  )
+	</insert>
+
+	<select id="findConfirmRecord" resultType="com.caimei.modules.user.entity.ClubConfirmRecord">
+		SELECT
+		  `id`,
+		  `userId`,
+		  `systemUserId`,
+		  `images`,
+		  `remarks`,
+		  `confirmTime`
+		FROM
+		  `club_confirm_record`
+		WHERE
+		  userId = #{userId}
+		ORDER BY
+		  confirmTime DESC
+	</select>
+
+	<select id="findByConfirmUserId" resultType="com.caimei.modules.user.entity.ClubTemporary">
+		SELECT
+			<include refid="clubTemporaryColumns"/>
+		FROM club_temporary a
+		<include refid="clubTemporaryJoins"/>
+		WHERE a.confirmUserId = #{userId}
+	</select>
+	
+</mapper>

+ 8 - 0
src/main/resources/mappings/modules/user/CmSpMapper.xml

@@ -360,5 +360,13 @@
 		UPDATE serviceprovider SET
 		UPDATE serviceprovider SET
 		mainServiceProviderID = #{spManagerID}
 		mainServiceProviderID = #{spManagerID}
 	</update>
 	</update>
+	
+	<select id="findByUserId" resultType="com.caimei.modules.user.entity.NewCmSp">
+		SELECT
+		<include refid="newCmSpColumns"/>
+		FROM serviceprovider a
+		<include refid="newCmSpJoins"/>
+		WHERE a.userID = #{userId}
+	</select>
 
 
 </mapper>
 </mapper>

+ 8 - 0
src/main/resources/mappings/modules/user/CmUserBalanceRecordMapper.xml

@@ -188,4 +188,12 @@
 		  1
 		  1
 	</select>
 	</select>
 
 
+	<update id="updateByWithdrawalsId">
+		UPDATE cm_user_balance_record SET delFlag = 1 WHERE withdrawalsId = #{withdrawalsId}
+	</update>
+	
+	<select id="findBalanceWithdrawals" resultType="integer">
+		SELECT id FROM cm_user_balance_withdrawals WHERE status = 0 AND userID = #{userId} AND delFlag = 0 LIMIT 1
+	</select>
+
 </mapper>
 </mapper>

+ 44 - 36
src/main/resources/mappings/modules/user/CmUserBalanceWithdrawalsMapper.xml

@@ -11,12 +11,20 @@
 		a.openBank AS "openBank",
 		a.openBank AS "openBank",
 		a.bankAccountType AS "bankAccountType",
 		a.bankAccountType AS "bankAccountType",
 		a.payType AS "payType",
 		a.payType AS "payType",
+		a.applicant AS "applicant",
 		a.addDate AS "addDate",
 		a.addDate AS "addDate",
+		a.reviewer AS "reviewer",
+		a.reviewTime AS "reviewTime",
+		a.payTime AS "payTime",
+		a.status AS "status",
+		a.reason AS "reason",
 		a.remark AS "remark",
 		a.remark AS "remark",
-		a.delFlag AS "delFlag"
+		a.delFlag AS "delFlag",
+		u.name AS "clubName"
 	</sql>
 	</sql>
 	
 	
 	<sql id="cmUserBalanceWithdrawalsJoins">
 	<sql id="cmUserBalanceWithdrawalsJoins">
+		LEFT JOIN USER u ON a.userID = u.userID
 	</sql>
 	</sql>
     
     
 	<select id="get" resultType="CmUserBalanceWithdrawals">
 	<select id="get" resultType="CmUserBalanceWithdrawals">
@@ -33,12 +41,21 @@
 		FROM cm_user_balance_withdrawals a
 		FROM cm_user_balance_withdrawals a
 		<include refid="cmUserBalanceWithdrawalsJoins"/>
 		<include refid="cmUserBalanceWithdrawalsJoins"/>
 		<where>
 		<where>
-			
+			a.delFlag = '0'
 			<if test="id != null and id != ''">
 			<if test="id != null and id != ''">
 				AND a.id = #{id}
 				AND a.id = #{id}
 			</if>
 			</if>
-			<if test="userID != null and userID != ''">
-				AND a.userID = #{userID}
+			<if test="clubName != null and clubName != ''">
+				AND u.name LIKE CONCAT('%',#{clubName},'%')
+			</if>
+			<if test="startTime != null and startTime != ''">
+				AND a.addDate <![CDATA[  >=  ]]> #{startTime}
+			</if>
+			<if test="endTime != null and endTime != ''">
+				AND a.addDate <![CDATA[  <=  ]]> #{endTime}
+			</if>
+			<if test="status != null and status != ''">
+				AND a.status = #{status}
 			</if>
 			</if>
 		</where>
 		</where>
 		<choose>
 		<choose>
@@ -46,6 +63,7 @@
 				ORDER BY ${page.orderBy}
 				ORDER BY ${page.orderBy}
 			</when>
 			</when>
 			<otherwise>
 			<otherwise>
+				ORDER BY a.id DESC
 			</otherwise>
 			</otherwise>
 		</choose>
 		</choose>
 	</select>
 	</select>
@@ -68,31 +86,21 @@
 	</select>
 	</select>
 	
 	
 	<insert id="insert" parameterType="CmUserBalanceWithdrawals"  keyProperty="id" useGeneratedKeys="true">
 	<insert id="insert" parameterType="CmUserBalanceWithdrawals"  keyProperty="id" useGeneratedKeys="true">
-		INSERT INTO cm_user_balance_withdrawals(
-			id,
-			userID,
-			withdrawalsFee,
-			bankAccountName,
-			bankAccountNo,
-			openBank,
-			bankAccountType,
-			payType,
-			addDate,
-			remark,
-			delFlag
-		) VALUES (
-			#{id},
-			#{userID},
-			#{withdrawalsFee},
-			#{bankAccountName},
-			#{bankAccountNo},
-			#{openBank},
-			#{bankAccountType},
-			#{payType},
-			#{addDate},
-			#{remark},
-			#{delFlag}
+		INSERT INTO `cm_user_balance_withdrawals` (
+		  `userID`, `withdrawalsFee`, `bankAccountName`,
+		  `bankAccountNo`, `openBank`, `bankAccountType`,
+		  `payType`, `applicant`, `addDate`,
+		  `reviewer`, `reviewTime`, `payTime`,
+		  `status`, `reason`, `remark`, `delFlag`
 		)
 		)
+		VALUES
+		  (
+			#{userID}, #{withdrawalsFee}, #{bankAccountName},
+			#{bankAccountNo}, #{openBank}, #{bankAccountType},
+			#{payType}, #{applicant}, #{addDate},
+			#{reviewer}, #{reviewTime}, #{payTime},
+			#{status}, #{reason}, #{remark}, #{delFlag}
+		  )
 	</insert>
 	</insert>
 	
 	
 	<update id="update">
 	<update id="update">
@@ -104,8 +112,14 @@
 			openBank = #{openBank},
 			openBank = #{openBank},
 			bankAccountType = #{bankAccountType},
 			bankAccountType = #{bankAccountType},
 			payType = #{payType},
 			payType = #{payType},
-			addDate = #{addDate},
-			remark = #{remark},
+		  	applicant = #{applicant},
+		  	addDate = #{addDate},
+		  	reviewer = #{reviewer},
+		  	reviewTime = #{reviewTime},
+		  	payTime = #{payTime},
+		  	status = #{status},
+		  	reason = #{reason},
+		  	remark = #{remark},
 			delFlag = #{delFlag}
 			delFlag = #{delFlag}
 		WHERE id = #{id}
 		WHERE id = #{id}
 	</update>
 	</update>
@@ -115,10 +129,4 @@
 		delFlag = 1
 		delFlag = 1
 		WHERE id = #{id}
 		WHERE id = #{id}
 	</update>
 	</update>
-	
-	<delete id="delete">
-		DELETE FROM cm_user_balance_withdrawals
-		WHERE id = #{id}
-	</delete>
-	
 </mapper>
 </mapper>

+ 22 - 0
src/main/resources/mappings/modules/user/CmUserMapper.xml

@@ -14,6 +14,7 @@
 		a.companyUserID AS "companyUserID",
 		a.companyUserID AS "companyUserID",
 		a.openID AS "openID",
 		a.openID AS "openID",
 		a.userName AS "userName",
 		a.userName AS "userName",
+		a.source AS "source",
 		a.image AS "image",
 		a.image AS "image",
 		a.password AS "password",
 		a.password AS "password",
 		a.userLevelID AS "userLevelID",
 		a.userLevelID AS "userLevelID",
@@ -234,6 +235,7 @@
 			userPermission,
 			userPermission,
 			email,
 			email,
 			userName,
 			userName,
+			source,
 			image,
 			image,
 			password,
 			password,
 			userLevelID,
 			userLevelID,
@@ -307,6 +309,7 @@
 			#{userPermission},
 			#{userPermission},
 			#{email},
 			#{email},
 			#{userName},
 			#{userName},
+			#{source},
 			#{image},
 			#{image},
 			#{password},
 			#{password},
 			#{userLevelID},
 			#{userLevelID},
@@ -783,6 +786,7 @@
 	<update id="updateUserBeans">
 	<update id="updateUserBeans">
 		UPDATE USER SET userBeans = #{userBeans} WHERE userID = #{userID}
 		UPDATE USER SET userBeans = #{userBeans} WHERE userID = #{userID}
 	</update>
 	</update>
+
 	<select id="findUserByOrganizeId" resultType="com.caimei.modules.user.entity.CmUser">
 	<select id="findUserByOrganizeId" resultType="com.caimei.modules.user.entity.CmUser">
 		SELECT
 		SELECT
 		<include refid="cmUserColumns"/>
 		<include refid="cmUserColumns"/>
@@ -790,7 +794,25 @@
 		WHERE a.userOrganizeID=#{organizeId}
 		WHERE a.userOrganizeID=#{organizeId}
 		limit 1
 		limit 1
 	</select>
 	</select>
+
 	<select id="getOrganizeStoreName" resultType="java.lang.String">
 	<select id="getOrganizeStoreName" resultType="java.lang.String">
 		select name from cm_organize_store where id = #{organizeStoreId}
 		select name from cm_organize_store where id = #{organizeStoreId}
 	</select>
 	</select>
+
+	<update id="updateByClubStatus">
+		UPDATE user SET clubStatus = #{clubStatus} WHERE userID = #{confirmUserId}
+	</update>
+
+	<select id="findByConfirmTime" resultType="date">
+		SELECT
+		  confirmTime
+		FROM
+		  club_confirm_record
+		WHERE
+		  userId = #{userId}
+		ORDER BY
+		  confirmTime DESC
+		LIMIT
+		  1
+  </select>
 </mapper>
 </mapper>

+ 4 - 0
src/main/resources/mappings/modules/user/NewCmClubMapper.xml

@@ -623,4 +623,8 @@
           )
           )
     </insert>
     </insert>
 
 
+	<update id="updateByStatus">
+		UPDATE club SET status = #{clubStatus} WHERE userID = #{confirmUserId}
+	</update>
+
 </mapper>
 </mapper>

+ 1 - 0
src/main/webapp/WEB-INF/views/modules/newhome/addProductImage.jsp

@@ -124,6 +124,7 @@
         var items = {
         var items = {
             "id": "",
             "id": "",
             "productId": product.productID,
             "productId": product.productID,
+            "validFlag": product.validFlag,
             "image": product.mainImage,
             "image": product.mainImage,
             "name": product.name,
             "name": product.name,
             "link": link,
             "link": link,

+ 7 - 0
src/main/webapp/WEB-INF/views/modules/newhome/newPageFloorContentForm.jsp

@@ -318,6 +318,7 @@
                 </th>
                 </th>
                 <th>图片</th>
                 <th>图片</th>
                 <th>名称</th>
                 <th>名称</th>
+                <th>商品状态</th>
                 <th>跳转链接</th>
                 <th>跳转链接</th>
                 <th>标签</th>
                 <th>标签</th>
                 <th>网站状态</th>
                 <th>网站状态</th>
@@ -445,6 +446,7 @@
         imageList.push({
         imageList.push({
             id: "${floorImage.id}",
             id: "${floorImage.id}",
             productId: "${empty floorImage.productId ? "":floorImage.productId}",
             productId: "${empty floorImage.productId ? "":floorImage.productId}",
+            validFlag: "${floorImage.validFlag}",
             image: "${floorImage.image}",
             image: "${floorImage.image}",
             name: "${floorImage.name}",
             name: "${floorImage.name}",
             link: "${floorImage.link}",
             link: "${floorImage.link}",
@@ -560,6 +562,11 @@
             ) : (data.name)) +
             ) : (data.name)) +
             '</td>' +
             '</td>' +
             '<td>' +
             '<td>' +
+            (data.productId == '' ? (
+                ('------')
+            ) : (data.validFlag == '0' ? "逻辑删除":(data.validFlag == '2' ? "已上架": (data.validFlag == '3' ? "已下架":(data.validFlag == '9' ? "已隐身":(data.validFlag == '10' ? "已冻结":"------")))))) +
+            '</td>' +
+            '<td>' +
             (data.productId == '' ? (
             (data.productId == '' ? (
                 '<input value="' + data.link + '"  onchange="changeLink(' + index + ',this)">'
                 '<input value="' + data.link + '"  onchange="changeLink(' + index + ',this)">'
             ) : ('------')) +
             ) : ('------')) +

+ 10 - 4
src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptForm.jsp

@@ -162,6 +162,9 @@
                             <c:if test="${vo.payType != 10}">
                             <c:if test="${vo.payType != 10}">
                                 转账返佣
                                 转账返佣
                             </c:if>
                             </c:if>
+                        </c:if>
+                        <c:if test="${vo.receiptType == 5}">
+                            供应商退款
                         </c:if>
                         </c:if>
 					</span>
 					</span>
             <span><label>收款类型:</label>${fns:getPayTypeStr(vo.payType)}</span>
             <span><label>收款类型:</label>${fns:getPayTypeStr(vo.payType)}</span>
@@ -211,14 +214,17 @@
     <div class="receipt-order-form">
     <div class="receipt-order-form">
         <c:forEach items="${vo.orderInfos}" var="orderInfo">
         <c:forEach items="${vo.orderInfos}" var="orderInfo">
             <div class="receipt-order-form">
             <div class="receipt-order-form">
-                <c:if test="${vo.receiptType == 3}">
+                <c:if test="${vo.receiptType == 3 || vo.receiptType == 5}">
                     <div class="receipt-suborder-title">
                     <div class="receipt-suborder-title">
                         <span class="font-blue"><label>子订单编号:</label><a
                         <span class="font-blue"><label>子订单编号:</label><a
                                 href="${ctx}/order/detail?id=${orderInfo.orderID}">${orderInfo.shopOrderNo}(${orderInfo.shopOrderID})</a></span>
                                 href="${ctx}/order/detail?id=${orderInfo.orderID}">${orderInfo.shopOrderNo}(${orderInfo.shopOrderID})</a></span>
-                        <span><label>订单金额:</label>¥<fmt:formatNumber
-                                value="${orderInfo.shopOrderAmount}"
-                                pattern="#0.00"/></span>
+                        <span><label>订单金额:</label>¥<fmt:formatNumber value="${orderInfo.shopOrderAmount}" pattern="#0.00"/></span>
                         <span><label>供应商:</label>${orderInfo.shopName}</span>
                         <span><label>供应商:</label>${orderInfo.shopName}</span>
+                        <c:if test="${vo.receiptType == 5}">
+                            <span><label>应付金额:</label>¥<fmt:formatNumber value="${orderInfo.shouldPayShopAmount}" pattern="#0.00"/></span>
+                            <span><label>已付金额:</label>¥<fmt:formatNumber value="${orderInfo.payedShopAmount}" pattern="#0.00"/></span>
+                            <span><label>已退金额:</label>¥<fmt:formatNumber value="${orderInfo.refundsAmount}" pattern="#0.00"/></span>
+                        </c:if>
                     </div>
                     </div>
                 </c:if>
                 </c:if>
                 <div class="receipt-order-row2">
                 <div class="receipt-order-row2">

+ 5 - 3
src/main/webapp/WEB-INF/views/modules/order/cmPayFormList.jsp

@@ -11,7 +11,7 @@
 		.ul-form{white-space:nowrap;margin-left:-10px !important}
 		.ul-form{white-space:nowrap;margin-left:-10px !important}
 		.ul-form label{width:90px;text-align:left;margin-top:15px}
 		.ul-form label{width:90px;text-align:left;margin-top:15px}
 		.time-space-symbols{width:100px;display:inline-block;text-align:center}
 		.time-space-symbols{width:100px;display:inline-block;text-align:center}
-		#btnSubmit{width:128px;margin-left:443px}
+		#btnSubmit{width:128px;margin-left:80%}
 		.td-a{width:100%;float:left;display:block;text-align:center}
 		.td-a{width:100%;float:left;display:block;text-align:center}
 		@media screen and (max-width:1300px){#searchForm{width:1460px !important}
 		@media screen and (max-width:1300px){#searchForm{width:1460px !important}
 		.nav-tabs,#contentTable{width:1490px !important}
 		.nav-tabs,#contentTable{width:1490px !important}
@@ -65,6 +65,8 @@
 							onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
 							onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
 			</div>
 			</div>
 			<div>
 			<div>
+				<label>付款单名称:</label>
+				<form:input path="name" htmlEscape="false" maxlength="250" class="input-medium"/>
 				<label>付款审核状态:</label>
 				<label>付款审核状态:</label>
 				<form:select path="status" class="input-medium">
 				<form:select path="status" class="input-medium">
 					<form:option value="" label="所有"/>
 					<form:option value="" label="所有"/>
@@ -86,9 +88,9 @@
 					<form:option value="2" label="供应商差价"/>
 					<form:option value="2" label="供应商差价"/>
 					<form:option value="3" label="付第三方"/>
 					<form:option value="3" label="付第三方"/>
 				</form:select>
 				</form:select>
-				&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
-				<div class="clearfix"></div>
 			</div>
 			</div>
+			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+			<div class="clearfix"></div>
 		</div>
 		</div>
 	</form:form>
 	</form:form>
 	<sys:message content="${message}"/>
 	<sys:message content="${message}"/>

+ 7 - 6
src/main/webapp/WEB-INF/views/modules/order/cmRefundRecordList.jsp

@@ -88,8 +88,7 @@
 		<li class="active tab-li"><a href="${ctx}/shopOrder/refundRecordList?operatingMode=2">记录退款</a></li>
 		<li class="active tab-li"><a href="${ctx}/shopOrder/refundRecordList?operatingMode=2">记录退款</a></li>
 	</c:if>
 	</c:if>
 </ul>
 </ul>
-<form:form id="searchForm" onsubmit="submitFunc()" modelAttribute="newShopOrder" action="${ctx}/shopOrder/refundRecordList?operatingMode=${operatingMode
-}" method="post" class="breadcrumb form-search">
+<form:form id="searchForm" onsubmit="submitFunc()" modelAttribute="newShopOrder" action="${ctx}/shopOrder/refundRecordList?operatingMode=${operatingMode}" method="post" class="breadcrumb form-search">
 	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
 	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
 	<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
 	<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
 	<div class="ul-form">
 	<div class="ul-form">
@@ -179,7 +178,7 @@
 					<th>收款状态</th>
 					<th>收款状态</th>
 					<th>收款金额</th>
 					<th>收款金额</th>
 					<th colspan="3">经理折扣</th>
 					<th colspan="3">经理折扣</th>
-					<th colspan="2">成本类型</th>
+					<th colspan="3">成本类型</th>
 				</tr>
 				</tr>
 				<tr>
 				<tr>
 					<td><a href="${ctx}/order/detail?id=${s.orderID}">${s.shopOrderNo}(${s.shopOrderID})</a></td>
 					<td><a href="${ctx}/order/detail?id=${s.orderID}">${s.shopOrderNo}(${s.shopOrderID})</a></td>
@@ -214,7 +213,7 @@
 						</c:if>
 						</c:if>
 						<c:if test="${s.discountTotalFee le 0}">¥0.00</c:if>
 						<c:if test="${s.discountTotalFee le 0}">¥0.00</c:if>
 					</td>
 					</td>
-					<td colspan="2"><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if test="${s.costType == '2'}">比例成本</c:if></td>
+					<td colspan="3"><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if test="${s.costType == '2'}">比例成本</c:if></td>
 				</tr>
 				</tr>
 				<tr>
 				<tr>
 					<th>供应商</th>
 					<th>供应商</th>
@@ -226,6 +225,7 @@
 					<th colspan="3">应付税费</th>
 					<th colspan="3">应付税费</th>
 					<th>付供应商</th>
 					<th>付供应商</th>
 					<th>付第三方</th>
 					<th>付第三方</th>
+					<th>退款金额</th>
 				</tr>
 				</tr>
 				<tr>
 				<tr>
 					<td>${s.shopName}</td>
 					<td>${s.shopName}</td>
@@ -269,6 +269,7 @@
 						<input type="hidden" class="proportional" value="${s.proportional}">
 						<input type="hidden" class="proportional" value="${s.proportional}">
 						<input type="hidden" class="modifyShouldPayNote" value="${s.modifyShouldPayNote}">
 						<input type="hidden" class="modifyShouldPayNote" value="${s.modifyShouldPayNote}">
 					<td class="third-party-fee"><fmt:formatNumber value="${s.shopOtherFee}" type="number" pattern="#,##0.00"/></td>
 					<td class="third-party-fee"><fmt:formatNumber value="${s.shopOtherFee}" type="number" pattern="#,##0.00"/></td>
+					<td><fmt:formatNumber value="${s.refundsAmount}" type="number" pattern="#,##0.00"/></td>
 				</tr>
 				</tr>
 				<tr>
 				<tr>
 					<th>商品名</th>
 					<th>商品名</th>
@@ -280,7 +281,7 @@
 					<th colspan="2">总价</th>
 					<th colspan="2">总价</th>
                     <th colspan="3">供应商税率 / 单税费 / 总税费</th>
                     <th colspan="3">供应商税率 / 单税费 / 总税费</th>
 					<th>成本(单)</th>
 					<th>成本(单)</th>
-					<th>成本(总)</th>
+					<th colspan="2">成本(总)</th>
 				</tr>
 				</tr>
 				<c:forEach items="${s.newOrderProducts}" var="p" varStatus="pIndex">
 				<c:forEach items="${s.newOrderProducts}" var="p" varStatus="pIndex">
 					<tr class="pay-product-item">
 					<tr class="pay-product-item">
@@ -329,7 +330,7 @@
 							</c:choose>
 							</c:choose>
 						</td>
 						</td>
                         <td class="p-costprice"><fmt:formatNumber value="${p.costPrice}" type="number" pattern="#,##0.00"/></td>
                         <td class="p-costprice"><fmt:formatNumber value="${p.costPrice}" type="number" pattern="#,##0.00"/></td>
-						<td><fmt:formatNumber value="${p.costPrice * (p.num + p.presentNum - p.returnedNum)}" type="number" pattern="#,##0.00"/></td>
+						<td colspan="2"><fmt:formatNumber value="${p.costPrice * (p.num + p.presentNum - p.returnedNum)}" type="number" pattern="#,##0.00"/></td>
 					</tr>
 					</tr>
 				</c:forEach>
 				</c:forEach>
 			</table>
 			</table>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/order/cmRefundShopDetail.jsp

@@ -272,7 +272,7 @@
 						</div>
 						</div>
 						<div class="refund-wrapper">
 						<div class="refund-wrapper">
 							<c:if test="${cmRefundShop.refundWay == '2'||cmRefundShop.refundWay == '3'}">
 							<c:if test="${cmRefundShop.refundWay == '2'||cmRefundShop.refundWay == '3'}">
-								余额账户:¥${cmRefundShop.refundBalanceAmount}
+								欠款账簿:¥${cmRefundShop.refundBalanceAmount}
 							</c:if>
 							</c:if>
 						</div>
 						</div>
 					</div>
 					</div>

+ 23 - 19
src/main/webapp/WEB-INF/views/modules/order/cmRefundShopForm.jsp

@@ -174,9 +174,10 @@
 							<div>应付:${s.shouldPayShopAmount}, 已付:${s.payedShopAmount}
 							<div>应付:${s.shouldPayShopAmount}, 已付:${s.payedShopAmount}
 								<c:if test="${s.wipePayment > 0}"><font color="red">(付款抹平¥${s.wipePayment})</font></c:if>
 								<c:if test="${s.wipePayment > 0}"><font color="red">(付款抹平¥${s.wipePayment})</font></c:if>
 							</div>
 							</div>
-							<div>已退:${s.refundsAmount}, 待退:<span class="need-refund"><fmt:formatNumber value="${s.payedShopAmount-s.refundsAmount-s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/></span></div>
-							<div>退款:<input type="number" value="${s.payedShopAmount-s.refundsAmount-s.shouldPayShopAmount}" class="refund refundMoneyInput" ></div>
+							<div>已退:${s.refundsAmount}<%--, 待退:<span class="need-refund"><fmt:formatNumber value="${s.payedShopAmount-s.refundsAmount-s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/></span>--%></div>
+							<div>退款:<input type="number" value="0" class="refund refundMoneyInput" ></div>
 							<input type="hidden" data-shoporderid="${s.shopOrderID}" name="refundInfo" class="refundInfo" value="${s.shopOrderID}_${s.payedShopAmount-s.refundsAmount-s.shouldPayShopAmount}">
 							<input type="hidden" data-shoporderid="${s.shopOrderID}" name="refundInfo" class="refundInfo" value="${s.shopOrderID}_${s.payedShopAmount-s.refundsAmount-s.shouldPayShopAmount}">
+							<input type="hidden" class="need-refund" value="${s.payedShopAmount-s.refundsAmount}">
 						</td>
 						</td>
 					</tr>
 					</tr>
 					<tr>
 					<tr>
@@ -248,10 +249,10 @@
 				<div class="refund-methods">
 				<div class="refund-methods">
 					<label>接收退款方式:</label>
 					<label>接收退款方式:</label>
 					<div>
 					<div>
-						<div class="refund-wrapper">
+						<%--<div class="refund-wrapper">
 							<input type="checkbox" class="refund-checkbox" name="refundWay" value="11" checked>线下转账&nbsp
 							<input type="checkbox" class="refund-checkbox" name="refundWay" value="11" checked>线下转账&nbsp
 							<select name="refundType" id="">
 							<select name="refundType" id="">
-								<%--<option value="6">账户余额</option>--%>
+								&lt;%&ndash;<option value="6">账户余额</option>&ndash;%&gt;
 								<option value="1">建设银行7297</option>
 								<option value="1">建设银行7297</option>
 								<option value="2">中信银行0897</option>
 								<option value="2">中信银行0897</option>
 								<option value="3">中信银行7172</option>
 								<option value="3">中信银行7172</option>
@@ -260,10 +261,13 @@
 								<option value="6">虚拟银行0000</option>
 								<option value="6">虚拟银行0000</option>
 							</select>
 							</select>
 							<input type="number" name="refundAmount" class="refund-amount" value="0.00">
 							<input type="number" name="refundAmount" class="refund-amount" value="0.00">
-						</div>
+						</div>--%>
 						<div class="refund-wrapper">
 						<div class="refund-wrapper">
-							<input type="checkbox" class="refund-checkbox" name="refundWay" value="22">欠款账簿
-							<input type="number" name="refundBalanceAmount" class="refund-amount" value="0.00">
+							<%--<input type="checkbox" class="refund-checkbox" name="refundWay" value="22" checked>--%>
+								欠款账簿
+								<input type="hidden" name="refundBalanceAmount" class="refund-amount" value="0.00">
+								<input type="hidden" name="refundWay" value="22">
+								<span id="refundBalanceAmount">0.00</span>
 						</div>
 						</div>
 						<input type="hidden" name="shopID" value="${cmRefundShop.shopID}">
 						<input type="hidden" name="shopID" value="${cmRefundShop.shopID}">
 					</div>
 					</div>
@@ -322,29 +326,31 @@
 				var thisEle = $(this), wrapper = thisEle.parents(".supplier-fee"),
 				var thisEle = $(this), wrapper = thisEle.parents(".supplier-fee"),
 						thisVal = thisEle.val(),
 						thisVal = thisEle.val(),
 						totalAmount = 0,
 						totalAmount = 0,
-						alreadyPaid = Number(wrapper.find('.need-refund').text());
-						//alreadyPaid = Number(wrapper.find('.need-refund').text().replace('待退:',''));
+						alreadyPaid = Number(wrapper.find('.need-refund').val());
 				if(thisVal.length > 8){
 				if(thisVal.length > 8){
 					wrapper.find('.refund').val(thisVal.slice(0,8));
 					wrapper.find('.refund').val(thisVal.slice(0,8));
 				}
 				}
 				if((thisVal > alreadyPaid) ) {
 				if((thisVal > alreadyPaid) ) {
 					thisEle.val(alreadyPaid);
 					thisEle.val(alreadyPaid);
+					thisVal = alreadyPaid;
 				}
 				}
 				$('.refund').each(function (index, ele) {
 				$('.refund').each(function (index, ele) {
 					totalAmount+= Number($(this).val());
 					totalAmount+= Number($(this).val());
 				});
 				});
 				$('#totalRefundAmount').text(totalAmount);
 				$('#totalRefundAmount').text(totalAmount);
+				$('#refundBalanceAmount').text(totalAmount);
 				$('#totalRefundAmount-hidden').val(totalAmount);
 				$('#totalRefundAmount-hidden').val(totalAmount);
+				$('.refund-amount').val(totalAmount);
 				var refundInfo = wrapper.find('.refundInfo');
 				var refundInfo = wrapper.find('.refundInfo');
 				refundInfo.val(refundInfo.attr('data-shoporderid') + '_' + thisVal);
 				refundInfo.val(refundInfo.attr('data-shoporderid') + '_' + thisVal);
 			});
 			});
 
 
-			$('.refund-amount').on('input',function() {
+			/*$('.refund-amount').on('input',function() {
 			    var thisVal = $(this).val();
 			    var thisVal = $(this).val();
 			    if(thisVal < 0) {
 			    if(thisVal < 0) {
                     $(this).val(0);
                     $(this).val(0);
 				}
 				}
-			})
+			})*/
 
 
 			function showTips(title,text) {
 			function showTips(title,text) {
 				$('.tips-popup h4').text(title);
 				$('.tips-popup h4').text(title);
@@ -363,10 +369,9 @@
                 }
                 }
 			})
 			})
 			$('.refund-cfm-btn').on('click',function() {
 			$('.refund-cfm-btn').on('click',function() {
-				var totalRefundAmount = $('#totalRefundAmount').text(),
+				/*var totalRefundAmount = $('#totalRefundAmount').text(),
 					refundCheckbox = $('.refund-checkbox:checked'),
 					refundCheckbox = $('.refund-checkbox:checked'),
-                    // totalRefundAmountInput = $('#refundMoneyInput').val(),//退款金额输入框
-					inputTotalAmount = 0;
+					inputTotalAmount = 0;*/
 				var isNullFlag = false;
 				var isNullFlag = false;
                 $('.refund').each(function (index, ele) {
                 $('.refund').each(function (index, ele) {
                     var _thisVal = $(this).val();
                     var _thisVal = $(this).val();
@@ -377,19 +382,19 @@
 					}
 					}
                 });
                 });
 
 
-                if(refundCheckbox.length < 1) {
+               /* if(refundCheckbox.length < 1) {
                     $('.tips-cfm-btn').addClass('tips-cfm-directly');
                     $('.tips-cfm-btn').addClass('tips-cfm-directly');
                     $('.tips-cancel-btn').hide();
                     $('.tips-cancel-btn').hide();
                     showTips('信息提示','请勾选接收退款方式');
                     showTips('信息提示','请勾选接收退款方式');
                     return false;
                     return false;
-                }
+                }*/
                 if(isNullFlag){
                 if(isNullFlag){
                     $('.tips-cfm-btn').addClass('tips-cfm-directly');
                     $('.tips-cfm-btn').addClass('tips-cfm-directly');
                     $('.tips-cancel-btn').hide();
                     $('.tips-cancel-btn').hide();
                     showTips('信息提示','退款金额不能为空');
                     showTips('信息提示','退款金额不能为空');
                     return false;
                     return false;
                 }
                 }
-                refundCheckbox.each(function(){
+                /*refundCheckbox.each(function(){
                     var wrapper = $(this).closest('.refund-wrapper'),
                     var wrapper = $(this).closest('.refund-wrapper'),
                         thisAmount = wrapper.find('.refund-amount');
                         thisAmount = wrapper.find('.refund-amount');
                     inputTotalAmount += Number(thisAmount.val());
                     inputTotalAmount += Number(thisAmount.val());
@@ -400,8 +405,7 @@
                     showTips('确认提示','各退款方式的金额之和不等于退款总金额,请重新计算后再提交申请。');
                     showTips('确认提示','各退款方式的金额之和不等于退款总金额,请重新计算后再提交申请。');
                     $('.tips-cancel-btn').hide();
                     $('.tips-cancel-btn').hide();
                     return false;
                     return false;
-                }
-
+                }*/
                 $('.tips-cfm-btn').removeClass('tips-cfm-directly');
                 $('.tips-cfm-btn').removeClass('tips-cfm-directly');
                 $('.tips-cancel-btn').show();
                 $('.tips-cancel-btn').show();
                 showTips('确认提示','确定操作已退付款?');
                 showTips('确认提示','确定操作已退付款?');

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/order/differencePriceForm.jsp

@@ -201,7 +201,7 @@
                             console.log('===', inputTotalAmount);
                             console.log('===', inputTotalAmount);
                         });
                         });
                         if (Number(differencePrice - inputTotalAmount - waitPayShop) > 0.1) {
                         if (Number(differencePrice - inputTotalAmount - waitPayShop) > 0.1) {
-                            alertx("退款金额应等于差价与付金额的差值");
+                            alertx("退款金额应等于差价与付金额的差值");
                             return false;
                             return false;
                         }
                         }
                     }
                     }

+ 34 - 2
src/main/webapp/WEB-INF/views/modules/order/payedAndRefundRecordList.jsp

@@ -269,6 +269,36 @@
         </tr>
         </tr>
         </thead>
         </thead>
         <tbody>
         <tbody>
+        <c:forEach items="${receipt}" var="r">
+            <tr>
+                <td>${r.id}</td>
+                <td><a href="${ctx}/order/cmDiscernReceipt/detail?id=${r.id}">${r.id}</a></td>
+                <td>${r.receiptDate}</td>
+                <td>
+                    <div class="text-left">
+                        线下转账:
+                        <c:if test="${r.payType == '1'}">
+                            建设银行7297
+                        </c:if>
+                        <c:if test="${r.payType == '2'}">
+                            中信银行0897
+                        </c:if>
+                        <c:if test="${r.payType == '3'}">
+                            中信银行7172
+                        </c:if>
+                        <c:if test="${r.payType == '4'}">
+                            广发银行0115
+                        </c:if>
+                        <c:if test="${r.payType == '5'}">
+                            广发银行5461
+                        </c:if>
+                        &nbsp&nbsp
+                        ¥${r.receiptAmount}<br>
+                    </div>
+                </td>
+                <td>${r.receiptAmount}</td>
+            </tr>
+        </c:forEach>
         <c:forEach items="${rr}" var="r">
         <c:forEach items="${rr}" var="r">
             <tr>
             <tr>
                 <td>${r.id}</td>
                 <td>${r.id}</td>
@@ -293,8 +323,10 @@
                             广发银行5461
                             广发银行5461
                         </c:if>
                         </c:if>
                         &nbsp&nbsp
                         &nbsp&nbsp
-                        ¥${r.cmRefundShop.refundAmount}<br>
-                        余额账户:&nbsp&nbsp¥${r.cmRefundShop.refundBalanceAmount}
+                        <c:if test="${r.cmRefundShop.refundAmount > 0}">
+                            ¥${r.cmRefundShop.refundAmount}<br>
+                        </c:if>
+                        欠款账簿:&nbsp&nbsp¥${r.cmRefundShop.refundBalanceAmount}
                     </div>
                     </div>
                     <c:if test="${(r.cmRefundShop.refundAmount+r.cmRefundShop.refundBalanceAmount) != r.refundAmount}">
                     <c:if test="${(r.cmRefundShop.refundAmount+r.cmRefundShop.refundBalanceAmount) != r.refundAmount}">
                         <span style="color: #9c0408">(本次退款涉及其他子订单,每种退款方式的金额为多个子订单的该方式退款总和)</span>
                         <span style="color: #9c0408">(本次退款涉及其他子订单,每种退款方式的金额为多个子订单的该方式退款总和)</span>

+ 34 - 2
src/main/webapp/WEB-INF/views/modules/order/refundRecord.jsp

@@ -355,6 +355,36 @@
         </tr>
         </tr>
         </thead>
         </thead>
         <tbody>
         <tbody>
+        <c:forEach items="${receipts}" var="r">
+            <tr>
+                <td>${r.id}</td>
+                <td><a href="${ctx}/order/cmDiscernReceipt/detail?id=${r.id}">${r.id}</a></td>
+                <td>${r.receiptDate}</td>
+                <td>
+                    <div class="text-left">
+                        线下转账:
+                        <c:if test="${r.payType == '1'}">
+                            建设银行7297
+                        </c:if>
+                        <c:if test="${r.payType == '2'}">
+                            中信银行0897
+                        </c:if>
+                        <c:if test="${r.payType == '3'}">
+                            中信银行7172
+                        </c:if>
+                        <c:if test="${r.payType == '4'}">
+                            广发银行0115
+                        </c:if>
+                        <c:if test="${r.payType == '5'}">
+                            广发银行5461
+                        </c:if>
+                        &nbsp&nbsp
+                        ¥${r.receiptAmount}<br>
+                    </div>
+                </td>
+                <td>${r.receiptAmount}</td>
+            </tr>
+        </c:forEach>
         <c:forEach items="${rr}" var="r">
         <c:forEach items="${rr}" var="r">
             <tr>
             <tr>
                 <td>${r.id}</td>
                 <td>${r.id}</td>
@@ -379,8 +409,10 @@
                             广发银行5461
                             广发银行5461
                         </c:if>
                         </c:if>
                         &nbsp&nbsp
                         &nbsp&nbsp
-                        ¥${r.cmRefundShop.refundAmount}<br>
-                        余额账户:&nbsp&nbsp¥${r.cmRefundShop.refundBalanceAmount}
+                        <c:if test="${r.cmRefundShop.refundAmount > 0}">
+                            ¥${r.cmRefundShop.refundAmount}<br>
+                        </c:if>
+                        欠款账簿:&nbsp&nbsp¥${r.cmRefundShop.refundBalanceAmount}
                     </div>
                     </div>
                     <c:if test="${(r.cmRefundShop.refundAmount+r.cmRefundShop.refundBalanceAmount) != r.refundAmount}">
                     <c:if test="${(r.cmRefundShop.refundAmount+r.cmRefundShop.refundBalanceAmount) != r.refundAmount}">
                         <span style="color: #9c0408">(本次退款涉及其他子订单,每种退款方式的金额为多个子订单的该方式退款总和)</span>
                         <span style="color: #9c0408">(本次退款涉及其他子订单,每种退款方式的金额为多个子订单的该方式退款总和)</span>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/order/shopOtherFeeForm.jsp

@@ -271,7 +271,7 @@
                 <sys:ckfinder input="remarkImage3" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
                 <sys:ckfinder input="remarkImage3" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
             </div>
             </div>
             <div class="conList hide-pic">
             <div class="conList hide-pic">
-                <form:hidden id="remarkImage4" path="" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <form:hidden id="remarkImage4" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
                 <sys:ckfinder input="remarkImage4" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
                 <sys:ckfinder input="remarkImage4" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
             </div>
             </div>
             <div class="conList hide-pic">
             <div class="conList hide-pic">

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/permission/rebateManagePermissionForm.jsp

@@ -29,7 +29,7 @@
 	<ul class="nav nav-tabs">
 	<ul class="nav nav-tabs">
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=4">返佣管理权限</a></li>
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=4">返佣管理权限</a></li>
 		<li class="active">
 		<li class="active">
-			<a href="${ctx}/permission/receiptUserPermission/form?id=${receiptUserPermission.id}">
+			<a href="${ctx}/permission/receiptUserPermission/form?userType=4&id=${receiptUserPermission.id}">
 				返佣管理权限<shiro:hasPermission name="permission:receiptUserPermission:edit">${not empty rebateManagePermission.id?'编辑':'添加'}</shiro:hasPermission>
 				返佣管理权限<shiro:hasPermission name="permission:receiptUserPermission:edit">${not empty rebateManagePermission.id?'编辑':'添加'}</shiro:hasPermission>
 			</a></li>
 			</a></li>
 	</ul><br/>
 	</ul><br/>

+ 1 - 0
src/main/webapp/WEB-INF/views/modules/permission/rebateManagePermissionList.jsp

@@ -27,6 +27,7 @@
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=2">收款确认权限</a></li>
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=2">收款确认权限</a></li>
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=3">收款审核权限</a></li>
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=3">收款审核权限</a></li>
 		<li class="active"><a href="${ctx}/permission/receiptUserPermission/list?userType=4">返佣管理权限</a></li>
 		<li class="active"><a href="${ctx}/permission/receiptUserPermission/list?userType=4">返佣管理权限</a></li>
+		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=5">供应商退款管理权限</a></li>
 	</ul>
 	</ul>
 	<form:form id="searchForm" modelAttribute="receiptUserPermission" action="${ctx}/permission/receiptUserPermission/" method="post" class="breadcrumb form-search">
 	<form:form id="searchForm" modelAttribute="receiptUserPermission" action="${ctx}/permission/receiptUserPermission/" method="post" class="breadcrumb form-search">
 		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
 		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>

+ 1 - 0
src/main/webapp/WEB-INF/views/modules/permission/receiptConfirmPermissionList.jsp

@@ -26,6 +26,7 @@
 		<li class="active"><a href="${ctx}/permission/receiptUserPermission/list?userType=2">收款确认权限</a></li>
 		<li class="active"><a href="${ctx}/permission/receiptUserPermission/list?userType=2">收款确认权限</a></li>
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=3">收款审核权限</a></li>
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=3">收款审核权限</a></li>
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=4">返佣管理权限</a></li>
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=4">返佣管理权限</a></li>
+		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=5">供应商退款管理权限</a></li>
 	</ul>
 	</ul>
 	<form:form id="searchForm" modelAttribute="receiptUserPermission" action="${ctx}/permission/receiptUserPermission/" method="post" class="breadcrumb form-search">
 	<form:form id="searchForm" modelAttribute="receiptUserPermission" action="${ctx}/permission/receiptUserPermission/" method="post" class="breadcrumb form-search">
 		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
 		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/permission/receiptNoticePermissionForm.jsp

@@ -27,9 +27,9 @@
 </head>
 </head>
 <body>
 <body>
 	<ul class="nav nav-tabs">
 	<ul class="nav nav-tabs">
-		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=2">收款通知权限</a></li>
+		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=1">收款通知权限</a></li>
 		<li class="active">
 		<li class="active">
-			<a href="${ctx}/permission/receiptUserPermission/form?userType=2&id=${receiptNoticePermission.id}">
+			<a href="${ctx}/permission/receiptUserPermission/form?userType=1&id=${receiptNoticePermission.id}">
 			收款通知权限
 			收款通知权限
 			<shiro:hasPermission name="permission:receiptUserPermission:edit">${not empty receiptUserPermission.id?'编辑':'添加'}
 			<shiro:hasPermission name="permission:receiptUserPermission:edit">${not empty receiptUserPermission.id?'编辑':'添加'}
 			</shiro:hasPermission></a>
 			</shiro:hasPermission></a>

+ 1 - 0
src/main/webapp/WEB-INF/views/modules/permission/receiptNoticePermissionList.jsp

@@ -26,6 +26,7 @@
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=2">收款确认权限</a></li>
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=2">收款确认权限</a></li>
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=3">收款审核权限</a></li>
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=3">收款审核权限</a></li>
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=4">返佣管理权限</a></li>
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=4">返佣管理权限</a></li>
+		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=5">供应商退款管理权限</a></li>
 	</ul>
 	</ul>
 	<form:form id="searchForm" modelAttribute="receiptUserPermission" action="${ctx}/permission/receiptUserPermission/" method="post" class="breadcrumb form-search">
 	<form:form id="searchForm" modelAttribute="receiptUserPermission" action="${ctx}/permission/receiptUserPermission/" method="post" class="breadcrumb form-search">
 		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
 		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>

+ 1 - 0
src/main/webapp/WEB-INF/views/modules/permission/receiptReviewPermissionList.jsp

@@ -26,6 +26,7 @@
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=2">收款确认权限</a></li>
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=2">收款确认权限</a></li>
 		<li class="active"><a href="${ctx}/permission/receiptUserPermission/list?userType=3">收款审核权限</a></li>
 		<li class="active"><a href="${ctx}/permission/receiptUserPermission/list?userType=3">收款审核权限</a></li>
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=4">返佣管理权限</a></li>
 		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=4">返佣管理权限</a></li>
+		<li><a href="${ctx}/permission/receiptUserPermission/list?userType=5">供应商退款管理权限</a></li>
 	</ul>
 	</ul>
 	<form:form id="searchForm" modelAttribute="receiptUserPermission" action="${ctx}/permission/receiptUserPermission/" method="post" class="breadcrumb form-search">
 	<form:form id="searchForm" modelAttribute="receiptUserPermission" action="${ctx}/permission/receiptUserPermission/" method="post" class="breadcrumb form-search">
 		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
 		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>

+ 75 - 0
src/main/webapp/WEB-INF/views/modules/permission/shopRefundPermissionForm.jsp

@@ -0,0 +1,75 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+    <title>返佣管理权限表(返佣管理人员使用)管理</title>
+    <meta name="decorator" content="default"/>
+    <script type="text/javascript">
+        $(document).ready(function() {
+            //$("#name").focus();
+            $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+        });
+    </script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/permission/receiptUserPermission/list?userType=5">供应商退款管理权限</a></li>
+    <li class="active">
+        <a href="${ctx}/permission/receiptUserPermission/form?id=${receiptUserPermission.id}&userType=5">
+            供应商退款管理权限<shiro:hasPermission name="permission:receiptUserPermission:edit">${not empty rebateManagePermission.id?'编辑':'添加'}</shiro:hasPermission>
+        </a></li>
+</ul><br/>
+<form:form id="inputForm" modelAttribute="receiptUserPermission" action="${ctx}/permission/receiptUserPermission/save" method="post" class="form-horizontal">
+    <form:hidden path="id"/>
+    <form:hidden path="userType"/>
+    <sys:message content="${message}"/>
+    <div class="control-group">
+        <label class="control-label"><font color="red">*</font>退款确认人:</label>
+        <div class="controls">
+            <form:input path="name" htmlEscape="false" maxlength="50" class="input-xlarge required"/>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label"><font color="red">*</font>手机号:</label>
+        <div class="controls">
+            <form:input path="mobile" htmlEscape="false" maxlength="11" class="input-xlarge required"/>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label"><font color="red">*</font>微信openID:</label>
+        <div class="controls">
+            <form:input path="openid" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label"><font color="red">*</font>身份:</label>
+        <div class="controls">
+            <form:select path="userIdentity" class="input-medium required">
+                <form:option value="1" label="协销人员"/>
+                <form:option value="2" label="客服"/>
+                <form:option value="3" label="财务"/>
+                <form:option value="4" label="超级管理员"/>
+            </form:select>
+        </div>
+    </div>
+    <div class="form-actions">
+        <shiro:hasPermission name="permission:receiptUserPermission:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
+        <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+    </div>
+</form:form>
+</body>
+</html>

+ 95 - 0
src/main/webapp/WEB-INF/views/modules/permission/shopRefundPermissionList.jsp

@@ -0,0 +1,95 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+    <title>供应商退款权限管理</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table th{text-align: center;}
+        .table td{text-align: center;}
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function() {
+
+        });
+        function page(n,s){
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
+        }
+    </script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <%--1收款通知权限(财务人员使用),2收款确认权限,3收款审核权限 4、返佣管理权限'--%>
+    <li><a href="${ctx}/permission/receiptUserPermission/list?userType=1">收款通知权限</a></li>
+    <li><a href="${ctx}/permission/receiptUserPermission/list?userType=2">收款确认权限</a></li>
+    <li><a href="${ctx}/permission/receiptUserPermission/list?userType=3">收款审核权限</a></li>
+    <li><a href="${ctx}/permission/receiptUserPermission/list?userType=4">返佣管理权限</a></li>
+    <li class="active"><a href="${ctx}/permission/receiptUserPermission/list?userType=5">供应商退款管理权限</a></li>
+</ul>
+<form:form id="searchForm" modelAttribute="receiptUserPermission" action="${ctx}/permission/receiptUserPermission/" method="post" class="breadcrumb form-search">
+    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+    <input id="userType" name="userType" type="hidden" value="5"/>
+    <div class="ul-form">
+        <label>退款确认人:</label>
+        <form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>
+        <label>手机号码:</label>
+        <form:input path="mobile" htmlEscape="false" maxlength="20" class="input-medium"/>
+        <label>微信openID:</label>
+        <form:input path="openid" htmlEscape="false" maxlength="32" class="input-medium"/>
+        &nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+        <shiro:hasPermission name="permission:receiptUserPermission:edit">
+            <a class="btn btn-primary" href="${ctx}/permission/receiptUserPermission/form?userType=5">添加</a></li>
+        </shiro:hasPermission>
+        <div class="clearfix"></div>
+    </div>
+</form:form>
+<sys:message content="${message}"/>
+<table id="contentTable" class="table table-striped table-bordered table-condensed">
+    <thead>
+    <tr>
+        <th>退款确认人</th>
+        <th>手机</th>
+        <th>微信openID</th>
+        <th>身份</th>
+        <shiro:hasPermission name="permission:receiptUserPermission:edit"><th>操作</th></shiro:hasPermission>
+    </tr>
+    </thead>
+    <tbody>
+    <c:forEach items="${page.list}" var="receiptUserPermission">
+        <tr>
+            <td><a href="${ctx}/permission/receiptUserPermission/form?id=${receiptUserPermission.id}">
+                    ${receiptUserPermission.name}
+            </a></td>
+            <td>${receiptUserPermission.mobile}</td>
+            <td>${receiptUserPermission.openid}</td>
+            <td>
+                <c:if test="${receiptUserPermission.userIdentity eq 1}">
+                    协销人员
+                </c:if>
+                <c:if test="${receiptUserPermission.userIdentity eq 2}">
+                    客服
+                </c:if>
+                <c:if test="${receiptUserPermission.userIdentity eq 3}">
+                    财务
+                </c:if>
+                <c:if test="${receiptUserPermission.userIdentity eq 4}">
+                    超级管理员
+                </c:if>
+            </td>
+            <shiro:hasPermission name="permission:receiptUserPermission:edit"><td>
+                <a href="${ctx}/permission/receiptUserPermission/form?id=${receiptUserPermission.id}">编辑</a>
+                <shiro:hasPermission name="permission:receiptUserPermission:delete">
+                    <a href="${ctx}/permission/receiptUserPermission/delete?id=${receiptUserPermission.id}" onclick="return confirmx('确认要删除吗?', this.href)">删除</a>
+                </shiro:hasPermission>
+            </td></shiro:hasPermission>
+        </tr>
+    </c:forEach>
+    </tbody>
+</table>
+<div class="pagination">${page}</div>
+</body>
+</html>

+ 39 - 1
src/main/webapp/WEB-INF/views/modules/product-new/productEdit.jsp

@@ -128,6 +128,26 @@
                 <label><input type="radio" name="commodityType" value="2" onchange="loadBigType()" ${product.commodityType == "2" ? "checked" : ""} />仪器</label>
                 <label><input type="radio" name="commodityType" value="2" onchange="loadBigType()" ${product.commodityType == "2" ? "checked" : ""} />仪器</label>
             </td>
             </td>
         </tr>
         </tr>
+        <tr class="training" hidden>
+            <th><span class="red">*</span>培训方式:</th>
+            <td colspan="3">
+                <label><input type="radio" name="trainingMethod" value="1" ${empty product.trainingMethod || product.trainingMethod == 1 ? "checked" : ""} />线上培训<b class="line">|</b></label>
+                <label><input type="radio" name="trainingMethod" value="2" ${product.trainingMethod == 2 ? "checked" : ""} />线下培训</label>
+            </td>
+        </tr>
+        <tr class="training" hidden>
+            <th><span class="red">*</span>培训费用:</th>
+            <td colspan="3">
+                <label><input type="radio" name="trainingType" value="1" ${empty product.trainingType || product.trainingType == 1 ? "checked" : ""} onchange="trainingShow()"/>售价未包含<b class="line">|</b></label>
+                <label><input type="radio" name="trainingType" value="2" ${product.trainingType == 2 ? "checked" : ""} onchange="trainingShow()"/>售价已包含</label>
+            </td>
+        </tr>
+        <tr id="trainingFee" hidden>
+            <th></th>
+            <td colspan="3">
+                <input type="number" name="trainingFee" value="${product.trainingFee}" style="width: 250px" min="0" placeholder="请填写包含食宿,交通等各项费用的总金额"/>
+            </td>
+        </tr>
         <tr>
         <tr>
             <th><span class="red">*</span>分类:</th>
             <th><span class="red">*</span>分类:</th>
             <td colspan="3">
             <td colspan="3">
@@ -271,7 +291,7 @@
             <td colspan="3"><form:input path="minBuyNumber" maxlength="11" class="short" /></td>
             <td colspan="3"><form:input path="minBuyNumber" maxlength="11" class="short" /></td>
         </tr>
         </tr>
         <tr>
         <tr>
-            <th><span class="red">*</span>商品查看权限:</th>
+            <th><span class="red">*</span>商品可见度:</th>
             <td colspan="3">
             <td colspan="3">
                 <form:select path="visibility" class="input-large required" id="visibility">
                 <form:select path="visibility" class="input-large required" id="visibility">
                     <form:option value="3" label="所有人可见"/>
                     <form:option value="3" label="所有人可见"/>
@@ -824,6 +844,7 @@
             }
             }
         }
         }
         loadSmallType();
         loadSmallType();
+        trainingShow();
     }
     }
 
 
 
 
@@ -1214,6 +1235,23 @@
             var n = parseFloat(that.value);
             var n = parseFloat(that.value);
             that.value = n.toFixed(2)
             that.value = n.toFixed(2)
         }
         }
+
+        //培训相关显示
+        function trainingShow() {
+            var commodityType = $("input[name='commodityType']:checked").val();
+            var trainingType = $("input[name='trainingType']:checked").val();
+            if (commodityType == 2){
+                $(".training").show();
+                if (trainingType == 1){
+                    $("#trainingFee").show();
+                }else {
+                    $("#trainingFee").hide();
+                }
+            }else {
+                $(".training").hide();
+                $("#trainingFee").hide();
+            }
+        }
 </script>
 </script>
 
 
 </body>
 </body>

+ 129 - 69
src/main/webapp/WEB-INF/views/modules/product-new/productList.jsp

@@ -14,6 +14,29 @@
         .red{color: red;}
         .red{color: red;}
         .flex-wrap >.item {margin-right: 20px;}
         .flex-wrap >.item {margin-right: 20px;}
         .jbox span.jbox-icon {top: auto !important;}
         .jbox span.jbox-icon {top: auto !important;}
+
+		.process-details span{width:140px;margin-left:50px;font-weight:600}
+		.process-details div{display:inline-block}
+		.check-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px solid #ddd}
+		.check-cfm-btn{background:#3daae9;color:#fff}
+		.mask{width:100%;height:100%;position:fixed;top:0;background:rgba(0,0,0,0.7);display:none}
+		.tips-popup-content{width:40%;height:auto;padding-bottom:30px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}
+		.tips-popup-content div{width:100%;text-align:center}
+		.tips-popup-content{width:25%}
+		.tips-popup-content p{text-align:center;padding:80px;font-size:20px}
+		.tips-popup-content h4{padding-left:10px;height:40px;line-height:40px;border-bottom:1px solid #eee;margin-bottom:20px}
+		.tips-cfm-btn,.tips-cancel-btn,.check-blue-btn,.check-grey-btn{width:100px;height:40px;margin:auto;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;background:#3daae9;color:#fff;border:none}
+		.return-btn,.tips-cancel-btn,.check-grey-btn{background:#fff;color:#555;margin-left:50px}
+		.tips-cancel-btn,.check-grey-btn{border:1px solid #ddd;margin-left:20px;display:none}
+		.close-btn1{top:8px;right:10px;width:18px;position:absolute;cursor:pointer}
+		.tips-popup-reason .tips-popup-content{height:220px}
+		.tips-popup-reason .tips-popup-content div{position:absolute;bottom:15px}
+		.tips-popup-reason .check-grey-btn{display:inline-block}
+		#refuse-reason{width:80%;height:30%;left:8%;position:absolute;resize:none}
+		.tips-popup-reason h5{color:#555;padding-left:8%;margin-bottom:4px;margin-top:-12px}
+		.red{color:red;}
+		.payment-form-bottom .wipeImgs{height:auto;padding:8px 0;}
+		.wipeImgs img{width:120px;height:90px;background-color:#eee;margin-right:15px;}
 	</style>
 	</style>
 </head>
 </head>
 <body>
 <body>
@@ -101,14 +124,6 @@
 						<form:options items="${brandList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
 						<form:options items="${brandList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
 					</form:select>
 					</form:select>
 				</div>
 				</div>
-				<%--<div class="item">
-					<label>二手商品:</label>
-					<form:select path="searchProductCategory" class="input-medium">
-						<form:option value="" label="请选择"/>
-						<form:option value="1" label="否"/>
-						<form:option value="2" label="是"/>
-					</form:select>
-				</div>--%>
 				<div class="item">
 				<div class="item">
 					<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" style="margin-left:20px;"/>
 					<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" style="margin-left:20px;"/>
 				</div>
 				</div>
@@ -129,6 +144,7 @@
 				<th>供应商名称</th>
 				<th>供应商名称</th>
 				<th>市场价</th>
 				<th>市场价</th>
 				<th>机构价</th>
 				<th>机构价</th>
+				<th>商品可见度</th>
 				<th>价格可见度</th>
 				<th>价格可见度</th>
 				<th>状态</th>
 				<th>状态</th>
 				<th>提交时间</th>
 				<th>提交时间</th>
@@ -174,6 +190,17 @@
                     </c:if>
                     </c:if>
 				</td>
 				</td>
 				<td>${product.price1}</td>
 				<td>${product.price1}</td>
+				<td>
+					<c:if test="${product.visibility eq 1}">
+						仅会员机构可见
+					</c:if>
+					<c:if test="${product.visibility eq 2}">
+						所有机构可见
+					</c:if>
+					<c:if test="${product.visibility eq 3}">
+						所有人可见
+					</c:if>
+				</td>
 				<td>
 				<td>
 				    <c:if test="${product.productCategory eq 2}">
 				    <c:if test="${product.productCategory eq 2}">
 				        ---
 				        ---
@@ -225,7 +252,9 @@
 				</td>
 				</td>
 				<shiro:hasPermission name="product:product:edit">
 				<shiro:hasPermission name="product:product:edit">
 					<c:if test="${product.validFlag eq 0}">
 					<c:if test="${product.validFlag eq 0}">
-						<td class="todo">无</td>
+						<td class="todo">
+							<a href="${ctx}/product/new/statusRemarks?productId=${product.id}">状态备注</a>
+						</td>
 					</c:if>
 					</c:if>
 					<c:if test="${product.productCategory eq 2}">
 					<c:if test="${product.productCategory eq 2}">
 						<c:if test="${product.validFlag ne 0}">
 						<c:if test="${product.validFlag ne 0}">
@@ -274,6 +303,7 @@
 									<a class="red" href="javascript:void(0);" onclick="validChange(${product.id}, 2)">显身</a>
 									<a class="red" href="javascript:void(0);" onclick="validChange(${product.id}, 2)">显身</a>
 								</c:if>
 								</c:if>
                                 <a class="red" href="javascript:void(0);" onclick="validChange(${product.id}, 0)" >删除</a>
                                 <a class="red" href="javascript:void(0);" onclick="validChange(${product.id}, 0)" >删除</a>
+								<a href="${ctx}/product/new/statusRemarks?productId=${product.id}">状态备注</a>
                             </td>
                             </td>
 					    </c:if>
 					    </c:if>
 					</c:if>
 					</c:if>
@@ -283,11 +313,39 @@
 		</c:forEach>
 		</c:forEach>
 		</tbody>
 		</tbody>
 	</table>
 	</table>
+	<div class="mask tips-popup-reason">
+		<div class="tips-popup-content">
+			<h4>确认提示</h4>
+			<h5 id="msg"></h5><br>
+			<h5><font color="red">* </font>备注:</h5>
+			<textarea id="refuse-reason" cols="30" rows="10" maxlength="200" placeholder="请填写备注信息描述原因,200字以内"></textarea>
+			<div>
+				<button class="check-cfm-btn check-blue-btn" type="button">确定</button>
+				<button class="check-grey-btn" type="button">取消</button>
+			</div>
+			<img class="close-btn1" src="/static/images/close-btn.png" alt="close-btn">
+		</div>
+	</div>
+	<div class="mask tips-popup">
+		<div class="tips-popup-content">
+			<h4>信息提示</h4>
+			<p></p>
+			<div>
+				<button class="tips-cfm-btn tips-cfm-directly" type="button">确定</button>
+				<button class="tips-cancel-btn" type="button">取消</button>
+			</div>
+			<img class="close-btn1" src="/static/images/close-btn.png" alt="close-btn">
+		</div>
+	</div>
 	<div class="pagination">${page}</div>
 	<div class="pagination">${page}</div>
 <% request.setAttribute("caimeiSpi", Global.getConfig("caimei.spi"));%>
 <% request.setAttribute("caimeiSpi", Global.getConfig("caimei.spi"));%>
 <% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
 <% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
 <script type="text/javascript">
 <script type="text/javascript">
-    var num = '';
+	var num = '';
+	//商品id
+	var productID = 0;
+	//商品状态
+	var validFlag;
     function page(n,s){
     function page(n,s){
         $("#pageNo").val(n);
         $("#pageNo").val(n);
         $("#pageSize").val(s);
         $("#pageSize").val(s);
@@ -319,40 +377,51 @@
         	$("#tinyType").val(tinyType);
         	$("#tinyType").val(tinyType);
         	$("#tinyType").prev().find(".select2-chosen").text($("#tinyType option:selected").text());
         	$("#tinyType").prev().find(".select2-chosen").text($("#tinyType option:selected").text());
         },500)
         },500)
-    });
 
 
-    // 选择配置
-    /*function settingApplets(that) {
-        var productId = that.attr('data-productid');
-        var preferred = that.attr('data-preferred');
-        var html = '<div id="auditBox"><div>请选择把该商品加入到如下商品列表中(可以多选)</div><div class="preferred">'
-                            +'<label><input '+(parseInt(preferred%10)>=1?'checked':'')+' name="preferredFlag" type="checkbox" value="1">新品上线</label>'
-                            +'<label><input '+(parseInt((preferred%100)/10)>=1?'checked':'')+' name="preferredFlag" type="checkbox" value="10">优惠商品</label>'
-                            +'<label><input '+(parseInt(preferred/100)>=1?'checked':'')+' name="preferredFlag" type="checkbox" value="100">常用商品</label>'
-                    +'</div></div>';
-        var submit = function (v, h, f) {
-            // 新品上线(001) 优惠商品(010) 常用商品(100),三者同时存在111
-            var preferredFlag = 0;
-            if (f.preferredFlag) {
-                var temp = f.preferredFlag.toString().split(",");
-                temp.forEach(function(item){
-                    preferredFlag += item*1;
-                });
-            }
-            $.post("${ctx}/product/new/addPreferred", {
-                'productId': productId,
-                'preferredFlag': preferredFlag
-            }, function (data) {
-                if (true == data.success) {
-                    $.jBox.tip(data.msg, 'info');
-                    $("#searchForm").submit();
-                } else {
-                    $.jBox.tip(data.msg, 'error');
-                }
-            }, "JSON");
-        };
-        $.jBox(html, {title: "选择配置", submit: submit});
-    }*/
+		$('.check-grey-btn').on('click', function () {
+			$('.tips-popup-reason').hide();
+		});
+
+		$('.close-btn1').on('click', function () {
+			$('.tips-popup-reason').hide();
+		});
+
+		$('.tips-cfm-directly').on('click', function () {
+			if ($('.tips-cfm-btn').hasClass('tips-cfm-directly')) {
+				$('.tips-popup').hide();
+			} else {
+				$('#form').submit();
+			}
+		})
+
+		$('.check-cfm-btn').on('click', function (e) {
+			var textareaVal = $('#refuse-reason').val();
+			if (!textareaVal.trim()) {
+				showTips('信息提示', '备注内容不能为空');
+				return false;
+			}
+			$.ajax({
+				url: "${ctx}/product/new/auditProduct",
+				data: {"productID": productID, "validFlag": validFlag, "remarks": textareaVal},
+				async: false,
+				type: "POST",
+				success: function (data) {
+					if (true == data.success) {
+						$.jBox.tip(data.msg, 'info');
+					} else {
+						$.jBox.tip(data.msg, 'error');
+					}
+					$("#searchForm").submit();
+				}
+			})
+		})
+	});
+
+	function showTips(title, text) {
+		$('.tips-popup h4').text(title);
+		$('.tips-popup p').text(text);
+		$('.tips-popup').show();
+	}
 
 
     // 更新索引
     // 更新索引
     function updateIndex(id) {
     function updateIndex(id) {
@@ -490,33 +559,24 @@
         };
         };
         $.jBox(html, {title: "审核", submit: submit});
         $.jBox(html, {title: "审核", submit: submit});
     }
     }
-    function validChange(id, flag) {
-			var msg = "提示信息";
-			if(flag == 10){
-				msg = "确定冻结该商品吗?冻结后该商品不会出现在采美商城。";
-			}else if(flag == 22){
-				msg = "确定解除冻结该商品吗?";
-			}else if(flag == 9){
-				msg = "确定隐身此商品吗?";
-			}else if(flag == 2){
-				msg = "确定显身此商品吗?";
-			}else if(flag == 0){
-				msg = "确定删除该商品吗?删除后不可恢复。";
-			}
 
 
-            top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
-                if(v=='ok'){
-                    $.post("${ctx}/product/new/auditProduct",{'productID': id,'validFlag': flag}, function(data) {
-                        if(true==data.success){
-                            $.jBox.tip(data.msg, 'info');
-                        } else {
-                            $.jBox.tip(data.msg,'error');
-                        }
-                        $("#searchForm").submit();
-                    },"JSON");//这里返回的类型有:json,html,xml,text
-                }
-                return;
-            },{buttonsFocus:1,persistent: true});
+	function validChange(id, flag) {
+		var msg = "提示信息";
+		if (flag == 10) {
+			msg = "确定冻结该商品吗?";
+		} else if (flag == 22) {
+			msg = "确定解除冻结该商品吗?";
+		} else if (flag == 9) {
+			msg = "确定隐身此商品吗?";
+		} else if (flag == 2) {
+			msg = "确定显身此商品吗?";
+		} else if (flag == 0) {
+			msg = "确定删除该商品吗?";
+		}
+		$("#msg").text(msg);
+		$('.tips-popup-reason').show();
+		productID = id;
+		validFlag = flag;
 	}
 	}
 	// 一级分类
 	// 一级分类
 	var bigtypeList = [
 	var bigtypeList = [

+ 186 - 134
src/main/webapp/WEB-INF/views/modules/product-new/recommend.jsp

@@ -82,32 +82,28 @@
 	<div class="flex-wrap">
 	<div class="flex-wrap">
 		<div class="item">
 		<div class="item">
 			<label><font color="red">*</font><b>设置类型:</b></label>
 			<label><font color="red">*</font><b>设置类型:</b></label>
-			<input type="radio" name="recommendType" value="1"  onchange="changeRecommendType()" ${recommendType == "1" ? "checked" : ""} />手动选择${recommendType}11 <b class="line">|</b>
+			<input type="radio" name="recommendType" value="1"  onchange="changeRecommendType()" ${recommendType == "1" ? "checked" : ""} />手动选择<b class="line">|</b>
 			<input type="radio" name="recommendType" value="0" onchange="changeRecommendType()" ${(recommendType == "0" || recommendType == ""|| recommendType == null) ? "checked" : ""} />自动选择
 			<input type="radio" name="recommendType" value="0" onchange="changeRecommendType()" ${(recommendType == "0" || recommendType == ""|| recommendType == null) ? "checked" : ""} />自动选择
-			<span style="color:#D0D0D0;">(设置自动选择后,系统将会选择该商品所属相同三级分类里的销量前7名商品)<span/>
+			<span style="color:#D0D0D0;">(设置自动选择后,系统将会选择该商品所属相同二级分类中销量前7名的商品进行推荐)<span/>
 		</div>
 		</div>
 	</div>
 	</div>
 	<div id="p-list" style="display:none;">
 	<div id="p-list" style="display:none;">
     	<div class="flex-wrap">
     	<div class="flex-wrap">
 			<div class="item">
 			<div class="item">
 				<label>商品分类:</label>
 				<label>商品分类:</label>
-				<select id="bigType" class="input-small" onchange="loadSmallType('', '#bigType', '#smallType', '#tinyType')">
+				<select id="commodityType" class="input-small" onchange="loadBigType()">
 					<option value="">请选择</option>
 					<option value="">请选择</option>
-					<c:forEach items="${classify.bigTypeList}" var="item">
-						<option value="${item.bigTypeID}">${item.name}</option>
-					</c:forEach>
+					<option value="1" ${product.commodityType eq 1 ? 'selected' :''}>产品</option>
+					<option value="2" ${product.commodityType eq 2 ? 'selected' :''}>仪器</option>
 				</select>
 				</select>
-				<select id="smallType" class="input-small" onchange="loadTinyType('', '#smallType', '#tinyType')">
+				<select id="bigType" class="input-small" onchange="loadSmallType()">
+					<option value="">请选择</option>
+				</select>
+				<select id="smallType" class="input-small" onchange="loadTinyType()">
 					<option value="">请选择</option>
 					<option value="">请选择</option>
-					<c:forEach items="${classify.smalltypeList}" var="item">
-						<option value="${item.smallTypeID}"  bigTypeID="${item.bigTypeID}">${item.name}</option>
-					</c:forEach>
 				</select>
 				</select>
 				<select id="tinyType" class="input-small">
 				<select id="tinyType" class="input-small">
 					<option value="">请选择</option>
 					<option value="">请选择</option>
-					<c:forEach items="${classify.tinytypeList}" var="item">
-						<option value="${item.tinyTypeID}" smallTypeID="${item.smallTypeID}">${item.name}</option>
-					</c:forEach>
 				</select>
 				</select>
 			</div>
 			</div>
 			<div class="item">
 			<div class="item">
@@ -188,9 +184,12 @@
         $('body').on('click','#queryBtn', function () {
         $('body').on('click','#queryBtn', function () {
             var recommendType = $("input[name='recommendType']:checked").val();
             var recommendType = $("input[name='recommendType']:checked").val();
             var url = "${ctx}//product/new/recommend?id=" + $("#productID").val() + "&recommendType=" + recommendType;
             var url = "${ctx}//product/new/recommend?id=" + $("#productID").val() + "&recommendType=" + recommendType;
-            if ($("#bigType").val() != '' && $("#bigType").val() != '请选择') {
-                url += "&bigTypeID=" + $("#bigType").val();
+            if ($("#commodityType").val() != '' && $("#commodityType").val() != '请选择') {
+                url += "&commodityType=" + $("#commodityType").val();
             }
             }
+			if ($("#bigType").val() != '' && $("#bigType").val() != '请选择') {
+				url += "&bigTypeID=" + $("#bigType").val();
+			}
             if ($("#smallType").val() != '' && $("#smallType").val() != '请选择') {
             if ($("#smallType").val() != '' && $("#smallType").val() != '请选择') {
                 url += "&smallTypeID=" + $("#smallType").val();
                 url += "&smallTypeID=" + $("#smallType").val();
             }
             }
@@ -259,126 +258,179 @@
 			$this.parent().next().find("input[name='recommendProductID']").attr("checked","true");
 			$this.parent().next().find("input[name='recommendProductID']").attr("checked","true");
 		});
 		});
     });
     });
-    // 初始化
-    var currentTinytype = ${product.tinyTypeID};
-    var currentSmalltype, currentBigType;
-    var bigTypeList = [
-        <c:forEach items="${classify.bigTypeList}" var="bigType" varStatus="index">
-            <c:if test="${index.index > 0}">,</c:if>
-            {
-                bigTypeID: ${bigType.bigTypeID},
-                name: "${bigType.name}"
-            }
-        </c:forEach>
-    ];
-    var smalltypeList = [
-        <c:forEach items="${classify.smalltypeList}" var="smalltype" varStatus="index">
-            <c:if test="${index.index > 0}">,</c:if>
-            {
-                smallTypeID: ${smalltype.smallTypeID},
-                name: "${smalltype.name}",
-                bigTypeID: ${smalltype.bigTypeID},
-            }
-        </c:forEach>
-    ];
-    var tinytypeList = [
-        <c:forEach items="${classify.tinytypeList}" var="tinytype" varStatus="index">
-            <c:if test="${index.index > 0}">,</c:if>
-            {
-                tinyTypeID: ${tinytype.tinyTypeID},
-                name: "${tinytype.name}",
-                smallTypeID: ${tinytype.smallTypeID}
-            }
-        </c:forEach>
-    ];
-    // 初始分类
-    function loadInitType(){
-        for(var i=0; i<tinytypeList.length; i++){
-            if (currentTinytype == tinytypeList[i].tinyTypeID) {
-                currentSmalltype = tinytypeList[i].smallTypeID;
-            }
-        }
-        for(var i=0; i<smalltypeList.length; i++){
-            if (currentSmalltype == smalltypeList[i].smallTypeID) {
-                currentBigType = smalltypeList[i].bigTypeID;
-            }
-        }
-        if(currentBigType != null && typeof(currentBigType) != "undefined"){
-            loadSmallType(currentBigType, '#bigType', '#smallType', '#tinyType');
-            setTimeout(function(){
-                loadTinyType(currentSmalltype, '#smallType', '#tinyType');
-            },0);
-            setTimeout(function(){
-                $('#tinyType').val(currentTinytype);
-                var tinyTypeText = $('#tinyType').find('option:selected').text();
-                $('#tinyType').prev().find('.select2-chosen').text(tinyTypeText);
-            },500)
-        }
-    }
+
+	// 网站分类
+	var currentBigtype = ${product.bigTypeID};
+	var currentSmalltype = ${product.smallTypeID};
+	var currentTinytype = ${product.tinyTypeID};
+	var currentCommodityType = ${product.commodityType};    //商品属性
+	var bigTypeList = [
+		<c:forEach items="${classify.bigTypeList}" var="bigType" varStatus="index">
+		<c:if test="${index.index > 0}">,</c:if>
+		{
+			bigTypeID: ${bigType.bigTypeID},
+			name: "${bigType.name}",
+			typeSort: ${bigType.typeSort}
+		}
+		</c:forEach>
+	];
+	var smalltypeList = [
+		<c:forEach items="${classify.smalltypeList}" var="smalltype" varStatus="index">
+		<c:if test="${index.index > 0}">,</c:if>
+		{
+			smallTypeID: ${smalltype.smallTypeID},
+			name: "${smalltype.name}",
+			bigTypeID: ${smalltype.bigTypeID},
+		}
+		</c:forEach>
+	];
+	var tinytypeList = [
+		<c:forEach items="${classify.tinytypeList}" var="tinytype" varStatus="index">
+		<c:if test="${index.index > 0}">,</c:if>
+		{
+			tinyTypeID: ${tinytype.tinyTypeID},
+			name: "${tinytype.name}",
+			smallTypeID: ${tinytype.smallTypeID}
+		}
+		</c:forEach>
+	];
+
+	// 初始分类
+	function loadInitType(){
+		if (currentCommodityType == null || typeof (currentCommodityType) == "undefined" || currentCommodityType == '0') {
+			$("#bigType").html("");
+			$("#bigType").prev().find(".select2-chosen").text("请选择");
+			$("#bigType").append("<option value=''>请选择</option>");
+			$("#smallType").html("");
+			$("#smallType").prev().find(".select2-chosen").text("请选择");
+			$("#smallType").append("<option value=''>请选择</option>");
+			$("#tinyType").html("");
+			$("#tinyType").prev().find(".select2-chosen").text("请选择");
+			$("#tinyType").append("<option value=''>请选择</option>");
+			document.getElementById("s2id_tinyType").style.cssText = "display: none";
+		}else if(currentBigtype != null && typeof(currentBigtype) != "undefined"){
+			setTimeout(function(){
+				loadBigType();
+			},0);
+		}
+	}
+
     // 分类联动
     // 分类联动
-    function loadSmallType(id, big, small, tiny){
-        if(id){
-            $(big).val(id);
-            var text = $(big).find('option:selected').text();
-            $(big).prev().find(".select2-chosen").text(text);
-        }
-        var bigType = $(big).val();
-        if(typeof(bigType) != "undefined") {
-            $(small).html("");
-            $(small).prev().find(".select2-chosen").text("请选择");
-            $(small).append("<option value=''>请选择</option>");
-            $(tiny).html("");
-            $(tiny).prev().find(".select2-chosen").text("请选择");
-            $(tiny).append("<option value=''>请选择</option>");
-            for(var i=0; i<smalltypeList.length; i++){
-                if (bigType == smalltypeList[i].bigTypeID) {
-                    if(currentSmalltype != null && typeof(currentSmalltype) != "undefined" && currentSmalltype == smalltypeList[i].smallTypeID) {
-                        $(small).append("<option selected value='"+smalltypeList[i].smallTypeID+"'>"+smalltypeList[i].name+"</option>");
-                        $(small).prev().find(".select2-chosen").text(smalltypeList[i].name);
-                        setTimeout(function(){
-                            loadTinyType(currentSmalltype, small, tiny)
-                        },i*500);
-                    }else{
-                        $(small).append("<option value='"+smalltypeList[i].smallTypeID+"'>"+smalltypeList[i].name+"</option>");
-                    }
-                }
-            }
-        } else {
-            $(small).html("");
-            $(small).prev().find(".select2-chosen").text("请选择");
-            $(small).append("<option value=''>请选择</option>");
-            $(tiny).html("");
-            $(tiny).prev().find(".select2-chosen").text("请选择");
-            $(tiny).append("<option value=''>请选择</option>");
-        }
-    }
-    function loadTinyType(id, small, tiny){
-        if(id){
-            $(small).val(id);
-            var text = $(small).find('option:selected').text();
-            $(small).prev().find(".select2-chosen").text(text);
-        }
-        var smallType = $(small).find('option:selected').val();
-        if(typeof(smallType) != "undefined") {
-            $(tiny).html("");
-            $(tiny).prev().find(".select2-chosen").text("请选择");
-            $(tiny).append("<option value=''>请选择</option>");
-            for(var i=0; i<tinytypeList.length; i++){
-                if (smallType == tinytypeList[i].smallTypeID) {
-                    if(currentTinytype != null && typeof(currentTinytype) != "undefined" && currentTinytype == tinytypeList[i].tinyTypeID) {
-                        $(tiny).append("<option selected value='"+tinytypeList[i].tinyTypeID+"'>"+tinytypeList[i].name+"</option>");
-                        $(tiny).prev().find(".select2-chosen").text(tinytypeList[i].name);
-                    }else{
-                        $(tiny).append("<option value='"+tinytypeList[i].tinyTypeID+"'>"+tinytypeList[i].name+"</option>");
-                    }
-                }
-            }
-        } else {
-            $(tiny).html("");
-            $(tiny).prev().find(".select2-chosen").text("请选择");
-            $(tiny).append("<option value=''>请选择</option>");
-        }
-    }
+	function loadBigType(){
+		var commodityType = $("#commodityType").val();
+		$("#bigType").html("");
+		$("#bigType").prev().find(".select2-chosen").text("请选择");
+		$("#bigType").append("<option value=''>请选择</option>");
+		$("#smallType").html("");
+		$("#smallType").prev().find(".select2-chosen").text("请选择");
+		$("#smallType").append("<option value=''>请选择</option>");
+		$("#tinyType").html("");
+		$("#tinyType").prev().find(".select2-chosen").text("请选择");
+		$("#tinyType").append("<option value=''>请选择</option>");
+		if(typeof(commodityType) != "undefined") {
+			$("#bigType").html("");
+			$("#bigType").prev().find(".select2-chosen").text("请选择");
+			$("#bigType").append("<option value=''>请选择</option>");
+			$("#smallType").html("");
+			$("#smallType").prev().find(".select2-chosen").text("请选择");
+			$("#smallType").append("<option value=''>请选择</option>");
+			$("#tinyType").html("");
+			$("#tinyType").prev().find(".select2-chosen").text("请选择");
+			$("#tinyType").append("<option value=''>请选择</option>");
+			for(var i=0; i<bigTypeList.length; i++){
+				if (commodityType == bigTypeList[i].typeSort) {
+					if (currentBigtype != null && typeof (currentBigtype) != "undefined" && currentBigtype == bigTypeList[i].bigTypeID) {
+						$("#bigType").append("<option selected value='"+bigTypeList[i].bigTypeID+"'>"+bigTypeList[i].name+"</option>");
+						$("#bigType").prev().find(".select2-chosen").text(bigTypeList[i].name);
+						setTimeout(function(){
+							loadSmallType();
+						},500);
+					}else{
+						$("#bigType").append("<option value='"+bigTypeList[i].bigTypeID+"'>"+bigTypeList[i].name+"</option>");
+					}
+				}
+			}
+		}
+		loadSmallType();
+	}
+
+	function loadSmallType(id){
+		if(id){
+			$("#bigType").val(id);
+			$("#bigType").prev().find(".select2-chosen").text($("#bigType option:selected").text());
+		}
+		var bigType = $("#bigType").val();
+		$("#smallType").html("");
+		$("#smallType").prev().find(".select2-chosen").text("请选择");
+		$("#smallType").append("<option value=''>请选择</option>");
+		$("#tinyType").html("");
+		$("#tinyType").prev().find(".select2-chosen").text("请选择");
+		$("#tinyType").append("<option value=''>请选择</option>");
+		if(typeof(bigType) != "undefined" && bigType != "") {
+			var smallTypeNum = 0;
+			for(var i=0; i<smalltypeList.length; i++){
+				if (bigType == smalltypeList[i].bigTypeID) {
+					smallTypeNum = smallTypeNum + 1;
+					if(currentSmalltype != null && typeof(currentSmalltype) != "undefined" && currentSmalltype == smalltypeList[i].smallTypeID) {
+						$("#smallType").append("<option selected value='"+smalltypeList[i].smallTypeID+"'>"+smalltypeList[i].name+"</option>");
+						$("#smallType").prev().find(".select2-chosen").text(smalltypeList[i].name);
+						setTimeout(function(){
+							loadTinyType(currentSmalltype);
+						},500);
+					}else{
+						$("#smallType").append("<option value='"+smalltypeList[i].smallTypeID+"'>"+smalltypeList[i].name+"</option>");
+					}
+				}
+			}
+			if (smallTypeNum == 0) {
+				$("#smallType").removeClass("required");
+				document.getElementById("s2id_smallType").style.cssText = "display: none";
+			}else {
+				$("#smallType").addClass("required");
+				document.getElementById("s2id_smallType").style.cssText = "display: inline-block";
+			}
+		} else {
+			$("#smallType").removeClass("required");
+			document.getElementById("s2id_smallType").style.cssText = "display: none";
+		}
+		loadTinyType();
+	}
+
+	function loadTinyType(id) {
+		if(id){
+			$("#smallType").val(id);
+			$("#smallType").prev().find(".select2-chosen").text($("#smallType option:selected").text());
+		}
+		var smallType = $("#smallType option:selected").val();
+		$("#tinyType").html("");
+		$("#tinyType").prev().find(".select2-chosen").text("请选择");
+		$("#tinyType").append("<option value=''>请选择</option>");
+		if(typeof(smallType) != "undefined" && smallType != "") {
+			var tinyTypeNum = 0;
+			for(var i=0; i<tinytypeList.length; i++){
+				if (smallType == tinytypeList[i].smallTypeID) {
+					tinyTypeNum = tinyTypeNum + 1;
+					if(currentTinytype != null && typeof(currentTinytype) != "undefined" && currentTinytype == tinytypeList[i].tinyTypeID) {
+						$("#tinyType").append("<option selected value='"+tinytypeList[i].tinyTypeID+"'>"+tinytypeList[i].name+"</option>");
+						$("#tinyType").prev().find(".select2-chosen").text(tinytypeList[i].name);
+					}else{
+						$("#tinyType").append("<option value='"+tinytypeList[i].tinyTypeID+"'>"+tinytypeList[i].name+"</option>");
+					}
+				}
+			}
+			if (tinyTypeNum == 0) {
+				$("#tinyType").removeClass("required");
+				document.getElementById("s2id_tinyType").style.cssText = "display: none";
+			}else {
+				$("#tinyType").addClass("required");
+				document.getElementById("s2id_tinyType").style.cssText = "display: inline-block";
+			}
+		} else {
+			document.getElementById("s2id_tinyType").style.cssText = "display: none";
+			$("#tinyType").removeClass("required");
+		}
+	}
+
     function changeRecommendType(){
     function changeRecommendType(){
 		var recommendType = $("input[name='recommendType']:checked").val();
 		var recommendType = $("input[name='recommendType']:checked").val();
 		if (recommendType == '0') {
 		if (recommendType == '0') {

+ 140 - 0
src/main/webapp/WEB-INF/views/modules/product-new/statusRemarksList.jsp

@@ -0,0 +1,140 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+    <title>商品管理</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table th {text-align: center}
+        .table td {text-align: center}
+        .pay-table th {
+            background: #f9f9f9;
+        }
+        .pay-table tr:first-child th {
+            background: #eee !important;
+        }
+        .pay-table td {
+            background: #fff !important;
+        }
+
+        .form-horizontal .controls {
+            margin-left: 0;
+        }
+
+        .dateInput input {
+            width: 150px;
+        }
+
+        .clause span {
+            margin-left: 30px;
+        }
+
+        #productTable th {
+            text-align: center;
+            white-space: nowrap;
+        }
+
+        #productTable td {
+            text-align: center;
+            white-space: nowrap;
+        }
+        .conList .btn:nth-of-type(1){
+            margin-left: 25px;
+        }
+        .upload-content .conList .btn:nth-of-type(1) {
+            width: 90px;
+            height: 100px;
+            border: 2px solid #eee;
+            background: #fff;
+            position: relative;
+        }
+        .upload-content .conList .btn:nth-of-type(1)>div {
+            position: absolute;
+            top: 50%;
+            left: 50%;
+            transform: translate(-50%, -50%);
+            color: #666;
+        }
+        .upload-content .conList .btn:nth-of-type(1) span {
+            font-size: 35px;
+        }
+        .upload-content .conList .btn:nth-of-type(1) h5 {
+            color: #666;
+        }
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function() {
+            $("#inputForm").validate({
+                ignore:"",
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+
+        });
+        function page(n,s){
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
+        }
+
+    </script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/product/new/list?searchProductCategory=1">商品列表</a></li>
+    <li class="active"><a href="${ctx}/product/new/statusRemarks?productId=${productId}">状态备注</a></li>
+</ul>
+<c:if test="${not empty records}">
+    <c:forEach items="${records}" var="record">
+        <div style="margin-left: 35px">
+            <div style="font-weight: bold;width: 100%;float: left;">
+                <span style="float: left;">${record.systemName}</span><span style="float: left;margin-left:10px;"><fmt:formatDate value="${record.addTime}" pattern="yyyy-MM-dd HH:mm"/></span>
+                <span style="margin-left: 35px;">
+                    <c:if test="${record.validFlag eq 0}">
+                        <font color="#0099FF">删除</font>
+                    </c:if>
+                    <c:if test="${record.validFlag eq 2}">
+                        <font color="#0099FF">显身</font>
+                    </c:if>
+                    <c:if test="${record.validFlag eq 9}">
+                        <font color="#0099FF">隐身</font>
+                    </c:if>
+                    <c:if test="${record.validFlag eq 10}">
+                        <font color="#0099FF">冻结</font>
+                    </c:if>
+                    <c:if test="${record.validFlag eq 22}">
+                        <font color="#0099FF">取消冻结</font>
+                    </c:if>
+                </span>
+            </div>
+            <br><br>
+            <div>
+                <label>备注内容:${record.remarks}</label>
+            </div>
+        </div><br>
+        <hr>
+    </c:forEach>
+</c:if>
+<c:if test="${empty records}">
+    <p style="text-align: center;"><font  color="#1e90ff">该商品暂无冻结/隐身/删除的状态备注</font></p>
+</c:if>
+<div>
+    <input id="btnCancel" class="btn" type="button" value="返回" onclick="history.go(-1)"/>
+</div>
+<script>
+</script>
+</body>
+</html>
+

+ 111 - 0
src/main/webapp/WEB-INF/views/modules/user/clubConfirmRecordList.jsp

@@ -0,0 +1,111 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>未确认机构管理</title>
+    <meta name="decorator" content="default"/>
+    <script src="/static/modules/bulkpurchase/loadAddressById.js"></script>
+    <script type="text/javascript">
+        $(document).ready(function () {
+            $("#inputForm").validate({
+                ignore: "",
+                submitHandler: function (form) {
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function (error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+        });
+
+
+        /**
+         * @param obj
+         * jquery控制input只能输入数字
+         */
+        function onlynum(obj) {
+            obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+        }
+
+        /**
+         * @param obj
+         * jquery控制input只能输入数字和两位小数
+         */
+        function num(obj) {
+            obj.value = obj.value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符
+            obj.value = obj.value.replace(/^\./g, ""); //验证第一个字符是数字
+            obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个, 清除多余的
+            obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
+            obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
+        }
+
+    </script>
+    <style>
+        th {
+            text-align: right;
+            white-space: nowrap;
+        }
+
+        td {
+            padding: 5px 0;
+        }
+    </style>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/new/user/agency/">机构列表</a></li>
+    <li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
+    <li class="active"><a href="${ctx}/user/clubTemporary/confirmRecord?id=${clubTemporary.id}">确认记录</a></li>
+</ul>
+<form:form id="inputForm" modelAttribute="clubTemporary" action="" method="post" class="form-horizontal">
+    <div style="max-width:1200px;padding:15px;">
+        <table border="0" cellspacing="0" cellpadding="0" width="100%">
+            <tr style="height: 28px;background-color: rgb(242, 242, 242)">
+                <th style="width:10%">机构名称:</th>
+                <td style="width:25%">${empty clubTemporary.name ? "--------" : clubTemporary.name}</td>
+                <th style="width:10%">机构简称:</th>
+                <td style="width:55%">${empty clubTemporary.shortName ? "--------" : clubTemporary.shortName}</td>
+            </tr>
+            <tr style="height: 28px;background-color: rgb(242, 242, 242)">
+                <th style="width:10%">联系人:</th>
+                <td style="width:25%">
+                        ${clubTemporary.linkMan}
+                </td>
+                <th style="width:10%">手机号:</th>
+                <td style="width:55%">${clubTemporary.bindMobile}</td>
+            </tr>
+            <c:forEach items="${recordList}" var="record">
+                <tr height="35">
+                    <td style="text-align: right">${record.systemName}</td>
+                    <td colspan="3" style="text-indent:5em">确认时间:<fmt:formatDate value="${record.confirmTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+                </tr>
+                <c:if test="${not empty record.remarkImages}">
+                    <tr height="100">
+                        <th>图片备注:</th>
+                        <td colspan="3">
+                            <c:forEach items="${record.remarkImages}" var="image">
+                                <img src="${image}" style="height: 70px;width: 65px">
+                            </c:forEach>
+                        </td>
+                    </tr>
+                </c:if>
+                <tr height="30">
+                    <th>文字备注:</th>
+                    <td colspan="3">${record.remarks}</td>
+                </tr>
+                <tr height="25">
+                    <td colspan="4" style="border-bottom: 1px dashed #aaa"></td>
+                </tr>
+            </c:forEach>
+        </table>
+    </div>
+</form:form>
+</body>
+</html>

+ 541 - 0
src/main/webapp/WEB-INF/views/modules/user/clubTemporaryForm.jsp

@@ -0,0 +1,541 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+	<title>未确认机构管理</title>
+	<meta name="decorator" content="default"/>
+	<script src="/static/modules/bulkpurchase/loadAddressById.js"></script>
+	<script type="text/javascript">
+		$(document).ready(function () {
+			$("#inputForm").validate({
+				ignore: "",
+				submitHandler: function (form) {
+					var bindMobile = $("#bindMobile").val();
+					var userID = $("#userId").val();
+					$.post("${ctx}/new/user/agency/checkMobile?bindMobile="+bindMobile+"&userID="+userID, function (data) {
+						if (data.code == -1) {
+							alertx(data.msg);
+						}else {
+							loading('正在提交,请稍等...');
+							form.submit();
+						}
+					})
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function (error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+		});
+
+		function checkMobile() {
+			var bindMobile = $("#bindMobile").val();
+			var userID = $("#userId").val();
+			$.post("${ctx}/new/user/agency/checkMobile?bindMobile="+bindMobile+"&userID="+userID, function (data) {
+				if (data.code == -1) {
+					alertx(data.msg);
+				}
+			})
+		}
+
+		function onlyNumOrLetter(obj) {
+			var reg = /^[0-9a-zA-Z]+$/;
+			var str = document.getElementById("socialCreditCode").value;
+			if (!reg.test(str)) {
+				alertx("营业执照编号格式不正确");
+				$("#socialCreditCode").val("");
+			}
+		}
+
+		/**
+		 * @param obj
+		 * jquery控制input只能输入数字
+		 */
+		function mobileVerification(obj) {
+			var reg = /^1\d{10}$/;
+			var contractMobile = document.getElementById("contractMobile").value;
+			if (!reg.test(contractMobile)) {
+				alertx("手机号格式不正确");
+				$("#contractMobile").val("");
+			}
+		}
+
+		/**
+		 * @param obj
+		 * jquery控制input只能输入数字
+		 */
+		function onlynum(obj) {
+			obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+		}
+
+		/**
+		 * @param obj
+		 * jquery控制input只能输入数字和两位小数
+		 */
+		function num(obj) {
+			obj.value = obj.value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符
+			obj.value = obj.value.replace(/^\./g, ""); //验证第一个字符是数字
+			obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个, 清除多余的
+			obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
+			obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
+		}
+
+		function int(obj) {
+			obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+		}
+
+		//设置主营类型
+		function setTags(opts) {
+			var tagArr = [];
+			opts.$mainPro.val('')
+			opts.$tagArea.find('.new-tag.active').each(function (i, v) {
+				var _typeName = $(v).attr('data-typeName');
+				tagArr.push(_typeName);
+				opts.$mainPro.val(tagArr.join('/'));
+			})
+		}
+
+		//选择主营内容项目
+		function getTags(opts) {
+			opts.$tagArea.on('click', '.new-tag', function () {
+				var $this = $(this);
+				$this.toggleClass('active');
+				setTags(opts);
+			});
+			opts.$other.on('click', function () {
+				opts.$input.css('display', 'inline-block');
+				opts.$add.css('display', 'inline-block');
+			});
+			opts.$add.on('click', function () {
+				var _tag = $.trim(opts.$input.val());
+				if (_tag) {
+					var flag = false;
+					opts.$tagArea.find('.new-tag').each(function (i, v) {
+						var _name = $(v).attr('data-typeName');
+						if (_tag == _name) {
+							flag = true;
+							return false;
+						} else {
+							if (i == opts.$tagArea.find('.new-tag').length) {
+								flag = false;
+							}
+						}
+
+					})
+					if (flag) {
+						opts.$tagArea.find('.new-tag').each(function (i, v) {
+							var _name = $(v).attr('data-typeName');
+							if (_tag == _name) {
+								$(v).addClass('active');
+								layer.tips('该类型已存在', opts.$add);
+								flag = true;
+								return false;
+							}
+
+						})
+					} else {
+						opts.$tagArea.append('<span class="new-tag up-' + opts.$type + '-tag active" data-typeName="' + _tag + '">' + _tag + '</span> ');
+						setTags(opts);
+						opts.$input.val('');
+						return;
+					}
+				}
+			})
+		}
+
+		$(document).on("change", "#auditStatus", function () {
+			if ($("#auditStatus").val() == 2) {
+				$("#auditNopass").show();
+			} else {
+				$("#auditNopass").hide();
+			}
+		})
+
+		// 初始化选中数据
+		$(function () {
+			//初始化1
+			var firstClubType = $('#firstClubType').val();
+			console.log(firstClubType)
+			if (firstClubType == '1') {
+				$('.med-option,.qualification').show();
+			}
+			$('.medical-radio div input[name="firstClubType"]').on('click', function () {
+				var html = '';
+				var nameval = $(this).val();
+				if (nameval == '1') {
+					$('.med-option,.qualification').show();
+					html += '<span class="new-tag up-club-tag" data-typeName="整形">整形</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="轻医美">轻医美</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="皮肤科">皮肤科</span>';
+					$('#clubArea').html(html);
+					$('.Main-content').show();
+				} else if (nameval == '2') {
+					$('.med-option,.qualification,.epart').hide();
+					$('input[name="secondClubType"]').attr('checked', false);
+					html += '<span class="new-tag up-club-tag" data-typeName="美容">美容</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="美体">美体</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="美发">美发</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="皮肤管理">皮肤管理</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="光电">光电</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="综合类">综合类</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="中医养生">中医养生</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="spa">spa</span>'
+					$('#clubArea').html(html);
+					$('.Main-content').show();
+				}
+			});
+			//初始化2
+			if (firstClubType == '1') {
+				var nameval1 = $('input[name="secondClubType"]:checked').val();
+				if (nameval1 == '1') {
+					$('.epart').hide()
+				} else if (nameval1 == '2') {
+					$('.epart').show()
+				} else if (nameval1 == '3') {
+					$('.epart').show()
+				}
+			}
+			//医美二级选择
+			$('.med-option div input[name="secondClubType"]').on('click', function () {
+				var nameVal = $(this).val();
+				if (nameVal == '1') {
+					$('.epart').hide()
+				} else if (nameVal == '2') {
+					$('.epart').show()
+				} else if (nameVal == '3') {
+					$('.epart').show()
+				}
+			});
+			//主营项目
+			var cMainProVal = $('#cMainPro').val();
+			if (cMainProVal != null && cMainProVal != "") {
+				var _mainPros = cMainProVal.split('/');
+				var proList = $('#clubArea').find('.new-tag');
+				for (var j = 0; j < _mainPros.length; j++) {
+					var _flag = false;
+					for (var i = 0; i < proList.length; i++) {
+						if ($(proList[i]).attr('data-typeName') == _mainPros[j]) {
+							_flag = true;
+						}
+					}
+					if (_flag) {
+						for (var i = 0; i < proList.length; i++) {
+							if ($(proList[i]).attr('data-typeName') == _mainPros[j]) {
+								$(proList[i]).addClass('active');
+							}
+						}
+					} else {
+						$('#clubArea').append('<span class="new-tag up-club-tag active" data-typeName="' + _mainPros[j] + '">' + _mainPros[j] + '</span> ');
+						$('.Main-content').show();
+					}
+				}
+				$('#cMainPro').val(cMainProVal);
+			}
+			//机构品项选择
+			var optsClub = {
+				$tag: $('.up-club-tag'),
+				$tagArea: $('#clubArea'),
+				$mainPro: $('#cMainPro'),
+				$other: $('#clubOther'),
+				$input: $('#clubInput'),
+				$add: $('#clubAdd'),
+				$type: 'club'
+			};
+			getTags(optsClub);
+
+		})
+	</script>
+	<style>
+		#auditBox .bd-row {
+			display: flex;
+			margin-bottom: 15px;
+		}
+
+		#auditBox .bd-row > span {
+			display: inline-block;
+			width: 60px;
+		}
+
+		#auditBox .auditCheckBox {
+			width: 250px;
+		}
+
+		#auditBox .auditCheckBox label {
+			margin: 0 5px 5px 0
+		}
+
+		#auditBox .auditCheckBox input {
+			display: none;
+		}
+
+		#auditBox .auditCheckBox input + span {
+			display: inline-block;
+			line-height: 24px;
+			padding: 0 12px;
+			border: 1px solid #666;
+			border-radius: 5px;
+		}
+
+		#auditBox .auditCheckBox input:checked + span {
+			background-color: #E6633A
+		}
+
+		.detailLine {
+			width: 98%;
+			margin-left: 10px;
+		}
+
+		th {
+			text-align: right;
+			white-space: nowrap;
+		}
+
+		td {
+			padding: 5px 0;
+		}
+
+		#headpicPreview li, #businessLicenseImagePreview li {
+			min-height: 100px;
+		}
+
+		.the-oradio {
+			display: inline-block;
+			vertical-align: top;
+		}
+
+		.the-oradio div {
+			width: 85px;
+			display: inline-block;
+			font-size: 12px;
+			color: #666;
+		}
+
+		.med-option {
+			display: block;
+			margin: 10px 0 0 160px;
+		}
+
+		.control-group .new-tag {
+			display: inline-block;
+			width: 78px;
+			height: 30px;
+			border: 1px solid #e5e5e5;
+			border-radius: 5px;
+			margin: 7px;
+			text-align: center;
+			line-height: 30px;
+			font-size: 14px;
+			overflow: hidden;
+			text-overflow: ellipsis;
+			white-space: nowrap;
+			cursor: pointer;
+		}
+
+		.control-group .new-tag.active {
+			border-color: #e15616;
+			color: #e15616;
+		}
+
+		#clubArea {
+			display: inline-block;
+			width: 450px;
+		}
+
+		#clubOther {
+			height: 40px;
+			line-height: 40px;
+			vertical-align: middle
+		}
+
+		#clubInput {
+			width: 159px;
+			margin: 7px;
+			display: inline-block;
+			height: 30px;
+			display: none;
+		}
+
+		.tags-operate {
+			margin-left: 160px;
+		}
+
+		.control-group .tags-operate .tag-add {
+			height: 40px;
+			line-height: 40px;
+			vertical-align: middle;
+			display: none;
+		}
+	</style>
+</head>
+<body>
+<ul class="nav nav-tabs">
+	<li><a href="${ctx}/new/user/agency/">机构列表</a></li>
+	<li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
+	<li class="active"><a href="">未确认机构编辑</a></li>
+</ul>
+<form:form id="inputForm" modelAttribute="clubTemporary" action="${ctx}/user/clubTemporary/save" method="post" class="form-horizontal">
+<form:hidden path="id"/>
+<form:hidden path="userId" id="userId"/>
+<div style="max-width:1200px;padding:15px;">
+	<table border="0" cellspacing="0" cellpadding="0" width="100%">
+		<tr height="28">
+			<th>状态:</th>
+			<td colspan="5">未确认</td>
+		</tr>
+		<tr height="28">
+			<th width="12%">机构名称:</th>
+			<td width="13%"><form:input path="name" htmlEscape="false" maxlength="20" class="input-medium"/></td>
+			<th width="12%">机构简称:</th>
+			<td width="13%"><form:input path="shortName" htmlEscape="false" maxlength="20" class="input-medium"/></td>
+			<th width="12%">注册邮箱:</th>
+			<td width="13%"><form:input path="contractEmail" htmlEscape="false" maxlength="20" class="input-medium"/></td>
+		</tr>
+		<tr height="28">
+			<th width="12%"><font color="red">*</font>联系人:</th>
+			<td width="13%">
+				<form:input path="linkMan" htmlEscape="false" maxlength="20" class="input-medium required"/>
+			</td>
+			<th width="12%"><font color="red">*</font> 手机号:</th>
+			<td colspan="3"><form:input path="bindMobile" htmlEscape="false" maxlength="20" class="input-medium required"  onchange="checkMobile()"/></td>
+		</tr>
+	</table>
+</div>
+
+<input type="hidden" id="curProvince" name="curProvince" value="${clubTemporary.province }" disabled="disabled">
+<input type="hidden" id="curCity" name="curCity" value="${clubTemporary.city }" disabled="disabled">
+<input type="hidden" id="curTown" name="curTown" value="${clubTemporary.town }" disabled="disabled">
+<sys:message content="${message}"/>
+<hr class="detailLine">
+<div>
+	<table border="0" cellspacing="0" cellpadding="0" width="100%">
+		<tr>
+			<td colspan="2">
+				<div class="control-group">
+					<label class="control-label"><b>地址:</b></label>
+					<div class="controls">
+						<form:select path="provinceId" class="input-xlarge" id="province"
+									 onchange="loadCity()" style="width:100px;">
+							<form:option value="" label="省" provinceId=""/>
+						</form:select>
+						<form:select path="cityId" class="input-xlarge" id="city" onchange="loadTown()"
+									 style="width:100px;">
+							<form:option value="" label="市" cityId=""/>
+						</form:select>
+						<form:select path="townId" class="input-xlarge" id="town" style="width:100px;">
+							<form:option value="" label="区"/>
+						</form:select>
+						<form:input path="address" class="input-xlarge userAddress" width="20px" maxlength="60"
+									placeholder="请填写会所详细的地址"/>
+					</div>
+				</div>
+			</td>
+		</tr>
+		<tr>
+			<td colspan="2">
+				<div class="control-group">
+					<label class="control-label"><b>营业执照编号:</b></label>
+					<div class="controls">
+						<form:input path="socialCreditCode" htmlEscape="false" maxlength="18"
+									class="input-xlarge" onchange="onlyNumOrLetter(this)"
+									placeholder="请填写统一社会信用代码"/>
+					</div>
+				</div>
+			</td>
+		</tr>
+		<tr>
+			<td>
+				<div class="control-group">
+					<label class="control-label"><b>营业执照:</b></label>
+					<div class="controls">
+						<form:hidden id="businessLicenseImage" path="businessLicense" htmlEscape="false"
+									 maxlength="255" class="input-xlarge required"/>
+						<sys:ckfinder input="businessLicenseImage" type="images" uploadPath="/photo"
+									  selectMultiple="false" maxWidth="100" maxHeight="100"/>
+						<font color="red">注意:请上传jpg/png格式的图片,最大不超过5M</font>
+					</div>
+				</div>
+			</td>
+			<td>
+				<div class="control-group">
+					<label class="control-label"><b>门头照:</b></label>
+					<div class="controls">
+						<form:hidden id="headpic" path="shopPhoto" htmlEscape="false" maxlength="255"
+									 class="input-xlarge"/>
+						<sys:ckfinder input="headpic" type="images" uploadPath="/photo" maxWidth="100" maxHeight="100"/>
+						<font color="red">注意:请上传jpg/png格式的图片,最大不超过5M</font>
+					</div>
+				</div>
+			</td>
+		</tr>
+		<tr>
+			<td>
+				<div class="control-group">
+					<label class="control-label" for=""><b>机构类型:</b></label>
+					<div class="medical-radio the-oradio">
+						<input value="${clubTemporary.firstClubType}" class="hide" type="text" id="firstClubType"/>
+						<div class="med-beauty">
+							<input name="firstClubType" value="1" type="radio" ${clubTemporary.firstClubType == "1" ? "checked" : ""}/>医美
+						</div>
+						<div class="raw-beauty">
+							<input name="firstClubType" value="2" type="radio" ${clubTemporary.firstClubType == "2" ? "checked" : ""}/>生美
+						</div>
+					</div>
+					<span class="err-tip"></span>
+					<div class="med-option the-oradio" style="display: none">
+						<div class="med-beauty"><input name="secondClubType" value="1"
+													   type="radio"  ${clubTemporary.secondClubType == "1" ? "checked" : ""}/>诊所
+						</div>
+						<div class="med-beauty"><input name="secondClubType" value="2"
+													   type="radio"  ${clubTemporary.secondClubType == "2" ? "checked" : ""}/>门诊
+						</div>
+						<div class="med-beauty"><input name="secondClubType" value="3"
+													   type="radio" ${clubTemporary.secondClubType == "3" ? "checked" : ""}/>医院
+						</div>
+						<span class="err-tip"></span>
+					</div>
+					<div class="qualification control-group" style="display: none">
+						<label class="control-label"><b>资质:</b></label>
+						<div class="controls" style="margin-bottom: 10px">
+							<form:hidden id="medicalPracticeLicenseImg" path="medicalPracticeLicense"
+										 htmlEscape="false" maxlength="255"
+										 class="input-xlarge"/>
+							<sys:ckfinder input="medicalPracticeLicenseImg" type="images" uploadPath="/photo"
+										  maxWidth="100" maxHeight="100"/>
+							<font color="red">注意:请上传jpg/png格式的图片,最大不超过5M</font>
+						</div>
+					</div>
+				</div>
+				<div class="control-group epart" style="display: none">
+					<label class="control-label"><b>科室:</b></label>
+					<input class="reg-input" type="text" name="department" id="Department"
+						   placeholder="请填写您的所经营的科室,用逗号隔开。(至少三个)" value="${clubTemporary.department}"
+						   style="margin-left: 10px;"/>
+					<span class="err-tip"></span>
+				</div>
+				<div class="control-group Main-content" style="display: none">
+					<label class="control-label" for=""><b>主营内容:</b></label>
+					<div class="tags-area" id="clubArea"></div>
+					<span class="err-tip" style="display: inline-block;margin-left:-55px;"></span>
+					<input type="hidden" name="mainProduct" value="${clubTemporary.mainProduct}" id="cMainPro">
+					<div class="tags-operate">
+						<span class="new-tag tag-other" id="clubOther">其他</span>
+						<input type="text" class="reg-input tag-input" id="clubInput" placeholder="请输入自定义品项目"
+							   maxlength="5">
+						<span class="new-tag tag-add" id="clubAdd">确认添加</span>
+					</div>
+				</div>
+			</td>
+		</tr>
+	</table>
+	<div class="form-actions">
+		<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;&nbsp;&nbsp;
+		<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+	</div>
+	</form:form>
+</body>
+</html>

+ 106 - 0
src/main/webapp/WEB-INF/views/modules/user/clubTemporaryList.jsp

@@ -0,0 +1,106 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>未确认机构管理</title>
+	<meta name="decorator" content="default"/>
+	<style type="text/css">
+		.table th{text-align: center;}
+		.table td{text-align: center;}
+	</style>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			
+		});
+		function page(n,s){
+			$("#pageNo").val(n);
+			$("#pageSize").val(s);
+			$("#searchForm").submit();
+        	return false;
+        }
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li><a href="${ctx}/new/user/agency/">机构列表</a></li>
+		<li class="active"><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
+	</ul>
+	<form:form id="searchForm" modelAttribute="clubTemporary" action="${ctx}/user/clubTemporary/" method="post" class="breadcrumb form-search">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<div class="ul-form">
+			 <label>机构名称:</label>
+				<form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>
+			 <label>联系人:</label>
+				<form:input path="linkMan" htmlEscape="false" maxlength="50" class="input-medium"/>
+			 <label>手机号:</label>
+				<form:input path="bindMobile" htmlEscape="false" maxlength="20" class="input-medium"/>
+			 <label>邮箱:</label>
+				<form:input path="contractEmail" htmlEscape="false" maxlength="50" class="input-medium"/>
+			<br><br>
+			 <label>添加时间:</label>
+				<input name="startTime" type="text" readonly="readonly" maxlength="15" class="input-mini Wdate"
+					   value="${clubTemporary.startTime}"
+					   onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/> -
+				<input name="endTime" type="text" readonly="readonly" maxlength="15" class="input-mini Wdate"
+					   value="${clubTemporary.endTime}"
+					   onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+			<div class="clearfix"></div>
+		</div>
+	</form:form>
+	<sys:message content="${message}"/>
+	<font color="red">未确认机构是指协销拉机构上线后,暂未通过协销分享的链接确认注册的机构。客服可在本页面暂时为机构确认注册,确认后<br>
+		协销可以帮机构下一个订单。在机构没有自己确认之前,每次协销为机构下单前都需要客服确认一次</font>
+	<table id="contentTable" class="table table-striped table-bordered table-condensed">
+		<thead>
+			<tr>
+				<th>机构名称</th>
+				<th>机构简称</th>
+				<th>联系人</th>
+				<th>手机号</th>
+				<th>邮箱</th>
+				<th>协销人员</th>
+				<th>机构类别</th>
+				<th>添加时间</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="club">
+			<tr>
+				<td>
+					${empty club.name ? "------" : club.name}
+				</td>
+				<td>
+					${empty club.shortName ? "------" : club.shortName}
+				</td>
+				<td>
+						${club.linkMan}
+				</td>
+				<td>
+					${club.bindMobile}
+				</td>
+				<td>
+					${empty club.contractEmail ? "------" : club.contractEmail}
+				</td>
+				<td>${club.spName}</td>
+				<td>
+						${empty club.businessLicense ? "普通机构" : "会员机构"}
+				</td>
+				<td>
+					<fmt:formatDate value="${club.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+    				<a href="${ctx}/user/clubTemporary/form?id=${club.id}">编辑</a>
+					<a href="${ctx}/user/clubTemporary/registerPage?id=${club.id}">确认注册</a>
+					<a href="${ctx}/user/clubTemporary/confirmRecord?id=${club.id}">确认记录</a>
+					<%--<a href="${ctx}/user/clubTemporary/delete?id=${club.id}" onclick="return confirmx('确认要删除该未确认机构吗?', this.href)">删除</a>--%>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	<div class="pagination">${page}</div>
+</body>
+</html>

+ 9 - 3
src/main/webapp/WEB-INF/views/modules/user/cmUserBalanceList.jsp

@@ -69,6 +69,7 @@
 </head>
 </head>
 <body>
 <body>
 	<ul class="nav nav-tabs">
 	<ul class="nav nav-tabs">
+		<li><a href="${ctx}/user/cmUserBalanceWithdrawals/">余额提现列表</a></li>
 		<li class="active"><a href="${ctx}/user/cmUserBalanceRecord/userBalanceList">机构余额</a></li>
 		<li class="active"><a href="${ctx}/user/cmUserBalanceRecord/userBalanceList">机构余额</a></li>
 	</ul>
 	</ul>
 	<form:form id="searchForm" modelAttribute="cmUser" action="${ctx}/user/cmUserBalanceRecord/userBalanceList" method="post" class="breadcrumb form-search">
 	<form:form id="searchForm" modelAttribute="cmUser" action="${ctx}/user/cmUserBalanceRecord/userBalanceList" method="post" class="breadcrumb form-search">
@@ -116,13 +117,18 @@
 				</td>
 				</td>
 					<td>
 					<td>
 						<a href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${cmUser.userID}" >查看详情</a>
 						<a href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${cmUser.userID}" >查看详情</a>
-						<shiro:hasPermission name="user:cmUserBalanceRecord:recharge">
+						<shiro:hasPermission name="balance:cmUserBalanceRecord:recharge">
 							<a href="javascript:void(0);" onclick="recharge('${cmUser.userID}')">充值</a>
 							<a href="javascript:void(0);" onclick="recharge('${cmUser.userID}')">充值</a>
 							<%--<font title="请使用充值订单的方式进行充值!">充值</font>--%>
 							<%--<font title="请使用充值订单的方式进行充值!">充值</font>--%>
 						</shiro:hasPermission>
 						</shiro:hasPermission>
-						<shiro:hasPermission name="user:cmUserBalanceRecord:edit">
+						<shiro:hasPermission name="balance:cmUserBalanceWithdrawals:withdrawalReview">
 							<c:if test="${cmUser.ableUserMoney > 0}">
 							<c:if test="${cmUser.ableUserMoney > 0}">
-								<a href="${ctx}/user/cmUserBalanceRecord/userWithdrawals?userID=${cmUser.userID}" >提现</a>
+								<c:if test="${cmUser.pending}">
+									<font color="#666666">申请提现</font>
+								</c:if>
+								<c:if test="${!cmUser.pending}">
+									<a href="${ctx}/user/cmUserBalanceRecord/userWithdrawals?userID=${cmUser.userID}" >申请提现</a>
+								</c:if>
 							</c:if>
 							</c:if>
 						</shiro:hasPermission>
 						</shiro:hasPermission>
 					</td>
 					</td>

+ 2 - 1
src/main/webapp/WEB-INF/views/modules/user/cmUserBalanceRecordList.jsp

@@ -60,6 +60,7 @@
 </head>
 </head>
 <body>
 <body>
 	<ul class="nav nav-tabs">
 	<ul class="nav nav-tabs">
+		<li><a href="${ctx}/user/cmUserBalanceWithdrawals">余额提现列表</a></li>
 		<li><a href="${ctx}/user/cmUserBalanceRecord/userBalanceList">会所余额</a></li>
 		<li><a href="${ctx}/user/cmUserBalanceRecord/userBalanceList">会所余额</a></li>
 		<li class="active"><a href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${userID}">余额详情</a></li>
 		<li class="active"><a href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${userID}">余额详情</a></li>
 	</ul>
 	</ul>
@@ -151,7 +152,7 @@
 							</c:if>
 							</c:if>
 							<c:if test="${cmUserBalanceRecord.balanceType eq 5 }">
 							<c:if test="${cmUserBalanceRecord.balanceType eq 5 }">
 								<a href="javascript:void(0);" onclick="toWithdrawals(${cmUserBalanceRecord.withdrawalsId})">提现详情</a>
 								<a href="javascript:void(0);" onclick="toWithdrawals(${cmUserBalanceRecord.withdrawalsId})">提现详情</a>
-								<a href="${ctx}/user/cmUserBalanceRecord/cancelWithdrawals?id=${cmUserBalanceRecord.id}" onclick="return confirmx('确定撤销本次提现吗?', this.href)"><font color="red">撤销提现</font></a>
+								<%--<a href="${ctx}/user/cmUserBalanceRecord/cancelWithdrawals?id=${cmUserBalanceRecord.id}" onclick="return confirmx('确定撤销本次提现吗?', this.href)"><font color="red">撤销提现</font></a>--%>
 							</c:if>
 							</c:if>
 							<c:if test="${cmUserBalanceRecord.balanceType eq 6 }">
 							<c:if test="${cmUserBalanceRecord.balanceType eq 6 }">
 								<a href="${ctx}/order/cmDiscernReceipt/detail?id=${cmUserBalanceRecord.receiptId}">订金订单充值</a>
 								<a href="${ctx}/order/cmDiscernReceipt/detail?id=${cmUserBalanceRecord.receiptId}">订金订单充值</a>

+ 7 - 19
src/main/webapp/WEB-INF/views/modules/user/cmUserBalanceWithdrawalsForm.jsp

@@ -45,8 +45,9 @@
 </head>
 </head>
 <body>
 <body>
 	<ul class="nav nav-tabs">
 	<ul class="nav nav-tabs">
-		<li><a href="${ctx}/user/cmUserBalanceRecord/userBalanceList">会所余额</a></li>
-		<li class="active"><a href="${ctx}/user/cmUserBalanceRecord/userWithdrawals?userID=${cmUser.userID}">提现管理</a></li>
+		<li><a href="${ctx}/user/cmUserBalanceWithdrawals/">余额提现列表</a></li>
+		<li><a href="${ctx}/user/cmUserBalanceRecord/userBalanceList">机构余额</a></li>
+		<li class="active"><a href="${ctx}/user/cmUserBalanceRecord/userWithdrawals?userID=${cmUser.userID}">申请提现</a></li>
 	</ul><br/>
 	</ul><br/>
 	<form:form id="inputForm" modelAttribute="cmUserBalanceWithdrawals" action="${ctx}/user/cmUserBalanceWithdrawals/save" method="post" class="form-horizontal">
 	<form:form id="inputForm" modelAttribute="cmUserBalanceWithdrawals" action="${ctx}/user/cmUserBalanceWithdrawals/save" method="post" class="form-horizontal">
 		<form:hidden path="userID" value="${cmUser.userID}"/>
 		<form:hidden path="userID" value="${cmUser.userID}"/>
@@ -69,7 +70,7 @@
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label"><font color="red">*</font><b>提现金额:</b></label>
 			<label class="control-label"><font color="red">*</font><b>提现金额:</b></label>
 			<div class="controls">
 			<div class="controls">
-				<form:input path="withdrawalsFee" htmlEscape="false" class="input-xlarge required" onchange="num(this)" placeholder="请输入此次提现金额"/>
+				<input type="number" name="withdrawalsFee" required placeholder="请输入此次提现金额" max="${empty cmUser.ableUserMoney ? 0:cmUser.ableUserMoney}">
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -92,26 +93,13 @@
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
-			<label class="control-label"><font color="red">*</font><b>采美付款银行:</b></label>
+			<label class="control-label"><font color="red">*</font><b>备注:</b></label>
 			<div class="controls">
 			<div class="controls">
-				<form:select path="payType"  class="input-medium required">
-					<form:option value="" label="请选择"/>
-					<form:option value="1" label="建设银行7297"/>
-					<form:option value="2" label="中信银行0897"/>
-					<form:option value="3" label="中信银行7172"/>
-					<form:option value="4" label="广发银行0115"/>
-					<form:option value="5" label="广发银行5461"/>
-				</form:select>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label"><b>备注:</b></label>
-			<div class="controls">
-				<form:textarea path="remark" maxlength="200" class="input-xlarge "  rows="4"></form:textarea>
+				<form:textarea path="remark" maxlength="200" placeholder="必填,不能超过200字" class="input-xlarge required"  rows="4"></form:textarea>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="form-actions">
 		<div class="form-actions">
-			<shiro:hasPermission name="user:cmUserBalanceWithdrawals:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
+			<shiro:hasPermission name="balance:cmUserBalanceWithdrawals:withdrawals"><input id="btnSubmit" class="btn btn-primary" type="submit" value="申 请"/>&nbsp;</shiro:hasPermission>
 			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
 			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
 		</div>
 		</div>
 	</form:form>
 	</form:form>

+ 122 - 0
src/main/webapp/WEB-INF/views/modules/user/cmUserBalanceWithdrawalsList.jsp

@@ -0,0 +1,122 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>审核列表管理</title>
+	<meta name="decorator" content="default"/>
+	<style type="text/css">
+		.table th{text-align: center;}
+		.table td{text-align: center;}
+	</style>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			
+		});
+		function page(n,s){
+			$("#pageNo").val(n);
+			$("#pageSize").val(s);
+			$("#searchForm").submit();
+        	return false;
+        }
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li class="active"><a href="${ctx}/user/cmUserBalanceWithdrawals/">余额提现列表</a></li>
+		<li><a href="${ctx}/user/cmUserBalanceRecord/userBalanceList">机构余额</a></li>
+	</ul>
+	<form:form id="searchForm" modelAttribute="cmUserBalanceWithdrawals" action="${ctx}/user/cmUserBalanceWithdrawals/" method="post" class="breadcrumb form-search">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<div class="ul-form">
+			 <label>提现单ID:</label>
+				<form:input path="id" htmlEscape="false" class="input-medium"/>
+			<label>机构名称:</label>
+				<form:input path="clubName" htmlEscape="false" maxlength="20" class="input-medium"/>
+			 <label>申请时间:</label>
+			<input name="startTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
+				   value="<fmt:formatDate value="${testData.beginInDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+				   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/> -
+			<input name="endTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
+				   value="<fmt:formatDate value="${testData.endInDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+				   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/><br><br>
+			<label>审核状态:</label>
+			<form:select path="status" class="input-medium required" style="width:160px">
+				<form:option value="" label="全部"/>
+				<form:option value="0" label="待审核"/>
+				<form:option value="1" label="审核通过"/>
+				<form:option value="2" label="审核不通过"/>
+			</form:select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+			<div class="clearfix"></div>
+		</div>
+	</form:form>
+	<sys:message content="${message}"/>
+	<table id="contentTable" class="table table-striped table-bordered table-condensed">
+		<thead>
+			<tr>
+				<th>提现单ID</th>
+				<th>机构名称</th>
+				<th>提现金额</th>
+				<th>申请人</th>
+				<th>申请时间</th>
+				<th>审核人</th>
+				<th>审核时间</th>
+				<th>审核状态</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="cmUserBalanceWithdrawals">
+			<tr>
+				<td>${cmUserBalanceWithdrawals.id}</td>
+				<td>${cmUserBalanceWithdrawals.clubName}</td>
+				<td>${cmUserBalanceWithdrawals.withdrawalsFee}</td>
+				<td>${cmUserBalanceWithdrawals.applicantName}</td>
+				<td>
+					<fmt:formatDate value="${cmUserBalanceWithdrawals.addDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>${cmUserBalanceWithdrawals.reviewerName}</td>
+				<td>
+					<fmt:formatDate value="${cmUserBalanceWithdrawals.reviewTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+					<c:if test="${cmUserBalanceWithdrawals.status eq 0}">
+						<font color="#DB7B3B">待审核</font>
+					</c:if>
+					<c:if test="${cmUserBalanceWithdrawals.status eq 1}">
+						<font color="green">审核通过</font>
+					</c:if>
+					<c:if test="${cmUserBalanceWithdrawals.status eq 2}">
+						<font color="red">审核不通过</font>
+					</c:if>
+				</td>
+				<td>
+					<a href="${ctx}/user/cmUserBalanceWithdrawals/viewDetails?id=${cmUserBalanceWithdrawals.id}">查看详情</a><br>
+					<c:if test="${cmUserBalanceWithdrawals.status eq 0}">
+						<shiro:hasPermission name="balance:cmUserBalanceWithdrawals:delete">
+							<a href="${ctx}/user/cmUserBalanceWithdrawals/delete?id=${cmUserBalanceWithdrawals.id}" onclick="return confirmx('确定要取消本次提现申请吗?', this.href)">取消提现</a><br>
+						</shiro:hasPermission>
+						<shiro:hasPermission name="balance:cmUserBalanceWithdrawals:withdrawalReview">
+							<a href="${ctx}/user/cmUserBalanceWithdrawals/withdrawalReview?id=${cmUserBalanceWithdrawals.id}">审核</a><br>
+						</shiro:hasPermission>
+					</c:if>
+					<c:if test="${cmUserBalanceWithdrawals.status eq 1 && not empty cmUserBalanceWithdrawals.reviewer}">
+						<shiro:hasPermission name="balance:cmUserBalanceWithdrawals:edit">
+							<a href="${ctx}/user/cmUserBalanceWithdrawals/withdrawalEdit?id=${cmUserBalanceWithdrawals.id}">编辑</a><br>
+						</shiro:hasPermission>
+						<shiro:hasPermission name="balance:cmUserBalanceWithdrawals:rollBackApply">
+							<a href="${ctx}/user/cmUserBalanceWithdrawals/rollBackApply?id=${cmUserBalanceWithdrawals.id}" onclick="return confirmx('确定撤销本次审核结果,重新再审核一次吗?', this.href)">撤销重来</a><br>
+						</shiro:hasPermission>
+						<shiro:hasPermission name="balance:cmUserBalanceWithdrawals:printDetail">
+							<a href="${ctx}/user/cmUserBalanceWithdrawals/printDetail?id=${cmUserBalanceWithdrawals.id}">打印</a><br>
+						</shiro:hasPermission>
+					</c:if>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	<div class="pagination">${page}</div>
+</body>
+</html>

+ 272 - 0
src/main/webapp/WEB-INF/views/modules/user/registerPage.jsp

@@ -0,0 +1,272 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>未确认机构管理</title>
+    <meta name="decorator" content="default"/>
+    <script src="/static/modules/bulkpurchase/loadAddressById.js"></script>
+    <script type="text/javascript">
+        $(document).ready(function () {
+            $("#inputForm").validate({
+                ignore: "",
+                submitHandler: function (form) {
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function (error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+        });
+
+
+        /**
+         * @param obj
+         * jquery控制input只能输入数字
+         */
+        function onlynum(obj) {
+            obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+        }
+
+        /**
+         * @param obj
+         * jquery控制input只能输入数字和两位小数
+         */
+        function num(obj) {
+            obj.value = obj.value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符
+            obj.value = obj.value.replace(/^\./g, ""); //验证第一个字符是数字
+            obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个, 清除多余的
+            obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
+            obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
+        }
+
+    </script>
+    <style>
+        th {
+            text-align: right;
+            white-space: nowrap;
+        }
+
+        td {
+            padding: 5px 0;
+        }
+
+        .controls .conList{
+            display: inline-block;
+            margin-right: 15px;
+        }
+        .conList .btn:nth-of-type(1){
+            margin-left: 25px;
+        }
+        .upload-content {
+            margin-top: -70px;
+            display: inline-block;
+        }
+        .upload-content .conList .btn:nth-of-type(1) {
+            width: 90px;
+            height: 100px;
+            border: 2px solid #eee;
+            background: #fff;
+            position: relative;
+        }
+        .upload-content .conList .btn:nth-of-type(1)>div {
+            position: absolute;
+            top: 50%;
+            left: 50%;
+            transform: translate(-50%, -50%);
+            color: #666;
+        }
+        .upload-content .conList .btn:nth-of-type(1) span {
+            font-size: 35px;
+        }
+        .upload-content .conList .btn:nth-of-type(1) h5 {
+            color: #666;
+        }
+        .cancel-upload {
+            background: transparent;
+            border: none;
+            box-shadow: none;
+            position: relative;
+            top: -38px;
+            left: -25px;
+            cursor: pointer;
+            z-index: 100;
+        }
+        .upload-content .conList ol li {
+            width: 114px;
+            min-height: 80px;
+            text-align: center;
+            background: #fff;
+            position: relative;
+            top: 120px;
+            margin-left: 2px;
+        }
+        .hide-pic {
+            display: none !important;
+        }
+    </style>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/new/user/agency/">机构列表</a></li>
+    <li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
+    <li class="active"><a href="${ctx}/user/clubTemporary/registerPage?id=${clubTemporary.id}">确认注册</a></li>
+</ul>
+<form:form id="inputForm" modelAttribute="clubTemporary" action="${ctx}/user/clubTemporary/registerSave" method="post" class="form-horizontal">
+<form:hidden path="id"/>
+<form:hidden path="userId" id="userId"/>
+<div style="max-width:1200px;padding:15px;">
+    <table border="0" cellspacing="0" cellpadding="0" width="100%">
+        <tr style="height: 28px;background-color: rgb(242, 242, 242)">
+            <th style="width:10%">机构名称:</th>
+            <td style="width:25%">${empty clubTemporary.name ? "--------" : clubTemporary.name}</td>
+            <th style="width:10%">机构简称:</th>
+            <td style="width:55%">${empty clubTemporary.shortName ? "--------" : clubTemporary.shortName}</td>
+        </tr>
+        <tr style="height: 28px;background-color: rgb(242, 242, 242)">
+            <th style="width:10%">联系人:</th>
+            <td style="width:25%">
+                    ${clubTemporary.linkMan}
+            </td>
+            <th style="width:10%">手机号:</th>
+            <td style="width:55%">${clubTemporary.bindMobile}</td>
+        </tr>
+        <tr height="35">
+            <td colspan="4" style="text-indent:2em">确认该机构注册采美吗?请详细填写确认的备注信息</td>
+        </tr>
+        <tr height="150">
+            <th>图片备注:</th>
+            <td colspan="3">
+                <div class="controls upload-content" style="margin: -91px 0px 0px 16px;" id="imagesBox">
+                    <div class="conList">
+                        <input type="hidden" name="images" id="images1">
+                        <sys:ckfinder input="images1" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <input type="hidden" name="images" id="images2">
+                        <sys:ckfinder input="images2" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <input type="hidden" name="images" id="images3">
+                        <sys:ckfinder input="images3" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <input type="hidden" name="images" id="images4">
+                        <sys:ckfinder input="images4" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <input type="hidden" name="images" id="images5">
+                        <sys:ckfinder input="images5" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <input type="hidden" name="images" id="images6">
+                        <sys:ckfinder input="images6" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <input type="hidden" name="images" id="images7">
+                        <sys:ckfinder input="images7" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <input type="hidden" name="images" id="images8">
+                        <sys:ckfinder input="images8" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList  hide-pic">
+                        <input type="hidden" name="images" id="images9">
+                        <sys:ckfinder input="images9" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList  hide-pic">
+                        <input type="hidden" name="images" id="images10">
+                        <sys:ckfinder input="images10" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                </div>
+            </td>
+        </tr>
+        <tr height="100">
+            <th><font color="red">*</font> 文字备注:</th>
+            <td colspan="3">
+                <textarea style="width: 350px;height: 75px" name="remarks" required placeholder="必填,不超过200字"></textarea>
+            </td>
+        </tr>
+    </table>
+</div>
+<div class="form-actions">
+    <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;&nbsp;&nbsp;
+    <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+</div>
+</form:form>
+<script>
+
+    //图片初始化
+    $(function () {
+        $('.upload-content .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
+        $('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();
+        $('.upload-content .conList').find('.cancel-upload').hide();
+        var observeEle = document.getElementsByClassName('upload-content')[0];
+        var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
+        var MutationObserverConfig={
+            childList: true,
+            subtree: true,
+            characterData: true
+        };
+        var observer = new MutationObserver(function(mutations){
+            $.each(mutations, function(index,item) {
+                if (item.type === 'childList') {
+                    // 在创建新的 element 时调用
+                    var target = $(item.target),
+                        thisWrapper = target.closest('.conList'),
+                        nextEle = thisWrapper.next();
+                    thisWrapper.find('li').css('z-index',99);
+                    thisWrapper.find('.cancel-upload').show();
+                    if(nextEle.hasClass('hide-pic')) {
+                        nextEle.removeClass('hide-pic');
+                    }
+                }
+            })
+        });
+        observer.observe(observeEle,MutationObserverConfig);
+
+        $('body').on('click','.upload-content li',function() {
+            var index = $(this).closest('.conList').index() + 1,
+                str = 'images'+index+'FinderOpen';
+            eval(str+'()');
+        });
+        $('body').on('click', '.cancel-upload',function() {
+            var wrapper = $(this).closest('.conList');
+            wrapper.find('li').css('z-index','-1');
+            wrapper.find('input').val('');
+            $(this).hide();
+            if ($('.cancel-upload:visible').length < 9) {
+                wrapper.addClass("hide-pic");
+            }else{
+                wrapper.removeClass("hide-pic");
+            }
+            wrapper.parent().append(wrapper.clone());
+            wrapper.remove();
+            $(".conList").each(function(i,ele){
+                if($(ele).find("input.input-xlarge").val()){
+                    $(ele).next().removeClass("hide-pic")
+                }
+            })
+        });
+        $(window).on("load", function(){
+            setTimeout(function(){
+                $("#imagesBox").find("input.input-xlarge").each(function(i,ele){
+                    if($(ele).val()){
+                        $(ele).next().find("li").css("z-index","99");
+                        $(ele).parents(".conList").find(".cancel-upload").show();
+                        $(ele).parents(".conList").next().removeClass("hide-pic")
+                    }
+                })
+            },500);
+        });
+    });
+</script>
+
+</body>
+</html>

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/user/toCmWithdrawalsForm.jsp

@@ -42,7 +42,7 @@
 	&nbsp;&nbsp;&nbsp;账户类型:
 	&nbsp;&nbsp;&nbsp;账户类型:
 	<c:if test="${cmUserBalanceWithdrawals.bankAccountType == '1'}">公帐</c:if>
 	<c:if test="${cmUserBalanceWithdrawals.bankAccountType == '1'}">公帐</c:if>
 	<c:if test="${cmUserBalanceWithdrawals.bankAccountType == '2'}">私帐</c:if>
 	<c:if test="${cmUserBalanceWithdrawals.bankAccountType == '2'}">私帐</c:if>
-	<br>采美付款银行:
+	<%--<br>采美付款银行:
 					<c:if test="${cmUserBalanceWithdrawals.payType == '1'}">
 					<c:if test="${cmUserBalanceWithdrawals.payType == '1'}">
 						建设银行7297
 						建设银行7297
 					</c:if>
 					</c:if>
@@ -57,7 +57,7 @@
 					</c:if>
 					</c:if>
 					<c:if test="${cmUserBalanceWithdrawals.payType == '5'}">
 					<c:if test="${cmUserBalanceWithdrawals.payType == '5'}">
 						广发银行5461
 						广发银行5461
-					</c:if>
+					</c:if>--%>
 	<c:if test="${not empty cmUserBalanceWithdrawals.remark}">
 	<c:if test="${not empty cmUserBalanceWithdrawals.remark}">
 		<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;备注:<div style="width: 755px;margin-left: 94px;margin-top: -19px;">${cmUserBalanceWithdrawals.remark}</div>
 		<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;备注:<div style="width: 755px;margin-left: 94px;margin-top: -19px;">${cmUserBalanceWithdrawals.remark}</div>
 	</c:if>
 	</c:if>

+ 156 - 0
src/main/webapp/WEB-INF/views/modules/user/userBalanceWithdrawalsDetails.jsp

@@ -0,0 +1,156 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+    <title>提现审核管理</title>
+    <meta name="decorator" content="default"/>
+    <style>
+        a[href]:after {
+            content: none !important;
+        }
+        .table th{text-align:center}
+        .table td{text-align:center}
+        .payment-form h4{width:96%;margin-left:2%;padding-bottom:20px;text-align:center;border-bottom:1px solid #eee}
+        .required{color:red}
+        .payment-form label{width:105px;text-align:right;vertical-align:middle;font-weight:600}
+        .payment-form-top{padding:10px 0}
+        .payment-form-top>div,.payment-form-bottom>div{width:94%;margin-left:3%;height:50px;line-height:50px;border-bottom:1px solid #eee;white-space:nowrap}
+        .payment-form-top input{vertical-align:baseline}
+        .payment-form-top>div:last-child span{margin-left:15px}
+        .payment-form-top>div:last-child span:nth-of-type(1){margin-left:0}
+        .pay-table th{background:#f9f9f9}
+        .pay-table tr:first-child th{background:#eee !important}
+        .pay-table td{background:#fff !important}
+        .check-btn{width:96%;margin-left:2%;text-align:center;height:60px;line-height:60px;margin-top:30px}
+        .check-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px solid #ddd}
+        .payment-form-bottom label{width:140px}
+        .process-details span{width:140px;margin-left:50px;font-weight:600}
+        .process-details div{display:inline-block}
+        .payment-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px solid #ddd}
+        .apply-btn{background:#3daae9;color:#fff}
+        .tips-popup-content div{width:100%;text-align:center}
+        .tips-popup-content p{text-align:center;padding:80px;font-size:20px}
+        .tips-popup-content h4{padding-left:10px;height:40px;line-height:40px;border-bottom:1px solid #eee;margin-bottom:20px}
+        .payment-form-bottom .wipeImgs{height:auto;padding:8px 0;}
+        .wipeImgs img{width:120px;height:90px;background-color:#eee;margin-right:15px;}
+    </style>
+    <style media="print">
+        .styleWidth{width:6%;word-break:break-all}
+        .styleWidth{}
+        .styleWidth3{width:10%;word-break:break-all}
+        .table{margin-left:0;margin-bottom:20px;padding-bottom:2px;border-bottom:1px solid #ddd;box-sizing:border-box}
+        .export{display:none}
+    </style>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/user/cmUserBalanceWithdrawals/">余额提现列表</a></li>
+    <li class="active"><a href="${ctx}/user/cmUserBalanceWithdrawals/viewDetails?id=${balanceWithdrawals.id}">提现单详情</a></li>
+</ul><br/>
+<div class="payment-form">
+    <h4>提现单</h4>
+    <div class="payment-form-top">
+        <div>
+            <label>机构名称:</label>
+            <span>${balanceWithdrawals.clubName}</span>
+        </div>
+        <div>
+            <label>提现账号:</label>
+            <span>户名:${balanceWithdrawals.bankAccountName}</span>&nbsp;&nbsp;
+            <span>账号:${balanceWithdrawals.bankAccountNo}</span>&nbsp;&nbsp;
+            <span>开户行:${balanceWithdrawals.openBank}</span>&nbsp;&nbsp;
+            <span>账户类型:
+                    <c:if test="${balanceWithdrawals.bankAccountType == '1'}">公帐</c:if>
+                    <c:if test="${balanceWithdrawals.bankAccountType == '2'}">私帐</c:if>
+            </span>
+        </div>
+        <div>
+            <label>提现金额:</label>
+            <span>${balanceWithdrawals.withdrawalsFee}</span>
+        </div>
+        <div>
+            <label>备注:</label>
+            <span>${balanceWithdrawals.remark}</span>
+        </div>
+        <div>
+            <label>申请人:</label>
+            <span>${balanceWithdrawals.applicantName}</span>
+        </div>
+        <div>
+            <label>申请时间:</label>
+            <span><fmt:formatDate value="${balanceWithdrawals.addDate}" pattern="yyyy-MM-dd HH:mm:ss"/> </span>
+        </div>
+        <div>
+            <label>审核状态:</label>
+            <span>
+                <c:if test="${balanceWithdrawals.status == '0'}">
+						<font color="red">
+							<strong>待审核</strong>
+						</font>
+                </c:if>
+                <c:if test="${balanceWithdrawals.status == '1'}">
+                    审核通过
+                </c:if>
+                <c:if test="${balanceWithdrawals.status == '2'}">
+                    审核不通过
+                </c:if>
+            </span>
+        </div>
+        <c:if test="${balanceWithdrawals.status == '2'}">
+            <div>
+                <label>原因:</label>
+                <span class="required">${balanceWithdrawals.reason}</span>
+            </div>
+        </c:if>
+        <c:if test="${balanceWithdrawals.status == '1'}">
+            <div>
+                <label>审核时间:</label>
+                <span><fmt:formatDate value="${balanceWithdrawals.reviewTime}" pattern="yyyy-MM-dd HH:mm:ss"/></span>
+            </div>
+            <div>
+            <label>付款银行:</label>
+            <span>
+                <c:if test="${balanceWithdrawals.payType eq 1}">
+                    建设银行7297
+                </c:if>
+                <c:if test="${balanceWithdrawals.payType eq 2}">
+                    中信银行0897
+                </c:if>
+                <c:if test="${balanceWithdrawals.payType eq 3}">
+                    中信银行7172
+                </c:if>
+                <c:if test="${balanceWithdrawals.payType eq 4}">
+                    广发银行0115
+                </c:if>
+                <c:if test="${balanceWithdrawals.payType eq 5}">
+                    广发银行5461
+                </c:if>
+            </span>
+            </div>
+            <div>
+                <label>付款时间:</label>
+                <span><fmt:formatDate value="${balanceWithdrawals.payTime}" pattern="yyyy-MM-dd HH:mm:ss"/></span>
+            </div>
+        </c:if>
+    </div>
+    <c:if test="${balanceWithdrawals.status == '1'}">
+        <shiro:hasPermission name="balance:cmUserBalanceWithdrawals:printDetail">
+        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>财务签名:</span>
+        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>审批人签名:</span>
+        <div class="check-btn">
+            <button class="export apply-btn btn btn-primary">打印</button>
+        </div>
+        </shiro:hasPermission>
+    </c:if>
+</div>
+<script>
+    (function(){
+        $('.export').on('click',function() {
+            window.print();
+        })
+    })()
+</script>
+</body>
+</html>

+ 144 - 0
src/main/webapp/WEB-INF/views/modules/user/userBalanceWithdrawalsEdit.jsp

@@ -0,0 +1,144 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+    <title>提现审核管理</title>
+    <meta name="decorator" content="default"/>
+    <style>
+        a[href]:after {
+            content: none !important;
+        }
+        .table th{text-align:center}
+        .table td{text-align:center}
+        .payment-form h4{width:96%;margin-left:2%;padding-bottom:20px;text-align:center;border-bottom:1px solid #eee}
+        .required{color:red}
+        .payment-form label{width:105px;text-align:right;vertical-align:middle;font-weight:600}
+        .payment-form-top{padding:10px 0}
+        .payment-form-top>div,.payment-form-bottom>div{width:94%;margin-left:3%;height:50px;line-height:50px;border-bottom:1px solid #eee;white-space:nowrap}
+        .payment-form-top input{vertical-align:baseline}
+        .payment-form-top>div:last-child span{margin-left:15px}
+        .payment-form-top>div:last-child span:nth-of-type(1){margin-left:0}
+        .pay-table th{background:#f9f9f9}
+        .pay-table tr:first-child th{background:#eee !important}
+        .pay-table td{background:#fff !important}
+        .check-btn{width:96%;margin-left:2%;text-align:center;height:60px;line-height:60px;margin-top:30px}
+        .check-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px solid #ddd}
+        .payment-form-bottom label{width:140px}
+        .process-details span{width:140px;margin-left:50px;font-weight:600}
+        .process-details div{display:inline-block}
+        .payment-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px solid #ddd}
+        .apply-btn{background:#3daae9;color:#fff}
+        .tips-popup-content div{width:100%;text-align:center}
+        .tips-popup-content p{text-align:center;padding:80px;font-size:20px}
+        .tips-popup-content h4{padding-left:10px;height:40px;line-height:40px;border-bottom:1px solid #eee;margin-bottom:20px}
+        .payment-form-bottom .wipeImgs{height:auto;padding:8px 0;}
+        .wipeImgs img{width:120px;height:90px;background-color:#eee;margin-right:15px;}
+    </style>
+    <style media="print">
+        .styleWidth{width:6%;word-break:break-all}
+        .styleWidth{}
+        .styleWidth3{width:10%;word-break:break-all}
+        .table{margin-left:0;margin-bottom:20px;padding-bottom:2px;border-bottom:1px solid #ddd;box-sizing:border-box}
+        .export{display:none}
+    </style>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/user/cmUserBalanceWithdrawals/">余额提现列表</a></li>
+    <li class="active"><a href="${ctx}/user/cmUserBalanceWithdrawals/withdrawalEdit?id=${balanceWithdrawals.id}">提现单详情</a></li>
+</ul><br/>
+<form:form id="inputForm" modelAttribute="balanceWithdrawals" action="${ctx}/user/cmUserBalanceWithdrawals/withdrawalEditSave?id=${balanceWithdrawals.id}" method="post" class="form-horizontal">
+<div class="payment-form">
+    <h4>提现单</h4>
+    <div class="payment-form-top">
+        <div>
+            <label>机构名称:</label>
+            <span>${balanceWithdrawals.clubName}</span>
+        </div>
+        <div>
+            <label>提现账号:</label>
+            <span>户名:${balanceWithdrawals.bankAccountName}</span>&nbsp;&nbsp;
+            <span>账号:${balanceWithdrawals.bankAccountNo}</span>&nbsp;&nbsp;
+            <span>开户行:${balanceWithdrawals.openBank}</span>&nbsp;&nbsp;
+            <span>账户类型:
+                    <c:if test="${balanceWithdrawals.bankAccountType == '1'}">公帐</c:if>
+                    <c:if test="${balanceWithdrawals.bankAccountType == '2'}">私帐</c:if>
+            </span>
+        </div>
+        <div>
+            <label>提现金额:</label>
+            <span>${balanceWithdrawals.withdrawalsFee}</span>
+        </div>
+        <div>
+            <label>备注:</label>
+            <span>${balanceWithdrawals.remark}</span>
+        </div>
+        <div>
+            <label>申请人:</label>
+            <span>${balanceWithdrawals.applicantName}</span>
+        </div>
+        <div>
+            <label>申请时间:</label>
+            <span><fmt:formatDate value="${balanceWithdrawals.addDate}" pattern="yyyy-MM-dd HH:mm:ss"/> </span>
+        </div>
+        <div>
+            <label>审核状态:</label>
+            <span>
+                <c:if test="${balanceWithdrawals.status == '0'}">
+						<font color="red">
+							<strong>待审核</strong>
+						</font>
+                </c:if>
+                <c:if test="${balanceWithdrawals.status == '1'}">
+                    审核通过
+                </c:if>
+                <c:if test="${balanceWithdrawals.status == '2'}">
+                    审核不通过
+                </c:if>
+            </span>
+        </div>
+        <c:if test="${balanceWithdrawals.status == '2'}">
+            <div>
+                <label>原因:</label>
+                <span class="required">${balanceWithdrawals.reason}</span>
+            </div>
+        </c:if>
+        <c:if test="${balanceWithdrawals.status == '1'}">
+            <div>
+                <label>审核时间:</label>
+                <span><fmt:formatDate value="${balanceWithdrawals.reviewTime}" pattern="yyyy-MM-dd HH:mm:ss"/></span>
+            </div>
+            <div>
+                <label>付款银行:</label>
+                <span>
+                <form:select path="payType" class="input-medium required">
+                    <form:option value="" label="请选择"/>
+                    <form:option value="1" label="建设银行7297"/>
+                    <form:option value="2" label="中信银行0897"/>
+                    <form:option value="3" label="中信银行7172"/>
+                    <form:option value="4" label="广发银行0115"/>
+                    <form:option value="5" label="广发银行5461"/>
+                </form:select>
+            </span>
+            </div>
+            <div>
+                <label>付款时间:</label>
+                <span><form:input path="payTime" type="text" maxlength="20" class="input-medium Wdate" value="${balanceWithdrawals.startTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/></span>
+            </div>
+        </c:if>
+    </div>
+    <div class="form-actions">
+        <shiro:hasPermission name="order:cmPayShop:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="确  认"/>&nbsp;</shiro:hasPermission>
+        <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+    </div>
+</div>
+</form:form>
+<script>
+    (function(){
+        $('.export').on('click',function() {
+            window.print();
+        })
+    })()
+</script>
+</body>
+</html>

+ 235 - 0
src/main/webapp/WEB-INF/views/modules/user/userBalanceWithdrawalsReview.jsp

@@ -0,0 +1,235 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+    <title>付款单表管理</title>
+    <meta name="decorator" content="default"/>
+    <style>
+        .table th{text-align:center}
+        .table td{text-align:center}
+        .payment-form h4{width:96%;margin-left:2%;padding-bottom:20px;text-align:center;border-bottom:1px solid #eee}
+        .required{color:red}
+        .payment-form label{width:100px;text-align:right;vertical-align:middle;font-weight:600}
+        .payment-form-top{padding:10px 0}
+        .payment-form-top>div,.payment-form-bottom>div{width:94%;margin-left:3%;height:50px;line-height:50px;border-bottom:1px solid #eee;white-space:nowrap}
+        .payment-form-top input{vertical-align:baseline}
+        .payment-form-top>div:last-child span{margin-left:15px}
+        .payment-form-top>div:last-child span:nth-of-type(1){margin-left:0}
+        .pay-table th{background:#f9f9f9}
+        .pay-table tr:first-child th{background:#eee !important}
+        .pay-table td{background:#fff !important}
+        .check-btn{width:96%;margin-left:2%;text-align:center;height:60px;line-height:60px;margin-top:30px}
+        .check-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px solid #ddd}
+        .payment-form-bottom label{width:140px}
+        .process-details span{width:140px;margin-left:50px;font-weight:600}
+        .process-details div{display:inline-block}
+        .payment-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px solid #ddd}
+        .tips-popup-content div{width:100%;text-align:center}
+        .tips-popup-content p{text-align:center;padding:80px;font-size:20px}
+        .tips-popup-content h4{padding-left:10px;height:40px;line-height:40px;border-bottom:1px solid #eee;margin-bottom:20px}
+        .check-btn{width:96%;margin-left:2%;text-align:center;height:60px;line-height:60px;margin-top:30px}
+        .check-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px solid #ddd}
+        .mask{width:100%;height:100%;position:fixed;top:0;background:rgba(0,0,0,0.7);display:none}
+        .tips-popup-content{width:40%;height:auto;padding-bottom:30px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}
+        .tips-popup-content div{width:100%;text-align:center}
+        .tips-popup-content{width:30%}
+        .tips-popup-content p{text-align:center;padding:80px;font-size:20px}
+        .tips-popup-content h4{padding-left:10px;height:40px;line-height:40px;border-bottom:1px solid #eee;margin-bottom:20px}
+        .tips-cfm-btn,.tips-cancel-btn,.check-blue-btn,.check-grey-btn{width:100px;height:40px;margin:auto;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;background:#3daae9;color:#fff;border:none}
+        .refuse-btn{margin-left:50px}
+        .return-btn,.tips-cancel-btn,.check-grey-btn{background:#fff;color:#555;margin-left:50px}
+        .tips-cancel-btn,.check-grey-btn{border:1px solid #ddd;margin-left:20px;display:none}
+        #close-btn1{top:8px;right:10px;width:18px;position:absolute;cursor:pointer}
+        .tips-popup-reason .tips-popup-content{height:250px}
+        .tips-popup-reason .tips-popup-content div{position:absolute;bottom:15px}
+        .tips-popup-reason .check-grey-btn{display:inline-block}
+        #refuse-reason{width:80%;height:48%;left:8%;position:absolute;resize:none}
+        .tips-popup-reason h5{color:#555;padding-left:8%;margin-bottom:4px;margin-top:-12px}
+        .check-cfm-btn{background:#3daae9;color:#fff}
+    </style>
+    <style media="print">
+        .styleWidth{width:6%;word-break:break-all}
+        .styleWidth{}
+        .styleWidth3{width:10%;word-break:break-all}
+        .table{margin-left:0;margin-bottom:20px;padding-bottom:2px;border-bottom:1px solid #ddd;box-sizing:border-box}
+        .export{display:none}
+    </style>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/user/cmUserBalanceWithdrawals/">余额提现列表</a></li>
+    <li class="active"><a href="${ctx}/user/cmUserBalanceWithdrawals/withdrawalReview?id=${balanceWithdrawals.id}">提现审核</a></li>
+</ul><br/>
+<div class="payment-form">
+    <h4>提现单</h4>
+    <div class="payment-form-top">
+        <div>
+            <label>机构名称:</label>
+            <span>${balanceWithdrawals.clubName}</span>
+        </div>
+        <div>
+            <label>提现账号:</label>
+            <span>户名:${balanceWithdrawals.bankAccountName}</span>&nbsp;&nbsp;
+            <span>账号:${balanceWithdrawals.bankAccountNo}</span>&nbsp;&nbsp;
+            <span>开户行:${balanceWithdrawals.openBank}</span>&nbsp;&nbsp;
+            <span>账户类型:
+                    <c:if test="${balanceWithdrawals.bankAccountType == '1'}">公帐</c:if>
+                    <c:if test="${balanceWithdrawals.bankAccountType == '2'}">私帐</c:if>
+            </span>
+        </div>
+        <div>
+            <label>提现金额:</label>
+            <span>${balanceWithdrawals.withdrawalsFee}</span>
+        </div>
+        <div>
+            <label>备注:</label>
+            <span>${balanceWithdrawals.remark}</span>
+        </div>
+        <div>
+            <label>申请人:</label>
+            <span>${balanceWithdrawals.applicantName}</span>
+        </div>
+        <div>
+            <label>申请时间:</label>
+            <span><fmt:formatDate value="${balanceWithdrawals.addDate}" pattern="yyyy-MM-dd HH:mm:ss"/> </span>
+        </div>
+        <div>
+            <label>审核状态:</label>
+            <span>
+                <c:if test="${balanceWithdrawals.status == '0'}">
+						<font color="red">
+							<strong>待审核</strong>
+						</font>
+                </c:if>
+            </span>
+        </div>
+        <div>
+            <label>转账银行:</label><span>
+					<select name="payType">
+						<option value="1">建设银行7297</option>
+						<option value="2">中信银行0897</option>
+						<option value="3">中信银行7172</option>
+						<option value="4">广发银行0115</option>
+						<option value="5">广发银行5461</option>
+					</select>
+				</span>
+        </div>
+        <div>
+            <label>转账时间:</label>
+            <span>${balanceWithdrawals.payTime}</span>
+            <input name="id" value="${balanceWithdrawals.id}" id="id" type="hidden">
+        </div>
+    </div>
+    <div class="check-btn">
+        <button class="check-cfm-btn" type="button">审核通过</button>
+        <button class="refuse-btn" type="button">审核不通过</button>
+        <button class="return-btn" type="button" onclick="history.go(-1)">返回</button>
+    </div>
+    <div class="mask tips-popup-reason">
+        <div class="tips-popup-content">
+            <h4>确认提示</h4>
+            <h5><span class="required">* </span>审核不通过原因:</h5>
+            <textarea id="refuse-reason" cols="30" rows="10" maxlength="200"></textarea>
+            <div>
+                <button class="check-cfm-btn check-blue-btn" type="button">确定</button>
+                <button class="check-grey-btn" type="button">取消</button>
+            </div>
+            <img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">
+        </div>
+    </div>
+    <div class="mask tips-popup">
+        <div class="tips-popup-content">
+            <h4>信息提示</h4>
+            <p></p>
+            <div>
+                <button class="tips-cfm-btn tips-cfm-directly" type="button">确定</button>
+                <button class="tips-cancel-btn" type="button">取消</button>
+            </div>
+            <img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">
+        </div>
+    </div>
+</div>
+<script>
+    (function(){
+        var payTableEle = $('.pay-table'),
+            accessFlag = true,
+            unaccessFlag = true,
+            payProductEle = $('.pay-product-item');
+        payTableEle.each(function (i,l) {
+            var productLength = $(this).find('.pay-product-item').length;
+
+        });
+
+        $('.pay-table').each(function(){
+            var thisEle = $(this),
+                totalComissionVal = 0,
+                resVal = '';
+            totalComissionEle = thisEle.find('.payCm'),
+                comissionEle = thisEle.find('.payCm-t'),
+                thirdPartyVal = thisEle.find('.third-party-fee').text().replace(',',''),
+                freightVal = thisEle.find('.freight').text().replace(',','');
+            totalComissionEle.each(function(){
+                totalComissionVal += Number($(this).text().replace(',',''));
+            })
+            resVal = (totalComissionVal - thirdPartyVal - freightVal).toFixed(2);
+            comissionEle.text(resVal);
+        })
+
+        $('.tips-cancel-btn, #close-btn1').on('click',function() {
+            $('.mask').hide();
+        })
+        $('.tips-cfm-directly').on('click',function() {
+            if($('.tips-cfm-btn').hasClass('tips-cfm-directly')) {
+                $('.tips-popup').hide();
+            } else {
+                $('#form').submit();
+            }
+        })
+        $('.refuse-btn').on('click',function() {
+            $('.tips-popup-reason').show();
+        })
+        $('.check-grey-btn').on('click',function() {
+            $('.tips-popup-reason').hide();
+        })
+
+        function showTips(title,text) {
+            $('.tips-popup h4').text(title);
+            $('.tips-popup p').text(text);
+            $('.tips-popup').show();
+        }
+
+
+        function submitForm() {
+            $('.tips-cfm-btn').removeClass('tips-cfm-directly').addClass('submit-now');
+            $('.tips-cancel-btn').hide();
+            showTips('信息提示','审核通过');
+        }
+
+        $('.check-cfm-btn').on('click',function(e) {
+            var payType = $('select[name="payType"]').val(),
+                id = $('#id').val();
+            if($(this).hasClass('check-blue-btn')) {
+                var textareaVal = $('#refuse-reason').val();
+                if(!textareaVal.trim()) {
+                    showTips('信息提示','审核原因不能为空');
+                    return false;
+                }
+                if (unaccessFlag) {
+                    window.location.href = '${ctx}/user/cmUserBalanceWithdrawals/withdrawalReviewData?id=' + id + '&reason=' + textareaVal;
+                    unaccessFlag = false;
+                }
+            } else {
+                if (accessFlag) {
+                    top.$.jBox.confirm("确定审核通过该提现单吗?", '系统提示', function (v, h, f) {
+                        if (v == 'ok') {
+                            window.location.href = '${ctx}/user/cmUserBalanceWithdrawals/withdrawalReviewData?payType=' + payType + '&id=' + id;
+                            accessFlag = false;
+                        }
+                    }, {buttonsFocus: 1, persistent: true});
+                }
+            }
+        })
+    })()
+</script>
+</body>
+</html>

+ 0 - 25
src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyForm.jsp

@@ -11,18 +11,6 @@
             $("#inputForm").validate({
             $("#inputForm").validate({
                 ignore: "",
                 ignore: "",
                 submitHandler: function (form) {
                 submitHandler: function (form) {
-                    // 获取输入的名称
-                    /*var sname = $("#sname").val();
-                    var name = $("#name").val();
-                    var userName = $("#userName").val();
-                    if( sname == userName){
-                        alertx("机构简称不能与联系人名称重复");
-                        return;
-                    }
-                    if( name == userName){
-                        alertx("机构名称不能与联系人名称重复");
-                        return;
-                    }*/
                     var bindMobile = $("#bindMobile").val();
                     var bindMobile = $("#bindMobile").val();
                     var userID = $("#userID").val();
                     var userID = $("#userID").val();
                     $.post("${ctx}/new/user/agency/checkMobile?bindMobile="+bindMobile+"&userID="+userID, function (data) {
                     $.post("${ctx}/new/user/agency/checkMobile?bindMobile="+bindMobile+"&userID="+userID, function (data) {
@@ -170,19 +158,6 @@
         })
         })
 
 
         function toAudit(id) {
         function toAudit(id) {
-        // 获取输入的名称
-       /* var sname = $("#sname").val();
-        var name = $("#name").val();
-        var userName = $("#userName").val();
-        if( sname == userName){
-            alertx("机构简称不能与联系人名称重复");
-            return;
-        }
-        if( name == userName){
-            alertx("机构名称不能与联系人名称重复");
-            return;
-        }*/
-        // 弹窗审核
         audit(id);
         audit(id);
 
 
         }
         }

+ 11 - 2
src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyList.jsp

@@ -252,6 +252,7 @@
 <body>
 <body>
 <ul class="nav nav-tabs">
 <ul class="nav nav-tabs">
     <li class="active"><a href="${ctx}/new/user/agency/">机构列表</a></li>
     <li class="active"><a href="${ctx}/new/user/agency/">机构列表</a></li>
+    <li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
 </ul>
 </ul>
 <form:form id="searchForm" modelAttribute="newCmClub" action="${ctx}/new/user/agency/" method="post"
 <form:form id="searchForm" modelAttribute="newCmClub" action="${ctx}/new/user/agency/" method="post"
            class="breadcrumb form-search">
            class="breadcrumb form-search">
@@ -382,6 +383,12 @@
                         <a href="JavaScript:;" onclick="return alertx('不通过原因:${newCmClubList.auditNote}')"
                         <a href="JavaScript:;" onclick="return alertx('不通过原因:${newCmClubList.auditNote}')"
                            style="text-decoration:underline;"><font color="red">审核未通过</font></a>
                            style="text-decoration:underline;"><font color="red">审核未通过</font></a>
                     </c:when>
                     </c:when>
+                    <c:when test="${newCmClubList.status eq 93}">
+                        <font color="#BF826C">已确认</font>
+                    </c:when>
+                    <c:when test="${newCmClubList.status eq 94}">
+                        <font color="red">已冻结</font>
+                    </c:when>
                     <c:otherwise>
                     <c:otherwise>
                         ${fns:getDictLabel(newCmClubList.status, 'club_status', newCmClubList.status)}
                         ${fns:getDictLabel(newCmClubList.status, 'club_status', newCmClubList.status)}
                     </c:otherwise>
                     </c:otherwise>
@@ -432,8 +439,10 @@
                     <c:if test="${newCmClubList.status eq 1 || newCmClubList.status eq 92}">
                     <c:if test="${newCmClubList.status eq 1 || newCmClubList.status eq 92}">
                         <a href="javascript:void(0);" onclick="toAudit(${newCmClubList.clubID},'${newCmClubList.userName}','${newCmClubList.bindMobile}')">审核</a>
                         <a href="javascript:void(0);" onclick="toAudit(${newCmClubList.clubID},'${newCmClubList.userName}','${newCmClubList.bindMobile}')">审核</a>
                     </c:if>
                     </c:if>
-                    <a href="javascript:void(0);"
-                       onclick="showClubAlert(${newCmClubList.clubID},${newCmClubList.userIdentity})">设置机构类别</a>
+                    <a href="javascript:void(0);" onclick="showClubAlert(${newCmClubList.clubID},${newCmClubList.userIdentity})">设置机构类别</a>
+                    <c:if test="${newCmClubList.status eq 92 || newCmClubList.status eq 93}">
+                        <a href="${ctx}/user/clubTemporary/confirmRecord?confirmUserId=${newCmClubList.userID}">确认记录</a>
+                    </c:if>
                 </td>
                 </td>
             </shiro:hasPermission>
             </shiro:hasPermission>
         </tr>
         </tr>