plf 3 роки тому
батько
коміт
ebe4c70dff
19 змінених файлів з 1803 додано та 495 видалено
  1. 16 5
      src/main/java/com/caimei/modules/order/dao/CmPayShopRecordDao.java
  2. 52 0
      src/main/java/com/caimei/modules/order/entity/ChangePayShopOther.java
  3. 380 358
      src/main/java/com/caimei/modules/order/entity/CmPayShop.java
  4. 118 110
      src/main/java/com/caimei/modules/order/entity/CmPayShopRecord.java
  5. 45 0
      src/main/java/com/caimei/modules/order/service/CmPayShopService.java
  6. 1 1
      src/main/java/com/caimei/modules/order/service/NewShopOrderService.java
  7. 32 1
      src/main/java/com/caimei/modules/order/web/CmPayShopController.java
  8. 4 0
      src/main/java/com/caimei/modules/order/web/CmShopOrderController.java
  9. 7 2
      src/main/resources/mappings/modules/order/CmPayShopMapper.xml
  10. 18 2
      src/main/resources/mappings/modules/order/CmPayShopRecordMapper.xml
  11. 3 6
      src/main/resources/mappings/modules/order/ShopOrderMapper.xml
  12. 14 1
      src/main/webapp/WEB-INF/views/modules/order/cmPayFormList.jsp
  13. 2 2
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopChange.jsp
  14. 18 6
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopList.jsp
  15. 118 0
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopOtherDetail.jsp
  16. 384 0
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopOtherForm.jsp
  17. 577 0
      src/main/webapp/WEB-INF/views/modules/order/paidShopOrderList.jsp
  18. 6 0
      src/main/webapp/WEB-INF/views/modules/order/payedAndRefundRecordList.jsp
  19. 8 1
      src/main/webapp/WEB-INF/views/modules/order/shopOtherFeeForm.jsp

+ 16 - 5
src/main/java/com/caimei/modules/order/dao/CmPayShopRecordDao.java

@@ -8,10 +8,12 @@ import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.caimei.modules.order.entity.CmPayShopRecord;
 import org.apache.ibatis.annotations.Param;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 /**
  * 付款记录表DAO接口
+ *
  * @author lwt
  * @version 2019-07-01
  */
@@ -22,25 +24,26 @@ public interface CmPayShopRecordDao extends CrudDao<CmPayShopRecord> {
 
     void checkNotPass(@Param("payShopID") String payShopID);
 
-    void updateByID(@Param("payShopID") String payShopID,@Param("shopOrderID") String shopOrderID,@Param("payAmount") Double payAmount,@Param("wipePayment") Double wipePayment);
+    void updateByID(@Param("payShopID") String payShopID, @Param("shopOrderID") String shopOrderID, @Param("payAmount") Double payAmount, @Param("wipePayment") Double wipePayment);
 
     void updateWipePayment(@Param("id") Integer id, @Param("wipePayment") Double wipePayment, @Param("wipeTime") String wipeTime);
 
     void deleteByFlag(@Param("ids") List<String> ids);
 
-    void updateStatusByPayShopID(@Param("status") String status,@Param("payShopID") String payShopID);
+    void updateStatusByPayShopID(@Param("status") String status, @Param("payShopID") String payShopID);
 
-    List<CmPayShopRecord> findByOrderIDsGroupBy(@Param("orderIDs")String[] orderIDs);
+    List<CmPayShopRecord> findByOrderIDsGroupBy(@Param("orderIDs") String[] orderIDs);
 
-    List<CmPayShopRecord> getPayedRecords(@Param("shopOrderID")String shopOrderID);
+    List<CmPayShopRecord> getPayedRecords(@Param("shopOrderID") String shopOrderID);
 
-    List<CmPayShopRecord> getPayedRecordsGroupBy(@Param("shopOrderID")String shopOrderID);
+    List<CmPayShopRecord> getPayedRecordsGroupBy(@Param("shopOrderID") String shopOrderID);
 
     Double sumByShopOrderID(@Param("shopOrderID") Integer shopOrderID);
 
     void applyCompileSave(CmPayShop cmPayShop);
 
     Double sumWipePayment(@Param("shopOrderID") Integer shopOrderID);
+
     Double sumWipePaymentNoStatus(@Param("shopOrderID") Integer shopOrderID);
 
     void cancelRecordWipePayment(Integer shopOrderID);
@@ -56,4 +59,12 @@ public interface CmPayShopRecordDao extends CrudDao<CmPayShopRecord> {
     void insertDifference(ChangePayShopDifference payShopDifference);
 
     List<ChangePayShopDifference> findShopDifference(Integer shopOrderId);
+
+    /**
+     * 查询第三方已付款金额
+     *
+     * @param shopOrderId
+     * @return
+     */
+    BigDecimal findPayShopOtherFee(Integer shopOrderId);
 }

+ 52 - 0
src/main/java/com/caimei/modules/order/entity/ChangePayShopOther.java

@@ -69,6 +69,26 @@ public class ChangePayShopOther implements Serializable {
      */
     private String systemName;
 
+    /**
+     * 付款单名称
+     */
+    private String name;
+
+    /**
+     * 子订单编号
+     */
+    private String shopOrderNo;
+
+    /**
+     * 主订单ID
+     */
+    private Integer orderId;
+
+    /**
+     * 订单编号
+     */
+    private String orderNo;
+
     public Integer getId() {
         return id;
     }
@@ -172,4 +192,36 @@ public class ChangePayShopOther implements Serializable {
     public void setSystemName(String systemName) {
         this.systemName = systemName;
     }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getShopOrderNo() {
+        return shopOrderNo;
+    }
+
+    public void setShopOrderNo(String shopOrderNo) {
+        this.shopOrderNo = shopOrderNo;
+    }
+
+    public Integer getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(Integer orderId) {
+        this.orderId = orderId;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
 }

+ 380 - 358
src/main/java/com/caimei/modules/order/entity/CmPayShop.java

@@ -1,373 +1,395 @@
 package com.caimei.modules.order.entity;
 
-import org.hibernate.validator.constraints.Length;
-
 import com.thinkgem.jeesite.common.persistence.DataEntity;
+import org.hibernate.validator.constraints.Length;
 
 import java.beans.Transient;
 import java.util.List;
 
 /**
  * 付款单表Entity
+ *
  * @author lwt
  * @version 2019-07-01
  */
 public class CmPayShop extends DataEntity<CmPayShop> {
 
-	private static final long serialVersionUID = 1L;
-	private String organizeID;//组织ID
-	private String shopID;		// 供应商Id
-	private String name;		// 付款单名称
-	private String shopName;		// 供应商名称
-	private String bankAccountName;		// 付款账号的户名
-	private String bankAccount;		// 付款账号
-	private String bankName;		// 付款账号的开户行
-	private String type;		//  付款账号的类型 0公账, 1私账
-	private Double totalAmount;		// 付供应商总金额
-	private Double balancePayFee;		// 余额支付
-	private Double transferPayFee;		// 转账支付
-	private String payType;		// 付款银行
-	private Double wipePayment;		// '付款抹平金额'
-	private String wipeRemarks;		// '付款抹平备注'
-	private String wipeRemarkImages;
-	private String wipeTime;		// 抹平申请时间
-	private List<String> wipeImages;
-	private String applicant;		// 申请人
-	private String applicantName;		// 申请人名称
-	private String applyTime;		// 申请时间
-	private String reviewer;		// 审核人
-	private String reviewerName;		// 审核人名称
-	private String reviewTime;		// 审核时间
-	private String payTime; 		//付款时间
-	private String status;		// 审核状态  0待审核,  1审核通过 2 审核不通过
-	private String reason;		// 审核不通过原因
-
-	private String startTime;
-	private String endTime;
-	private Double ableRebateAmount;//供应商可用余额
-	private Double rebateAmount;//供应商余额
-	private List<NewShopOrder> shopOrders;  //付款单关联的子订单
-	private String reApply;  // 审核不通过  重新修改发起申请
-
-	private String shopOrderNo;// 子订单编号
-
-	private String shopOrderID;  // 子订单ID
-	private String orderID;  //主订单ID
-	private String orderNo;  //订单编号
-	private String rePayment; //1可以重申,2不可以重申
-
-	public Double getWipePayment() {
-		return wipePayment;
-	}
-	public void setWipePayment(Double wipePayment) {
-		this.wipePayment = wipePayment;
-	}
-	public String getWipeRemarks() {
-		return wipeRemarks;
-	}
-	public void setWipeRemarks(String wipeRemarks) {
-		this.wipeRemarks = wipeRemarks;
-	}
-	public String getWipeRemarkImages() {
-		return wipeRemarkImages;
-	}
-	public void setWipeRemarkImages(String wipeRemarkImages) {
-		this.wipeRemarkImages = wipeRemarkImages;
-	}
-	@Length(min=0, max=19, message="抹平时间长度必须介于 0 和 19 之间")
-	public String getWipeTime() {
-		return wipeTime;
-	}
-
-	public void setWipeTime(String wipeTime) {
-		this.wipeTime = wipeTime;
-	}
-
-	public List<String> getWipeImages() {
-		return wipeImages;
-	}
-
-	public void setWipeImages(List<String> wipeImages) {
-		this.wipeImages = wipeImages;
-	}
-
-	public CmPayShop() {
-		super();
-	}
-
-	public CmPayShop(String id){
-		super(id);
-	}
-
-	@Length(min=0, max=11, message="供应商Id长度必须介于 0 和 11 之间")
-	public String getShopID() {
-		return shopID;
-	}
-
-	public void setShopID(String shopID) {
-		this.shopID = shopID;
-	}
-
-	@Length(min=0, max=250, message="付款单名称长度必须介于 0 和 250 之间")
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	@Length(min=0, max=20, message="供应商名称长度必须介于 0 和 20 之间")
-	public String getShopName() {
-		return shopName;
-	}
-
-	public void setShopName(String shopName) {
-		this.shopName = shopName;
-	}
-
-	@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 getBankAccount() {
-		return bankAccount;
-	}
-
-	public void setBankAccount(String bankAccount) {
-		this.bankAccount = bankAccount;
-	}
-
-	@Length(min=0, max=19, message="付款账号的开户行长度必须介于 0 和 19 之间")
-	public String getBankName() {
-		return bankName;
-	}
-
-	public void setBankName(String bankName) {
-		this.bankName = bankName;
-	}
-
-	@Length(min=0, max=1, message=" 付款账号的类型 0公账, 1私账长度必须介于 0 和 1 之间")
-	public String getType() {
-		return type;
-	}
-
-	public void setType(String type) {
-		this.type = type;
-	}
-
-	public Double getTotalAmount() {
-		return totalAmount;
-	}
-
-	public void setTotalAmount(Double totalAmount) {
-		this.totalAmount = totalAmount;
-	}
-
-	public Double getBalancePayFee() {
-		return balancePayFee;
-	}
-
-	public void setBalancePayFee(Double balancePayFee) {
-		this.balancePayFee = balancePayFee;
-	}
-
-	public Double getTransferPayFee() {
-		return transferPayFee;
-	}
-
-	public void setTransferPayFee(Double TransferPayFee) {
-		this.transferPayFee = TransferPayFee;
-	}
-
-	@Length(min=0, max=20, message="付款银行长度必须介于 0 和 20 之间")
-	public String getPayType() {
-		return payType;
-	}
-
-	public void setPayType(String bankNo) {
-		this.payType = bankNo;
-	}
-
-	@Length(min=0, max=11, message="申请人长度必须介于 0 和 11 之间")
-	public String getApplicant() {
-		return applicant;
-	}
-
-	public void setApplicant(String applicant) {
-		this.applicant = applicant;
-	}
-
-	@Length(min=0, max=19, message="申请时间长度必须介于 0 和 19 之间")
-	public String getApplyTime() {
-		return applyTime;
-	}
-
-	public void setApplyTime(String applyTime) {
-		this.applyTime = applyTime;
-	}
-
-	@Length(min=0, max=11, message="审核人长度必须介于 0 和 11 之间")
-	public String getReviewer() {
-		return reviewer;
-	}
-
-	public void setReviewer(String reviewer) {
-		this.reviewer = reviewer;
-	}
-
-	@Length(min=0, max=19, message="审核时间长度必须介于 0 和 19 之间")
-	public String getReviewTime() {
-		return reviewTime;
-	}
-
-	public void setReviewTime(String reviewTime) {
-		this.reviewTime = reviewTime;
-	}
-
-	@Length(min=0, max=1, message="审核状态  0待审核,  1审核通过长度必须介于 0 和 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;
-	}
-
-	@Transient
-	public List<NewShopOrder> getShopOrders() {
-		return shopOrders;
-	}
-
-	public void setShopOrders(List<NewShopOrder> shopOrders) {
-		this.shopOrders = shopOrders;
-	}
-	@Transient
-	public String getApplicantName() {
-		return applicantName;
-	}
-
-	public void setApplicantName(String applicantName) {
-		this.applicantName = applicantName;
-	}
-	@Transient
-	public String getReviewerName() {
-		return reviewerName;
-	}
-
-	public void setReviewerName(String reviewerName) {
-		this.reviewerName = reviewerName;
-	}
-	@Transient
-	public String getStartTime() {
-		return startTime;
-	}
-
-	public void setStartTime(String startTime) {
-		this.startTime = startTime;
-	}
-	@Transient
-	public String getEndTime() {
-		return endTime;
-	}
-
-	public void setEndTime(String endTime) {
-		this.endTime = endTime;
-	}
-	@Transient
-	public Double getAbleRebateAmount() {
-		return ableRebateAmount;
-	}
-
-	public void setAbleRebateAmount(Double ableRebateAmount) {
-		this.ableRebateAmount = ableRebateAmount;
-	}
-	@Transient
-	public Double getRebateAmount() {
-		return rebateAmount;
-	}
-
-	public void setRebateAmount(Double rebateAmount) {
-		this.rebateAmount = rebateAmount;
-	}
-	@Transient
-	public String getReApply() {
-		return reApply;
-	}
-
-	public void setReApply(String reApply) {
-		this.reApply = reApply;
-	}
-
-	@Transient
-	public String getShopOrderNo() {
-		return shopOrderNo;
-	}
-
-	public void setShopOrderNo(String shopOrderNo) {
-		this.shopOrderNo = shopOrderNo;
-	}
-
-	public String getShopOrderID() {
-		return shopOrderID;
-	}
-
-	public void setShopOrderID(String shopOrderID) {
-		this.shopOrderID = shopOrderID;
-	}
-
-	public String getOrderID() {
-		return orderID;
-	}
-
-	public void setOrderID(String orderID) {
-		this.orderID = orderID;
-	}
-
-	public String getOrderNo() {
-		return orderNo;
-	}
-
-	public void setOrderNo(String orderNo) {
-		this.orderNo = orderNo;
-	}
-
-	public String getRePayment() {
-		return rePayment;
-	}
-
-	public void setRePayment(String rePayment) {
-		this.rePayment = rePayment;
-	}
-
-	public String getPayTime() {
-		return payTime;
-	}
-
-	public void setPayTime(String payTime) {
-		this.payTime = payTime;
-	}
-
-	public String getOrganizeID() {
-		return organizeID;
-	}
-
-	public void setOrganizeID(String organizeID) {
-		this.organizeID = organizeID;
-	}
+    private static final long serialVersionUID = 1L;
+    private String organizeID;//组织ID
+    private String shopID;        // 供应商Id
+    private String name;        // 付款单名称
+    private String shopName;        // 供应商名称
+    private String bankAccountName;        // 付款账号的户名
+    private String bankAccount;        // 付款账号
+    private String bankName;        // 付款账号的开户行
+    private String type;        //  付款账号的类型 0公账, 1私账
+    private Double totalAmount;        // 付供应商总金额
+    private Double balancePayFee;        // 余额支付
+    private Double transferPayFee;        // 转账支付
+    private String payType;        // 付款银行
+    private Double wipePayment;        // '付款抹平金额'
+    private String wipeRemarks;        // '付款抹平备注'
+    private String wipeRemarkImages;
+    private String wipeTime;        // 抹平申请时间
+    private List<String> wipeImages;
+    private String applicant;        // 申请人
+    private String applicantName;        // 申请人名称
+    private String applyTime;        // 申请时间
+    private String reviewer;        // 审核人
+    private String reviewerName;        // 审核人名称
+    private String reviewTime;        // 审核时间
+    private String payTime;        //付款时间
+    private String status;        // 审核状态  0待审核,  1审核通过 2 审核不通过
+    private String reason;        // 审核不通过原因
+    private Integer paymentType; //付款类型: 1子订单付款 2供应商差价 3付第三方
+
+    private String startTime;
+    private String endTime;
+    private Double ableRebateAmount;//供应商可用余额
+    private Double rebateAmount;//供应商余额
+    private List<NewShopOrder> shopOrders;  //付款单关联的子订单
+    private String reApply;  // 审核不通过  重新修改发起申请
+
+    private String shopOrderNo;// 子订单编号
+
+    private String shopOrderID;  // 子订单ID
+    private String orderID;  //主订单ID
+    private String orderNo;  //订单编号
+    private String rePayment; //1可以重申,2不可以重申
+
+    public Double getWipePayment() {
+        return wipePayment;
+    }
+
+    public void setWipePayment(Double wipePayment) {
+        this.wipePayment = wipePayment;
+    }
+
+    public String getWipeRemarks() {
+        return wipeRemarks;
+    }
+
+    public void setWipeRemarks(String wipeRemarks) {
+        this.wipeRemarks = wipeRemarks;
+    }
+
+    public String getWipeRemarkImages() {
+        return wipeRemarkImages;
+    }
+
+    public void setWipeRemarkImages(String wipeRemarkImages) {
+        this.wipeRemarkImages = wipeRemarkImages;
+    }
+
+    @Length(min = 0, max = 19, message = "抹平时间长度必须介于 0 和 19 之间")
+    public String getWipeTime() {
+        return wipeTime;
+    }
+
+    public void setWipeTime(String wipeTime) {
+        this.wipeTime = wipeTime;
+    }
+
+    public List<String> getWipeImages() {
+        return wipeImages;
+    }
+
+    public void setWipeImages(List<String> wipeImages) {
+        this.wipeImages = wipeImages;
+    }
+
+    public CmPayShop() {
+        super();
+    }
+
+    public CmPayShop(String id) {
+        super(id);
+    }
+
+    @Length(min = 0, max = 11, message = "供应商Id长度必须介于 0 和 11 之间")
+    public String getShopID() {
+        return shopID;
+    }
+
+    public void setShopID(String shopID) {
+        this.shopID = shopID;
+    }
+
+    @Length(min = 0, max = 250, message = "付款单名称长度必须介于 0 和 250 之间")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Length(min = 0, max = 20, message = "供应商名称长度必须介于 0 和 20 之间")
+    public String getShopName() {
+        return shopName;
+    }
+
+    public void setShopName(String shopName) {
+        this.shopName = shopName;
+    }
+
+    @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 getBankAccount() {
+        return bankAccount;
+    }
+
+    public void setBankAccount(String bankAccount) {
+        this.bankAccount = bankAccount;
+    }
+
+    @Length(min = 0, max = 19, message = "付款账号的开户行长度必须介于 0 和 19 之间")
+    public String getBankName() {
+        return bankName;
+    }
+
+    public void setBankName(String bankName) {
+        this.bankName = bankName;
+    }
+
+    @Length(min = 0, max = 1, message = " 付款账号的类型 0公账, 1私账长度必须介于 0 和 1 之间")
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Double getTotalAmount() {
+        return totalAmount;
+    }
+
+    public void setTotalAmount(Double totalAmount) {
+        this.totalAmount = totalAmount;
+    }
+
+    public Double getBalancePayFee() {
+        return balancePayFee;
+    }
+
+    public void setBalancePayFee(Double balancePayFee) {
+        this.balancePayFee = balancePayFee;
+    }
+
+    public Double getTransferPayFee() {
+        return transferPayFee;
+    }
+
+    public void setTransferPayFee(Double TransferPayFee) {
+        this.transferPayFee = TransferPayFee;
+    }
+
+    @Length(min = 0, max = 20, message = "付款银行长度必须介于 0 和 20 之间")
+    public String getPayType() {
+        return payType;
+    }
+
+    public void setPayType(String bankNo) {
+        this.payType = bankNo;
+    }
+
+    @Length(min = 0, max = 11, message = "申请人长度必须介于 0 和 11 之间")
+    public String getApplicant() {
+        return applicant;
+    }
+
+    public void setApplicant(String applicant) {
+        this.applicant = applicant;
+    }
+
+    @Length(min = 0, max = 19, message = "申请时间长度必须介于 0 和 19 之间")
+    public String getApplyTime() {
+        return applyTime;
+    }
+
+    public void setApplyTime(String applyTime) {
+        this.applyTime = applyTime;
+    }
+
+    @Length(min = 0, max = 11, message = "审核人长度必须介于 0 和 11 之间")
+    public String getReviewer() {
+        return reviewer;
+    }
+
+    public void setReviewer(String reviewer) {
+        this.reviewer = reviewer;
+    }
+
+    @Length(min = 0, max = 19, message = "审核时间长度必须介于 0 和 19 之间")
+    public String getReviewTime() {
+        return reviewTime;
+    }
+
+    public void setReviewTime(String reviewTime) {
+        this.reviewTime = reviewTime;
+    }
+
+    @Length(min = 0, max = 1, message = "审核状态  0待审核,  1审核通过长度必须介于 0 和 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;
+    }
+
+    @Transient
+    public List<NewShopOrder> getShopOrders() {
+        return shopOrders;
+    }
+
+    public void setShopOrders(List<NewShopOrder> shopOrders) {
+        this.shopOrders = shopOrders;
+    }
+
+    @Transient
+    public String getApplicantName() {
+        return applicantName;
+    }
+
+    public void setApplicantName(String applicantName) {
+        this.applicantName = applicantName;
+    }
+
+    @Transient
+    public String getReviewerName() {
+        return reviewerName;
+    }
+
+    public void setReviewerName(String reviewerName) {
+        this.reviewerName = reviewerName;
+    }
+
+    @Transient
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    @Transient
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    @Transient
+    public Double getAbleRebateAmount() {
+        return ableRebateAmount;
+    }
+
+    public void setAbleRebateAmount(Double ableRebateAmount) {
+        this.ableRebateAmount = ableRebateAmount;
+    }
+
+    @Transient
+    public Double getRebateAmount() {
+        return rebateAmount;
+    }
+
+    public void setRebateAmount(Double rebateAmount) {
+        this.rebateAmount = rebateAmount;
+    }
+
+    @Transient
+    public String getReApply() {
+        return reApply;
+    }
+
+    public void setReApply(String reApply) {
+        this.reApply = reApply;
+    }
+
+    @Transient
+    public String getShopOrderNo() {
+        return shopOrderNo;
+    }
+
+    public void setShopOrderNo(String shopOrderNo) {
+        this.shopOrderNo = shopOrderNo;
+    }
+
+    public String getShopOrderID() {
+        return shopOrderID;
+    }
+
+    public void setShopOrderID(String shopOrderID) {
+        this.shopOrderID = shopOrderID;
+    }
+
+    public String getOrderID() {
+        return orderID;
+    }
+
+    public void setOrderID(String orderID) {
+        this.orderID = orderID;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public String getRePayment() {
+        return rePayment;
+    }
+
+    public void setRePayment(String rePayment) {
+        this.rePayment = rePayment;
+    }
+
+    public String getPayTime() {
+        return payTime;
+    }
+
+    public void setPayTime(String payTime) {
+        this.payTime = payTime;
+    }
+
+    public String getOrganizeID() {
+        return organizeID;
+    }
+
+    public void setOrganizeID(String organizeID) {
+        this.organizeID = organizeID;
+    }
+
+    public Integer getPaymentType() {
+        return paymentType;
+    }
+
+    public void setPaymentType(Integer paymentType) {
+        this.paymentType = paymentType;
+    }
 }

+ 118 - 110
src/main/java/com/caimei/modules/order/entity/CmPayShopRecord.java

@@ -1,122 +1,130 @@
 package com.caimei.modules.order.entity;
 
-import org.hibernate.validator.constraints.Length;
-
 import com.thinkgem.jeesite.common.persistence.DataEntity;
+import org.hibernate.validator.constraints.Length;
 
 /**
  * 付款记录表Entity
+ *
  * @author lwt
  * @version 2019-07-01
  */
 public class CmPayShopRecord extends DataEntity<CmPayShopRecord> {
 
-	private static final long serialVersionUID = 1L;
-	private String shopID;		// 供应商Id
-	private String shopOrderID;		// 子订单ID
-	private String shopOrderNo;		// 授权人手机号
-	private Double payAmount;		// 付款金额
-	private Double wipePayment;		// '付款抹平金额'
-	private String payType;		// 付款方式
-	private String payTime;		// 付款时间
-	private String wipeTime;		// 抹平申请时间
-	private String payShopID;		// 付款单表id
-	private String status;		// 0待审核, 1已审核
-
-	public CmPayShopRecord() {
-		super();
-	}
-
-	public CmPayShopRecord(String id){
-		super(id);
-	}
-
-	@Length(min=0, max=11, message="供应商Id长度必须介于 0 和 11 之间")
-	public String getShopID() {
-		return shopID;
-	}
-
-	public void setShopID(String shopID) {
-		this.shopID = shopID;
-	}
-
-	@Length(min=0, max=11, message="子订单ID长度必须介于 0 和 11 之间")
-	public String getShopOrderID() {
-		return shopOrderID;
-	}
-
-	public void setShopOrderID(String shopOrderID) {
-		this.shopOrderID = shopOrderID;
-	}
-
-	@Length(min=0, max=30, message="授权人手机号长度必须介于 0 和 30 之间")
-	public String getShopOrderNo() {
-		return shopOrderNo;
-	}
-
-	public void setShopOrderNo(String shopOrderNo) {
-		this.shopOrderNo = shopOrderNo;
-	}
-
-	public Double getPayAmount() {
-		return payAmount;
-	}
-
-	public void setPayAmount(Double payAmount) {
-		this.payAmount = payAmount;
-	}
-
-	public Double getWipePayment() {
-		return wipePayment;
-	}
-
-	public void setWipePayment(Double wipePayment) {
-		this.wipePayment = wipePayment;
-	}
-
-	@Length(min=0, max=1, message="付款方式长度必须介于 0 和 1 之间")
-	public String getPayType() {
-		return payType;
-	}
-
-	public void setPayType(String payType) {
-		this.payType = payType;
-	}
-
-	@Length(min=0, max=19, message="付款时间长度必须介于 0 和 19 之间")
-	public String getPayTime() {
-		return payTime;
-	}
-
-	public void setPayTime(String payTime) {
-		this.payTime = payTime;
-	}
-
-	@Length(min=0, max=19, message="抹平时间长度必须介于 0 和 19 之间")
-	public String getWipeTime() {
-		return wipeTime;
-	}
-
-	public void setWipeTime(String wipeTime) {
-		this.wipeTime = wipeTime;
-	}
-
-	@Length(min=0, max=11, message="付款单表id长度必须介于 0 和 11 之间")
-	public String getPayShopID() {
-		return payShopID;
-	}
-
-	public void setPayShopID(String payShopID) {
-		this.payShopID = payShopID;
-	}
-
-	@Length(min=0, max=1, message="0待审核, 1已审核长度必须介于 0 和 1 之间")
-	public String getStatus() {
-		return status;
-	}
-
-	public void setStatus(String status) {
-		this.status = status;
-	}
-
+    private static final long serialVersionUID = 1L;
+    private String shopID;        // 供应商Id
+    private String shopOrderID;        // 子订单ID
+    private String shopOrderNo;        // 授权人手机号
+    private Double payAmount;        // 付款金额
+    private Double wipePayment;        // '付款抹平金额'
+    private Integer paymentType;    //付款类型: 1子订单付款 2供应商差价 3付第三方
+    private String payType;        // 付款方式
+    private String payTime;        // 付款时间
+    private String wipeTime;        // 抹平申请时间
+    private String payShopID;        // 付款单表id
+    private String status;        // 0待审核, 1已审核
+
+    public CmPayShopRecord() {
+        super();
+    }
+
+    public CmPayShopRecord(String id) {
+        super(id);
+    }
+
+    @Length(min = 0, max = 11, message = "供应商Id长度必须介于 0 和 11 之间")
+    public String getShopID() {
+        return shopID;
+    }
+
+    public void setShopID(String shopID) {
+        this.shopID = shopID;
+    }
+
+    @Length(min = 0, max = 11, message = "子订单ID长度必须介于 0 和 11 之间")
+    public String getShopOrderID() {
+        return shopOrderID;
+    }
+
+    public void setShopOrderID(String shopOrderID) {
+        this.shopOrderID = shopOrderID;
+    }
+
+    @Length(min = 0, max = 30, message = "授权人手机号长度必须介于 0 和 30 之间")
+    public String getShopOrderNo() {
+        return shopOrderNo;
+    }
+
+    public void setShopOrderNo(String shopOrderNo) {
+        this.shopOrderNo = shopOrderNo;
+    }
+
+    public Double getPayAmount() {
+        return payAmount;
+    }
+
+    public void setPayAmount(Double payAmount) {
+        this.payAmount = payAmount;
+    }
+
+    public Double getWipePayment() {
+        return wipePayment;
+    }
+
+    public void setWipePayment(Double wipePayment) {
+        this.wipePayment = wipePayment;
+    }
+
+    @Length(min = 0, max = 1, message = "付款方式长度必须介于 0 和 1 之间")
+    public String getPayType() {
+        return payType;
+    }
+
+    public void setPayType(String payType) {
+        this.payType = payType;
+    }
+
+    @Length(min = 0, max = 19, message = "付款时间长度必须介于 0 和 19 之间")
+    public String getPayTime() {
+        return payTime;
+    }
+
+    public void setPayTime(String payTime) {
+        this.payTime = payTime;
+    }
+
+    @Length(min = 0, max = 19, message = "抹平时间长度必须介于 0 和 19 之间")
+    public String getWipeTime() {
+        return wipeTime;
+    }
+
+    public void setWipeTime(String wipeTime) {
+        this.wipeTime = wipeTime;
+    }
+
+    @Length(min = 0, max = 11, message = "付款单表id长度必须介于 0 和 11 之间")
+    public String getPayShopID() {
+        return payShopID;
+    }
+
+    public void setPayShopID(String payShopID) {
+        this.payShopID = payShopID;
+    }
+
+    @Length(min = 0, max = 1, message = "0待审核, 1已审核长度必须介于 0 和 1 之间")
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public Integer getPaymentType() {
+        return paymentType;
+    }
+
+    public void setPaymentType(Integer paymentType) {
+        this.paymentType = paymentType;
+    }
 }

+ 45 - 0
src/main/java/com/caimei/modules/order/service/CmPayShopService.java

@@ -355,6 +355,7 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                 record.setPayShopID(cmPayShop.getId());
                 record.setStatus("0");
                 record.setDelFlag("0");
+                record.setPaymentType(1);
                 cmPayShopRecordDao.insert(record);
             }
             if (orderID != null) {
@@ -721,11 +722,19 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
         if (shopOtherList != null && shopOtherList.size() > 0) {
             payShopOther = shopOtherList.get(0);
         }
+        NewShopOrder shopOrder = newShopOrderDao.findByShopOrderID(shopOrderId);
+        if (shopOrder != null) {
+            payShopOther.setOrderId(shopOrder.getOrderID());
+            payShopOther.setOrderNo(shopOrder.getOrderNo());
+            payShopOther.setShopOrderNo(shopOrder.getShopOrderNo());
+        }
         return payShopOther;
     }
 
     @Transactional(readOnly = false)
     public void saveShopOtherFee(ChangePayShopOther payShopOther) {
+        //已付第三方金额
+        BigDecimal shopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(payShopOther.getShopOrderId());
         String[] remarkImages = payShopOther.getRemarkImages();
         if (remarkImages != null && remarkImages.length > 0) {
             StringBuilder remarkImage = new StringBuilder();
@@ -740,6 +749,42 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
         payShopOther.setModifyUserId(Integer.parseInt(UserUtils.getUser().getId()));
         cmPayShopRecordDao.insertShopOtherFee(payShopOther);
         newShopOrderDao.updateByShopOtherFee(payShopOther.getShopOtherFee(), payShopOther.getShopOrderId());
+
+        //保存付第三方付款记录
+        User currentUser = UserUtils.getUser();
+        String time = DateUtils.getDateTime();
+        NewShopOrder shopOrder = newShopOrderDao.findByShopOrderID(payShopOther.getShopOrderId());
+        double payAmount = MathUtil.sub(payShopOther.getShopOtherFee(), shopOtherFee).doubleValue();
+        CmPayShop payShop = new CmPayShop();
+        payShop.setShopID(shopOrder.getShopID().toString());
+        payShop.setName(payShopOther.getName());
+        payShop.setBankAccountName(payShopOther.getBankAccountName());
+        payShop.setBankAccount(payShopOther.getBankAccount());
+        payShop.setBankName(payShopOther.getBankName());
+        payShop.setType(payShopOther.getType().toString());
+        payShop.setTotalAmount(payAmount);
+        payShop.setBalancePayFee(0d);
+        payShop.setTransferPayFee(payAmount);
+        payShop.setWipePayment(0d);
+        payShop.setApplicant(currentUser.getId());
+        payShop.setApplyTime(time);
+        payShop.setPayTime(time);
+        payShop.setStatus("0");
+        payShop.setDelFlag("0");
+        cmPayShopDao.insert(payShop);
+
+        CmPayShopRecord payShopRecord = new CmPayShopRecord();
+        payShopRecord.setShopID(shopOrder.getShopID().toString());
+        payShopRecord.setShopOrderID(payShopOther.getShopOrderId().toString());
+        payShopRecord.setShopOrderNo(shopOrder.getOrderNo());
+        payShopRecord.setPayAmount(payAmount);
+        payShopRecord.setWipePayment(0d);
+        payShopRecord.setPaymentType(3);
+        payShopRecord.setPayTime(time);
+        payShopRecord.setPayShopID(payShop.getId());
+        payShopRecord.setStatus("0");
+        payShopRecord.setDelFlag("0");
+        cmPayShopRecordDao.insert(payShopRecord);
     }
 
     public ChangePayShopDifference differencePriceForm(Integer shopOrderId) {

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

@@ -261,7 +261,7 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
     @Transactional(readOnly = false)
     public Page<NewShopOrder> findPayOrderList(Page<NewShopOrder> page, NewShopOrder shopOrder) {
         shopOrder.setPage(page);
-        if (shopOrder.getPayStatus() != null && shopOrder.getPayStatus() != "") {
+        if (StringUtils.isNotBlank(shopOrder.getPayStatus())) {
             String[] split = shopOrder.getPayStatus().split(",");
             shopOrder.setPs(split);
         }

+ 32 - 1
src/main/java/com/caimei/modules/order/web/CmPayShopController.java

@@ -2,6 +2,7 @@ package com.caimei.modules.order.web;
 
 import com.caimei.dfs.image.beens.ImageUploadInfo;
 import com.caimei.modules.common.utils.UploadUtils;
+import com.caimei.modules.order.dao.CmPayShopRecordDao;
 import com.caimei.modules.order.entity.*;
 import com.caimei.modules.order.service.*;
 import com.caimei.modules.sys.utils.UploadImageUtils;
@@ -27,6 +28,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.atomic.AtomicReference;
@@ -57,6 +59,8 @@ public class CmPayShopController extends BaseController {
     private CmChangePayShopRecondService cmChangePayShopRecondService;
     @Autowired
     private CmChangePayShopProductService cmChangePayShopProductService;
+    @Autowired
+    private CmPayShopRecordDao cmPayShopRecordDao;
 
     @ModelAttribute
     public CmPayShop get(@RequestParam(required = false) String id) {
@@ -207,11 +211,24 @@ public class CmPayShopController extends BaseController {
             String imageUrl = getImageUrl(remarkImage10);
             imgStr.append(imageUrl).append(",");
         }
-        if (null != imgStr && imgStr.length() > 0) {
+        if (imgStr.length() > 0) {
             String substring = imgStr.substring(0, imgStr.length() - 1);
             cmChangePayShopRecond.setRemarkImage(substring);
         }
         cmChangePayShopRecondService.save(cmChangePayShopRecond);
+        if (!shopOrder.getShopOtherFee().equals(thirdPartyFee)) {
+            //保存付第三方备注
+            ChangePayShopOther payShopOther = new ChangePayShopOther();
+            payShopOther.setShopOrderId(newShopOrder.getShopOrderID());
+            payShopOther.setRemark(newShopOrder.getModifyShouldPayNote());
+            if (imgStr.length() > 0) {
+                payShopOther.setRemarkImage(imgStr.substring(0, imgStr.length() - 1));
+            }
+            payShopOther.setShopOtherFee(BigDecimal.valueOf(thirdPartyFee));
+            payShopOther.setModifyUserId(Integer.valueOf(UserUtils.getUser().getId()));
+            payShopOther.setUpdateTime(new Date());
+            cmPayShopRecordDao.insertShopOtherFee(payShopOther);
+        }
         String cmChangePayShopRecondId2 = cmChangePayShopRecond.getId();
         List<NewOrderProduct> orderProducts = new ArrayList<>();
         Boolean soZeroCostFlag = true;
@@ -570,6 +587,9 @@ public class CmPayShopController extends BaseController {
             logger.info(e.getMessage());
             e.printStackTrace();
         }
+        if (3 == cmPayShop.getPaymentType()) {
+            return "modules/order/cmPayShopOtherDetail";
+        }
         return "modules/order/cmPayShopDetail";
     }
 
@@ -759,6 +779,7 @@ public class CmPayShopController extends BaseController {
         ChangePayShopOther payShopOther = cmPayShopService.shopOtherFeeForm(shopOrderId);
         payShopOther.setShopOrderId(shopOrderId);
         NewShopOrder shopOrder = newShopOrderService.findByShopOrderID(shopOrderId);
+        payShopOther.setShopOtherFee(BigDecimal.valueOf(shopOrder.getShopOtherFee()));
         Double brokerage = shopOrder.getBrokerage();
         brokerage = brokerage == null ? 0d : brokerage;
         model.addAttribute("brokerage", brokerage);
@@ -800,4 +821,14 @@ public class CmPayShopController extends BaseController {
         }
         return "redirect:" + Global.getAdminPath() + "/shopOrder/payOrderList?operatingMode=1";
     }
+
+    /**
+     * 申请第三方付款,页面回显
+     */
+    @RequestMapping("shopOtherApplyEdit")
+    public String shopOtherApplyEdit(Integer shopOrderId, Model model) {
+        ChangePayShopOther payShopOther = cmPayShopService.shopOtherFeeForm(shopOrderId);
+        model.addAttribute("payShopOther", payShopOther);
+        return "modules/order/cmPayShopOtherForm";
+    }
 }

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

@@ -71,6 +71,10 @@ public class CmShopOrderController extends BaseController {
         model.addAttribute("cmUserOrganizeList", cmUserOrganizeList);
         model.addAttribute("page", page);
         model.addAttribute("operatingMode", newShopOrder.getOperatingMode());
+        if ("3".equals(newShopOrder.getOperatingMode())) {
+            //已付款子订单页面
+            return "modules/order/paidShopOrderList";
+        }
         return "modules/order/cmPayShopList";
     }
 

+ 7 - 2
src/main/resources/mappings/modules/order/CmPayShopMapper.xml

@@ -38,7 +38,8 @@
 		u2.name AS reviewerName,
 		s.name AS shopName,
 		s.ableRebateAmount AS ableRebateAmount,
-		s.rebateAmount AS rebateAmount
+		s.rebateAmount AS rebateAmount,
+		(SELECT paymentType FROM cm_pay_shop_record WHERE payShopID = a.id LIMIT 1) AS paymentType
 		FROM cm_pay_shop a
 		<include refid="cmPayShopJoins"/>
 		left join shop s on s.shopID = a.shopID
@@ -65,7 +66,8 @@
 			<include refid="cmPayShopColumns"/>,
 		u1.name AS applicantName,
 		u2.name AS reviewerName,
-		s.name AS shopName
+		s.name AS shopName,
+		(SELECT paymentType FROM cm_pay_shop_record WHERE payShopID = a.id LIMIT 1) AS paymentType
 		FROM cm_pay_shop a
 		left join sys_user u1 on u1.id = a.applicant
 		left join sys_user u2 on u2.id = a.reviewer
@@ -110,6 +112,9 @@
 			<if test="orderNo != null and orderNo != ''">
 				AND a.id in (SELECT cpsr.payShopID FROM cm_pay_shop_record  cpsr LEFT JOIN cm_shop_order so ON so.shopOrderID=cpsr.shopOrderID WHERE so.orderNo LIKE CONCAT('%',#{orderNo},'%'))
 			</if>
+			<if test="paymentType != null">
+				AND a.id IN(SELECT payShopID FROM cm_pay_shop_record WHERE paymentType = #{paymentType} AND delFlag = 0)
+			</if>
 			and a.delFlag = '0'
 			and a.shopID != 998
 		</where>

+ 18 - 2
src/main/resources/mappings/modules/order/CmPayShopRecordMapper.xml

@@ -9,6 +9,7 @@
 		a.shopOrderNo AS "shopOrderNo",
 		a.payAmount AS "payAmount",
 		a.wipePayment AS "wipePayment",
+		a.paymentType AS "paymentType",
 		a.payType AS "payType",
 		a.payTime AS "payTime",
 		a.wipeTime AS "wipeTime",
@@ -95,6 +96,7 @@
 			shopOrderNo,
 			payAmount,
 			wipePayment,
+			paymentType,
 			payType,
 			payTime,
 			wipeTime,
@@ -108,6 +110,7 @@
 			#{shopOrderNo},
 			#{payAmount},
 			#{wipePayment},
+			#{paymentType},
 			#{payType},
 			#{payTime},
 			#{wipeTime},
@@ -228,6 +231,7 @@
 		  `shopOrderId`,
 		  `shopOtherFee`,
 		  modifyUserId,
+		  name,
 		  `bankAccountName`,
 		  `bankAccount`,
 		  `bankName`,
@@ -247,13 +251,13 @@
 		INSERT INTO `cm_change_pay_shop_other` (
 		  `shopOrderId`, `shopOtherFee`, `bankAccountName`,
 		  `bankAccount`, `bankName`, `type`, modifyUserId,
-		  `remark`, `remarkImage`, `updateTime`
+		  `remark`, `remarkImage`, `updateTime`, name
 		)
 		VALUES
 		  (
 			#{shopOrderId}, #{shopOtherFee}, #{bankAccountName},
 			#{bankAccount}, #{bankName}, #{type}, #{modifyUserId},
-			#{remark}, #{remarkImage}, NOW()
+			#{remark}, #{remarkImage}, NOW(), #{name}
 		  )
 	</insert>
 
@@ -289,4 +293,16 @@
 		ORDER BY
 		  updateTime
 	</select>
+
+	<select id="findPayShopOtherFee" resultType="java.math.BigDecimal">
+		SELECT
+		  SUM(payAmount)
+		FROM
+		  cm_pay_shop_record
+		WHERE
+		  delFlag = 0
+		  AND status = 1
+		  AND paymentType = 3
+		  AND shopOrderID =	#{shopOrderId}
+	</select>
 </mapper>

+ 3 - 6
src/main/resources/mappings/modules/order/ShopOrderMapper.xml

@@ -809,14 +809,11 @@
 			<if test="operatingMode != null and operatingMode == '2'.toString()">
 				and a.payStatus != 1 and co.status != 6
 			</if>
+			<if test="operatingMode != null and operatingMode == '3'.toString()">
+				and a.payStatus = 3 and co.status NOT IN (6,7)
+			</if>
 			and co.delFlag = 0
 			and a.delFlag = 0
-			and a.shopOrderID not in (
-				select cror.orderID from cm_receipt_order_relation cror
-				LEFT JOIN cm_discern_receipt cdr ON cror.receiptID = cdr.id
-				where cror.relationType = '1' and  cror.delFlag = '0' AND cdr.receiptStatus = '2'
-				and  cror.orderID is not null
-			)
 			and a.shopID != 998
 			and co.orderID not in (
 				SELECT orderID FROM cm_order_product WHERE productID IN

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

@@ -35,6 +35,7 @@
 		<li class="active"><a href="${ctx}/order/cmPayShop/">付款列表</a></li>
 		<shiro:hasPermission name="order:cmPayShop:view">
             <li onclick="sessionStorage.removeItem('checkedIndexArr')"><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
+			<li onclick="sessionStorage.removeItem('checkedIndexArr')"><a href="${ctx}/shopOrder/payOrderList?operatingMode=3">已付款子订单</a></li>
         </shiro:hasPermission>
 	</ul>
 	<form:form id="searchForm" modelAttribute="cmPayShop" action="${ctx}/order/cmPayShop/" method="post" class="breadcrumb form-search">
@@ -77,6 +78,13 @@
 					<form:option value="9999" label="呵呵商城"/>
 					<form:options items="${cmUserOrganizeList}" itemLabel="organizeName" itemValue="id"
 								  htmlEscape="false"/>
+				</form:select>&nbsp;&nbsp;&nbsp;&nbsp;
+				<label>付款类型:</label>
+				<form:select path="paymentType" class="input-medium">
+					<form:option value="" label="请选择"/>
+					<form:option value="1" label="付款子订单"/>
+					<form:option value="2" label="供应商差价"/>
+					<form:option value="3" label="付第三方"/>
 				</form:select>
 				&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
 				<div class="clearfix"></div>
@@ -171,7 +179,12 @@
 					</shiro:hasPermission>
 					<c:if test="${cmPayShop.status == '0'}">
 						<shiro:hasPermission name="order:cmPayShop:apply">
-							<a class="td-a" href="${ctx}/order/cmPayShop/applyEdit?id=${cmPayShop.id}">申请付款</a>
+							<c:if test="${cmPayShop.paymentType ne 3}">
+								<a class="td-a" href="${ctx}/order/cmPayShop/applyEdit?id=${cmPayShop.id}">申请付款</a>
+							</c:if>
+							<c:if test="${cmPayShop.paymentType eq 3}">
+								<a class="td-a" href="${ctx}/order/cmPayShop/shopOtherApplyEdit?shopOrderId=${cmPayShop.shopOrderID}">申请付款</a>
+							</c:if>
 						</shiro:hasPermission>
 						<shiro:hasPermission name="order:cmPayShop:cancel">
 							<a class="td-a" href="${ctx}/order/cmPayShop/cancel?id=${cmPayShop.id}"

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

@@ -239,9 +239,9 @@
 					<td>
 						<b>供应商运费:</b><input type="number" id="shopPostFee" name="shopPostFee"  onchange="changeShouldPay(this)"  value="${newShopOrder.shopPostFee}" style="margin-left: 20px"/>
 					</td>
-					<%--<td>
+					<td>
 						<b>付第三方:</b><input type="number" id="shopOtherFee" name="shopOtherFee"  onchange="inputnum(this)"  value="${newShopOrder.shopOtherFee}" style="margin-left: 5px;"/>
-					</td>--%>
+					</td>
 				</tr>
 				<tr>
 					<td style="padding-top: 10px;">

+ 18 - 6
src/main/webapp/WEB-INF/views/modules/order/cmPayShopList.jsp

@@ -13,10 +13,6 @@
             text-align: center
         }
 
-        #searchForm {
-            white-space: nowrap
-        }
-
         .pay-wrapper {
             padding: 0 10px
         }
@@ -50,7 +46,7 @@
         }
 
         .t-btn {
-            width: 70px;
+            width: 100px;
             height: 30px;
             -webkit-border-radius: 5px;
             -moz-border-radius: 5px;
@@ -299,6 +295,7 @@
     <c:if test="${operatingMode == '1'}">
         <li><a href="${ctx}/order/cmPayShop">付款列表</a></li>
         <li class="active tab-li"><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
+        <li><a href="${ctx}/shopOrder/payOrderList?operatingMode=3">已付款子订单</a></li>
     </c:if>
     <c:if test="${operatingMode == '2'}">
         <li><a href="${ctx}/order/cmRefundShop/">退款列表</a></li>
@@ -357,6 +354,7 @@
     <button id="select-all" style="color:white;background-color:#2F6FAB">全选</button>
     <c:if test="${operatingMode == '1'}">
         <button id="apply" class="t-btn" style="color:white;background-color:#2F6FAB">付款申请</button>
+        <button id="applyShopOtherFee" class="t-btn" style="color:white;background-color:#2F6FAB">付第三方申请</button>
     </c:if>
     <c:if test="${operatingMode == '2'}">
         <button id="refund" class="t-btn">已付退款</button>
@@ -586,7 +584,6 @@
                 <c:if test="${s.modifyPayable and s.paying ne '1'}">
                     <a href="${ctx}/order/cmPayShop/differencePriceForm?shopOrderId=${s.shopOrderID}">供应商差价</a>
                 </c:if>
-                <a href="${ctx}/order/cmPayShop/shopOtherFeeForm?shopOrderId=${s.shopOrderID}">付第三方</a>
                 <c:if test="${s.paying ne '1' and s.payStatus eq '2'}">
                     <c:if test="${!s.modifyPayable || s.receiptStatus eq '3'}">
                         <shiro:hasPermission name="order:cmPayShop:modifyPay">
@@ -888,6 +885,21 @@
             window.location.href = '${ctx}/order/cmPayShop/applyEdit' + params;
         });
 
+        //付第三方
+        $('#applyShopOtherFee').on('click', function () {
+            var checked = $('.pay-wrapper input[type=checkbox]:checked');
+            if (checked.length < 1) {
+                alertx('请选择一个子订单');
+                return false;
+            }
+            if (checked.length > 1){
+                alertx('每次只能选择一个子订单进行付第三方申请');
+                return false;
+            }
+            var shopOrderId = $(checked[0]).attr('data-shoporderid');
+            window.location.href = '${ctx}/order/cmPayShop/shopOtherFeeForm?shopOrderId=' + shopOrderId;
+        });
+
         $('#refund').on('click', function () {
             var checked = $('.pay-wrapper input[type=checkbox]:checked'), params = '?';
             for (var i = 0; i < checked.length; i++) {

+ 118 - 0
src/main/webapp/WEB-INF/views/modules/order/cmPayShopOtherDetail.jsp

@@ -0,0 +1,118 @@
+<%@ 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}
+        .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}/order/cmPayShop/">付款列表</a></li>
+    <li class="active"><a href="${ctx}/order/cmPayShop/applyDetail?id=${cmPayShop.id}">付款单详情</a></li>
+</ul><br/>
+<div class="payment-form">
+    <h4>付款单</h4>
+    <div class="payment-form-top">
+        <div>
+            <label>订单编号(ID):</label>&nbsp;&nbsp;
+            <span><a href="${ctx}/order/detail?id=${cmPayShop.shopOrders.get(0).orderID}">${cmPayShop.shopOrders.get(0).orderNo}(${cmPayShop.shopOrders.get(0).orderID})</a></span>
+        </div>
+        <div>
+            <label>子订单编号(ID):</label>&nbsp;&nbsp;&nbsp;&nbsp;
+            <span><a href="${ctx}/order/detail?id=${cmPayShop.shopOrders.get(0).orderID}">${cmPayShop.shopOrders.get(0).shopOrderNo}(${cmPayShop.shopOrders.get(0).shopOrderID})</a></span>
+        </div>
+        <div>
+            <label>付款单名称:</label>
+            <span>${cmPayShop.name}</span>
+        </div>
+        <div>
+            <label>供应商名称:</label>
+            <span>${cmPayShop.shopName}</span>
+        </div>
+        <div>
+            <label>付款账号:</label>
+            <c:if test="${cmPayShop.payType eq '6'}">
+                无
+            </c:if>
+            <c:if test="${cmPayShop.payType ne '6'}">
+                <span>户名:${cmPayShop.bankAccountName}</span>
+                <span>账号:${cmPayShop.bankAccount}</span>
+                <span>开户行:${cmPayShop.bankName}</span>
+                <span>账户类型:
+						<c:if test="${cmPayShop.type == '0'}">公帐</c:if>
+						<c:if test="${cmPayShop.type == '1'}">私帐</c:if>
+					</span>
+            </c:if>
+        </div>
+        <div>
+            <label>付第三方金额:</label>
+            <span>${cmPayShop.totalAmount}</span>
+        </div>
+        <div>
+            <label>申请人:</label>
+            <span>${cmPayShop.applicantName}</span>
+        </div>
+        <div>
+            <label>申请时间:</label>
+            <span>${cmPayShop.applyTime}</span>
+        </div>
+        <div>
+            <label>审核状态:</label>
+            <span>
+                <c:if test="${cmPayShop.status == '0'}">
+						<font color="red">
+							<strong>待审核</strong>
+						</font>
+                </c:if>
+                <c:if test="${cmPayShop.status == '1'}">
+                    审核通过
+                </c:if>
+                <c:if test="${cmPayShop.status == '2'}">
+                    审核不通过<br><font color="red">原因: ${cmPayShop.reason}</font>
+                </c:if>
+            </span>
+        </div>
+    </div>
+    <div class="check-btn">
+        <button class="apply-btn btn btn-primary" type="button" onclick="window.location.href='${ctx}/order/cmPayShop/printDetail?id=${cmPayShop.id}'">去打印</button>
+    </div>
+</div>
+<script>
+
+</script>
+</body>
+</html>

+ 384 - 0
src/main/webapp/WEB-INF/views/modules/order/cmPayShopOtherForm.jsp

@@ -0,0 +1,384 @@
+<%@ 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
+        }
+
+        input[type="checkbox"]::before {
+            content: '\a0';
+            display: inline-block;
+            vertical-align: .2em;
+            width: .8em;
+            height: .8em;
+            margin-right: .2em;
+            border-radius: .2em;
+            text-indent: .15em;
+            line-height: .65
+        }
+
+        .pay-more-func span:first-child {
+            margin-right: 6px
+        }
+
+        .pay-more-func span:hover {
+            color: #7aa9c3
+        }
+
+        .tips-popup-content p {
+            text-align: center;
+            padding: 80px;
+            font-size: 20px
+        }
+
+        .revise-popup-content h4, .tips-popup-content h4 {
+            padding-left: 10px;
+            height: 40px;
+            line-height: 40px;
+            border-bottom: 1px solid #eee;
+            margin-bottom: 20px
+        }
+
+        .revise-popup-content div {
+            margin-top: 7px;
+            text-align: center
+        }
+
+        .revise-popup-content label {
+            width: 70px;
+            text-align: right;
+            vertical-align: text-bottom
+        }
+
+        .revise-popup-content button {
+            width: 80px;
+            height: 30px;
+            -webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px
+        }
+
+        .revise-popup-content > div:nth-of-type(4) > span:first-child {
+            margin-left: -104px
+        }
+
+        .revise-popup-content > div:nth-of-type(4) > span:last-child {
+            margin-left: 30px
+        }
+
+        .revise-popup-content > div:nth-of-type(4) > span span {
+            margin-left: 10px
+        }
+
+        .revise-popup-content > div:last-child {
+            text-align: center;
+            margin-top: 20px
+        }
+
+        .revise-popup-content input {
+            width: 100px;
+            margin-bottom: 0px
+        }
+
+        .form-search label {
+            width: 80px;
+            text-align: left;
+            margin-top: 12px
+        }
+
+        .remark-title span {
+            color: red
+        }
+
+        .ul-form label {
+            width: 90px;
+            text-align: left;
+            margin-top: 15px
+        }
+
+        .pay-status label {
+            margin-left: 0
+        }
+
+        .pay-status label:first-child {
+            margin-left: 10px
+        }
+        .controls{
+            font-size: 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>
+    <script type="text/javascript">
+        $(document).ready(function() {
+            $("#inputForm").validate({
+                ignore:"",
+                submitHandler: function (form) {
+                    var shopPostFee = $("#shopPostFee").val();
+                    var brokerage = ${brokerage};
+                    if (brokerage < shopPostFee) {
+                        top.$.jBox.confirm("付第三方的值不合理,导致佣金为负,确认继续吗?", '提示', function (v, h, f) {
+                            if (v == true) {
+                                loading('正在提交,请稍等...');
+                                form.submit();
+                            }
+                            return;
+                        }, {buttons: {'取消': false, '确定': true}});
+                    } 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);
+                    }
+                }
+            });
+        });
+    </script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/order/cmPayShop/">付款列表</a></li>
+    <li class="active"><a>提交付款单</a></li>
+</ul>
+<form:form id="inputForm" modelAttribute="payShopOther" action="${ctx}/order/cmPayShop/saveShopOtherFee" method="post" class="form-horizontal">
+    <form:hidden path="shopOrderId"/>
+    <h4>付款单</h4>
+    <div class="control-group">
+        <label class="control-label"><font color='red'>*</font>付款单名称:</label>
+        <div class="controls">
+            <form:input path="name" htmlEscape="false" maxlength="250" class="input-xlarge required"/>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label"><font color='red'>*</font>付第三方金额:</label>
+        <div class="controls">
+            <input type="number" id="shopOtherFee" required name="shopOtherFee" value="${payShopOther.shopOtherFee}" onchange="changeShouldPay(this)"/>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label"><font color='red'>*</font>开户名:</label>&nbsp;&nbsp;&nbsp;&nbsp;
+        <form:input path="bankAccountName" htmlEscape="false" maxlength="100" class="input-xlarge required"/>&nbsp;&nbsp;&nbsp;&nbsp;
+        <label><font color='red'>*</font>账号:</label>
+        <form:input path="bankAccount" htmlEscape="false" maxlength="100" class="input-xlarge required"/>
+    </div>
+    <div class="control-group">
+        <label class="control-label"><font color='red'>*</font>开户行:</label>&nbsp;&nbsp;&nbsp;&nbsp;
+        <form:input path="bankName" htmlEscape="false" maxlength="100" class="input-xlarge required"/>&nbsp;&nbsp;&nbsp;&nbsp;
+        <label><font color='red'>*</font>账户类型:</label>
+        <form:select path="type" class="select-ele input-xlarge required">
+            <form:option value="0" label="公账"/>
+            <form:option value="1" label="私账"/>
+        </form:select>
+    </div>
+    <div class="control-group">
+        <label class="control-label"><font color='red'>*</font>备注内容:</label>
+        <div class="controls">
+            <textarea type="text" name="remark" placeholder="请详细说明修改的原因,不超过500字" style="position: relative;height: 100px; width: 450px;" maxlength="500" required ></textarea>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">图片:</label>
+        <div class="controls upload-content" style="margin: -91px 0px 0px 16px;" id="remarkImageBox">
+            <div class="conList">
+                <form:hidden id="remarkImage1" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage1" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage2" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage2" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage3" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage3" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage4" path="" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage4" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage5" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage5" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage6" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage6" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage7" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage7" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage8" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage8" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList  hide-pic">
+                <form:hidden id="remarkImage9" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage9" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList  hide-pic">
+                <form:hidden id="remarkImage10" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage10" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+        </div>
+    </div>
+    <div class="form-actions">
+        <input id="btnSubmit" style="margin-left: 150px" class="btn btn-primary" type="submit" value="确认"/>&nbsp;&nbsp;&nbsp;&nbsp;
+        <input id="btnCancel" class="btn" type="button" value="返回" onclick="history.go(-1)"/>
+    </div>
+</form:form>
+<sys:message content="${message}"/>
+<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 = 'remarkImage'+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(){
+                $("#remarkImageBox").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);
+        });
+    });
+
+    /**
+     * @param obj
+     * jquery控制input只能输入数字
+     */
+    function onlynum(obj) {
+        obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+    }
+</script>
+</body>
+</html>

+ 577 - 0
src/main/webapp/WEB-INF/views/modules/order/paidShopOrderList.jsp

@@ -0,0 +1,577 @@
+<%@ 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-wrapper {
+            padding: 0 10px
+        }
+
+        .pay-list-item {
+            margin-bottom: 30px
+        }
+
+        .pay-table th {
+            background: #f9f9f9
+        }
+
+        .pay-table tr:first-child th {
+            background: #eee !important
+        }
+
+        .pay-table td {
+            background: #fff !important
+        }
+
+        input[type="checkbox"]::before {
+            content: '\a0';
+            display: inline-block;
+            vertical-align: .2em;
+            width: .8em;
+            height: .8em;
+            margin-right: .2em;
+            border-radius: .2em;
+            text-indent: .15em;
+            line-height: .65
+        }
+
+        .t-btn {
+            width: 120px;
+            height: 30px;
+            -webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px;
+            background: #fff;
+            border: 1px solid #ddd;
+            margin-bottom: 10px
+        }
+
+        #select-all {
+            width: 70px;
+            height: 30px;
+            -webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px;
+            background: #fff;
+            border: 1px solid #ddd;
+            margin-bottom: 10px
+        }
+
+        #select-all:active {
+            background: #3daae9;
+            color: #fff
+        }
+
+        .pay-more-func {
+            float: right;
+            color: #2fa4e7;
+            cursor: pointer
+        }
+
+        .pay-more-func span:first-child {
+            margin-right: 6px
+        }
+
+        .pay-more-func span:hover {
+            color: #7aa9c3
+        }
+
+        .mask {
+            width: 100%;
+            height: 100%;
+            position: fixed;
+            top: 0;
+            background: rgba(0, 0, 0, 0.7);
+            display: none
+        }
+
+        .revise-popup-content, .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%)
+        }
+
+        .revise-popup-content {
+            width: 450px;
+            height: 360px;
+            overflow-y: scroll;
+            padding: 0 15px 30px 15px
+        }
+
+        .tips-popup-content {
+            width: 30%
+        }
+
+        .tips-popup-content p {
+            text-align: center;
+            padding: 80px;
+            font-size: 20px
+        }
+
+        .revise-popup-content h4, .tips-popup-content h4 {
+            padding-left: 10px;
+            height: 40px;
+            line-height: 40px;
+            border-bottom: 1px solid #eee;
+            margin-bottom: 20px
+        }
+
+        .revise-popup-content div {
+            margin-top: 7px;
+            text-align: center
+        }
+
+        .revise-popup-content label {
+            width: 70px;
+            text-align: right;
+            vertical-align: text-bottom
+        }
+
+        .revise-popup-content button {
+            width: 80px;
+            height: 30px;
+            -webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px
+        }
+
+        .revise-popup-content > div:nth-of-type(4) > span:first-child {
+            margin-left: -104px
+        }
+
+        .revise-popup-content > div:nth-of-type(4) > span:last-child {
+            margin-left: 30px
+        }
+
+        .revise-popup-content > div:nth-of-type(4) > span span {
+            margin-left: 10px
+        }
+
+        .revise-popup-content > div:last-child {
+            text-align: center;
+            margin-top: 20px
+        }
+
+        .revise-popup-content input {
+            width: 100px;
+            margin-bottom: 0px
+        }
+
+        .tips-input-wrapper {
+            width: 100px
+        }
+
+        .pay-status {
+            height: 40px;
+            line-height: 40px;
+            display: block
+        }
+
+        .form-search label {
+            width: 80px;
+            text-align: left;
+            margin-top: 12px
+        }
+
+        .remark-textarea {
+            width: 95%;
+            height: 100px;
+            resize: none
+        }
+
+        .remark-title {
+            text-align: left !important
+        }
+
+        .remark-title span {
+            color: red
+        }
+
+        .ul-form {
+            white-space: nowrap;
+            margin-left: -10px !important
+        }
+
+        .ul-form label {
+            width: 90px;
+            text-align: left;
+            margin-top: 15px
+        }
+
+        .time-space-symbols {
+            width: 100px;
+            display: inline-block;
+            text-align: center
+        }
+
+        #btnSubmit {
+            width: 128px;
+            margin-left: 165px
+        }
+
+        .pay-status label {
+            margin-left: 0
+        }
+
+        .pay-status label:first-child {
+            margin-left: 10px
+        }
+
+        .weishaIcon {background:darkorange;color:white;margin:0 0px;padding:0 3px;font-style:normal;font-size: 12px; display:inline-block;border-radius:2px}
+
+    </style>
+    <script type="text/javascript">
+        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}/order/cmPayShop">付款列表</a></li>
+    <li><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
+    <li class="active tab-li"><a href="${ctx}/shopOrder/payOrderList?operatingMode=3">已付款子订单</a></li>
+</ul>
+<form:form id="searchForm" onsubmit="submitFunc()" modelAttribute="newShopOrder"
+           action="${ctx}/shopOrder/payOrderList?operatingMode=${operatingMode
+}" 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="shopOrderID" htmlEscape="false" onkeyup="onlynum(this)" maxlength="8" class="input-medium"/>
+        <label>子订单编号:</label>
+        <form:input path="shopOrderNo" htmlEscape="false" maxlength="20" class="input-medium"/>
+        <label>订单ID:</label>
+        <form:input path="orderID" htmlEscape="false" onkeyup="onlynum(this)" maxlength="8" class="input-medium"/>
+        <label>订单编号:</label>
+        <form:input path="orderNo" htmlEscape="false" maxlength="20" class="input-medium"/><br>
+        <label>供应商:</label>
+        <form:input path="shopName" htmlEscape="false" maxlength="20" class="input-medium"/>
+        <label>机构:</label>
+        <form:input path="clubName" htmlEscape="false" maxlength="20" class="input-medium"/>
+        <label class="control-label">下单时间:</label>
+        <form:input path="startTime" type="text" maxlength="10" class="input-medium Wdate" value="${startTime}"
+                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd ',isShowClear:false});"/>
+        <span class="time-space-symbols">至</span>
+        <form:input path="endTime" type="text" maxlength="10" class="input-medium Wdate" value="${endTime}"
+                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd ',isShowClear:false});"/>
+        <div class="pay-status">
+            <label>组织:</label>
+            <form:select path="organizeID" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="0" label="采美"/>
+                <form:option value="9999" label="呵呵商城"/>
+                <form:options items="${cmUserOrganizeList}" itemLabel="organizeName" itemValue="id" htmlEscape="false"/>
+            </form:select>
+            <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+        </div>
+        <div class="clearfix"></div>
+    </div>
+</form:form>
+<sys:message content="${message}"/>
+<div class="pay-wrapper">
+    <button id="applyShopOtherFee" class="t-btn" style="color:white;background-color:#2F6FAB">付第三方申请</button>
+    <button id="applyDifferencePrice" class="t-btn" style="color:white;background-color:#2F6FAB">供应商差价申请</button>
+    <c:forEach items="${page.list}" var="s" varStatus="sIndex">
+        <div class="pay-list-item">
+            <table class="table table-striped table-bordered table-condensed pay-table">
+                <tr>
+                    <th style="width:20px;">
+                        <input type="checkbox" ${s.status eq 7 ?'disabled':''} data-shoporderid="${s.shopOrderID}" data-shopid="${s.shopID}"/>
+                    </th>
+                    <th>子订单编号(ID)</th>
+                    <th colspan="3">订单编号(ID)</th>
+                    <th colspan="2">订单金额</th>
+                    <th colspan="3">下单时间</th>
+                    <th>收款状态</th>
+                    <th>收款金额</th>
+                    <th colspan="3">经理折扣</th>
+                    <th colspan="2">成本类型</th>
+                </tr>
+                <tr>
+                    <td><a href="${ctx}/order/detail?id=${s.orderID}">${s.shopOrderNo}(${s.shopOrderID})</a></td>
+                    <td colspan="3"><a href="${ctx}/order/detail?id=${s.orderID}">${s.orderNo}(${s.orderID})</a></td>
+                    <td colspan="2"><fmt:formatNumber value="${s.payTotalFee}" type="number" pattern="#,##0.00"/></td>
+                    <td colspan="3">${s.orderTime}</td>
+                        <%--此处对应订单列表收款状态--%>
+                    <td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline">
+                        <c:if test="${s.receiptStatus == 1}"><font color="red">待收款</font></c:if>
+                        <c:if test="${s.receiptStatus == 2}"><font color="#ff8c00">部分收款</font></c:if>
+                        <c:if test="${s.receiptStatus == 3}"><font color="green">已收款</font></c:if></a>
+                    </td>
+                    <td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline">${s.receiptTotalFee}</a></td>
+                    <td colspan="3">
+                        <c:if test="${s.discountTotalFee gt 0}">
+                            <c:if test="${s.discountTotalFee gt s.returnedPurchaseTotalFee}">
+                                <fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}"
+                                                  type="currency"/>
+                            </c:if>
+                            <c:if test="${s.discountTotalFee le s.returnedPurchaseTotalFee}">
+                                ¥0.00
+                            </c:if>
+                            <c:if test="${s.returnedPurchaseTotalFee gt 0}">
+                                <span style="color: red">
+                                    (原<fmt:formatNumber value="${s.discountTotalFee}" type="currency"/>,因退货折扣取消
+                                    <c:if test="${s.discountTotalFee gt s.returnedPurchaseTotalFee}">
+                                        <fmt:formatNumber value="${s.returnedPurchaseTotalFee}" type="currency"/>
+                                    </c:if>
+                                    <c:if test="${s.discountTotalFee le s.returnedPurchaseTotalFee}">
+                                        <fmt:formatNumber value="${s.discountTotalFee}" type="currency"/>
+                                    </c:if>)
+                                </span>
+                            </c:if>
+                        </c:if>
+                        <c:if test="${s.discountTotalFee le 0}">¥0.00</c:if>
+                    </td>
+                    <td colspan="2"><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if
+                            test="${s.costType == '2'}">比例成本</c:if></td>
+                </tr>
+                <tr>
+                    <th>供应商</th>
+                    <th colspan="3">机构</th>
+                    <th>机构运费</th>
+                    <th>供应商运费</th>
+                    <th colspan="3">商品费</th>
+                    <th colspan="2">付款状态</th>
+                    <th colspan="3">应付税费</th>
+                    <th>付供应商</th>
+                    <th>付第三方</th>
+                </tr>
+                <tr>
+                    <td>${s.shopName}</td>
+                    <td colspan="3">
+                        <c:if test="${s.organizeID eq 1}"><span class="org-note">星范</span></c:if>
+                            ${s.clubName}
+                        <c:if test="${s.orderType eq 2}"><font color="red">(呵呵商城)</font></c:if>
+                        <c:if test="${s.organizeID == 3}"><em class="weishaIcon">维沙</em></c:if>
+                    </td>
+                    <td>
+                        <c:if test="${s.freight == 0}">
+                            包邮
+                        </c:if>
+                        <c:if test="${s.freight == -1}">
+                            到付
+                        </c:if>
+                        <c:if test="${s.freight == -2}">
+                            仪器到付-产品包邮
+                        </c:if>
+                        <c:if test="${s.freight != -1 && s.freight != 0 && s.freight != -2}">
+                            <fmt:formatNumber value="${s.freight}" type="currency"/>
+                            <c:if test="${s.returnedFreightFlag eq true}"><font color="red">(已退)</font></c:if>
+                        </c:if>
+                        <c:if test="${s.userBeans > 0}">
+                            <br><font color="red">(采美豆抵用:${s.userBeans})</font>
+                        </c:if>
+                    </td>
+                    <td class="freight"><fmt:formatNumber value="${s.shopPostFee}" type="number"
+                                                          pattern="#,##0.00"/></td>
+                    <td colspan="3" class="product-fee"><fmt:formatNumber value="${s.shopProductAmount}" type="number"
+                                                                          pattern="#,##0.00"/></td>
+                    <td colspan="2"><c:if test="${s.payStatus == 1 || empty s.payStatus || s.payStatus == 0}"><font
+                            color="red">待付款</font></c:if>
+                        <c:if test="${s.payStatus == 2}"><font color="#ff8c00">部分付款</font></c:if>
+                        <c:if test="${s.payStatus == 3}"><font color="green">已付款</font></c:if></td>
+                    <td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number"
+                                                                    pattern="#,##0.00"/></td>
+                    <td class="supplier-fee">
+                        <font color="#E15616"><fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/></font>
+                        <c:if test="${s.differenceType eq 1}">
+                            <font color="red">(需补差价¥${s.differencePrice})</font>
+                        </c:if>
+                        <c:if test="${s.differenceType eq 2}">
+                            <font color="red">(需退差价¥${s.differencePrice})</font>
+                        </c:if>
+                    </td>
+                    <input type="hidden" class="payedShopAmount" value="${s.payedShopAmount}">
+                    <input type="hidden" class="productAmount" value="${s.productAmount}">
+                    <input type="hidden" class="costType" value="${s.costType}">
+                    <input type="hidden" class="proportional" value="${s.proportional}">
+                    <input type="hidden" class="modifyShouldPayNote" value="${s.modifyShouldPayNote}">
+                    <td class="third-party-fee"><fmt:formatNumber value="${s.shopOtherFee}" type="number"
+                                                                  pattern="#,##0.00"/></td>
+                </tr>
+                <tr>
+                    <th>商品名</th>
+                    <th>规格</th>
+                    <th>数量<%--(赠品)--%></th>
+                    <th>退货</th>
+                    <th colspan="2">单价</th>
+                    <th colspan="3">机构税率 / 单税费 / 总税费</th>
+                    <th colspan="2">总价</th>
+                    <th colspan="3">供应商税率 / 单税费 / 总税费</th>
+                    <th>成本(单)</th>
+                    <th>成本(总)</th>
+                </tr>
+                <c:forEach items="${s.newOrderProducts}" var="p" varStatus="pIndex">
+                    <tr class="pay-product-item">
+                        <input type="hidden" class="p-copId" value="${p.orderProductID}">
+                        <td style="width:300px;" class="p-name">
+                            <c:if test="${p.productType eq 1}"><font color="red">协商赠品:</font></c:if>
+                            <c:if test="${p.productType eq 2}"><font color="red">促销赠品:</font></c:if>
+                                ${p.name}
+                        </td>
+                        <td style="width:80px;">${p.unit}</td>
+                        <td class="p-num" data-num="${p.num + p.presentNum}">
+                                ${p.num}
+                            <c:if test="${p.presentNum > 0}">(赠:${p.presentNum})</c:if>
+                        </td>
+                        <td><font color="${p.returnedNum>0?'red':''}">${p.returnedNum}</font></td>
+                        <td colspan="2"><fmt:formatNumber value="${empty p.touchPrice?p.discountPrice:p.touchPrice}"
+                                                          type="number" pattern="#,##0.00"/>
+                            <c:if test="${p.includedTax != null and p.includedTax != '' and p.includedTax ne 2}">
+                                <label style="color: red">
+                                    (${p.includedTax eq 1?'含税':(p.invoiceType eq 1 or p.invoiceType eq 2)?'不含税-能开票':'不含税-不能开票'})
+                                </label>
+                            </c:if>
+                        </td>
+                        <td>${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.taxRate?0.0:p.taxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
+                        <td>${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.addedValueTax ?0.00:p.addedValueTax}</td>
+                        <td>
+                            <c:choose>
+                                <c:when test="${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))}">
+                                    ---
+                                </c:when>
+                                <c:otherwise>
+                                    <fmt:formatNumber
+                                            value="${empty p.totalAddedValueTax ?0.00:(p.addedValueTax * (p.num+p.presentNum-p.returnedNum))}"
+                                            type="number" pattern="#,##0.00"/>
+                                </c:otherwise>
+                            </c:choose>
+                        </td>
+                        <td colspan="2"><fmt:formatNumber
+                                value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax)*(p.num+p.presentNum-p.returnedNum)}"
+                                type="number" pattern="#,##0.00"/></td>
+                        <td class="p-taxes">${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.supplierTaxRate?0.0:p.supplierTaxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
+                        <td class="p-taxes">${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.singleShouldPayTotalTax ?0.00:p.singleShouldPayTotalTax}</td>
+                        <td class="p-taxes-t">
+                            <c:choose>
+                                <c:when test="${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))}">
+                                    ---
+                                </c:when>
+                                <c:otherwise>
+                                    <fmt:formatNumber
+                                            value="${empty p.shouldPayTotalTax ?0.00:(p.singleShouldPayTotalTax * (p.num+p.presentNum-p.returnedNum))}"
+                                            type="number" pattern="#,##0.00"/>
+                                </c:otherwise>
+                            </c:choose>
+                        </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>
+                    </tr>
+                </c:forEach>
+            </table>
+            <div class="pay-more-func">
+                <a href="${ctx}/shopOrder/payShopRemark?shopOrderId=${s.shopOrderID}">应付备注</a>
+                <a href="${ctx}/shopOrder/payedAndRefundRecordList?shopOrderID=${s.shopOrderID}&operatingMode=${operatingMode}">退/付款记录</a>
+            </div>
+        </div>
+    </c:forEach>
+</div>
+<div class="pagination">${page}</div>
+
+<script>
+    (function () {
+        var payTableEle = $('.pay-table'),
+            payProductEle = $('.pay-product-item');
+        payTableEle.each(function (i, l) {
+            var leftLength = $(this).find('tr').length,
+                productLength = $(this).find('.pay-product-item').length;
+            // 左侧栏合并单元格
+            $(this).find('tr:first-child th:first-child').attr('rowspan', leftLength);
+        });
+
+        $('.tab-li').on('click', function () {
+            if (getCheckedArr) {
+                sessionStorage.removeItem('checkedIndexArr');
+            }
+        });
+
+        //付第三方
+        $('#applyShopOtherFee').on('click', function () {
+            var checked = $('.pay-wrapper input[type=checkbox]:checked');
+            if (checked.length < 1) {
+                alertx('请选择一个子订单');
+                return false;
+            }
+            if (checked.length > 1){
+                alertx('每次只能选择一个子订单进行付第三方申请');
+                return false;
+            }
+            var shopOrderId = $(checked[0]).attr('data-shoporderid');
+            window.location.href = '${ctx}/order/cmPayShop/shopOtherFeeForm?shopOrderId=' + shopOrderId;
+        });
+
+        //供应商差价申请
+        $('#applyDifferencePrice').on('click', function () {
+            var checked = $('.pay-wrapper input[type=checkbox]:checked');
+            if (checked.length < 1) {
+                alertx('请选择一个子订单');
+                return false;
+            }
+            if (checked.length > 1){
+                alertx('每次只能选择一个子订单进行供应商差价申请');
+                return false;
+            }
+            var shopOrderId = $(checked[0]).attr('data-shoporderid');
+            window.location.href = '${ctx}/order/cmPayShop/differencePriceForm?shopOrderId=' + shopOrderId;
+        });
+
+    })();
+
+    /**
+     * @param obj
+     * jquery控制input只能输入数字
+     */
+    function onlynum(obj) {
+        obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+    }
+
+    function submitFunc() {
+        var checkedArr = [];
+        $('.pay-checkbox').each(function (index) {
+            var thisStatus = $(this).prop('checked');
+            if (thisStatus) {
+                checkedArr.push(index);
+            }
+        })
+        if (checkedArr.length > 0) {
+            sessionStorage.setItem('checkedIndexArr', JSON.stringify(checkedArr));
+        } else {
+            sessionStorage.setItem('checkedIndexArr', []);
+        }
+    }
+
+    function inputnum(obj, val) {
+        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>
+</body>
+</html>

+ 6 - 0
src/main/webapp/WEB-INF/views/modules/order/payedAndRefundRecordList.jsp

@@ -49,6 +49,12 @@
             <li><a href="${ctx}/shopOrder/refundRecordList?operatingMode=2">记录退款</a></li>
             <li class="active"><a href="${ctx}/shopOrder/payedAndRefundRecordList?shopOrderID=${s.shopOrderID}&operatingMode=2">退/付款记录</a></li>
         </c:if>
+        <c:if test="${operatingMode == 3}">
+            <li><a href="${ctx}/shopOrder/payOrderList">付款列表</a></li>
+            <li><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
+            <li><a href="${ctx}/shopOrder/payOrderList?operatingMode=3">已付款子订单</a></li>
+            <li class="active"><a href="${ctx}/shopOrder/payedAndRefundRecordList?shopOrderID=${s.shopOrderID}&operatingMode=1">退/付款记录</a></li>
+        </c:if>
 
 	</ul>
     <table class="table table-striped table-bordered table-condensed pay-table">

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

@@ -217,14 +217,21 @@
 <ul class="nav nav-tabs">
     <li><a href="${ctx}/order/cmPayShop">付款列表</a></li>
     <li><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
+    <li><a href="${ctx}/shopOrder/payOrderList?operatingMode=3">已付款子订单</a></li>
     <li class="active"><a href="${ctx}/order/cmPayShop/shopOtherFeeForm?shopOrderId=${payShopOther.shopOrderId}">付第三方</a></li>
 </ul>
 <form:form id="inputForm" modelAttribute="payShopOther" action="${ctx}/order/cmPayShop/saveShopOtherFee" method="post" class="form-horizontal">
     <form:hidden path="shopOrderId"/>
+    <div class="control-group">
+        <label class="control-label"><font color='red'>*</font>付款单名称:</label>
+        <div class="controls">
+            <form:input path="name" htmlEscape="false" maxlength="250" class="input-xlarge required"/>
+        </div>
+    </div>
     <div class="control-group">
         <label class="control-label"><font color='red'>*</font>付第三方金额:</label>
         <div class="controls">
-            <input type="number" id="shopOtherFee" required name="shopOtherFee" onchange="changeShouldPay(this)"/>
+            <input type="number" id="shopOtherFee" required name="shopOtherFee" value="${payShopOther.shopOtherFee}" onchange="changeShouldPay(this)"/>
         </div>
     </div>
     <div class="control-group">