浏览代码

Merge branch 'developer' into developerA

zhijiezhao 3 年之前
父节点
当前提交
5858b171cf
共有 27 个文件被更改,包括 4474 次插入2410 次删除
  1. 27 0
      src/main/java/com/caimei/modules/order/dao/CmUtilsDao.java
  2. 10 0
      src/main/java/com/caimei/modules/order/dao/NewOrderDao.java
  3. 3 3
      src/main/java/com/caimei/modules/order/entity/NewOrder.java
  4. 9 5
      src/main/java/com/caimei/modules/order/service/NewOrderService.java
  5. 1 1
      src/main/java/com/caimei/modules/order/web/CmPayShopController.java
  6. 22 4
      src/main/java/com/caimei/modules/order/web/NewOrderController.java
  7. 2 0
      src/main/java/com/caimei/modules/product/web/ProductNewController.java
  8. 61 0
      src/main/resources/mappings/modules/order/CmUtilsMapper.xml
  9. 8 0
      src/main/resources/mappings/modules/order/OrderMapper.xml
  10. 1 1
      src/main/resources/mappings/modules/product/ProductMapper.xml
  11. 342 77
      src/main/webapp/WEB-INF/views/modules/order/checkPaymentOrder.jsp
  12. 652 388
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopCheck.jsp
  13. 8 5
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopDetail.jsp
  14. 6 3
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopEdit.jsp
  15. 1000 630
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopForm.jsp
  16. 5 3
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopList.jsp
  17. 516 98
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopOtherCheck.jsp
  18. 773 98
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopOtherPrintDetail.jsp
  19. 600 0
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopOtherPrintDetails.jsp
  20. 6 3
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopPrintDetail.jsp
  21. 19 0
      src/main/webapp/WEB-INF/views/modules/order/cmRefundShopForm.jsp
  22. 24 782
      src/main/webapp/WEB-INF/views/modules/order/newOrderList.jsp
  23. 4 0
      src/main/webapp/WEB-INF/views/modules/order/orderDetail.jsp
  24. 6 3
      src/main/webapp/WEB-INF/views/modules/order/paidShopOrderList.jsp
  25. 357 292
      src/main/webapp/WEB-INF/views/modules/order/payedAndRefundRecordList.jsp
  26. 6 7
      src/main/webapp/WEB-INF/views/modules/user/newCmShopForm.jsp
  27. 6 7
      src/main/webapp/WEB-INF/views/modules/user/newCmShopList.jsp

+ 27 - 0
src/main/java/com/caimei/modules/order/dao/CmUtilsDao.java

@@ -0,0 +1,27 @@
+package com.caimei.modules.order.dao;
+
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+
+
+/**
+ * @author zzj
+ * 工具类dao
+ */
+@MyBatisDao
+public interface CmUtilsDao {
+
+    /**
+     * 普通订单根据订单id查总佣金
+     * @param orderID
+     * @return
+     */
+    Double selectPayTotalFee(Integer orderID);
+
+
+    /**
+     * 返佣订单根据订单id查佣金
+      * @param orderID
+     * @return
+     */
+    Double selectPayTotalFees(Integer orderID);
+}

+ 10 - 0
src/main/java/com/caimei/modules/order/dao/NewOrderDao.java

@@ -41,6 +41,16 @@ public interface NewOrderDao extends CrudDao<NewOrder> {
 
     int updatePromotionsRecord(CmPromotion promotion);
 
+    /**
+     * 置为已收款已付款
+     * @param orderId
+     */
+    void updatePayAndReceipt(Integer orderId);
+    /**
+     * 子订单置为已收款已付款
+     * @param orderId
+     */
+    void updatePayStatusSon(Integer orderId);
     /**
      * 删除此订单下订单促销
      *

+ 3 - 3
src/main/java/com/caimei/modules/order/entity/NewOrder.java

@@ -88,7 +88,7 @@ public class NewOrder extends DataEntity<NewOrder> {
     private String unReceipt;//未收金额(需要包含运费,目前只存在普通订单存在运费)
     private String paid;//已付金额(不需要包含运费,等同于订单商品金额)
     private String unpaid;//未付金额(不需要包含运费,等同于订单商品金额)
-    private String brokerage;//佣金
+    private Double brokerage;//佣金
     private String buyerName; //买家名称
     private String mobile; //手机
     private String address; //地址
@@ -624,11 +624,11 @@ public class NewOrder extends DataEntity<NewOrder> {
     }
 
     @Transient
-    public String getBrokerage() {
+    public Double getBrokerage() {
         return brokerage;
     }
 
-    public void setBrokerage(String brokerage) {
+    public void setBrokerage(Double brokerage) {
         this.brokerage = brokerage;
     }
 

+ 9 - 5
src/main/java/com/caimei/modules/order/service/NewOrderService.java

@@ -35,8 +35,6 @@ import com.caimei.modules.user.service.CmUserBalanceRecordService;
 import com.caimei.modules.user.service.CmUserService;
 import com.caimei.modules.user.utils.ReturnedPurchaseStatus;
 import com.caimei.modules.user.utils.UserUtils;
-import com.caimei.po.CouponClub;
-import com.caimei.po.CouponRedemptionCode;
 import com.caimei.po.ProductLadderPrice;
 import com.caimei.po.neworder.CmShopOrder;
 import com.caimei.utils.*;
@@ -66,6 +64,8 @@ import java.util.stream.IntStream;
 @Transactional(readOnly = true)
 public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
 
+    @Resource
+    private CmUtilsDao cmUtilsDao;
     @Resource
     private NewOrderDao newOrderDao;
     @Resource
@@ -1007,7 +1007,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
         List<Integer> l = new ArrayList<>();
         l.add(newOrder.getOrderID());
         List<Integer> orderIds = cmDiscernReceiptDao.findRebateOrderID(l);
-        if (orderIds.contains(newOrder.getOrderID()))
+        if (orderIds.contains(newOrder.getOrderID()) || "1".equals(newOrder.getRebateFlag()))
             newOrder.setRebateOrder("1");
         else
             newOrder.setRebateOrder("0");
@@ -1836,7 +1836,6 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
                 if (shopOrder.getShopID() != 998) {
                     count++;
                 }
-
                 Integer shopOrderID = shopOrder.getShopOrderID();//子订单ID
                 //通过子订单ID查询子订单信息
                 NewShopOrder newShopOrder = newShopOrderDao.get(String.valueOf(shopOrderID));
@@ -1899,7 +1898,6 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
         }
         return pageResult;
     }
-
     /**
      * 判断是否是游客
      *
@@ -2298,5 +2296,11 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
         cmCouponDao.updateClubCoupon(clubCouponId, orderId);
         return true;
     }
+
+    @Transactional(readOnly = false)
+    public void changePay(Integer orderId) {
+        newOrderDao.updatePayAndReceipt(orderId);
+        newOrderDao.updatePayStatusSon(orderId);
+    }
 }
 

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

@@ -628,7 +628,7 @@ public class CmPayShopController extends BaseController {
             e.printStackTrace();
         }
         if (3 == cmPayShop.getPaymentType()) {
-            return "modules/order/cmPayShopOtherPrintDetail";
+            return "modules/order/cmPayShopOtherPrintDetails";
         }
         return "modules/order/cmPayShopPrintDetail";
     }

+ 22 - 4
src/main/java/com/caimei/modules/order/web/NewOrderController.java

@@ -12,10 +12,7 @@ import com.caimei.modules.common.utils.ExcelUtil;
 import com.caimei.modules.common.utils.UploadUtils;
 import com.caimei.modules.coupon.entity.CmCouponOrderRecord;
 import com.caimei.modules.coupon.service.CmCouponService;
-import com.caimei.modules.order.dao.CmDiscernReceiptDao;
-import com.caimei.modules.order.dao.CmReceiptOrderRelationDao;
-import com.caimei.modules.order.dao.CmReturnedPurchaseDao;
-import com.caimei.modules.order.dao.NewOrderProductDao;
+import com.caimei.modules.order.dao.*;
 import com.caimei.modules.order.entity.*;
 import com.caimei.modules.order.service.*;
 import com.caimei.modules.order.utils.OrderUtil;
@@ -80,6 +77,8 @@ import java.util.stream.IntStream;
 @RequestMapping(value = "${adminPath}/order")
 public class NewOrderController extends BaseController {
 
+    @Resource
+    private CmUtilsDao cmUtilsDao;
     @Resource
     private NewOrderService newOrderService;
     @Resource
@@ -716,6 +715,8 @@ public class NewOrderController extends BaseController {
         return "redirect:" + Global.getAdminPath() + "/order/detail/?id=" + orderID;
     }
 
+
+
     /**
      * 确认收货
      *
@@ -732,6 +733,8 @@ public class NewOrderController extends BaseController {
     }
 
 
+
+
     /**
      * 去子订单orderProduct页面
      *
@@ -1278,6 +1281,8 @@ public class NewOrderController extends BaseController {
             returnValue = returnedPurchaseFee - order.getDiscountFee(); //抵用完经理折扣后才是真实价值
         }
         //订单已收金额
+        Double brokerage = cmUtilsDao.selectPayTotalFees(order.getOrderID());
+        model.addAttribute("brokerage",brokerage);
         Double receiptAmount = cmDiscernReceiptService.findOrderReceipt(order.getOrderID());
         model.addAttribute("returnValue", returnValue);
         model.addAttribute("receiptAmount", receiptAmount == null ? 0 : receiptAmount);
@@ -1396,6 +1401,19 @@ public class NewOrderController extends BaseController {
         return "modules/order/orderClause";
     }
 
+    /**
+     * 置为已收款已付款
+     * @param orderId
+     * @return
+     */
+    @RequestMapping("toChangePay")
+    public String changePay(Integer orderId){
+        newOrderService.changePay(orderId);
+        return "redirect:" + Global.getAdminPath() + "/order/orderList";
+    }
+
+
+
     @RequestMapping(value = "saveClause")
     public String saveClause(NewOrder order, RedirectAttributes redirectAttributes, HttpServletRequest request) {
         String clauseContent = request.getParameter("clauseContent");

+ 2 - 0
src/main/java/com/caimei/modules/product/web/ProductNewController.java

@@ -856,6 +856,8 @@ public class ProductNewController extends BaseController {
         model.addAttribute("full", recommendList.size() >= 15 ? 1 : 0);
         model.addAttribute("dbProductNum", manualRecommend);
         model.addAttribute("product", product);
+//        model.addAttribute("pageNo",1);
+//        model.addAttribute("pageSize",10);
         return "modules/product-new/recommend";
     }
 

+ 61 - 0
src/main/resources/mappings/modules/order/CmUtilsMapper.xml

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.caimei.modules.order.dao.CmUtilsDao">
+
+
+    <select id="selectPayTotalFee" resultType="java.lang.Double">
+        select ROUND(IFNULL((
+                                        co.payTotalFee - (IFNULL((
+                                                                     select ROUND(SUM((IFNULL(op.costPrice, 0) *
+                                                                                       (IFNULL(op.num, 0) + IFNULL(op.presentNum, 0))) +
+                                                                                      IFNULL(op.shouldPayTotalTax, 0)),
+                                                                                  2)
+                                                                     from cm_order_product op
+                                                                              left join cm_shop_order cso on cso.shopOrderID = op.shopOrderID
+                                                                     where cso.orderID = co.orderID
+                                                                       AND op.productID != 999
+                                                                     group by cso.orderID
+                                                                 ), 0)) - (select IFNULL(SUM(cso.shopOtherFee), 0)
+                                                                           from cm_shop_order cso
+                                                                           where cso.orderID = co.orderID)
+                                        - IFNULL((SELECT SUM(shopPostFee + IF(differenceType = 1, differencePrice, 0) -
+                                                             IF(differenceType = 2, differencePrice, 0))
+                                                  FROM cm_shop_order
+                                                  WHERE orderID = co.orderID), 0)
+                                    + IFNULL((SELECT SUM(cpsr.wipePayment)
+                                              FROM cm_pay_shop_record cpsr
+                                              WHERE cpsr.shopOrderID IN (SELECT cso.shopOrderID
+                                                                         FROM cm_shop_order cso
+                                                                         WHERE cso.orderID = co.orderID)
+                                                AND cpsr.delFlag = 0
+                                                AND (cpsr.`status` = 1 OR cpsr.`status` = 0)), 0)
+                                ), 0), 2) as "采美总佣金"
+        from cm_order co
+        where co.orderID = #{orderID}
+    </select>
+
+    <select id="selectPayTotalFees" resultType="java.lang.Double">
+        select ROUND(IFNULL((
+                                    co.payTotalFee - (IFNULL((
+                                                                 SELECT ROUND(SUM((IFNULL(op.costPrice, 0) *
+                                                                                   (IFNULL(op.num, 0) + IFNULL(op.presentNum, 0))) +
+                                                                                  IFNULL(op.shouldPayTotalTax, 0)), 2)
+                                                                 FROM cm_order_product op
+                                                                          LEFT JOIN cm_shop_order cso ON cso.shopOrderID = op.shopOrderID
+                                                                 WHERE cso.orderID = co.orderID
+                                                                   AND op.productID != 999
+                                                                 GROUP BY cso.orderID
+                                                             ), 0)) - (SELECT IFNULL(SUM(cso.shopOtherFee +
+                                                                                         IF(differenceType = 1, differencePrice, 0) -
+                                                                                         IF(differenceType = 2, differencePrice, 0)),
+                                                                                     0)
+                                                                       FROM cm_shop_order cso
+                                                                       WHERE cso.orderID = co.orderID)
+                                    - IFNULL((SELECT SUM(shopPostFee) FROM cm_shop_order WHERE orderID = co.orderID), 0)
+                                ), 0), 2) as "采美总佣金"
+        from cm_order co
+        where orderID = #{orderID}
+    </select>
+
+
+</mapper>

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

@@ -796,6 +796,10 @@
 		where id = #{id}
 	</update>
 
+	<update id="updatePayAndReceipt">
+		update cm_order set payStatus= 3, receiptStatus= 3 where orderID= #{orderId}
+	</update>
+	
 	<update id="updateOrderStatus">
 		update cm_order set payStatus = #{payStatus} ,zeroCostFlag = #{zeroCostFlag} where orderID = #{orderID}
 	</update>
@@ -939,6 +943,10 @@
 		  orderId = #{orderId}
 	</update>
 
+	<update id="updatePayStatusSon">
+		UPDATE cm_shop_order SET  payStatus=3 WHERE orderID=#{orderId}
+	</update>
+
 	<delete id="deleteCouponOrderRecord">
 		DELETE FROM cm_coupon_order_record WHERE id = #{id}
 	</delete>

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

@@ -1714,7 +1714,7 @@
 			</if>
 			and a.productCategory = 1
 		</where>
-		limit 0, 10
+<!--		limit 0, 10-->
 	</select>
 
 	<update id="updateRecommendType">

+ 342 - 77
src/main/webapp/WEB-INF/views/modules/order/checkPaymentOrder.jsp

@@ -5,70 +5,312 @@
     <title>订单财务信息</title>
     <meta name="decorator" content="default"/>
     <style type="text/css">
-        .table th{text-align:center}
-        .table td{text-align:center}
-        #searchForm{white-space:nowrap}
-        .pay-wrapper{padding:0 10px}
-        .pay-list-item{margin-bottom:30px}
-        .pay-table th{background:#f9f9f9!important;}
-        .pay-table tr.t2 td{background:#f2fbff!important;}
-        .pay-table tr.t2 th{background:#e9f3f7!important;}
-        .pay-table tr.t1 th{background:#eee!important}
-        .pay-table td{background:#fff !important}
-        .pay-table .item0{padding:0;margin:0;font-size:12px;}
-        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}
-        #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}
-        .popup-cfm-btn,.tips-cfm-btn{background:#3daae9;color:#fff;border:none}
-        .tips-cfm-btn{width:100px;height:40px;margin:auto;display:block;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}
-        .popup-cancel-btn{background:#fff;color:#555;border:1px solid #ddd;margin-left:20px}
-        .popup-tips{color:red;display:none}
-        #close-btn,#close-btn1{top:8px;right:10px;width:18px;position:absolute;cursor:pointer}
-        .tips-input-wrapper{width:100px}
-        .reset-btn{background:#fff;color:#555;border:1px solid #ddd;margin-right:20px}
-        .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:435px}
-        .pay-status label{margin-left:0}
-        .pay-status label:first-child{margin-left:10px}
-        .zeroCost .message{
-            display:none;
-            position:absolute;
-            background:#FFF;
-            white-space:nowrap;
-            border:1px solid black;
-
-        }
-        .zeroCost:hover .message{
+        .table th {
+            text-align: center
+        }
+
+        .table td {
+            text-align: center
+        }
+
+        #searchForm {
+            white-space: nowrap
+        }
+
+        .pay-wrapper {
+            padding: 0 10px
+        }
+
+        .pay-list-item {
+            margin-bottom: 30px
+        }
+
+        .pay-table th {
+            background: #f9f9f9 !important;
+        }
+
+        .pay-table tr.t2 td {
+            background: #f2fbff !important;
+        }
+
+        .pay-table tr.t2 th {
+            background: #e9f3f7 !important;
+        }
+
+        .pay-table tr.t1 th {
+            background: #eee !important
+        }
+
+        .pay-table td {
+            background: #fff !important
+        }
+
+        .pay-table .item0 {
+            padding: 0;
+            margin: 0;
+            font-size: 12px;
+        }
+
+        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
+        }
+
+        #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
+        }
+
+        .popup-cfm-btn, .tips-cfm-btn {
+            background: #3daae9;
+            color: #fff;
+            border: none
+        }
+
+        .tips-cfm-btn {
+            width: 100px;
+            height: 40px;
+            margin: auto;
+            display: block;
+            -webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px
+        }
+
+        .popup-cancel-btn {
+            background: #fff;
+            color: #555;
+            border: 1px solid #ddd;
+            margin-left: 20px
+        }
+
+        .popup-tips {
+            color: red;
+            display: none
+        }
+
+        #close-btn, #close-btn1 {
+            top: 8px;
+            right: 10px;
+            width: 18px;
+            position: absolute;
+            cursor: pointer
+        }
+
+        .tips-input-wrapper {
+            width: 100px
+        }
+
+        .reset-btn {
+            background: #fff;
+            color: #555;
+            border: 1px solid #ddd;
+            margin-right: 20px
+        }
+
+        .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: 435px
+        }
+
+        .pay-status label {
+            margin-left: 0
+        }
+
+        .pay-status label:first-child {
+            margin-left: 10px
+        }
+
+        .zeroCost .message {
+            display: none;
+            position: absolute;
+            background: #FFF;
+            white-space: nowrap;
+            border: 1px solid black;
+
+        }
+
+        .zeroCost:hover .message {
             display: inline-block;
             color: black;
             padding: 5px;
             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}
+
+        .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">
@@ -88,6 +330,7 @@
 <ul class="nav nav-tabs">
     <li class="active tab-li"><a href="${ctx}/shopOrder/checkPaymentOrder">订单财务信息</a></li>
 </ul>
+
 <form:form id="searchForm" onsubmit="submitFunc()" modelAttribute="newOrder"
            action="${ctx}/shopOrder/checkPaymentOrder" method="post" class="breadcrumb form-search">
     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
@@ -188,7 +431,8 @@
                         <c:if test="${s.status eq 0 || s.status eq 4 || s.status eq 5 || s.status eq 6 || s.status eq 7}">${fns:getDictLabel(s.status,"order_detail_status","" )}</c:if>
                     </td>
                     <td>
-                        <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"  style="text-decoration: underline">
+                        <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>
@@ -208,7 +452,8 @@
                         (余额抵扣:<fmt:formatNumber value="${s.balancePayFee}" type="number" pattern="#,##0.00"/>)
                     </td>
                     <td>
-                        <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"  style="text-decoration: underline">
+                        <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
+                           style="text-decoration: underline">
                             <c:if test="${s.alreadyReceipt eq '----'}">
                                 ${s.alreadyReceipt}
                             </c:if>
@@ -223,7 +468,8 @@
                         <c:if test="${s.payStatus == 2}"><font color="#ff8c00">部分付款</font></c:if>
                         <c:if test="${s.payStatus == 3}"><font color="green">已付款</font>
                             <c:if test="${s.zeroCostFlag eq 1}">
-                                <a href="javascript:;" class="zeroCost"><span><img src="/static/images/info.jpg" style="width: 15px;margin-bottom: 4px"></span>
+                                <a href="javascript:;" class="zeroCost"><span><img src="/static/images/info.jpg"
+                                                                                   style="width: 15px;margin-bottom: 4px"></span>
                                     <div class="message">
                                         <span>商品成本为0,直接置为已付款,无需付款供应商</span>
                                     </div>
@@ -302,26 +548,36 @@
                     <tr class="t2">
                         <td colspan="3">${so.shopOrderNo}(${so.shopOrderID})</td>
                         <td colspan="3">${so.shopName}</td>
-                        <td colspan="2" class="product-fee"><fmt:formatNumber value="${so.shopProductAmount}" type="number" pattern="#,##0.00"/></td>
-                        <td colspan="2"><fmt:formatNumber value="${so.payedShopAmount}" type="number" pattern="#,##0.00"/></td>
+                        <td colspan="2" class="product-fee"><fmt:formatNumber value="${so.shopProductAmount}"
+                                                                              type="number" pattern="#,##0.00"/></td>
+                        <td colspan="2"><fmt:formatNumber value="${so.payedShopAmount}" type="number"
+                                                          pattern="#,##0.00"/></td>
                         <td>
                             <c:if test="${so.refundAmount > 0}">
                                 <fmt:formatNumber value="${so.refundAmount}" type="number" pattern="#,##0.00"/>
                             </c:if>
                         </td>
                         <td colspan="2">
-                            <fmt:formatNumber value="${so.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
+                            <c:if test="${so.differenceType ne 1 && so.differenceType ne 2 }">
+                                <font color="#E15616"><fmt:formatNumber value="${so.shouldPayShopAmount}" type="number"
+                                                                        pattern="#,##0.00"/></font>
+                            </c:if>
+                                  <%--1少付2多付--%>
                             <c:if test="${so.differenceType eq 1 && so.differencePrice > 0}">
-                                <font color="red">(需补差价¥${so.differencePrice})</font>
+                                <font color="black">${so.shouldPayShopAmount+so.differencePrice}</font><font color="red">(原应付:${so.shouldPayShopAmount},已补差价:${so.differencePrice})</font>
                             </c:if>
                             <c:if test="${so.differenceType eq 2 && so.differencePrice > 0}">
-                                <font color="red">(需退差价¥${so.differencePrice})</font>
+                                <font color="black">${so.shouldPayShopAmount-so.differencePrice}</font><font color="red">(原应付:${so.shouldPayShopAmount},已退差价:${so.differencePrice})</font>
                             </c:if>
+
                         </td>
-                        <td colspan="3"><fmt:formatNumber value="${so.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
-                        <td class="product-freight"><fmt:formatNumber value="${so.shopPostFee}" type="number" pattern="#,##0.00"/></td>
+                        <td colspan="3"><fmt:formatNumber value="${so.shopTaxFee}" type="number"
+                                                          pattern="#,##0.00"/></td>
+                        <td class="product-freight"><fmt:formatNumber value="${so.shopPostFee}" type="number"
+                                                                      pattern="#,##0.00"/></td>
                         <td><fmt:formatNumber value="${so.shopOtherFee}" type="number" pattern="#,##0.00"/></td>
-                        <td><c:if test="${empty so.costType || so.costType == '1'}">固定成本</c:if><c:if test="${so.costType == '2'}">比例成本</c:if></td>
+                        <td><c:if test="${empty so.costType || so.costType == '1'}">固定成本</c:if><c:if
+                                test="${so.costType == '2'}">比例成本</c:if></td>
                     </tr>
                     <tr>
                         <th colspan="3">商品名</th>
@@ -340,15 +596,16 @@
                             <td colspan="3" class="product-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}
+                                    ${p.name}
                             </td>
                             <td style="width:80px;">${p.unit}</td>
                             <td class="p-num" data-num="${p.num + p.presentNum}">
-                                ${p.num}
+                                    ${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"/>
+                            <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)?'不含税-能开票':'不含税-不能开票'})
@@ -362,10 +619,14 @@
                                     ---
                                 </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"/>
+                                    <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 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>${(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>${(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><c:choose>
@@ -373,11 +634,15 @@
                                     ---
                                 </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"/>
+                                    <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><fmt:formatNumber value="${p.costPrice}" type="number" pattern="#,##0.00"/></td>
-                            <td colspan="2"><fmt:formatNumber value="${p.costPrice * (p.num + p.presentNum - p.returnedNum)}" type="number" pattern="#,##0.00"/></td>
+                            <td colspan="2"><fmt:formatNumber
+                                    value="${p.costPrice * (p.num + p.presentNum - p.returnedNum)}" type="number"
+                                    pattern="#,##0.00"/></td>
                         </tr>
                     </c:forEach>
                 </c:forEach>

+ 652 - 388
src/main/webapp/WEB-INF/views/modules/order/cmPayShopCheck.jsp

@@ -1,151 +1,383 @@
 <%@ page contentType="text/html;charset=UTF-8" %>
-<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<%@ 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-list-item{margin-bottom:30px}
-		.pay-table{width:96%;margin-left:2%;margin-bottom:10px}
-		.pay-table th{background:#f9f9f9}
-		.pay-table tr:first-child th{background:#eee !important}
-		.pay-table td{background:#fff !important}
-		.supplier-fee{text-align:left !important;padding-top:20px !important;padding-left:20px !important}
-		.need-to-pay{width:90px}
-		.payment-form-bottom label{width:140px}
-		.used-amount{width:80px;margin-top:6px}
-		.process-details span{width:140px;margin-left:50px;font-weight:600}
-		.process-for-label{margin-left:0 !important}
-		.process-details div{display:inline-block}
-		.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}
-		.check-cfm-btn{background:#3daae9;color:#fff}
-		.cfm-btn:active,.return-btn:active{background:#ddd;color:#fff}
-		.mask{width:100%;height:100%;position:fixed;top:0;background:rgba(0,0,0,0.7);display:none}
-		.tips-popup-content{width:40%;height:auto;padding-bottom:30px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}
-		.tips-popup-content div{width:100%;text-align:center}
-		.tips-popup-content{width:30%}
-		.tips-popup-content p{text-align:center;padding:80px;font-size:20px}
-		.tips-popup-content h4{padding-left:10px;height:40px;line-height:40px;border-bottom:1px solid #eee;margin-bottom:20px}
-		.tips-cfm-btn,.tips-cancel-btn,.check-blue-btn,.check-grey-btn{width:100px;height:40px;margin:auto;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;background:#3daae9;color:#fff;border:none}
-		.refuse-btn{margin-left:50px}
-		.return-btn,.tips-cancel-btn,.check-grey-btn{background:#fff;color:#555;margin-left:50px}
-		.tips-cancel-btn,.check-grey-btn{border:1px solid #ddd;margin-left:20px;display:none}
-		#close-btn1{top:8px;right:10px;width:18px;position:absolute;cursor:pointer}
-		.tips-popup-reason .tips-popup-content{height:250px}
-		.tips-popup-reason .tips-popup-content div{position:absolute;bottom:15px}
-		.tips-popup-reason .check-grey-btn{display:inline-block}
-		#refuse-reason{width:80%;height:48%;left:8%;position:absolute;resize:none}
-		.tips-popup-reason h5{color:#555;padding-left:8%;margin-bottom:4px;margin-top:-12px}
-		.red{color:red;}
-		.payment-form-bottom .wipeImgs{height:auto;padding:8px 0;}
-		.wipeImgs img{width:120px;height:90px;background-color:#eee;margin-right:15px;}
-		.weishaIcon {background:darkorange;color:white;margin:0 0px;padding:0 3px;font-style:normal;font-size: 12px; display:inline-block;border-radius:2px}
-	</style>
+    <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-list-item {
+            margin-bottom: 30px
+        }
+
+        .pay-table {
+            width: 96%;
+            margin-left: 2%;
+            margin-bottom: 10px
+        }
+
+        .pay-table th {
+            background: #f9f9f9
+        }
+
+        .pay-table tr:first-child th {
+            background: #eee !important
+        }
+
+        .pay-table td {
+            background: #fff !important
+        }
+
+        .supplier-fee {
+            text-align: left !important;
+            padding-top: 20px !important;
+            padding-left: 20px !important
+        }
+
+        .need-to-pay {
+            width: 90px
+        }
+
+        .payment-form-bottom label {
+            width: 140px
+        }
+
+        .used-amount {
+            width: 80px;
+            margin-top: 6px
+        }
+
+        .process-details span {
+            width: 140px;
+            margin-left: 50px;
+            font-weight: 600
+        }
+
+        .process-for-label {
+            margin-left: 0 !important
+        }
+
+        .process-details div {
+            display: inline-block
+        }
+
+        .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
+        }
+
+        .check-cfm-btn {
+            background: #3daae9;
+            color: #fff
+        }
+
+        .cfm-btn:active, .return-btn:active {
+            background: #ddd;
+            color: #fff
+        }
+
+        .mask {
+            width: 100%;
+            height: 100%;
+            position: fixed;
+            top: 0;
+            background: rgba(0, 0, 0, 0.7);
+            display: none
+        }
+
+        .tips-popup-content {
+            width: 40%;
+            height: auto;
+            padding-bottom: 30px;
+            background: #fff;
+            -webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px;
+            position: absolute;
+            top: 50%;
+            left: 50%;
+            transform: translate(-50%, -50%)
+        }
+
+        .tips-popup-content div {
+            width: 100%;
+            text-align: center
+        }
+
+        .tips-popup-content {
+            width: 30%
+        }
+
+        .tips-popup-content p {
+            text-align: center;
+            padding: 80px;
+            font-size: 20px
+        }
+
+        .tips-popup-content h4 {
+            padding-left: 10px;
+            height: 40px;
+            line-height: 40px;
+            border-bottom: 1px solid #eee;
+            margin-bottom: 20px
+        }
+
+        .tips-cfm-btn, .tips-cancel-btn, .check-blue-btn, .check-grey-btn {
+            width: 100px;
+            height: 40px;
+            margin: auto;
+            -webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px;
+            background: #3daae9;
+            color: #fff;
+            border: none
+        }
+
+        .refuse-btn {
+            margin-left: 50px
+        }
+
+        .return-btn, .tips-cancel-btn, .check-grey-btn {
+            background: #fff;
+            color: #555;
+            margin-left: 50px
+        }
+
+        .tips-cancel-btn, .check-grey-btn {
+            border: 1px solid #ddd;
+            margin-left: 20px;
+            display: none
+        }
+
+        #close-btn1 {
+            top: 8px;
+            right: 10px;
+            width: 18px;
+            position: absolute;
+            cursor: pointer
+        }
+
+        .tips-popup-reason .tips-popup-content {
+            height: 250px
+        }
+
+        .tips-popup-reason .tips-popup-content div {
+            position: absolute;
+            bottom: 15px
+        }
+
+        .tips-popup-reason .check-grey-btn {
+            display: inline-block
+        }
+
+        #refuse-reason {
+            width: 80%;
+            height: 48%;
+            left: 8%;
+            position: absolute;
+            resize: none
+        }
+
+        .tips-popup-reason h5 {
+            color: #555;
+            padding-left: 8%;
+            margin-bottom: 4px;
+            margin-top: -12px
+        }
+
+        .red {
+            color: red;
+        }
+
+        .payment-form-bottom .wipeImgs {
+            height: auto;
+            padding: 8px 0;
+        }
+
+        .wipeImgs img {
+            width: 120px;
+            height: 90px;
+            background-color: #eee;
+            margin-right: 15px;
+        }
+
+        .weishaIcon {
+            background: darkorange;
+            color: white;
+            margin: 0 0px;
+            padding: 0 3px;
+            font-style: normal;
+            font-size: 12px;
+            display: inline-block;
+            border-radius: 2px
+        }
+    </style>
 </head>
 <body>
-	<ul class="nav nav-tabs">
-		<li><a href="${ctx}/order/cmPayShop/">付款管理</a></li>
-		<li class="active"><a href="${ctx}/order/cmPayShop/toCheck?id=${cmPayShop.id}">付款审核</a></li>
-	</ul><br/>
-		<div class="payment-form">
-		<h4>付款单</h4>
-		<div class="payment-form-top">
-			<div>
-				<label><span class="required">* </span>付款单名称:</label>
-				<span>${cmPayShop.name}</span>
-			</div>
-			<div>
-				<label>供应商名称:</label>
-				<span>${cmPayShop.shopName}</span>
-			</div>
-			<div>
-				<label><em class="required">* </em>付款账号:</label>
-				<span>户名:${cmPayShop.bankAccountName}</span>
-				<span>账号:${cmPayShop.bankAccount}</span>
-				<span>开户行:${cmPayShop.bankName}</span>
-				<span>账户类型:
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/order/cmPayShop/">付款管理</a></li>
+    <li class="active"><a href="${ctx}/order/cmPayShop/toCheck?id=${cmPayShop.id}">付款审核</a></li>
+</ul>
+<br/>
+<div class="payment-form">
+    <h4>付款单</h4>
+    <div class="payment-form-top">
+        <div>
+            <label><span class="required">* </span>付款单名称:</label>
+            <span>${cmPayShop.name}</span>
+        </div>
+        <div>
+            <label>供应商名称:</label>
+            <span>${cmPayShop.shopName}</span>
+        </div>
+        <div>
+            <label><em class="required">* </em>付款账号:</label>
+            <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>
-			</div>
-		</div>
-		<div class="payment-form-content">
-			<c:forEach items="${cmPayShop.shopOrders}" var="s">
-            	<%--涛姐遍历下面这个table--%>
-				<table class="table table-striped table-bordered table-condensed pay-table">
-					<tr>
-						<th>子订单编号(ID)</th>
-						<th colspan="3">订单编号(ID)</th>
-						<th colspan="2">订单金额</th>
-						<th colspan="3">下单时间</th>
-						<th>收款状态</th>
-						<th>收款金额</th>
-						<th colspan="2">经理折扣</th>
-						<th colspan="3">成本类型</th>
-						<th colspan="2">付第三方</th>
-					</tr>
-					<tr>
-						<td>${s.shopOrderNo}(${s.shopOrderID})</td>
-						<td colspan="3">${s.orderNo}(${s.orderID})</td>
-						<td colspan="2">${s.payTotalFee}</td>
-						<td colspan="3">${s.orderTime}</td>
-						<%--此处对应订单列表收款状态--%>
-						<td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline">
+        </div>
+    </div>
+    <div class="payment-form-content">
+        <c:forEach items="${cmPayShop.shopOrders}" var="s">
+            <%--涛姐遍历下面这个table--%>
+            <table class="table table-striped table-bordered table-condensed pay-table">
+                <tr>
+                    <th>子订单编号(ID)</th>
+                    <th colspan="3">订单编号(ID)</th>
+                    <th colspan="2">订单金额</th>
+                    <th colspan="3">下单时间</th>
+                    <th>收款状态</th>
+                    <th>收款金额</th>
+                    <th colspan="2">经理折扣</th>
+                    <th colspan="3">成本类型</th>
+                    <th colspan="2">付第三方</th>
+                </tr>
+                <tr>
+                    <td>${s.shopOrderNo}(${s.shopOrderID})</td>
+                    <td colspan="3">${s.orderNo}(${s.orderID})</td>
+                    <td colspan="2">${s.payTotalFee}</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="2">
-							<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}">
+                    <td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
+                           style="text-decoration: underline">${s.receiptTotalFee}</a></td>
+                    <td colspan="2">
+                        <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>
+                                        <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>)
+                                        <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="3"><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if test="${s.costType == '2'}">比例成本</c:if></td>
-						<td colspan="2" class="third-party-fee"><fmt:formatNumber value="${s.shopOtherFee}" type="number" pattern="#,##0.00"/></td>
-					</tr>
-					<tr>
-						<th>供应商</th>
-						<th colspan="3">机构</th>
-						<th>机构运费</th>
-						<th>供应商运费</th>
-						<th colspan="3">商品费</th>
-						<th colspan="2">付款状态</th>
-						<th colspan="2">采美佣金</th>
-						<th colspan="3">应付税费</th>
-						<th colspan="2">付供应商</th>
-					</tr>
-					<tr>
-						<td>${s.shopName}</td>
-						<td colspan="3">${s.buyer}<c:if test="${s.organizeID == 3}"></c:if></td>
-						<td>
+                            </c:if>
+                        </c:if>
+                        <c:if test="${s.discountTotalFee le 0}">¥0.00</c:if>
+                    </td>
+                    <td colspan="3"><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if
+                            test="${s.costType == '2'}">比例成本</c:if></td>
+                    <td colspan="2" class="third-party-fee"><fmt:formatNumber value="${s.shopOtherFee}" type="number"
+                                                                              pattern="#,##0.00"/></td>
+                </tr>
+                <tr>
+                    <th>供应商</th>
+                    <th colspan="3">机构</th>
+                    <th>机构运费</th>
+                    <th>供应商运费</th>
+                    <th colspan="3">商品费</th>
+                    <th colspan="2">付款状态</th>
+                    <th colspan="2">采美佣金</th>
+                    <th colspan="3">应付税费</th>
+                    <th colspan="2">付供应商</th>
+                </tr>
+                <tr>
+                    <td>${s.shopName}</td>
+                    <td colspan="3">${s.buyer}<c:if test="${s.organizeID == 3}"></c:if></td>
+                    <td>
                         <c:if test="${s.freight == 0}">
                             包邮
                         </c:if>
@@ -160,141 +392,169 @@
                             <c:if test="${s.returnedFreightFlag eq true}"><font color="red">(已退)</font></c:if>
                         </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="2" class="payCm-t"></td>
-						<td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
-						<td colspan="2" class="supplier-fee">
-							<div>应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
-								<c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
-									<font color="red">(需补差价¥${s.differencePrice})</font>
-								</c:if>
-								<c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
-									<font color="red">(需退差价¥${s.differencePrice})</font>
-								</c:if>,
-								 已付:<fmt:formatNumber value="${s.payedShopAmount}" type="number" pattern="#,##0.00"/>
-							</div>
-							<div>
-								<c:if test="${s.refundAmount > 0}">
-									<span style="color:red">退款:<fmt:formatNumber value="${s.refundAmount}" type="number" pattern="#,##0.00"/></span>,
-								</c:if>
-								待付: <fmt:formatNumber value="${s.waitPayShop}" type="number" pattern="#,##0.00"/>
-							</div>
-							<c:if test="${s.wipePayment > 0}">
-								<div>
-									付款抹平:<fmt:formatNumber value="${s.wipePayment}" type="number" pattern="#,##0.00"/>
-								</div>
-							</c:if>
-						</td>
-					</tr>
-					<tr>
-						<th>商品名</th>
-						<th>规格</th>
-						<th>数量<%--(赠品)--%></th>
-						<th>退货</th>
-						<th colspan="2">单价</th>
-						<th colspan="3">机构税率 / 单税费 / 总税费</th>
-						<th colspan="2">总价</th>
-						<th>佣金(单)</th>
-						<th>佣金(总)</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}">
-									<font color="red">
-										(${p.includedTax eq 1?'含税':(p.invoiceType eq 1 or p.invoiceType eq 2)?'不含税-能开票':'不含税-不能开票'})
-									</font>
-								</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>
-							<c:if test="${empty p.touchPrice}">
-								<td><fmt:formatNumber value="${p.discountPrice + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax}" pattern="#,##0.00"/></td>
-								<td class="payCm"><fmt:formatNumber value="${(p.discountPrice + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax) * (p.num + p.presentNum - p.returnedNum)}" pattern="#,##0.00"/></td>
-							</c:if>
-							<c:if test="${!empty p.touchPrice}">
-								<td><fmt:formatNumber value="${p.touchPrice + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax}" pattern="#,##0.00"/></td>
-								<td class="payCm"><fmt:formatNumber value="${(p.touchPrice + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax) * (p.num + p.presentNum - p.returnedNum)}" pattern="#,##0.00"/></td>
-							</c:if>
-							<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>
-			</c:forEach>
-		</div>
-		<div class="payment-form-bottom">
-			<div >
-				<label style="font-weight: bold; font-size:18px">${cmPayShop.paymentType eq 2 ? "需补供应商差价":"付供应商总金额"}:</label>
-				<span id="totalAmount" style="font-weight: bold; font-size:18px"><fmt:formatNumber value="${cmPayShop.totalAmount}" pattern="#,##0.00"/> </span>
-				<c:if test="${cmPayShop.wipePayment > 0}">
-					<span class="red">(付款抹平总额:¥<fmt:formatNumber value="${cmPayShop.wipePayment}" pattern="#,##0.00"/>)</span>
-				</c:if>
-			</div>
-			<c:if test="${cmPayShop.wipePayment > 0}">
-				<div>
-					<label>抹平备注:</label>
-					<span>${cmPayShop.wipeRemarks}</span>
-				</div>
-				<c:if test="${not empty cmPayShop.wipeImages}">
-                    <div class="wipeImgs">
-                        <label>图片:</label>
-                        <c:forEach items="${cmPayShop.wipeImages}" var="wi" varStatus="wIndex">
-                            <img src="${wi}">
-                        </c:forEach>
-                    </div>
-                </c:if>
-			</c:if>
-			<div>
-				<label>余额支付:</label>
-				总余额:<span id="rebateAmount">${cmPayShop.rebateAmount}</span>,
-				可用余额:<span id="ableRebateAmount">${cmPayShop.ableRebateAmount}</span>,
-				使用:${cmPayShop.balancePayFee},
-				剩余:<span id="remainingBalance">${cmPayShop.rebateAmount - cmPayShop.balancePayFee}</span>
-			</div>
-			<div>
-				<label style="font-weight: bold; font-size:18px">转账支付:</label>
-				<span id="transferPayFee" style="font-weight: bold; font-size:18px"><fmt:formatNumber value="${cmPayShop.transferPayFee}" pattern="#,##0.00"/> </span>
-				<label>付款银行:</label><span>
+                    <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="2" class="payCm-t"></td>
+                    <td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number"
+                                                                    pattern="#,##0.00"/></td>
+                    <td colspan="2" class="supplier-fee">
+                        <div>
+                            <c:if test="${s.differenceType ne 1 && s.differenceType ne 2}">应付:<fmt:formatNumber
+                                    value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
+                            </c:if>
+                            <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
+                                <font color="black">${s.shouldPayShopAmount+s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已补差价:${s.differencePrice})</font>
+                            </c:if>
+                            <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
+                                <font color="black">${s.shouldPayShopAmount-s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已退差价:${s.differencePrice})</font>
+                            </c:if>
+                            , 已付:<fmt:formatNumber value="${s.payedShopAmount}" type="number" pattern="#,##0.00"/>
+                        </div>
+                        <div>
+                            <c:if test="${s.refundAmount > 0}">
+                                <span style="color:red">退款:<fmt:formatNumber value="${s.refundAmount}" type="number"
+                                                                             pattern="#,##0.00"/></span>,
+                            </c:if>
+                            待付: <fmt:formatNumber value="${s.waitPayShop}" type="number" pattern="#,##0.00"/>
+                        </div>
+                        <c:if test="${s.wipePayment > 0}">
+                            <div>
+                                付款抹平:<fmt:formatNumber value="${s.wipePayment}" type="number" pattern="#,##0.00"/>
+                            </div>
+                        </c:if>
+                    </td>
+                </tr>
+                <tr>
+                    <th>商品名</th>
+                    <th>规格</th>
+                    <th>数量<%--(赠品)--%></th>
+                    <th>退货</th>
+                    <th colspan="2">单价</th>
+                    <th colspan="3">机构税率 / 单税费 / 总税费</th>
+                    <th colspan="2">总价</th>
+                    <th>佣金(单)</th>
+                    <th>佣金(总)</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}">
+                                <font color="red">
+                                    (${p.includedTax eq 1?'含税':(p.invoiceType eq 1 or p.invoiceType eq 2)?'不含税-能开票':'不含税-不能开票'})
+                                </font>
+                            </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>
+                        <c:if test="${empty p.touchPrice}">
+                            <td><fmt:formatNumber
+                                    value="${p.discountPrice + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax}"
+                                    pattern="#,##0.00"/></td>
+                            <td class="payCm"><fmt:formatNumber
+                                    value="${(p.discountPrice + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax) * (p.num + p.presentNum - p.returnedNum)}"
+                                    pattern="#,##0.00"/></td>
+                        </c:if>
+                        <c:if test="${!empty p.touchPrice}">
+                            <td><fmt:formatNumber
+                                    value="${p.touchPrice + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax}"
+                                    pattern="#,##0.00"/></td>
+                            <td class="payCm"><fmt:formatNumber
+                                    value="${(p.touchPrice + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax) * (p.num + p.presentNum - p.returnedNum)}"
+                                    pattern="#,##0.00"/></td>
+                        </c:if>
+                        <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>
+        </c:forEach>
+    </div>
+    <div class="payment-form-bottom">
+        <div>
+            <label style="font-weight: bold; font-size:18px">${cmPayShop.paymentType eq 2 ? "需补供应商差价":"付供应商总金额"}:</label>
+            <span id="totalAmount" style="font-weight: bold; font-size:18px"><fmt:formatNumber
+                    value="${cmPayShop.totalAmount}" pattern="#,##0.00"/> </span>
+            <c:if test="${cmPayShop.wipePayment > 0}">
+                <span class="red">(付款抹平总额:¥<fmt:formatNumber value="${cmPayShop.wipePayment}"
+                                                             pattern="#,##0.00"/>)</span>
+            </c:if>
+        </div>
+        <c:if test="${cmPayShop.wipePayment > 0}">
+            <div>
+                <label>抹平备注:</label>
+                <span>${cmPayShop.wipeRemarks}</span>
+            </div>
+            <c:if test="${not empty cmPayShop.wipeImages}">
+                <div class="wipeImgs">
+                    <label>图片:</label>
+                    <c:forEach items="${cmPayShop.wipeImages}" var="wi" varStatus="wIndex">
+                        <img src="${wi}">
+                    </c:forEach>
+                </div>
+            </c:if>
+        </c:if>
+        <div>
+            <label>余额支付:</label>
+            总余额:<span id="rebateAmount">${cmPayShop.rebateAmount}</span>,
+            可用余额:<span id="ableRebateAmount">${cmPayShop.ableRebateAmount}</span>,
+            使用:${cmPayShop.balancePayFee},
+            剩余:<span id="remainingBalance">${cmPayShop.rebateAmount - cmPayShop.balancePayFee}</span>
+        </div>
+        <div>
+            <label style="font-weight: bold; font-size:18px">转账支付:</label>
+            <span id="transferPayFee" style="font-weight: bold; font-size:18px"><fmt:formatNumber
+                    value="${cmPayShop.transferPayFee}" pattern="#,##0.00"/> </span>
+            <label>付款银行:</label><span>
 					<select name="payType">
 						<option value="1">建设银行7297</option>
 						<option value="2">中信银行0897</option>
@@ -303,135 +563,139 @@
 						<option value="5">广发银行5461</option>
 					</select>
 				</span>
-				<label>付款时间:</label>
-				<span>${cmPayShop.payTime}</span>
-				<input name="id" value="${cmPayShop.id}" id="id" type="hidden">
-			</div>
-			<div class="process-details">
-				<label>申请人:</label><div class="process-for-label">${cmPayShop.applicantName}</div>
-				<span>申请时间:</span><div>${cmPayShop.applyTime}</div>
-				<span>审核人:</span><div>
-										<c:if test="${cmPayShop.status == 1 || cmPayShop.status == 2}">
-											${cmPayShop.reviewerName}
-										</c:if>
-									</div>
-				<span>审核时间:</span><div>
-										<c:if test="${cmPayShop.status == 1 || cmPayShop.status == 2}">
-											${cmPayShop.reviewTime}
-										</c:if>
-										</div>
-			</div>
-		</div>
-		<div class="check-btn">
-			<button class="check-cfm-btn" type="button">审核通过</button>
-			<button class="refuse-btn" type="button">审核不通过</button>
-			<button class="return-btn" type="button" onclick="history.go(-1)">返回</button>
-		</div>
-	</div>
-	<%--</form>--%>
-	<div class="mask tips-popup-reason">
-		<div class="tips-popup-content">
-			<h4>确认提示</h4>
-			<h5><span class="required">* </span>审核不通过原因:</h5>
-			<textarea id="refuse-reason" cols="30" rows="10" maxlength="200"></textarea>
-			<div>
-				<button class="check-cfm-btn check-blue-btn" type="button">确定</button>
-				<button class="check-grey-btn" type="button">取消</button>
-			</div>
-			<img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">
-		</div>
-	</div>
-	<div class="mask tips-popup">
-		<div class="tips-popup-content">
-			<h4>信息提示</h4>
-			<p></p>
-			<div>
-				<button class="tips-cfm-btn tips-cfm-directly" type="button">确定</button>
-				<button class="tips-cancel-btn" type="button">取消</button>
-			</div>
-			<img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">
-		</div>
-	</div>
-	<script>
-		(function(){
-            var payTableEle = $('.pay-table'),
-				accessFlag = true,
-				unaccessFlag = true,
-                payProductEle = $('.pay-product-item');
-            payTableEle.each(function (i,l) {
-                var productLength = $(this).find('.pay-product-item').length;
-                // 商品列表合并单元格
-                // $(this).find('.mergeRows').attr('rowspan',productLength);
-            });
-
-            $('.pay-table').each(function(){
-                var thisEle = $(this),
-                    totalComissionVal = 0,
-                    resVal = '';
-                totalComissionEle = thisEle.find('.payCm'),
-                    comissionEle = thisEle.find('.payCm-t'),
-                    thirdPartyVal = thisEle.find('.third-party-fee').text().replace(',',''),
-                    freightVal = thisEle.find('.freight').text().replace(',','');
-                totalComissionEle.each(function(){
-                    totalComissionVal += Number($(this).text().replace(',',''));
-                })
-                resVal = (totalComissionVal - thirdPartyVal - freightVal).toFixed(2);
-                comissionEle.text(resVal);
-            })
+            <label>付款时间:</label>
+            <span>${cmPayShop.payTime}</span>
+            <input name="id" value="${cmPayShop.id}" id="id" type="hidden">
+        </div>
+        <div class="process-details">
+            <label>申请人:</label>
+            <div class="process-for-label">${cmPayShop.applicantName}</div>
+            <span>申请时间:</span>
+            <div>${cmPayShop.applyTime}</div>
+            <span>审核人:</span>
+            <div>
+                <c:if test="${cmPayShop.status == 1 || cmPayShop.status == 2}">
+                    ${cmPayShop.reviewerName}
+                </c:if>
+            </div>
+            <span>审核时间:</span>
+            <div>
+                <c:if test="${cmPayShop.status == 1 || cmPayShop.status == 2}">
+                    ${cmPayShop.reviewTime}
+                </c:if>
+            </div>
+        </div>
+    </div>
+    <div class="check-btn">
+        <button class="check-cfm-btn" type="button">审核通过</button>
+        <button class="refuse-btn" type="button">审核不通过</button>
+        <button class="return-btn" type="button" onclick="history.go(-1)">返回</button>
+    </div>
+</div>
+<%--</form>--%>
+<div class="mask tips-popup-reason">
+    <div class="tips-popup-content">
+        <h4>确认提示</h4>
+        <h5><span class="required">* </span>审核不通过原因:</h5>
+        <textarea id="refuse-reason" cols="30" rows="10" maxlength="200"></textarea>
+        <div>
+            <button class="check-cfm-btn check-blue-btn" type="button">确定</button>
+            <button class="check-grey-btn" type="button">取消</button>
+        </div>
+        <img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">
+    </div>
+</div>
+<div class="mask tips-popup">
+    <div class="tips-popup-content">
+        <h4>信息提示</h4>
+        <p></p>
+        <div>
+            <button class="tips-cfm-btn tips-cfm-directly" type="button">确定</button>
+            <button class="tips-cancel-btn" type="button">取消</button>
+        </div>
+        <img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">
+    </div>
+</div>
+<script>
+    (function () {
+        var payTableEle = $('.pay-table'),
+            accessFlag = true,
+            unaccessFlag = true,
+            payProductEle = $('.pay-product-item');
+        payTableEle.each(function (i, l) {
+            var productLength = $(this).find('.pay-product-item').length;
+            // 商品列表合并单元格
+            // $(this).find('.mergeRows').attr('rowspan',productLength);
+        });
 
-            $('.tips-cancel-btn, #close-btn1').on('click',function() {
-                $('.mask').hide();
-            })
-            $('.tips-cfm-directly').on('click',function() {
-                if($('.tips-cfm-btn').hasClass('tips-cfm-directly')) {
-                    $('.tips-popup').hide();
-                } else {
-                    $('#form').submit();
-                }
-            })
-			$('.refuse-btn').on('click',function() {
-			    $('.tips-popup-reason').show();
-			})
-            $('.check-grey-btn').on('click',function() {
-                $('.tips-popup-reason').hide();
+        $('.pay-table').each(function () {
+            var thisEle = $(this),
+                totalComissionVal = 0,
+                resVal = '';
+            totalComissionEle = thisEle.find('.payCm'),
+                comissionEle = thisEle.find('.payCm-t'),
+                thirdPartyVal = thisEle.find('.third-party-fee').text().replace(',', ''),
+                freightVal = thisEle.find('.freight').text().replace(',', '');
+            totalComissionEle.each(function () {
+                totalComissionVal += Number($(this).text().replace(',', ''));
             })
+            resVal = (totalComissionVal - thirdPartyVal - freightVal).toFixed(2);
+            comissionEle.text(resVal);
+        })
 
-            function showTips(title,text) {
-                $('.tips-popup h4').text(title);
-                $('.tips-popup p').text(text);
-                $('.tips-popup').show();
+        $('.tips-cancel-btn, #close-btn1').on('click', function () {
+            $('.mask').hide();
+        })
+        $('.tips-cfm-directly').on('click', function () {
+            if ($('.tips-cfm-btn').hasClass('tips-cfm-directly')) {
+                $('.tips-popup').hide();
+            } else {
+                $('#form').submit();
             }
+        })
+        $('.refuse-btn').on('click', function () {
+            $('.tips-popup-reason').show();
+        })
+        $('.check-grey-btn').on('click', function () {
+            $('.tips-popup-reason').hide();
+        })
+
+        function showTips(title, text) {
+            $('.tips-popup h4').text(title);
+            $('.tips-popup p').text(text);
+            $('.tips-popup').show();
+        }
+
 
+        function submitForm() {
+            $('.tips-cfm-btn').removeClass('tips-cfm-directly').addClass('submit-now');
+            $('.tips-cancel-btn').hide();
+            showTips('信息提示', '审核通过');
+        }
 
-            function submitForm() {
-                $('.tips-cfm-btn').removeClass('tips-cfm-directly').addClass('submit-now');
-                $('.tips-cancel-btn').hide();
-                showTips('信息提示','审核通过');
-			}
-
-			$('.check-cfm-btn').on('click',function(e) {
-				var payType = $('select[name="payType"]').val(),
-						id = $('#id').val();
-			    if($(this).hasClass('check-blue-btn')) {
-                    var textareaVal = $('#refuse-reason').val();
-                    if(!textareaVal.trim()) {
-                        showTips('信息提示','审核原因不能为空');
-                        return false;
-                    }
-                    if(unaccessFlag) {
-						window.location.href = '${ctx}/order/cmPayShop/checkNotPass?id=' + id + '&reason=' + textareaVal;
-						unaccessFlag = false;
-					}
-				} else {
-			    	if(accessFlag) {
-						window.location.href = '${ctx}/order/cmPayShop/checkPass?payType=' + payType + '&id=' + id;
-						accessFlag = false;
-					}
+        $('.check-cfm-btn').on('click', function (e) {
+            var payType = $('select[name="payType"]').val(),
+                id = $('#id').val();
+            if ($(this).hasClass('check-blue-btn')) {
+                var textareaVal = $('#refuse-reason').val();
+                if (!textareaVal.trim()) {
+                    showTips('信息提示', '审核原因不能为空');
+                    return false;
                 }
-            })
+                if (unaccessFlag) {
+                    window.location.href = '${ctx}/order/cmPayShop/checkNotPass?id=' + id + '&reason=' + textareaVal;
+                    unaccessFlag = false;
+                }
+            } else {
+                if (accessFlag) {
+                    window.location.href = '${ctx}/order/cmPayShop/checkPass?payType=' + payType + '&id=' + id;
+                    accessFlag = false;
+                }
+            }
+        })
 
-		})()
+    })()
 
-	</script>
+</script>
 </body>
 </html>

+ 8 - 5
src/main/webapp/WEB-INF/views/modules/order/cmPayShopDetail.jsp

@@ -180,14 +180,17 @@
 					<td colspan="2" class="payCm-t"></td>
 					<td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
 					<td colspan="2" class="supplier-fee">
-						<div>应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
+						<div>
+							<c:if test="${s.differenceType ne 1 && s.differenceType ne 2}">
+								应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
+							</c:if>
 							<c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
-								<font color="red">(需补差价¥${s.differencePrice})</font>
+								<font color="black">${s.shouldPayShopAmount+s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已补差价:${s.differencePrice})</font>
 							</c:if>
 							<c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
-								<font color="red">(需退差价¥${s.differencePrice})</font>
-							</c:if>
-							 已付:<fmt:formatNumber value="${s.payedShopAmount}" type="number" pattern="#,##0.00"/>
+							<font color="black">${s.shouldPayShopAmount-s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已退差价:${s.differencePrice})</font>
+							</c:if>
+							 已付:<fmt:formatNumber value="${s.payedShopAmount}" type="number" pattern="#,##0.00"/>
 						</div>
 						<div>
 							<c:if test="${s.refundAmount > 0}">

+ 6 - 3
src/main/webapp/WEB-INF/views/modules/order/cmPayShopEdit.jsp

@@ -165,12 +165,15 @@
                         <td colspan="2" class="payCm-t"></td>
                         <td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
                         <td colspan="2" class="supplier-fee">
-                            <div>应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
+                            <div>
+                                <c:if test="${s.differenceType ne 1 && s.differenceType ne 2}">
+                                    应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
+                                </c:if>
                                 <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
-                                    <font color="red">(需补差价¥${s.differencePrice})</font>
+                                    <font color="black">${s.shouldPayShopAmount+s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已补差价:${s.differencePrice})</font>
                                 </c:if>
                                 <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
-                                    <font color="red">(需退差价¥${s.differencePrice})</font>
+                                    <font color="black">${s.shouldPayShopAmount-s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已退差价:${s.differencePrice})</font>
                                 </c:if>
                                 ,已付:<fmt:formatNumber value="${s.payedShopAmount}" type="number" pattern="#,##0.00"/>
                             </div>

+ 1000 - 630
src/main/webapp/WEB-INF/views/modules/order/cmPayShopForm.jsp

@@ -1,655 +1,1025 @@
 <%@ page contentType="text/html;charset=UTF-8" %>
-<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
 <html>
 <head>
-	<title>付款单表管理</title>
-	<meta name="decorator" content="default"/>
-<style>
-	.red{color:red;font-style:normal;}
-	.nowrap{white-space:nowrap;}
-	.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-list-item{margin-bottom:30px}
-	.pay-table{width:96%;margin-left:2%;margin-bottom:10px}
-	.pay-table th{background:#f9f9f9}
-	.pay-table tr:first-child th{background:#eee !important}
-	.pay-table td{background:#fff !important}
-	.need-to-pay{width:90px}
-	.payment-form-bottom label{width:140px}
-	.used-amount{width:80px;margin-top:6px}
-	.process-details span{width:140px;margin-left:50px;font-weight:600}
-	.process-for-label{margin-left:0 !important}
-	.process-details div{display:inline-block}
-	.payment-btn{width:96%;margin-left:2%;text-align:center;height:60px;line-height:60px;margin-top:30px}
-	.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}
-	.cfm-btn:active,.return-btn:active{background:#ddd;color:#fff}
-	.mask{width:100%;height:100%;position:fixed;top:0;background:rgba(0,0,0,0.7);display:none}
-	.tips-popup-content{width:40%;height:auto;padding-bottom:30px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}
-	.tips-popup-content div{width:100%;text-align:center}
-	.tips-popup-content{width:30%}
-	.tips-popup-content p{text-align:center;padding:80px;font-size:20px}
-	.tips-popup-content h4{padding-left:10px;height:40px;line-height:40px;border-bottom:1px solid #eee;margin-bottom:20px}
-	.tips-cfm-btn,.tips-cancel-btn{width:100px;height:40px;margin:auto;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;background:#3daae9;color:#fff;border:none}
-	.return-btn,.tips-cancel-btn{background:#fff;color:#555;margin-left:50px}
-	.tips-cancel-btn{border:1px solid #ddd;margin-left:20px;display:none}
-	#close-btn1{top:8px;right:10px;width:18px;position:absolute;cursor:pointer}
-	td.supplier-fee {text-align:left;}
-	td.supplier-fee .wipeBtn{width:auto;white-space:nowrap;height:30px;line-height:30px;display:none;}
-	.inputForm{/*max-width:1200px;*/width:100%;}
-	.inputForm table{width:100%;line-height:18px;margin-bottom:50px;}
-	.inputForm th,.inputForm td{ font-weight: normal; text-align: left; padding: 8px 5px; border-bottom: 1px solid rgb(238, 238, 238); }
-	.inputForm th{width:15%;text-align:right;white-space:nowrap;font-weight:bold;}
-	.inputForm td input[type="text"]{width:320px;height:16px; line-height:16px; }
-	.inputForm td input.short{width:110px;}
-	.inputForm td b.line{margin:0 15px 0 20px;font-weight:normal}
-	.wipeVisible{display:none;}
-	.wipeRemarks{margin:0;}
-	.controls{font-size:0}
-	.select2-choice{width:100px}
-	.upload-content{position:relative;}
-	.upload-content *{margin:0;padding:0;}
-	.upload-content .conList{display:inline-block;margin-right:5px;width:90px;height:90px;background:#e6e6e6;border-radius:5px;position:relative;overflow:hidden}
-	.upload-content .conList li{position:relative;padding:18px 0}
-	.upload-content .conList li img{width:100%;margin:0 !important;padding:0 !important}
-	.upload-content img.cancel-upload{position:absolute;top:0;right:0;cursor:pointer;z-index:100}
-	.upload-content .conList .btn{position:absolute;width:100%;height:100%;top:0;left:0;background:#e6e6e6}
-	.upload-content .conList .btn div{padding-top:20px}
-	.upload-content .conList .btn div span{font-size:35px}
-	.hide-pic{display:none !important}
-	.upload-tips{margin:10px 0}
-	.mask {z-index: 9999;}
-	.weishaIcon {background:darkorange;color:white;margin:0 0px;padding:0 3px;font-style:normal;font-size: 12px; display:inline-block;border-radius:2px}
-</style>
+    <title>付款单表管理</title>
+    <meta name="decorator" content="default"/>
+    <style>
+        .red {
+            color: red;
+            font-style: normal;
+        }
+
+        .nowrap {
+            white-space: nowrap;
+        }
+
+        .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-list-item {
+            margin-bottom: 30px
+        }
+
+        .pay-table {
+            width: 96%;
+            margin-left: 2%;
+            margin-bottom: 10px
+        }
+
+        .pay-table th {
+            background: #f9f9f9
+        }
+
+        .pay-table tr:first-child th {
+            background: #eee !important
+        }
+
+        .pay-table td {
+            background: #fff !important
+        }
+
+        .need-to-pay {
+            width: 90px
+        }
+
+        .payment-form-bottom label {
+            width: 140px
+        }
+
+        .used-amount {
+            width: 80px;
+            margin-top: 6px
+        }
+
+        .process-details span {
+            width: 140px;
+            margin-left: 50px;
+            font-weight: 600
+        }
+
+        .process-for-label {
+            margin-left: 0 !important
+        }
+
+        .process-details div {
+            display: inline-block
+        }
+
+        .payment-btn {
+            width: 96%;
+            margin-left: 2%;
+            text-align: center;
+            height: 60px;
+            line-height: 60px;
+            margin-top: 30px
+        }
+
+        .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
+        }
+
+        .cfm-btn:active, .return-btn:active {
+            background: #ddd;
+            color: #fff
+        }
+
+        .mask {
+            width: 100%;
+            height: 100%;
+            position: fixed;
+            top: 0;
+            background: rgba(0, 0, 0, 0.7);
+            display: none
+        }
+
+        .tips-popup-content {
+            width: 40%;
+            height: auto;
+            padding-bottom: 30px;
+            background: #fff;
+            -webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px;
+            position: absolute;
+            top: 50%;
+            left: 50%;
+            transform: translate(-50%, -50%)
+        }
+
+        .tips-popup-content div {
+            width: 100%;
+            text-align: center
+        }
+
+        .tips-popup-content {
+            width: 30%
+        }
+
+        .tips-popup-content p {
+            text-align: center;
+            padding: 80px;
+            font-size: 20px
+        }
+
+        .tips-popup-content h4 {
+            padding-left: 10px;
+            height: 40px;
+            line-height: 40px;
+            border-bottom: 1px solid #eee;
+            margin-bottom: 20px
+        }
+
+        .tips-cfm-btn, .tips-cancel-btn {
+            width: 100px;
+            height: 40px;
+            margin: auto;
+            -webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px;
+            background: #3daae9;
+            color: #fff;
+            border: none
+        }
+
+        .return-btn, .tips-cancel-btn {
+            background: #fff;
+            color: #555;
+            margin-left: 50px
+        }
+
+        .tips-cancel-btn {
+            border: 1px solid #ddd;
+            margin-left: 20px;
+            display: none
+        }
+
+        #close-btn1 {
+            top: 8px;
+            right: 10px;
+            width: 18px;
+            position: absolute;
+            cursor: pointer
+        }
+
+        td.supplier-fee {
+            text-align: left;
+        }
+
+        td.supplier-fee .wipeBtn {
+            width: auto;
+            white-space: nowrap;
+            height: 30px;
+            line-height: 30px;
+            display: none;
+        }
+
+        .inputForm { /*max-width:1200px;*/
+            width: 100%;
+        }
+
+        .inputForm table {
+            width: 100%;
+            line-height: 18px;
+            margin-bottom: 50px;
+        }
+
+        .inputForm th, .inputForm td {
+            font-weight: normal;
+            text-align: left;
+            padding: 8px 5px;
+            border-bottom: 1px solid rgb(238, 238, 238);
+        }
+
+        .inputForm th {
+            width: 15%;
+            text-align: right;
+            white-space: nowrap;
+            font-weight: bold;
+        }
+
+        .inputForm td input[type="text"] {
+            width: 320px;
+            height: 16px;
+            line-height: 16px;
+        }
+
+        .inputForm td input.short {
+            width: 110px;
+        }
+
+        .inputForm td b.line {
+            margin: 0 15px 0 20px;
+            font-weight: normal
+        }
+
+        .wipeVisible {
+            display: none;
+        }
+
+        .wipeRemarks {
+            margin: 0;
+        }
+
+        .controls {
+            font-size: 0
+        }
+
+        .select2-choice {
+            width: 100px
+        }
+
+        .upload-content {
+            position: relative;
+        }
+
+        .upload-content * {
+            margin: 0;
+            padding: 0;
+        }
+
+        .upload-content .conList {
+            display: inline-block;
+            margin-right: 5px;
+            width: 90px;
+            height: 90px;
+            background: #e6e6e6;
+            border-radius: 5px;
+            position: relative;
+            overflow: hidden
+        }
+
+        .upload-content .conList li {
+            position: relative;
+            padding: 18px 0
+        }
+
+        .upload-content .conList li img {
+            width: 100%;
+            margin: 0 !important;
+            padding: 0 !important
+        }
+
+        .upload-content img.cancel-upload {
+            position: absolute;
+            top: 0;
+            right: 0;
+            cursor: pointer;
+            z-index: 100
+        }
+
+        .upload-content .conList .btn {
+            position: absolute;
+            width: 100%;
+            height: 100%;
+            top: 0;
+            left: 0;
+            background: #e6e6e6
+        }
+
+        .upload-content .conList .btn div {
+            padding-top: 20px
+        }
+
+        .upload-content .conList .btn div span {
+            font-size: 35px
+        }
+
+        .hide-pic {
+            display: none !important
+        }
+
+        .upload-tips {
+            margin: 10px 0
+        }
+
+        .mask {
+            z-index: 9999;
+        }
+
+        .weishaIcon {
+            background: darkorange;
+            color: white;
+            margin: 0 0px;
+            padding: 0 3px;
+            font-style: normal;
+            font-size: 12px;
+            display: inline-block;
+            border-radius: 2px
+        }
+    </style>
 </head>
 <body>
-	<ul class="nav nav-tabs">
-		<li><a href="${ctx}/order/cmPayShop/">付款列表</a></li>
-		<li class="active"><a>提交付款单</a></li>
-	</ul><br/>
-	<form action="${ctx}/order/cmPayShop/apply" id="form" method="post">
-		<div class="payment-form">
-		<h4>付款单</h4>
-		<div class="payment-form-top">
-			<div>
-				<label><span class="required">* </span>付款单名称:</label>
-				<input type="text" id="payment-form-name" name="name" value="${cmPayShop.name}" maxlength="200" >
-				<input type="hidden" name="shopID" value="${cmPayShop.shopID}">
-				<input type="hidden" name="id" value="${cmPayShop.id}">
-			</div>
-			<div>
-				<label>供应商名称:</label>
-				<span>${cmPayShop.shopName}</span>
-			</div>
-			<div>
-				<label><em class="required">* </em>付款账号:</label>
-				<span>户名:<input type="text" id="account-name" name="bankAccountName" value="${cmPayShop.bankAccountName}"></span>
-				<span>账号:<input type="text" id="account-no" name="bankAccount" value="${cmPayShop.bankAccount}" ></span>
-				<span>开户行:<input type="text" id="account-bank" name="bankName" value="${cmPayShop.bankName}"></span>
-				<span>账户类型:
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/order/cmPayShop/">付款列表</a></li>
+    <li class="active"><a>提交付款单</a></li>
+</ul>
+<br/>
+<form action="${ctx}/order/cmPayShop/apply" id="form" method="post">
+    <div class="payment-form">
+        <h4>付款单</h4>
+        <div class="payment-form-top">
+            <div>
+                <label><span class="required">* </span>付款单名称:</label>
+                <input type="text" id="payment-form-name" name="name" value="${cmPayShop.name}" maxlength="200">
+                <input type="hidden" name="shopID" value="${cmPayShop.shopID}">
+                <input type="hidden" name="id" value="${cmPayShop.id}">
+            </div>
+            <div>
+                <label>供应商名称:</label>
+                <span>${cmPayShop.shopName}</span>
+            </div>
+            <div>
+                <label><em class="required">* </em>付款账号:</label>
+                <span>户名:<input type="text" id="account-name" name="bankAccountName"
+                                value="${cmPayShop.bankAccountName}"></span>
+                <span>账号:<input type="text" id="account-no" name="bankAccount" value="${cmPayShop.bankAccount}"></span>
+                <span>开户行:<input type="text" id="account-bank" name="bankName" value="${cmPayShop.bankName}"></span>
+                <span>账户类型:
 					<select name="type">
-						<option value ="0" ${cmPayShop.type == '0' ? 'selected' : ''}>公帐</option>
-						<option value ="1" ${cmPayShop.type == '1' ? 'selected' : ''}>私帐</option>
+						<option value="0" ${cmPayShop.type == '0' ? 'selected' : ''}>公帐</option>
+						<option value="1" ${cmPayShop.type == '1' ? 'selected' : ''}>私帐</option>
 					</select>
 				</span>
-			</div>
-		</div>
-		<div class="payment-form-content">
-			<c:forEach items="${cmPayShop.shopOrders}" var="s">
-				<table class="table table-striped table-bordered table-condensed pay-table">
-				<tr>
-					<th>子订单编号(ID)</th>
-					<th colspan="3">订单编号(ID)</th>
-					<th colspan="2">订单金额</th>
-					<th colspan="3">下单时间</th>
-					<th>收款状态</th>
-					<th>收款金额</th>
-					<th colspan="2">经理折扣</th>
-					<th colspan="3">成本类型</th>
-					<th colspan="2">付第三方</th>
-				</tr>
-				<tr>
-					<td>${s.shopOrderNo}(${s.shopOrderID})</td>
-					<td colspan="3">${s.orderNo}(${s.orderID})</td>
-					<td colspan="2">${s.payTotalFee}</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="2">
-						<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}">
+            </div>
+        </div>
+        <div class="payment-form-content">
+            <c:forEach items="${cmPayShop.shopOrders}" var="s">
+                <table class="table table-striped table-bordered table-condensed pay-table">
+                    <tr>
+                        <th>子订单编号(ID)</th>
+                        <th colspan="3">订单编号(ID)</th>
+                        <th colspan="2">订单金额</th>
+                        <th colspan="3">下单时间</th>
+                        <th>收款状态</th>
+                        <th>收款金额</th>
+                        <th colspan="2">经理折扣</th>
+                        <th colspan="3">成本类型</th>
+                        <th colspan="2">付第三方</th>
+                    </tr>
+                    <tr>
+                        <td>${s.shopOrderNo}(${s.shopOrderID})</td>
+                        <td colspan="3">${s.orderNo}(${s.orderID})</td>
+                        <td colspan="2">${s.payTotalFee}</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="2">
+                            <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>
+                                        <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>)
+                                        <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="3"><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if test="${s.costType == '2'}">比例成本</c:if></td>
-					<td colspan="2" class="third-party-fee">${s.shopOtherFee}</td>
-				</tr>
-				<tr>
-					<th>供应商</th>
-					<th colspan="3">客户</th>
-					<th>机构运费</th>
-					<th>供应商运费</th>
-					<th colspan="3">商品费</th>
-					<th colspan="2">付款状态</th>
-					<th colspan="2">采美佣金</th>
-					<th colspan="3">应付税费</th>
-					<th colspan="2">付供应商</th>
-				</tr>
-				<tr>
-					<td>${s.shopName}</td>
-					<td colspan="3">
-							${s.buyer}
-						<c:if test="${s.orderType eq 2}"><font color="red">(呵呵商城)</font></c:if>
-						<c:if test="${s.organizeID == 3}"></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>
-                    </td>
-					<td class="freight"><fmt:formatNumber value="${s.shopPostFee}" type="number" pattern="#,##0.00"/></td>
-					<td colspan="3" class="product-fee">${s.shopProductAmount}</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="2" class="payCm-t"></td>
-					<td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
-					<td colspan="2" class="supplier-fee">
-						<div><span class="nowrap">应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" pattern="#,##0.00"/>
+                                </c:if>
+                            </c:if>
+                            <c:if test="${s.discountTotalFee le 0}">¥0.00</c:if>
+                        </td>
+                        <td colspan="3"><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if
+                                test="${s.costType == '2'}">比例成本</c:if></td>
+                        <td colspan="2" class="third-party-fee">${s.shopOtherFee}</td>
+                    </tr>
+                    <tr>
+                        <th>供应商</th>
+                        <th colspan="3">客户</th>
+                        <th>机构运费</th>
+                        <th>供应商运费</th>
+                        <th colspan="3">商品费</th>
+                        <th colspan="2">付款状态</th>
+                        <th colspan="2">采美佣金</th>
+                        <th colspan="3">应付税费</th>
+                        <th colspan="2">付供应商</th>
+                    </tr>
+                    <tr>
+                        <td>${s.shopName}</td>
+                        <td colspan="3">
+                                ${s.buyer}
+                            <c:if test="${s.orderType eq 2}"><font color="red">(呵呵商城)</font></c:if>
+                            <c:if test="${s.organizeID == 3}"></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>
+                        </td>
+                        <td class="freight"><fmt:formatNumber value="${s.shopPostFee}" type="number"
+                                                              pattern="#,##0.00"/></td>
+                        <td colspan="3" class="product-fee">${s.shopProductAmount}</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="2" class="payCm-t"></td>
+                        <td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number"
+                                                                        pattern="#,##0.00"/></td>
+                        <td colspan="2" class="supplier-fee">
+                            <div><span class="nowrap">
+                            <c:if test="${s.differenceType ne 1 && s.differenceType ne 2}">
+                                应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
+                            </c:if>
 							<c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
-								<font color="red">(需补差价¥${s.differencePrice})</font>
-							</c:if>
+                                <font color="black">${s.shouldPayShopAmount+s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已补差价:${s.differencePrice})</font>
+                            </c:if>
 							<c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
-								<font color="red">(需退差价¥${s.differencePrice})</font>
-							</c:if>,</span>
-							 <span class="nowrap">已付:${s.payedShopAmount},</span></div>
-						<div><span class="nowrap">待付:<input type="number" value="<fmt:formatNumber value="${s.waitPayShop}" pattern="0.00"/>" class="need-to-pay" data-type="${s.differenceType}" data-difference="${s.differencePrice}" data-pay="${s.shouldPayShopAmount}" data-payed="${s.payedShopAmount}"></span></div>
-						<input type="hidden" name="payInfo" class="payInfo" data-shoporderid="${s.shopOrderID}" value="${s.shopOrderID}_${s.waitPayShop}_0">
-						<label class="wipeBtn"><input class="wipeFee" type="checkbox" value="0"><span>付款抹平:<em class="red wipeText">¥0.00</em></span></label>
-					</td>
-					<input type="hidden" class="payedShopAmount" value="${s.payedShopAmount}">
-				</tr>
-				<tr>
-					<th>商品名</th>
-					<th>规格</th>
-					<th>数量<%--(赠品)--%></th>
-					<th>退货</th>
-					<th colspan="2">单价</th>
-                    <th colspan="3">机构税率 / 单税费 / 总税费</th>
-					<th colspan="2">总价</th>
-					<th>佣金(单)</th>
-					<th>佣金(总)</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>
+                                <font color="black">${s.shouldPayShopAmount-s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已退差价:${s.differencePrice})</font>
                             </c:if>
+							,</span>
+                                <span class="nowrap">已付:${s.payedShopAmount},</span></div>
+                            <div><span class="nowrap">待付:<input type="number"
+                                                                value="<fmt:formatNumber value="${s.waitPayShop}" pattern="0.00"/>"
+                                                                class="need-to-pay" data-type="${s.differenceType}"
+                                                                data-difference="${s.differencePrice}"
+                                                                data-pay="${s.shouldPayShopAmount}"
+                                                                data-payed="${s.payedShopAmount}"></span></div>
+                            <input type="hidden" name="payInfo" class="payInfo" data-shoporderid="${s.shopOrderID}"
+                                   value="${s.shopOrderID}_${s.waitPayShop}_0">
+                            <label class="wipeBtn"><input class="wipeFee" type="checkbox" value="0"><span>付款抹平:<em
+                                    class="red wipeText">¥0.00</em></span></label>
                         </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><fmt:formatNumber value="${(empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax}" pattern="#,##0.00"/></td>
-						<td class="payCm"><fmt:formatNumber value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax) * (p.num + p.presentNum - p.returnedNum)}" 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>
-			</c:forEach>
-		</div>
-		<div class="inputForm">
-			<table border="0" cellspacing="0" cellpadding="0" width="100%">
-				<tr>
-					<th><span style="font-weight:bold;font-size:18px">${cmPayShop.paymentType eq 2 ? "需补供应商差价":"付供应商总金额"}:</span></th>
-					<td colspan="3">
-						<span id="totalAmount" style="font-weight: bold;font-size:18px"><fmt:formatNumber value="${cmPayShop.totalAmount}" pattern="#,##0.00"/></span>
-						<span class="wipeVisible">(付款抹平总额:<em class="red wipeTotalFee">¥0.00</em>)</span>
-						<input type="hidden" id="totalAmount-hidden" name="totalAmount" value="${cmPayShop.totalAmount}">
-					</td>
-				</tr>
-				<tr class="wipeVisible">
-					<th><span class="red">*</span>抹平备注:</th>
-					<td colspan="3">
-						<textarea name="wipeRemarks" id="wipeRemarks" placeholder="请输入备注文字,200字以内..." maxlength="200" style="width:500px;"></textarea>
-						<p style="width:500px;text-align:right;"><span id="remarkLen" style="color:red;">0</span>/200</p>
-						<input type="hidden" id="wipePayment" name="wipePayment" value="0">
-					</td>
-				</tr>
-				<tr class="wipeVisible">
-					<th>图片:</th>
-					<td colspan="3">
-						<input type="hidden" id="wipeRemarkImages" name="wipeRemarkImages" value="">
-						<div class="imgbox">
-							<div class="controls upload-content" id="wipeImageBox">
-								<div class="conList">
-									<input type="hidden" id="image1" maxlength="255" class="imagesInput">
-									<sys:ckfinder input="image1" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
-								</div>
-								<div class="conList hide-pic">
-									<input type="hidden" id="image2" maxlength="255" class="imagesInput">
-									<sys:ckfinder input="image2" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
-								</div>
-								<div class="conList hide-pic">
-									<input type="hidden" id="image3" maxlength="255" class="imagesInput">
-									<sys:ckfinder input="image3" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
-								</div>
-								<div class="conList hide-pic">
-									<input type="hidden" id="image4" maxlength="255" class="imagesInput">
-									<sys:ckfinder input="image4" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
-								</div>
-								<div class="conList hide-pic">
-									<input type="hidden" id="image5" maxlength="255" class="imagesInput">
-									<sys:ckfinder input="image5" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
-								</div>
-							</div>
-							<div class="conList upload-tips"><span style="color:red;">注意:请上传jpg / png格式的图片,最大不超过5M,最多可上传5张</span></div>
-						</div>
-					</td>
-				</tr>
-				<tr>
-					<th>欠款抵扣:</th>
-					<td colspan="3">
-						总欠款:<span id="rebateAmount">${empty cmPayShop.rebateAmount ? 0 : cmPayShop.rebateAmount}</span>,
-						可用抵扣欠款:<span id="ableRebateAmount">${empty cmPayShop.ableRebateAmount ? 0 : cmPayShop.ableRebateAmount}</span>,
-						使用:<input type="number" value="${empty cmPayShop.balancePayFee ? 0 : cmPayShop.balancePayFee}" name="balancePayFee" class="used-amount">,
-						剩余:<span id="remainingBalance">${cmPayShop.rebateAmount}</span>
-						<input type="hidden" id="rebateAmount-hidden" value="${empty cmPayShop.rebateAmount ? 0 : cmPayShop.rebateAmount}">
-						<input type="hidden" id="ableRebateAmount-hidden" value="${(empty cmPayShop.ableRebateAmount ? 0 : cmPayShop.ableRebateAmount) + (empty cmPayShop.balancePayFee ? 0 : cmPayShop.balancePayFee)}">
-					</td>
-				</tr>
-				<tr>
-					<th><span style="font-weight:bold;font-size:18px">转账支付:</span></th>
-					<td colspan="3">
-						<span id="transferPayFee" style="font-weight: bold; font-size:18px"><fmt:formatNumber value="${cmPayShop.totalAmount}" pattern="#,##0.00" /></span>
-						<input type="hidden" name="transferPayFee" id="transferPayFee-hidden" value="${cmPayShop.totalAmount}">
-					</td>
-				</tr>
-				<tr class="process-details">
-					<th>申请人:</th>
-					<td colspan="3">
-						<div class="process-for-label">${cmPayShop.applicantName}</div>
-						<span>申请时间:</span><div>${cmPayShop.applyTime}</div>
-						<c:if test="${cmPayShop.status == 1 || cmPayShop.status == 2}">
-							<span>审核人:</span><div>${cmPayShop.reviewerName}</div>
-							<span>审核时间:</span><div>${cmPayShop.reviewTime}</div>
-						</c:if>
-					</td>
-				</tr>
-				<tr class="process-details process-details-last">
-					<th>审核状态:</th>
-					<td colspan="3">
-						<div class="process-for-label"><c:if test="${cmPayShop.status == 1}">待审核</c:if></div>
-						<span>原因:</span><div>${cmPayShop.reason}</div>
-					</td>
-				</tr>
-				<tr><td colspan="4" style="text-align:center;">
-					<button class="apply-btn btn btn-primary" type="button">申请</button>
-					<button class="return-btn btn" type="button" onclick="history.go(-1)">返回</button>
-				</td></tr>
-			</table>
-		</div>
-	</div>
-	</form>
-	<div class="mask tips-popup">
-		<div class="tips-popup-content">
-			<h4>信息提示</h4>
-			<p></p>
-			<div>
-				<button class="tips-cfm-btn tips-cfm-directly" type="button">确定</button>
-				<button class="tips-cancel-btn" type="button">取消</button>
-			</div>
-			<img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">
-		</div>
-	</div>
+                        <input type="hidden" class="payedShopAmount" value="${s.payedShopAmount}">
+                    </tr>
+                    <tr>
+                        <th>商品名</th>
+                        <th>规格</th>
+                        <th>数量<%--(赠品)--%></th>
+                        <th>退货</th>
+                        <th colspan="2">单价</th>
+                        <th colspan="3">机构税率 / 单税费 / 总税费</th>
+                        <th colspan="2">总价</th>
+                        <th>佣金(单)</th>
+                        <th>佣金(总)</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><fmt:formatNumber
+                                    value="${(empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax}"
+                                    pattern="#,##0.00"/></td>
+                            <td class="payCm"><fmt:formatNumber
+                                    value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax) * (p.num + p.presentNum - p.returnedNum)}"
+                                    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>
+            </c:forEach>
+        </div>
+        <div class="inputForm">
+            <table border="0" cellspacing="0" cellpadding="0" width="100%">
+                <tr>
+                    <th><span
+                            style="font-weight:bold;font-size:18px">${cmPayShop.paymentType eq 2 ? "需补供应商差价":"付供应商总金额"}:</span>
+                    </th>
+                    <td colspan="3">
+                        <span id="totalAmount" style="font-weight: bold;font-size:18px"><fmt:formatNumber
+                                value="${cmPayShop.totalAmount}" pattern="#,##0.00"/></span>
+                        <span class="wipeVisible">(付款抹平总额:<em class="red wipeTotalFee">¥0.00</em>)</span>
+                        <input type="hidden" id="totalAmount-hidden" name="totalAmount"
+                               value="${cmPayShop.totalAmount}">
+                    </td>
+                </tr>
+                <tr class="wipeVisible">
+                    <th><span class="red">*</span>抹平备注:</th>
+                    <td colspan="3">
+                        <textarea name="wipeRemarks" id="wipeRemarks" placeholder="请输入备注文字,200字以内..." maxlength="200"
+                                  style="width:500px;"></textarea>
+                        <p style="width:500px;text-align:right;"><span id="remarkLen" style="color:red;">0</span>/200
+                        </p>
+                        <input type="hidden" id="wipePayment" name="wipePayment" value="0">
+                    </td>
+                </tr>
+                <tr class="wipeVisible">
+                    <th>图片:</th>
+                    <td colspan="3">
+                        <input type="hidden" id="wipeRemarkImages" name="wipeRemarkImages" value="">
+                        <div class="imgbox">
+                            <div class="controls upload-content" id="wipeImageBox">
+                                <div class="conList">
+                                    <input type="hidden" id="image1" maxlength="255" class="imagesInput">
+                                    <sys:ckfinder input="image1" type="images" uploadPath="/photo"
+                                                  selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                                </div>
+                                <div class="conList hide-pic">
+                                    <input type="hidden" id="image2" maxlength="255" class="imagesInput">
+                                    <sys:ckfinder input="image2" type="images" uploadPath="/photo"
+                                                  selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                                </div>
+                                <div class="conList hide-pic">
+                                    <input type="hidden" id="image3" maxlength="255" class="imagesInput">
+                                    <sys:ckfinder input="image3" type="images" uploadPath="/photo"
+                                                  selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                                </div>
+                                <div class="conList hide-pic">
+                                    <input type="hidden" id="image4" maxlength="255" class="imagesInput">
+                                    <sys:ckfinder input="image4" type="images" uploadPath="/photo"
+                                                  selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                                </div>
+                                <div class="conList hide-pic">
+                                    <input type="hidden" id="image5" maxlength="255" class="imagesInput">
+                                    <sys:ckfinder input="image5" type="images" uploadPath="/photo"
+                                                  selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                                </div>
+                            </div>
+                            <div class="conList upload-tips"><span style="color:red;">注意:请上传jpg / png格式的图片,最大不超过5M,最多可上传5张</span>
+                            </div>
+                        </div>
+                    </td>
+                </tr>
+                <tr>
+                    <th>欠款抵扣:</th>
+                    <td colspan="3">
+                        总欠款:<span id="rebateAmount">${empty cmPayShop.rebateAmount ? 0 : cmPayShop.rebateAmount}</span>,
+                        可用抵扣欠款:<span
+                            id="ableRebateAmount">${empty cmPayShop.ableRebateAmount ? 0 : cmPayShop.ableRebateAmount}</span>,
+                        使用:<input type="number" value="${empty cmPayShop.balancePayFee ? 0 : cmPayShop.balancePayFee}"
+                                  name="balancePayFee" class="used-amount">,
+                        剩余:<span id="remainingBalance">${cmPayShop.rebateAmount}</span>
+                        <input type="hidden" id="rebateAmount-hidden"
+                               value="${empty cmPayShop.rebateAmount ? 0 : cmPayShop.rebateAmount}">
+                        <input type="hidden" id="ableRebateAmount-hidden"
+                               value="${(empty cmPayShop.ableRebateAmount ? 0 : cmPayShop.ableRebateAmount) + (empty cmPayShop.balancePayFee ? 0 : cmPayShop.balancePayFee)}">
+                    </td>
+                </tr>
+                <tr>
+                    <th><span style="font-weight:bold;font-size:18px">转账支付:</span></th>
+                    <td colspan="3">
+                        <span id="transferPayFee" style="font-weight: bold; font-size:18px"><fmt:formatNumber
+                                value="${cmPayShop.totalAmount}" pattern="#,##0.00"/></span>
+                        <input type="hidden" name="transferPayFee" id="transferPayFee-hidden"
+                               value="${cmPayShop.totalAmount}">
+                    </td>
+                </tr>
+                <tr class="process-details">
+                    <th>申请人:</th>
+                    <td colspan="3">
+                        <div class="process-for-label">${cmPayShop.applicantName}</div>
+                        <span>申请时间:</span>
+                        <div>${cmPayShop.applyTime}</div>
+                        <c:if test="${cmPayShop.status == 1 || cmPayShop.status == 2}">
+                            <span>审核人:</span>
+                            <div>${cmPayShop.reviewerName}</div>
+                            <span>审核时间:</span>
+                            <div>${cmPayShop.reviewTime}</div>
+                        </c:if>
+                    </td>
+                </tr>
+                <tr class="process-details process-details-last">
+                    <th>审核状态:</th>
+                    <td colspan="3">
+                        <div class="process-for-label"><c:if test="${cmPayShop.status == 1}">待审核</c:if></div>
+                        <span>原因:</span>
+                        <div>${cmPayShop.reason}</div>
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan="4" style="text-align:center;">
+                        <button class="apply-btn btn btn-primary" type="button">申请</button>
+                        <button class="return-btn btn" type="button" onclick="history.go(-1)">返回</button>
+                    </td>
+                </tr>
+            </table>
+        </div>
+    </div>
+</form>
+<div class="mask tips-popup">
+    <div class="tips-popup-content">
+        <h4>信息提示</h4>
+        <p></p>
+        <div>
+            <button class="tips-cfm-btn tips-cfm-directly" type="button">确定</button>
+            <button class="tips-cancel-btn" type="button">取消</button>
+        </div>
+        <img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">
+    </div>
+</div>
 <script>
-(function(){
-	var payTableEle = $('.pay-table'),
-		listenClickNumStatus = true,
-		payProductEle = $('.pay-product-item');
-	payTableEle.each(function (i,l) {
-		var productLength = $(this).find('.pay-product-item').length;
-		// 商品列表合并单元格
-		/*$(this).find('.mergeRows').attr('rowspan',productLength);*/
-	});
-	$(window).on("load", function(){
-		$('.need-to-pay').each(function (index, ele) {
-			if($(this).val()<=0){
-				alertx("待付金额为负数,不能操作付款抹平。请先去操作供应商退款,使数据恢复正常",function(){
-					window.location.href = "${ctx}/shopOrder/refundRecordList?operatingMode=2"
-				});
-			}
-			var thisEle = $(this),
-				wrapper = thisEle.parents(".supplier-fee"),
-				shouldPay = thisEle.attr('data-pay')*1,
-				differencePrice = thisEle.attr('data-difference')*1,
-				differenceType = thisEle.attr('data-type'),
-				alreadyPaid = thisEle.attr('data-payed')*1;
-			if(thisEle.val().length>8){
-				thisEle.val(thisEle.val().slice(0,8));
-			}
-			if (differenceType == 2){
-				differencePrice = -differencePrice;
-			}
-			if((thisEle.val() > shouldPay - alreadyPaid + differencePrice) || thisEle.val() < 0) {
-				thisEle.val((shouldPay - alreadyPaid + differencePrice).toFixed(2));
-			}
-			var wipe = parseFloat((shouldPay - alreadyPaid - thisEle.val() + differencePrice).toFixed(12));
-			if (wipe>0) {
-				wrapper.find('.wipeBtn').show();
-			}else{
-				wrapper.find('.wipeBtn').hide();
-				wrapper.find('.wipeFee').prop("checked", false);
-			}
-			wrapper.find('.wipeFee').val(wipe);
-			wrapper.find('.wipeText').text('¥'+wipe.toFixed(2));
-		});
-	});
-	$('.tips-cancel-btn, #close-btn1').on('click',function() {
-		$('.tips-popup').hide();
-	});
-	$('.tips-cfm-directly').on('click',function() {
-		if($('.tips-cfm-btn').hasClass('tips-cfm-directly')) {
-			$('.tips-popup').hide();
-		} else {
-			if(listenClickNumStatus) {
-				$('#form').submit();
-				listenClickNumStatus = false;
-			}
-		}
-	})
-	function showTips(title,text) {
-		$('.tips-popup h4').text(title);
-		$('.tips-popup p').text(text);
-		$('.tips-popup').show();
-	}
-    $('body').on('keyup', '#wipeRemarks',function() {
-        $('#remarkLen').text($(this).val().length);
-    });
-	$('body').on('change','.wipeBtn input',function() {
-	    var wrapper = $(this).parents(".supplier-fee");
-		wrapper.find('.need-to-pay').trigger("input");
-		wrapper.find('.need-to-pay').trigger("propertychange");
-	});
-	//  待付<=应付-已付
-	$('body').on('input propertychange','.need-to-pay',function() {
-		var thisEle = $(this),
-			wrapper = thisEle.parents(".supplier-fee"),
-			shouldPay = thisEle.attr('data-pay')*1,
-			differencePrice = thisEle.attr('data-difference')*1,
-			differenceType = thisEle.attr('data-type'),
-			alreadyPaid = thisEle.attr('data-payed')*1;
-		if(thisEle.val().length>8){
-			thisEle.val(thisEle.val().slice(0,8));
-		}
-		if (differenceType == 2){
-			differencePrice = -differencePrice;
-		}
-		if((thisEle.val() > shouldPay - alreadyPaid + differencePrice) || thisEle.val() < 0) {
-			thisEle.val((shouldPay - alreadyPaid + differencePrice).toFixed(2));
-		}
-		var wipe = parseFloat((shouldPay - alreadyPaid - thisEle.val() + differencePrice).toFixed(12));
-		if (wipe>0) {
-			wrapper.find('.wipeBtn').show();
-		}else{
-			wrapper.find('.wipeBtn').hide();
-			wrapper.find('.wipeFee').prop("checked", false);
-		}
-		wrapper.find('.wipeFee').val(wipe);
-		wrapper.find('.wipeText').text('¥'+wipe.toFixed(2));
-		var totalAmount = 0,wipeTotalFee = 0;
-		$('.need-to-pay').each(function (index, ele) {
-			totalAmount += Number($(this).val());
-		});
-		$('.wipeFee:checked').each(function (index, ele) {
-			wipeTotalFee += Number($(this).val());
-		});
-		totalAmount = totalAmount.toFixed(2);
-		wipeTotalFee = wipeTotalFee.toFixed(2);
-		if(Number(wipeTotalFee)>0){
-			$('.wipeVisible').show();
-			$('#wipePayment').val(wipeTotalFee);
-			$('.wipeTotalFee').text('¥'+wipeTotalFee);
-		} else {
-			$('.wipeVisible').hide();
-			$('#wipePayment').val(0);
-			$('.wipeTotalFee').text('¥0.00');
-		}
-		$('#totalAmount').text(totalAmount);
-		$('#totalAmount-hidden').val(totalAmount);
-		$('#transferPayFee').text(totalAmount);
-		$('#transferPayFee-hidden').val(totalAmount);
-		$('#ableRebateAmount').text($('#ableRebateAmount-hidden').val());
-		$('#remainingBalance').text($('#ableRebateAmount-hidden').val());
-		$('.used-amount').val(0);
-		var payInfo = wrapper.find('.payInfo');
-		var checkedWipe = wrapper.find('.wipeFee:checked').length>0?wrapper.find('.wipeFee:checked').val():0;
-		payInfo.val(payInfo.attr('data-shoporderid') + '_' + thisEle.val() + '_' + checkedWipe);
-	});
+    (function () {
+        var payTableEle = $('.pay-table'),
+            listenClickNumStatus = true,
+            payProductEle = $('.pay-product-item');
+        payTableEle.each(function (i, l) {
+            var productLength = $(this).find('.pay-product-item').length;
+            // 商品列表合并单元格
+            /*$(this).find('.mergeRows').attr('rowspan',productLength);*/
+        });
+        $(window).on("load", function () {
+            $('.need-to-pay').each(function (index, ele) {
+                if ($(this).val() <= 0) {
+                    alertx("待付金额为负数,不能操作付款抹平。请先去操作供应商退款,使数据恢复正常", function () {
+                        window.location.href = "${ctx}/shopOrder/refundRecordList?operatingMode=2"
+                    });
+                }
+                var thisEle = $(this),
+                    wrapper = thisEle.parents(".supplier-fee"),
+                    shouldPay = thisEle.attr('data-pay') * 1,
+                    differencePrice = thisEle.attr('data-difference') * 1,
+                    differenceType = thisEle.attr('data-type'),
+                    alreadyPaid = thisEle.attr('data-payed') * 1;
+                if (thisEle.val().length > 8) {
+                    thisEle.val(thisEle.val().slice(0, 8));
+                }
+                if (differenceType == 2) {
+                    differencePrice = -differencePrice;
+                }
+                if ((thisEle.val() > shouldPay - alreadyPaid + differencePrice) || thisEle.val() < 0) {
+                    thisEle.val((shouldPay - alreadyPaid + differencePrice).toFixed(2));
+                }
+                var wipe = parseFloat((shouldPay - alreadyPaid - thisEle.val() + differencePrice).toFixed(12));
+                if (wipe > 0) {
+                    wrapper.find('.wipeBtn').show();
+                } else {
+                    wrapper.find('.wipeBtn').hide();
+                    wrapper.find('.wipeFee').prop("checked", false);
+                }
+                wrapper.find('.wipeFee').val(wipe);
+                wrapper.find('.wipeText').text('¥' + wipe.toFixed(2));
+            });
+        });
+        $('.tips-cancel-btn, #close-btn1').on('click', function () {
+            $('.tips-popup').hide();
+        });
+        $('.tips-cfm-directly').on('click', function () {
+            if ($('.tips-cfm-btn').hasClass('tips-cfm-directly')) {
+                $('.tips-popup').hide();
+            } else {
+                if (listenClickNumStatus) {
+                    $('#form').submit();
+                    listenClickNumStatus = false;
+                }
+            }
+        })
+
+        function showTips(title, text) {
+            $('.tips-popup h4').text(title);
+            $('.tips-popup p').text(text);
+            $('.tips-popup').show();
+        }
+
+        $('body').on('keyup', '#wipeRemarks', function () {
+            $('#remarkLen').text($(this).val().length);
+        });
+        $('body').on('change', '.wipeBtn input', function () {
+            var wrapper = $(this).parents(".supplier-fee");
+            wrapper.find('.need-to-pay').trigger("input");
+            wrapper.find('.need-to-pay').trigger("propertychange");
+        });
+        //  待付<=应付-已付
+        $('body').on('input propertychange', '.need-to-pay', function () {
+            var thisEle = $(this),
+                wrapper = thisEle.parents(".supplier-fee"),
+                shouldPay = thisEle.attr('data-pay') * 1,
+                differencePrice = thisEle.attr('data-difference') * 1,
+                differenceType = thisEle.attr('data-type'),
+                alreadyPaid = thisEle.attr('data-payed') * 1;
+            if (thisEle.val().length > 8) {
+                thisEle.val(thisEle.val().slice(0, 8));
+            }
+            if (differenceType == 2) {
+                differencePrice = -differencePrice;
+            }
+            if ((thisEle.val() > shouldPay - alreadyPaid + differencePrice) || thisEle.val() < 0) {
+                thisEle.val((shouldPay - alreadyPaid + differencePrice).toFixed(2));
+            }
+            var wipe = parseFloat((shouldPay - alreadyPaid - thisEle.val() + differencePrice).toFixed(12));
+            if (wipe > 0) {
+                wrapper.find('.wipeBtn').show();
+            } else {
+                wrapper.find('.wipeBtn').hide();
+                wrapper.find('.wipeFee').prop("checked", false);
+            }
+            wrapper.find('.wipeFee').val(wipe);
+            wrapper.find('.wipeText').text('¥' + wipe.toFixed(2));
+            var totalAmount = 0, wipeTotalFee = 0;
+            $('.need-to-pay').each(function (index, ele) {
+                totalAmount += Number($(this).val());
+            });
+            $('.wipeFee:checked').each(function (index, ele) {
+                wipeTotalFee += Number($(this).val());
+            });
+            totalAmount = totalAmount.toFixed(2);
+            wipeTotalFee = wipeTotalFee.toFixed(2);
+            if (Number(wipeTotalFee) > 0) {
+                $('.wipeVisible').show();
+                $('#wipePayment').val(wipeTotalFee);
+                $('.wipeTotalFee').text('¥' + wipeTotalFee);
+            } else {
+                $('.wipeVisible').hide();
+                $('#wipePayment').val(0);
+                $('.wipeTotalFee').text('¥0.00');
+            }
+            $('#totalAmount').text(totalAmount);
+            $('#totalAmount-hidden').val(totalAmount);
+            $('#transferPayFee').text(totalAmount);
+            $('#transferPayFee-hidden').val(totalAmount);
+            $('#ableRebateAmount').text($('#ableRebateAmount-hidden').val());
+            $('#remainingBalance').text($('#ableRebateAmount-hidden').val());
+            $('.used-amount').val(0);
+            var payInfo = wrapper.find('.payInfo');
+            var checkedWipe = wrapper.find('.wipeFee:checked').length > 0 ? wrapper.find('.wipeFee:checked').val() : 0;
+            payInfo.val(payInfo.attr('data-shoporderid') + '_' + thisEle.val() + '_' + checkedWipe);
+        });
 
 //			使用余额<总余额
-	$('body').on('input propertychange','.used-amount',function() {
-		var thisEle = $(this),
-			thisVal = Number(thisEle.val()),
-			//totalAmount = Number($('#totalAmount').text()),
-			totalAmount = ${cmPayShop.totalAmount},
-			rebateAmount = Number($('#rebateAmount-hidden').val()),
-			ableRebateAmount = Number($('#ableRebateAmount-hidden').val());
-
-		if((thisVal > ableRebateAmount) || thisVal < 0 || thisVal > totalAmount) {
-			thisEle.val(0);
-			$('#transferPayFee').text(totalAmount);
-			$('#transferPayFee-hidden').val(totalAmount);
-			$('#ableRebateAmount').text($('#ableRebateAmount-hidden').val());
-			$('#remainingBalance').text(rebateAmount);
-		} else {
-			$('#transferPayFee').text((totalAmount-thisVal).toFixed(2));
-			$('#transferPayFee-hidden').val((totalAmount-thisVal).toFixed(2));
-			$('#ableRebateAmount').text((ableRebateAmount-thisVal).toFixed(2));
-			$('#remainingBalance').text((rebateAmount-thisVal).toFixed(2));
-		}
-	});
-
-	$('.pay-table').each(function(){
-		var thisEle = $(this),
-			totalComissionVal = 0,
-			resVal = '';
-		totalComissionEle = thisEle.find('.payCm'),
-			comissionEle = thisEle.find('.payCm-t'),
-			thirdPartyVal = thisEle.find('.third-party-fee').text().replace(',',''),
-			freightVal = thisEle.find('.freight').text().replace(',','');
-		totalComissionEle.each(function(){
-			totalComissionVal += Number($(this).text().replace(',',''));
-		})
-		resVal = (totalComissionVal - thirdPartyVal - freightVal).toFixed(2);
-		comissionEle.text(resVal);
-	})
-
-	$('.apply-btn').on('click',function() {
-		var payNameVal = $('#payment-form-name').val(),
-			accountNameVal = $('#account-name').val(),
-			accountNoVal = $('#account-no').val(),
-			accountBankVal = $('#account-bank').val();
-
-		if(!payNameVal.trim()) {
-			alertx("付款单名称不能为空");
-			return false;
-		}
-		if(!accountNameVal.trim()) {
-			alertx("户名不能为空");
-			return false;
-		}
-		if(!accountNoVal.trim()) {
-			alertx("账号不能为空");
-			return false;
-		}
-		if(!accountBankVal.trim()) {
-			alertx("开户行不能为空");
-			return false;
-		}
-		if($('#wipePayment').val()*1>0){
-            if(!$('#wipeRemarks').val().trim()) {
-                alertx("抹平备注不能为空");
+        $('body').on('input propertychange', '.used-amount', function () {
+            var thisEle = $(this),
+                thisVal = Number(thisEle.val()),
+                //totalAmount = Number($('#totalAmount').text()),
+                totalAmount = ${cmPayShop.totalAmount},
+                rebateAmount = Number($('#rebateAmount-hidden').val()),
+                ableRebateAmount = Number($('#ableRebateAmount-hidden').val());
+
+            if ((thisVal > ableRebateAmount) || thisVal < 0 || thisVal > totalAmount) {
+                thisEle.val(0);
+                $('#transferPayFee').text(totalAmount);
+                $('#transferPayFee-hidden').val(totalAmount);
+                $('#ableRebateAmount').text($('#ableRebateAmount-hidden').val());
+                $('#remainingBalance').text(rebateAmount);
+            } else {
+                $('#transferPayFee').text((totalAmount - thisVal).toFixed(2));
+                $('#transferPayFee-hidden').val((totalAmount - thisVal).toFixed(2));
+                $('#ableRebateAmount').text((ableRebateAmount - thisVal).toFixed(2));
+                $('#remainingBalance').text((rebateAmount - thisVal).toFixed(2));
+            }
+        });
+
+        $('.pay-table').each(function () {
+            var thisEle = $(this),
+                totalComissionVal = 0,
+                resVal = '';
+            totalComissionEle = thisEle.find('.payCm'),
+                comissionEle = thisEle.find('.payCm-t'),
+                thirdPartyVal = thisEle.find('.third-party-fee').text().replace(',', ''),
+                freightVal = thisEle.find('.freight').text().replace(',', '');
+            totalComissionEle.each(function () {
+                totalComissionVal += Number($(this).text().replace(',', ''));
+            })
+            resVal = (totalComissionVal - thirdPartyVal - freightVal).toFixed(2);
+            comissionEle.text(resVal);
+        })
+
+        $('.apply-btn').on('click', function () {
+            var payNameVal = $('#payment-form-name').val(),
+                accountNameVal = $('#account-name').val(),
+                accountNoVal = $('#account-no').val(),
+                accountBankVal = $('#account-bank').val();
+
+            if (!payNameVal.trim()) {
+                alertx("付款单名称不能为空");
+                return false;
+            }
+            if (!accountNameVal.trim()) {
+                alertx("户名不能为空");
                 return false;
             }
-			var imgArr = [];
-			if($('#image1').val()){ imgArr.push($('#image1').val()); }
-			if($('#image2').val()){ imgArr.push($('#image2').val()); }
-			if($('#image3').val()){ imgArr.push($('#image3').val()); }
-			if($('#image4').val()){ imgArr.push($('#image4').val()); }
-			if($('#image5').val()){ imgArr.push($('#image5').val()); }
-			if(imgArr.length>0){
-			    $('#wipeRemarkImages').val(imgArr.join("##"));
-			}else{
-			    $('#wipeRemarkImages').val('');
-			}
-            $('.tips-cfm-btn').removeClass('tips-cfm-directly');
-            $('.tips-cancel-btn').show();
-            showTips('确认提示','本次付款存在付款抹平行为,付款抹平总额为¥'+$('#wipePayment').val()+',确认无误后,请点击确定按钮提交付款申请!');
-		}else{
-			$('#wipePayment').val(0);
-			$('#wipeRemarks').val('');
-			$('#wipeRemarkImages').val('');
-            $('.tips-cfm-btn').removeClass('tips-cfm-directly');
-            $('.tips-cancel-btn').show();
-            showTips('确认提示','确定要提交申请吗?');
-		}
-	})
-})();
-
-//图片初始化
-$(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', '.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.imagesInput").val()){
-				$(ele).next().removeClass("hide-pic")
-			}
-		})
-	});
-	$(window).on("load", function(){
-		setTimeout(function(){
-			$("#wipeImageBox").find("input.imagesInput").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);
-	});
-});
+            if (!accountNoVal.trim()) {
+                alertx("账号不能为空");
+                return false;
+            }
+            if (!accountBankVal.trim()) {
+                alertx("开户行不能为空");
+                return false;
+            }
+            if ($('#wipePayment').val() * 1 > 0) {
+                if (!$('#wipeRemarks').val().trim()) {
+                    alertx("抹平备注不能为空");
+                    return false;
+                }
+                var imgArr = [];
+                if ($('#image1').val()) {
+                    imgArr.push($('#image1').val());
+                }
+                if ($('#image2').val()) {
+                    imgArr.push($('#image2').val());
+                }
+                if ($('#image3').val()) {
+                    imgArr.push($('#image3').val());
+                }
+                if ($('#image4').val()) {
+                    imgArr.push($('#image4').val());
+                }
+                if ($('#image5').val()) {
+                    imgArr.push($('#image5').val());
+                }
+                if (imgArr.length > 0) {
+                    $('#wipeRemarkImages').val(imgArr.join("##"));
+                } else {
+                    $('#wipeRemarkImages').val('');
+                }
+                $('.tips-cfm-btn').removeClass('tips-cfm-directly');
+                $('.tips-cancel-btn').show();
+                showTips('确认提示', '本次付款存在付款抹平行为,付款抹平总额为¥' + $('#wipePayment').val() + ',确认无误后,请点击确定按钮提交付款申请!');
+            } else {
+                $('#wipePayment').val(0);
+                $('#wipeRemarks').val('');
+                $('#wipeRemarkImages').val('');
+                $('.tips-cfm-btn').removeClass('tips-cfm-directly');
+                $('.tips-cancel-btn').show();
+                showTips('确认提示', '确定要提交申请吗?');
+            }
+        })
+    })();
+
+    //图片初始化
+    $(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', '.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.imagesInput").val()) {
+                    $(ele).next().removeClass("hide-pic")
+                }
+            })
+        });
+        $(window).on("load", function () {
+            setTimeout(function () {
+                $("#wipeImageBox").find("input.imagesInput").each(function (i, ele) {
+                    if ($(ele).val()) {
+                        $(ele).next().find("li").css("z-index", "99");
+                        $(ele).parents(".conList").find(".cancel-upload").show();
+                        $(ele).parents(".conList").next().removeClass("hide-pic")
+                    }
+                })
+            }, 500);
+        });
+    });
 </script>
 </body>
 </html>

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

@@ -487,12 +487,14 @@
                     <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 ne 1 && s.differenceType ne 2 }">
+                            <font color="#E15616"><fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/></font>
+                        </c:if>
                         <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
-                            <font color="red">(需补差价¥${s.differencePrice})</font>
+                            <font color="black">${s.shouldPayShopAmount+s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已补差价:${s.differencePrice})</font>
                         </c:if>
                         <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
-                            <font color="red">(需退差价¥${s.differencePrice})</font>
+                            <font color="black">${s.shouldPayShopAmount-s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已退差价:${s.differencePrice})</font>
                         </c:if>
                     </td>
                     <input type="hidden" class="payedShopAmount" value="${s.payedShopAmount}">

+ 516 - 98
src/main/webapp/WEB-INF/views/modules/order/cmPayShopOtherCheck.jsp

@@ -1,3 +1,256 @@
+<%--<%@ 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 slid #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 slid #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 slid #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 slid #ddd}--%>
+<%--        .tips-popup-content div{width:100%;text-align:center}--%>
+<%--        .tips-popup-content p{text-align:center;padding:80px;font-size:20px}--%>
+<%--        .tips-popup-content h4{padding-left:10px;height:40px;line-height:40px;border-bottom:1px slid #eee;margin-bottom:20px}--%>
+<%--        .check-btn{width:96%;margin-left:2%;text-align:center;height:60px;line-height:60px;margin-top:30px}--%>
+<%--        .check-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px slid #ddd}--%>
+<%--        .mask{width:100%;height:100%;position:fixed;top:0;background:rgba(0,0,0,0.7);display:none}--%>
+<%--        .tips-popup-content{width:40%;height:auto;padding-bottom:30px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:abslute;top:50%;left:50%;transform:translate(-50%,-50%)}--%>
+<%--        .tips-popup-content div{width:100%;text-align:center}--%>
+<%--        .tips-popup-content{width:30%}--%>
+<%--        .tips-popup-content p{text-align:center;padding:80px;font-size:20px}--%>
+<%--        .tips-popup-content h4{padding-left:10px;height:40px;line-height:40px;border-bottom:1px slid #eee;margin-bottom:20px}--%>
+<%--        .tips-cfm-btn,.tips-cancel-btn,.check-blue-btn,.check-grey-btn{width:100px;height:40px;margin:auto;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;background:#3daae9;color:#fff;border:none}--%>
+<%--        .refuse-btn{margin-left:50px}--%>
+<%--        .return-btn,.tips-cancel-btn,.check-grey-btn{background:#fff;color:#555;margin-left:50px}--%>
+<%--        .tips-cancel-btn,.check-grey-btn{border:1px slid #ddd;margin-left:20px;display:none}--%>
+<%--        #close-btn1{top:8px;right:10px;width:18px;position:abslute;cursr:pointer}--%>
+<%--        .tips-popup-reasn .tips-popup-content{height:250px}--%>
+<%--        .tips-popup-reasn .tips-popup-content div{position:abslute;bottom:15px}--%>
+<%--        .tips-popup-reasn .check-grey-btn{display:inline-block}--%>
+<%--        #refuse-reasn{width:80%;height:48%;left:8%;position:abslute;resize:none}--%>
+<%--        .tips-popup-reasn h5{color:#555;padding-left:8%;margin-bottom:4px;margin-top:-12px}--%>
+<%--        .check-cfm-btn{background:#3daae9;color:#fff}--%>
+<%--    </style>--%>
+<%--    <style media="print">--%>
+<%--        .styleWidth{width:6%;word-break:break-all}--%>
+<%--        .styleWidth{}--%>
+<%--        .styleWidth3{width:10%;word-break:break-all}--%>
+<%--        .table{margin-left:0;margin-bottom:20px;padding-bottom:2px;border-bottom:1px slid #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/toCheck?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>--%>
+<%--            <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>--%>
+<%--					<select name="payType">--%>
+<%--						<option value="1">建设银行7297</option>--%>
+<%--						<option value="2">中信银行0897</option>--%>
+<%--						<option value="3">中信银行7172</option>--%>
+<%--						<option value="4">广发银行0115</option>--%>
+<%--						<option value="5">广发银行5461</option>--%>
+<%--					</select>--%>
+<%--				</span>--%>
+<%--            <label>付款时间:</label>--%>
+<%--            <span>${cmPayShop.payTime}</span>--%>
+<%--            <input name="id" value="${cmPayShop.id}" id="id" type="hidden">--%>
+<%--        </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'}">--%>
+<%--                    审核不通过--%>
+<%--                </c:if>--%>
+<%--            </span>--%>
+<%--        </div>--%>
+<%--        <c:if test="${cmPayShop.status == '2'}">--%>
+<%--            <div>--%>
+<%--                <label>原因:</label>--%>
+<%--                <span>${cmPayShop.reasn}</span>--%>
+<%--            </div>--%>
+<%--        </c:if>--%>
+<%--    </div>--%>
+<%--    <div class="check-btn">--%>
+<%--        <button class="check-cfm-btn" type="button">审核通过</button>--%>
+<%--        <button class="refuse-btn" type="button">审核不通过</button>--%>
+<%--        <button class="return-btn" type="button" onclick="history.go(-1)">返回</button>--%>
+<%--    </div>--%>
+<%--    <div class="mask tips-popup-reasn">--%>
+<%--        <div class="tips-popup-content">--%>
+<%--            <h4>确认提示</h4>--%>
+<%--            <h5><span class="required">* </span>审核不通过原因:</h5>--%>
+<%--            <textarea id="refuse-reasn" cols="30" rows="10" maxlength="200"></textarea>--%>
+<%--            <div>--%>
+<%--                <button class="check-cfm-btn check-blue-btn" type="button">确定</button>--%>
+<%--                <button class="check-grey-btn" type="button">取消</button>--%>
+<%--            </div>--%>
+<%--            <img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">--%>
+<%--        </div>--%>
+<%--    </div>--%>
+<%--    <div class="mask tips-popup">--%>
+<%--        <div class="tips-popup-content">--%>
+<%--            <h4>信息提示</h4>--%>
+<%--            <p></p>--%>
+<%--            <div>--%>
+<%--                <button class="tips-cfm-btn tips-cfm-directly" type="button">确定</button>--%>
+<%--                <button class="tips-cancel-btn" type="button">取消</button>--%>
+<%--            </div>--%>
+<%--            <img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">--%>
+<%--        </div>--%>
+<%--    </div>--%>
+<%--</div>--%>
+<%--<script>--%>
+<%--    (function(){--%>
+<%--        var payTableEle = $('.pay-table'),--%>
+<%--            accessFlag = true,--%>
+<%--            unaccessFlag = true,--%>
+<%--            payProductEle = $('.pay-product-item');--%>
+<%--        payTableEle.each(function (i,l) {--%>
+<%--            var productLength = $(this).find('.pay-product-item').length;--%>
+<%--            // 商品列表合并单元格--%>
+<%--            // $(this).find('.mergeRows').attr('rowspan',productLength);--%>
+<%--        });--%>
+
+<%--        $('.pay-table').each(function(){--%>
+<%--            var thisEle = $(this),--%>
+<%--                totalComissionVal = 0,--%>
+<%--                resVal = '';--%>
+<%--            totalComissionEle = thisEle.find('.payCm'),--%>
+<%--                comissionEle = thisEle.find('.payCm-t'),--%>
+<%--                thirdPartyVal = thisEle.find('.third-party-fee').text().replace(',',''),--%>
+<%--                freightVal = thisEle.find('.freight').text().replace(',','');--%>
+<%--            totalComissionEle.each(function(){--%>
+<%--                totalComissionVal += Number($(this).text().replace(',',''));--%>
+<%--            })--%>
+<%--            resVal = (totalComissionVal - thirdPartyVal - freightVal).toFixed(2);--%>
+<%--            comissionEle.text(resVal);--%>
+<%--        })--%>
+
+<%--        $('.tips-cancel-btn, #close-btn1').on('click',function() {--%>
+<%--            $('.mask').hide();--%>
+<%--        })--%>
+<%--        $('.tips-cfm-directly').on('click',function() {--%>
+<%--            if($('.tips-cfm-btn').hasClass('tips-cfm-directly')) {--%>
+<%--                $('.tips-popup').hide();--%>
+<%--            } else {--%>
+<%--                $('#form').submit();--%>
+<%--            }--%>
+<%--        })--%>
+<%--        $('.refuse-btn').on('click',function() {--%>
+<%--            $('.tips-popup-reasn').show();--%>
+<%--        })--%>
+<%--        $('.check-grey-btn').on('click',function() {--%>
+<%--            $('.tips-popup-reasn').hide();--%>
+<%--        })--%>
+
+<%--        function showTips(title,text) {--%>
+<%--            $('.tips-popup h4').text(title);--%>
+<%--            $('.tips-popup p').text(text);--%>
+<%--            $('.tips-popup').show();--%>
+<%--        }--%>
+
+
+<%--        function submitForm() {--%>
+<%--            $('.tips-cfm-btn').removeClass('tips-cfm-directly').addClass('submit-now');--%>
+<%--            $('.tips-cancel-btn').hide();--%>
+<%--            showTips('信息提示','审核通过');--%>
+<%--        }--%>
+
+<%--        $('.check-cfm-btn').on('click',function(e) {--%>
+<%--            var payType = $('select[name="payType"]').val(),--%>
+<%--                id = $('#id').val();--%>
+<%--            if($(this).hasClass('check-blue-btn')) {--%>
+<%--                var textareaVal = $('#refuse-reasn').val();--%>
+<%--                if(!textareaVal.trim()) {--%>
+<%--                    showTips('信息提示','审核原因不能为空');--%>
+<%--                    return false;--%>
+<%--                }--%>
+<%--                if(unaccessFlag) {--%>
+<%--                    window.location.href = '${ctx}/order/cmPayShop/checkNotPass?id=' + id + '&reasn=' + textareaVal;--%>
+<%--                    unaccessFlag = false;--%>
+<%--                }--%>
+<%--            } else {--%>
+<%--                if(accessFlag) {--%>
+<%--                    window.location.href = '${ctx}/order/cmPayShop/checkPass?payType=' + payType + '&id=' + id;--%>
+<%--                    accessFlag = false;--%>
+<%--                }--%>
+<%--            }--%>
+<%--        })--%>
+
+<%--    })()--%>
+<%--</script>--%>
+<%--</body>--%>
+<%--</html>--%>
+
 <%@ page contentType="text/html;charset=UTF-8" %>
 <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
 <html>
@@ -7,94 +260,272 @@
     <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}
+        .payment-form h4{width:96%;margin-left:2%;padding-bottom:20px;text-align:center;border-bottom:1px slid #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>div,.payment-form-bottom>div{width:94%;margin-left:3%;height:50px;line-height:50px;border-bottom:1px slid #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-list-item{margin-bottom:30px}
+        .pay-table{width:96%;margin-left:2%;margin-bottom:10px}
         .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}
+        .supplier-fee{text-align:left !important;padding-top:20px !important;padding-left:20px !important}
+        .need-to-pay{width:90px}
         .payment-form-bottom label{width:140px}
+        .used-amount{width:80px;margin-top:6px}
         .process-details span{width:140px;margin-left:50px;font-weight:600}
+        .process-for-label{margin-left:0 !important}
         .process-details div{display:inline-block}
-        .payment-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px solid #ddd}
-        .tips-popup-content div{width:100%;text-align:center}
-        .tips-popup-content p{text-align:center;padding:80px;font-size:20px}
-        .tips-popup-content h4{padding-left:10px;height:40px;line-height:40px;border-bottom:1px solid #eee;margin-bottom:20px}
         .check-btn{width:96%;margin-left:2%;text-align:center;height:60px;line-height:60px;margin-top:30px}
-        .check-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px solid #ddd}
+        .check-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px slid #ddd}
+        .check-cfm-btn{background:#3daae9;color:#fff}
+        .cfm-btn:active,.return-btn:active{background:#ddd;color:#fff}
         .mask{width:100%;height:100%;position:fixed;top:0;background:rgba(0,0,0,0.7);display:none}
-        .tips-popup-content{width:40%;height:auto;padding-bottom:30px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}
+        .tips-popup-content{width:40%;height:auto;padding-bottom:30px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:abslute;top:50%;left:50%;transform:translate(-50%,-50%)}
         .tips-popup-content div{width:100%;text-align:center}
         .tips-popup-content{width:30%}
         .tips-popup-content p{text-align:center;padding:80px;font-size:20px}
-        .tips-popup-content h4{padding-left:10px;height:40px;line-height:40px;border-bottom:1px solid #eee;margin-bottom:20px}
+        .tips-popup-content h4{padding-left:10px;height:40px;line-height:40px;border-bottom:1px slid #eee;margin-bottom:20px}
         .tips-cfm-btn,.tips-cancel-btn,.check-blue-btn,.check-grey-btn{width:100px;height:40px;margin:auto;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;background:#3daae9;color:#fff;border:none}
         .refuse-btn{margin-left:50px}
         .return-btn,.tips-cancel-btn,.check-grey-btn{background:#fff;color:#555;margin-left:50px}
-        .tips-cancel-btn,.check-grey-btn{border:1px solid #ddd;margin-left:20px;display:none}
-        #close-btn1{top:8px;right:10px;width:18px;position:absolute;cursor:pointer}
-        .tips-popup-reason .tips-popup-content{height:250px}
-        .tips-popup-reason .tips-popup-content div{position:absolute;bottom:15px}
-        .tips-popup-reason .check-grey-btn{display:inline-block}
-        #refuse-reason{width:80%;height:48%;left:8%;position:absolute;resize:none}
-        .tips-popup-reason h5{color:#555;padding-left:8%;margin-bottom:4px;margin-top:-12px}
-        .check-cfm-btn{background:#3daae9;color:#fff}
-    </style>
-    <style media="print">
-        .styleWidth{width:6%;word-break:break-all}
-        .styleWidth{}
-        .styleWidth3{width:10%;word-break:break-all}
-        .table{margin-left:0;margin-bottom:20px;padding-bottom:2px;border-bottom:1px solid #ddd;box-sizing:border-box}
-        .export{display:none}
+        .tips-cancel-btn,.check-grey-btn{border:1px slid #ddd;margin-left:20px;display:none}
+        #close-btn1{top:8px;right:10px;width:18px;position:abslute;cursr:pointer}
+        .tips-popup-reasn .tips-popup-content{height:250px}
+        .tips-popup-reasn .tips-popup-content div{position:abslute;bottom:15px}
+        .tips-popup-reasn .check-grey-btn{display:inline-block}
+        #refuse-reasn{width:80%;height:48%;left:8%;position:abslute;resize:none}
+        .tips-popup-reasn h5{color:#555;padding-left:8%;margin-bottom:4px;margin-top:-12px}
+        .red{color:red;}
+        .payment-form-bottom .wipeImgs{height:auto;padding:8px 0;}
+        .wipeImgs img{width:120px;height:90px;background-color:#eee;margin-right:15px;}
+        .weishaIcon {background:darkorange;color:white;margin:0 0px;padding:0 3px;font-style:normal;font-size: 12px; display:inline-block;border-radius:2px}
     </style>
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/cmPayShop/">付款列表</a></li>
+    <li><a href="${ctx}/order/cmPayShop/">付款管理</a></li>
     <li class="active"><a href="${ctx}/order/cmPayShop/toCheck?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>
+            <label><span class="required">* </span>付款单名称:</label>
+            <span>${cmPayShop.name}</span>
         </div>
         <div>
-            <label>付款单名称:</label>
-            <span>${cmPayShop.name}</span>
+            <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>
+            <label><em class="required">* </em>付款账号:</label>
+            <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>
         </div>
+    </div>
+    <div class="payment-form-content">
+        <c:forEach items="${cmPayShop.shopOrders}" var="s">
+            <%--涛姐遍历下面这个table--%>
+            <table class="table table-striped table-bordered table-condensed pay-table">
+                <tr>
+                    <th>子订单编号(ID)</th>
+                    <th colspan="3">订单编号(ID)</th>
+                    <th colspan="2">订单金额</th>
+                    <th colspan="3">下单时间</th>
+                    <th>收款状态</th>
+                    <th>收款金额</th>
+                    <th colspan="2">经理折扣</th>
+                    <th colspan="3">成本类型</th>
+                    <th colspan="2">付第三方</th>
+                </tr>
+                <tr>
+                    <td>${s.shopOrderNo}(${s.shopOrderID})</td>
+                    <td colspan="3">${s.orderNo}(${s.orderID})</td>
+                    <td colspan="2">${s.payTotalFee}</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="2">
+                        <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="3"><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if test="${s.costType == '2'}">比例成本</c:if></td>
+                    <td colspan="2" class="third-party-fee"><fmt:formatNumber value="${s.shopOtherFee}" type="number" pattern="#,##0.00"/></td>
+                </tr>
+                <tr>
+                    <th>供应商</th>
+                    <th colspan="3">机构</th>
+                    <th>机构运费</th>
+                    <th>供应商运费</th>
+                    <th colspan="3">商品费</th>
+                    <th colspan="2">付款状态</th>
+                    <th colspan="2">采美佣金</th>
+                    <th colspan="3">应付税费</th>
+                    <th colspan="2">付供应商</th>
+                </tr>
+                <tr>
+                    <td>${s.shopName}</td>
+                    <td colspan="3">${s.buyer}<c:if test="${s.organizeID == 3}"></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>
+                    </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="2" class="payCm-t"></td>
+                    <td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
+                    <td colspan="2" class="supplier-fee">
+                        <div>
+                            <c:if test="${s.differenceType ne 1 && s.differenceType ne 2}">应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
+                            </c:if>
+                            <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
+                                <font color="black">${s.shouldPayShopAmount+s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已补差价:${s.differencePrice})</font>
+                            </c:if>
+                            <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
+                                <font color="black">${s.shouldPayShopAmount-s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已退差价:${s.differencePrice})</font>
+                            </c:if>
+                            , 已付:<fmt:formatNumber value="${s.payedShopAmount}" type="number" pattern="#,##0.00"/>
+                        </div>
+                        <div>
+                            <c:if test="${s.refundAmount > 0}">
+                                <span style="color:red">退款:<fmt:formatNumber value="${s.refundAmount}" type="number" pattern="#,##0.00"/></span>,
+                            </c:if>
+                            待付: <fmt:formatNumber value="${s.waitPayShop}" type="number" pattern="#,##0.00"/>
+                        </div>
+                        <c:if test="${s.wipePayment > 0}">
+                            <div>
+                                付款抹平:<fmt:formatNumber value="${s.wipePayment}" type="number" pattern="#,##0.00"/>
+                            </div>
+                        </c:if>
+                    </td>
+                </tr>
+                <tr>
+                    <th>商品名</th>
+                    <th>规格</th>
+                    <th>数量<%--(赠品)--%></th>
+                    <th>退货</th>
+                    <th colspan="2">单价</th>
+                    <th colspan="3">机构税率 / 单税费 / 总税费</th>
+                    <th colspan="2">总价</th>
+                    <th>佣金(单)</th>
+                    <th>佣金(总)</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}">
+                                <font color="red">
+                                    (${p.includedTax eq 1?'含税':(p.invoiceType eq 1 or p.invoiceType eq 2)?'不含税-能开票':'不含税-不能开票'})
+                                </font>
+                            </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>
+                        <c:if test="${empty p.touchPrice}">
+                            <td><fmt:formatNumber value="${p.discountPrice + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax}" pattern="#,##0.00"/></td>
+                            <td class="payCm"><fmt:formatNumber value="${(p.discountPrice + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax) * (p.num + p.presentNum - p.returnedNum)}" pattern="#,##0.00"/></td>
+                        </c:if>
+                        <c:if test="${!empty p.touchPrice}">
+                            <td><fmt:formatNumber value="${p.touchPrice + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax}" pattern="#,##0.00"/></td>
+                            <td class="payCm"><fmt:formatNumber value="${(p.touchPrice + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax) * (p.num + p.presentNum - p.returnedNum)}" pattern="#,##0.00"/></td>
+                        </c:if>
+                        <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>
+        </c:forEach>
+    </div>
+    <div class="payment-form-bottom">
         <div>
             <label>付第三方金额:</label>
             <span>${cmPayShop.totalAmount}</span>
         </div>
+
         <div>
+            <label style="font-weight: bold; font-size:18px">转账支付:</label>
+            <span id="transferPayFee" style="font-weight: bold; font-size:18px"><fmt:formatNumber value="${cmPayShop.transferPayFee}" pattern="#,##0.00"/> </span>
             <label>付款银行:</label><span>
 					<select name="payType">
 						<option value="1">建设银行7297</option>
@@ -108,64 +539,49 @@
             <span>${cmPayShop.payTime}</span>
             <input name="id" value="${cmPayShop.id}" id="id" type="hidden">
         </div>
-        <div>
-            <label>申请人:</label>
-            <span>${cmPayShop.applicantName}</span>
+        <div class="process-details">
+            <label>申请人:</label><div class="process-for-label">${cmPayShop.applicantName}</div>
+            <span>申请时间:</span><div>${cmPayShop.applyTime}</div>
+            <span>审核人:</span><div>
+            <c:if test="${cmPayShop.status == 1 || cmPayShop.status == 2}">
+                ${cmPayShop.reviewerName}
+            </c:if>
         </div>
-        <div>
-            <label>申请时间:</label>
-            <span>${cmPayShop.applyTime}</span>
+            <span>审核时间:</span><div>
+            <c:if test="${cmPayShop.status == 1 || cmPayShop.status == 2}">
+                ${cmPayShop.reviewTime}
+            </c:if>
         </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'}">
-                    审核不通过
-                </c:if>
-            </span>
         </div>
-        <c:if test="${cmPayShop.status == '2'}">
-            <div>
-                <label>原因:</label>
-                <span>${cmPayShop.reason}</span>
-            </div>
-        </c:if>
     </div>
     <div class="check-btn">
         <button class="check-cfm-btn" type="button">审核通过</button>
         <button class="refuse-btn" type="button">审核不通过</button>
         <button class="return-btn" type="button" onclick="history.go(-1)">返回</button>
     </div>
-    <div class="mask tips-popup-reason">
-        <div class="tips-popup-content">
-            <h4>确认提示</h4>
-            <h5><span class="required">* </span>审核不通过原因:</h5>
-            <textarea id="refuse-reason" cols="30" rows="10" maxlength="200"></textarea>
-            <div>
-                <button class="check-cfm-btn check-blue-btn" type="button">确定</button>
-                <button class="check-grey-btn" type="button">取消</button>
-            </div>
-            <img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">
+</div>
+<%--</form>--%>
+<div class="mask tips-popup-reasn">
+    <div class="tips-popup-content">
+        <h4>确认提示</h4>
+        <h5><span class="required">* </span>审核不通过原因:</h5>
+        <textarea id="refuse-reasn" cols="30" rows="10" maxlength="200"></textarea>
+        <div>
+            <button class="check-cfm-btn check-blue-btn" type="button">确定</button>
+            <button class="check-grey-btn" type="button">取消</button>
         </div>
+        <img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">
     </div>
-    <div class="mask tips-popup">
-        <div class="tips-popup-content">
-            <h4>信息提示</h4>
-            <p></p>
-            <div>
-                <button class="tips-cfm-btn tips-cfm-directly" type="button">确定</button>
-                <button class="tips-cancel-btn" type="button">取消</button>
-            </div>
-            <img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">
+</div>
+<div class="mask tips-popup">
+    <div class="tips-popup-content">
+        <h4>信息提示</h4>
+        <p></p>
+        <div>
+            <button class="tips-cfm-btn tips-cfm-directly" type="button">确定</button>
+            <button class="tips-cancel-btn" type="button">取消</button>
         </div>
+        <img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">
     </div>
 </div>
 <script>
@@ -206,10 +622,10 @@
             }
         })
         $('.refuse-btn').on('click',function() {
-            $('.tips-popup-reason').show();
+            $('.tips-popup-reasn').show();
         })
         $('.check-grey-btn').on('click',function() {
-            $('.tips-popup-reason').hide();
+            $('.tips-popup-reasn').hide();
         })
 
         function showTips(title,text) {
@@ -229,13 +645,13 @@
             var payType = $('select[name="payType"]').val(),
                 id = $('#id').val();
             if($(this).hasClass('check-blue-btn')) {
-                var textareaVal = $('#refuse-reason').val();
+                var textareaVal = $('#refuse-reasn').val();
                 if(!textareaVal.trim()) {
                     showTips('信息提示','审核原因不能为空');
                     return false;
                 }
                 if(unaccessFlag) {
-                    window.location.href = '${ctx}/order/cmPayShop/checkNotPass?id=' + id + '&reason=' + textareaVal;
+                    window.location.href = '${ctx}/order/cmPayShop/checkNotPass?id=' + id + '&reasn=' + textareaVal;
                     unaccessFlag = false;
                 }
             } else {
@@ -247,6 +663,8 @@
         })
 
     })()
+
 </script>
 </body>
 </html>
+

+ 773 - 98
src/main/webapp/WEB-INF/views/modules/order/cmPayShopOtherPrintDetail.jsp

@@ -1,69 +1,474 @@
+<%--<%@ page contentType="text/html;charset=UTF-8" %>--%>
+<%--<%@ include file="/WEB-INF/views/include/taglib.jsp"%>--%>
+<%--<html>--%>
+<%--<head>--%>
+<%--    <title>付款单表管理</title>--%>
+<%--    <meta name="decorator" content="default"/>--%>
+<%--    <style>--%>
+<%--        a[href]:after {--%>
+<%--            content: none !important;--%>
+<%--        }--%>
+<%--        .table th{text-align:center}--%>
+<%--        .table td{text-align:center}--%>
+<%--        .payment-form h4{width:96%;margin-left:2%;padding-bottom:20px;text-align:center;border-bottom:1px solid #eee}--%>
+<%--        .required{color:red}--%>
+<%--        .payment-form label{width:105px;text-align:right;vertical-align:middle;font-weight:600}--%>
+<%--        .payment-form-top{padding:10px 0}--%>
+<%--        .payment-form-top>div,.payment-form-bottom>div{width:94%;margin-left:3%;height:50px;line-height:50px;border-bottom:1px solid #eee;white-space:nowrap}--%>
+<%--        .payment-form-top input{vertical-align:baseline}--%>
+<%--        .payment-form-top>div:last-child span{margin-left:15px}--%>
+<%--        .payment-form-top>div:last-child span:nth-of-type(1){margin-left:0}--%>
+<%--        .pay-table th{background:#f9f9f9}--%>
+<%--        .pay-table tr:first-child th{background:#eee !important}--%>
+<%--        .pay-table td{background:#fff !important}--%>
+<%--        .check-btn{width:96%;margin-left:2%;text-align:center;height:60px;line-height:60px;margin-top:30px}--%>
+<%--        .check-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px solid #ddd}--%>
+<%--        .payment-form-bottom label{width:140px}--%>
+<%--        .process-details span{width:140px;margin-left:50px;font-weight:600}--%>
+<%--        .process-details div{display:inline-block}--%>
+<%--        .payment-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px solid #ddd}--%>
+<%--        .apply-btn{background:#3daae9;color:#fff}--%>
+<%--        .tips-popup-content div{width:100%;text-align:center}--%>
+<%--        .tips-popup-content p{text-align:center;padding:80px;font-size:20px}--%>
+<%--        .tips-popup-content h4{padding-left:10px;height:40px;line-height:40px;border-bottom:1px solid #eee;margin-bottom:20px}--%>
+<%--        .payment-form-bottom .wipeImgs{height:auto;padding:8px 0;}--%>
+<%--        .wipeImgs img{width:120px;height:90px;background-color:#eee;margin-right:15px;}--%>
+<%--    </style>--%>
+<%--    <style media="print">--%>
+<%--        .styleWidth{width:6%;word-break:break-all}--%>
+<%--        .styleWidth{}--%>
+<%--        .styleWidth3{width:10%;word-break:break-all}--%>
+<%--        .table{margin-left:0;margin-bottom:20px;padding-bottom:2px;border-bottom:1px solid #ddd;box-sizing:border-box}--%>
+<%--        .export{display:none}--%>
+<%--    </style>--%>
+<%--</head>--%>
+<%--<body>--%>
+<%--<ul class="nav nav-tabs">--%>
+<%--    <li><a href="${ctx}/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>--%>
+<%--            <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>--%>
+<%--                <c:if test="${cmPayShop.payType eq 1}">--%>
+<%--                    建设银行7297--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${cmPayShop.payType eq 2}">--%>
+<%--                    中信银行0897--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${cmPayShop.payType eq 3}">--%>
+<%--                    中信银行7172--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${cmPayShop.payType eq 4}">--%>
+<%--                    广发银行0115--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${cmPayShop.payType eq 5}">--%>
+<%--                    广发银行5461--%>
+<%--                </c:if>--%>
+<%--            </span>--%>
+<%--        </div>--%>
+<%--        <div>--%>
+<%--            <label>付款时间:</label>--%>
+<%--            <span>${cmPayShop.payTime}</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'}">--%>
+<%--                    审核不通过--%>
+<%--                </c:if>--%>
+<%--            </span>--%>
+<%--        </div>--%>
+<%--        <c:if test="${cmPayShop.status == '2'}">--%>
+<%--            <div>--%>
+<%--                <label>原因:</label>--%>
+<%--                <span class="required">${cmPayShop.reason}</span>--%>
+<%--            </div>--%>
+<%--        </c:if>--%>
+<%--        <div>--%>
+<%--            <label>审核时间:</label>--%>
+<%--            <span>${cmPayShop.reviewTime}</span>--%>
+<%--        </div>--%>
+<%--    </div>--%>
+<%--    <c:if test="${cmPayShop.status == '1'}">--%>
+<%--        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--%>
+<%--        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>财务签名:</span>--%>
+<%--        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--%>
+<%--        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>审批人签名:</span>--%>
+<%--        <div class="check-btn">--%>
+<%--            <button class="export apply-btn btn btn-primary">打印</button>--%>
+<%--        </div>--%>
+<%--    </c:if>--%>
+<%--</div>--%>
+<%--<script>--%>
+<%--    (function(){--%>
+<%--        $('.export').on('click',function() {--%>
+<%--            window.print();--%>
+<%--        })--%>
+<%--    })()--%>
+<%--</script>--%>
+<%--</body>--%>
+<%--</html>--%>
+
+
 <%@ page contentType="text/html;charset=UTF-8" %>
-<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
 <html>
 <head>
     <title>付款单表管理</title>
     <meta name="decorator" content="default"/>
     <style>
-        a[href]:after {
-            content: none !important;
-        }
-        .table th{text-align:center}
-        .table td{text-align:center}
-        .payment-form h4{width:96%;margin-left:2%;padding-bottom:20px;text-align:center;border-bottom:1px solid #eee}
-        .required{color:red}
-        .payment-form label{width:105px;text-align:right;vertical-align:middle;font-weight:600}
-        .payment-form-top{padding:10px 0}
-        .payment-form-top>div,.payment-form-bottom>div{width:94%;margin-left:3%;height:50px;line-height:50px;border-bottom:1px solid #eee;white-space:nowrap}
-        .payment-form-top input{vertical-align:baseline}
-        .payment-form-top>div:last-child span{margin-left:15px}
-        .payment-form-top>div:last-child span:nth-of-type(1){margin-left:0}
-        .pay-table th{background:#f9f9f9}
-        .pay-table tr:first-child th{background:#eee !important}
-        .pay-table td{background:#fff !important}
-        .check-btn{width:96%;margin-left:2%;text-align:center;height:60px;line-height:60px;margin-top:30px}
-        .check-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px solid #ddd}
-        .payment-form-bottom label{width:140px}
-        .process-details span{width:140px;margin-left:50px;font-weight:600}
-        .process-details div{display:inline-block}
-        .payment-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px solid #ddd}
-        .apply-btn{background:#3daae9;color:#fff}
-        .tips-popup-content div{width:100%;text-align:center}
-        .tips-popup-content p{text-align:center;padding:80px;font-size:20px}
-        .tips-popup-content h4{padding-left:10px;height:40px;line-height:40px;border-bottom:1px solid #eee;margin-bottom:20px}
-        .payment-form-bottom .wipeImgs{height:auto;padding:8px 0;}
-        .wipeImgs img{width:120px;height:90px;background-color:#eee;margin-right:15px;}
+        .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-list-item {
+            margin-bottom: 30px
+        }
+
+        .pay-table {
+            width: 96%;
+            margin-left: 2%;
+            margin-bottom: 10px
+        }
+
+        .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
+        }
+
+        .used-amount {
+            width: 80px;
+            margin-top: 6px
+        }
+
+        .process-details span {
+            width: 140px;
+            margin-left: 50px;
+            font-weight: 600
+        }
+
+        .process-for-label {
+            margin-left: 0 !important
+        }
+
+        .process-details div {
+            display: inline-block
+        }
+
+        .payment-btn {
+            width: 96%;
+            margin-left: 2%;
+            text-align: center;
+            height: 60px;
+            line-height: 60px;
+            margin-top: 30px
+        }
+
+        .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
+        }
+
+        .cfm-btn:active, .return-btn:active {
+            background: #ddd;
+            color: #fff
+        }
+
+        .mask {
+            width: 100%;
+            height: 100%;
+            position: fixed;
+            top: 0;
+            background: rgba(0, 0, 0, 0.7);
+            display: none
+        }
+
+        .tips-popup-content {
+            width: 40%;
+            height: auto;
+            padding-bottom: 30px;
+            background: #fff;
+            -webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px;
+            position: absolute;
+            top: 50%;
+            left: 50%;
+            transform: translate(-50%, -50%)
+        }
+
+        .tips-popup-content div {
+            width: 100%;
+            text-align: center
+        }
+
+        .tips-popup-content {
+            width: 30%
+        }
+
+        .tips-popup-content p {
+            text-align: center;
+            padding: 80px;
+            font-size: 20px
+        }
+
+        .tips-popup-content h4 {
+            padding-left: 10px;
+            height: 40px;
+            line-height: 40px;
+            border-bottom: 1px solid #eee;
+            margin-bottom: 20px
+        }
+
+        .tips-cfm-btn, .tips-cancel-btn, .export {
+            width: 100px;
+            height: 40px;
+            margin: auto;
+            -webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px;
+            background: #3daae9;
+            color: #fff;
+            border: none
+        }
+
+        .return-btn, .tips-cancel-btn {
+            background: #fff;
+            color: #555;
+            margin-left: 50px
+        }
+
+        .tips-cancel-btn {
+            border: 1px solid #ddd;
+            margin-left: 20px;
+            display: none
+        }
+
+        #close-btn1 {
+            top: 8px;
+            right: 10px;
+            width: 18px;
+            position: absolute;
+            cursor: pointer
+        }
+
+        .export {
+            float: right;
+            margin-right: 50px
+        }
+
+        .red {
+            color: red;
+        }
+
+        .payment-form-bottom .wipeImgs {
+            height: auto;
+            padding: 8px 0;
+        }
+
+        .wipeImgs img {
+            width: 120px;
+            height: 90px;
+            background-color: #eee;
+            margin-right: 15px;
+        }
+
+        .weishaIcon {
+            background: darkorange;
+            color: white;
+            margin: 0 0px;
+            padding: 0 3px;
+            font-style: normal;
+            font-size: 12px;
+            display: inline-block;
+            border-radius: 2px
+        }
     </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}
+        .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/>
+</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>
+            <label><span class="required">* </span>付款单名称:</label>
+            <span>${cmPayShop.name}</span>
         </div>
         <div>
-            <label>付款单名称:</label>
-            <span>${cmPayShop.name}</span>
+            <label>供应商名称:</label>
+            <span>${cmPayShop.shopName}</span>
         </div>
         <div>
-            <label>付款账号:</label>
+            <label><em class="required">* </em>付款账号:</label>
             <c:if test="${cmPayShop.payType eq '6'}">
             </c:if>
@@ -77,84 +482,354 @@
 					</span>
             </c:if>
         </div>
+    </div>
+    <div class="payment-form-content">
+        <%--涛姐遍历下面这个table--%>
+        <c:forEach items="${cmPayShop.shopOrders}" var="s">
+            <table class="table table-striped table-bordered table-condensed pay-table">
+                <tr>
+                    <th>子订单编号(ID)</th>
+                    <th colspan="3">订单编号(ID)</th>
+                    <th colspan="2">订单金额</th>
+                    <th colspan="3">下单时间</th>
+                    <th>收款状态</th>
+                    <th>收款金额</th>
+                    <th colspan="2">经理折扣</th>
+                    <th colspan="3">成本类型</th>
+                    <th colspan="2">付第三方</th>
+                </tr>
+                <tr>
+                    <td>${s.shopOrderNo}(${s.shopOrderID})</td>
+                    <td colspan="3">${s.orderNo}(${s.orderID})</td>
+                    <td colspan="2">${s.payTotalFee}</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="2">
+                        <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="3"><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if
+                            test="${s.costType == '2'}">比例成本</c:if></td>
+                    <td colspan="2" class="third-party-fee"><fmt:formatNumber value="${s.shopOtherFee}" type="number"
+                                                                              pattern="#,##0.00"/></td>
+                </tr>
+                <tr>
+                    <th>供应商</th>
+                    <th colspan="3">机构</th>
+                    <th>机构运费</th>
+                    <th>供应商运费</th>
+                    <th colspan="3">商品费</th>
+                    <th colspan="2">付款状态</th>
+                    <th colspan="2">采美佣金</th>
+                    <th colspan="3">应付税费</th>
+                    <th colspan="2">付供应商</th>
+                </tr>
+                <tr>
+                    <td>${s.shopName}</td>
+                    <td colspan="3">
+                            ${s.clubName}
+                        <c:if test="${s.orderType eq 2}"><font color="red">(呵呵商城)</font></c:if>
+                        <c:if test="${s.organizeID == 3}"></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>
+                    </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="2" class="payCm-t"></td>
+                    <td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number"
+                                                                    pattern="#,##0.00"/></td>
+                    <td colspan="2" class="supplier-fee">
+                        <div>
+                            <c:if test="${s.differenceType ne 1 && s.differenceType ne 2}">应付:<fmt:formatNumber
+                                    value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
+                            </c:if>
+                            <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
+                                <font color="black">${s.shouldPayShopAmount+s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已补差价:${s.differencePrice})</font>
+                            </c:if>
+                            <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
+                                <font color="black">${s.shouldPayShopAmount-s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已退差价:${s.differencePrice})</font>
+                            </c:if>,
+                            已付:<fmt:formatNumber value="${s.payedShopAmount}" type="number" pattern="#,##0.00"/>
+                        </div>
+                        <div>
+                            <c:if test="${s.refundAmount > 0}">
+                                <span style="color:red">退款:<fmt:formatNumber value="${s.refundAmount}" type="number"
+                                                                             pattern="#,##0.00"/></span>,
+                            </c:if>
+                            待付: <fmt:formatNumber
+                                value="${s.wipePayment > 0 ? 0 : (s.differenceType eq 1 ? (s.differencePrice + s.waitPayShop):(s.waitPayShop - s.differencePrice))}"
+                                type="number" pattern="#,##0.00"/>
+                        </div>
+                        <c:if test="${s.wipePayment > 0}">
+                            <div>
+                                付款抹平:<fmt:formatNumber value="${s.wipePayment}" type="number" pattern="#,##0.00"/>
+                            </div>
+                        </c:if>
+                    </td>
+                </tr>
+                <tr>
+                    <th>商品名</th>
+                    <th>规格</th>
+                    <th>数量<%--(赠品)--%></th>
+                    <th>退货</th>
+                    <th colspan="2">单价</th>
+                    <th colspan="3">机构税率 / 单税费 / 总税费</th>
+                    <th colspan="2">总价</th>
+                    <th>佣金(单)</th>
+                    <th>佣金(总)</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}">
+                                <font color="red">
+                                    (${p.includedTax eq 1?'含税':(p.invoiceType eq 1 or p.invoiceType eq 2)?'不含税-能开票':'不含税-不能开票'})
+                                </font>
+                            </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>
+                        <c:if test="${empty p.touchPrice}">
+                            <td><fmt:formatNumber
+                                    value="${p.discountPrice + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax}"
+                                    pattern="#,##0.00"/></td>
+                            <td class="payCm"><fmt:formatNumber
+                                    value="${(p.discountPrice + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax) * (p.num + p.presentNum - p.returnedNum)}"
+                                    pattern="#,##0.00"/></td>
+                        </c:if>
+                        <c:if test="${!empty p.touchPrice}">
+                            <td><fmt:formatNumber
+                                    value="${p.touchPrice + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax}"
+                                    pattern="#,##0.00"/></td>
+                            <td class="payCm"><fmt:formatNumber
+                                    value="${(p.touchPrice + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax) * (p.num + p.presentNum - p.returnedNum)}"
+                                    pattern="#,##0.00"/></td>
+                        </c:if>
+                        <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>
+        </c:forEach>
+    </div>
+    <div class="payment-form-bottom">
         <div>
             <label>付第三方金额:</label>
             <span>${cmPayShop.totalAmount}</span>
         </div>
-        <div>
-            <label>付款银行:</label>
-            <span>
-                <c:if test="${cmPayShop.payType eq 1}">
-                    建设银行7297
-                </c:if>
-                <c:if test="${cmPayShop.payType eq 2}">
-                    中信银行0897
-                </c:if>
-                <c:if test="${cmPayShop.payType eq 3}">
-                    中信银行7172
-                </c:if>
-                <c:if test="${cmPayShop.payType eq 4}">
-                    广发银行0115
-                </c:if>
-                <c:if test="${cmPayShop.payType eq 5}">
-                    广发银行5461
+
+        <c:if test="${cmPayShop.payType ne '6'}">
+            <div>
+                <label style="font-weight: bold; font-size:18px">转账支付:</label>
+                <span id="transferAmount" style="font-weight: bold; font-size:18px"><fmt:formatNumber
+                        value="${cmPayShop.transferPayFee}" pattern="#,##0.00"/></span>
+                <c:if test="${cmPayShop.status != '2'}">
+                    <c:if test="${not empty cmPayShop.payType }">
+                        <label>付款银行:</label>
+                        <span id="payType">
+							<c:if test="${cmPayShop.payType eq 1}">
+                                建设银行7297
+                            </c:if>
+							<c:if test="${cmPayShop.payType eq 2}">
+                                中信银行0897
+                            </c:if>
+							<c:if test="${cmPayShop.payType eq 3}">
+                                中信银行7172
+                            </c:if>
+							<c:if test="${cmPayShop.payType eq 4}">
+                                广发银行0115
+                            </c:if>
+							<c:if test="${cmPayShop.payType eq 5}">
+                                广发银行5461
+                            </c:if>
+						</span>
+                    </c:if>
+                    <c:if test="${cmPayShop.status != '0'}">
+                        <label>付款时间:</label>
+                        <span>${cmPayShop.payTime}</span>
+                    </c:if>
                 </c:if>
-            </span>
-        </div>
-        <div>
-            <label>付款时间:</label>
-            <span>${cmPayShop.payTime}</span>
-        </div>
-        <div>
+            </div>
+        </c:if>
+        <div class="process-details">
             <label>申请人:</label>
-            <span>${cmPayShop.applicantName}</span>
-        </div>
-        <div>
-            <label>申请时间:</label>
-            <span>${cmPayShop.applyTime}</span>
+            <div class="process-for-label">${cmPayShop.payType eq '6'? '系统自动':cmPayShop.applicantName}</div>
+            <span>申请时间:</span>
+            <div>${cmPayShop.applyTime}</div>
+            <c:if test="${cmPayShop.status != '0'}">
+                <span>审核人:</span>
+                <div>
+                    <c:if test="${cmPayShop.status == 1 || cmPayShop.status == 2}">
+                        ${cmPayShop.payType eq '6'? '系统自动':cmPayShop.reviewerName}
+                    </c:if>
+                </div>
+                <span>审核时间:</span>
+                <div>
+                    <c:if test="${cmPayShop.status == 1 || cmPayShop.status == 2}">
+                        ${cmPayShop.reviewTime}
+                    </c:if>
+                </div>
+            </c:if>
         </div>
-        <div>
+        <div class="process-details process-details-last">
             <label>审核状态:</label>
-            <span>
+            <div class="process-for-label">
                 <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'}">
-                    审核不通过
-                </c:if>
-            </span>
-        </div>
-        <c:if test="${cmPayShop.status == '2'}">
-            <div>
-                <label>原因:</label>
-                <span class="required">${cmPayShop.reason}</span>
-            </div>
-        </c:if>
-        <div>
-            <label>审核时间:</label>
-            <span>${cmPayShop.reviewTime}</span>
+                    <font color="red">审核不通过</font>
+                </c:if></div>
+            <c:if test="${cmPayShop.status == '2'}">
+                <span>原因:</span>
+                <div>
+                        ${cmPayShop.reason}
+                </div>
+            </c:if>
         </div>
     </div>
     <c:if test="${cmPayShop.status == '1'}">
-        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>财务签名:</span>
-        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>审批人签名:</span>
         <div class="check-btn">
-            <button class="export apply-btn btn btn-primary">打印</button>
+            <button class="apply-btn btn btn-primary" type="button"
+                    onclick="window.location.href='${ctx}/order/cmPayShop/printDetail?id=${cmPayShop.id}'">去打印
+            </button>
         </div>
     </c:if>
 </div>
 <script>
-    (function(){
-        $('.export').on('click',function() {
+    (function () {
+        var payTableEle = $('.pay-table'),
+            payProductEle = $('.pay-product-item');
+        payTableEle.each(function (i, l) {
+            var productLength = $(this).find('.pay-product-item').length;
+            // 商品列表合并单元格
+            $(this).find('.mergeRows').attr('rowspan', productLength);
+        });
+
+        $('.tips-cancel-btn, #close-btn1').on('click', function () {
+            $('.tips-popup').hide();
+        })
+        $('.tips-cfm-directly').on('click', function () {
+            if ($('.tips-cfm-btn').hasClass('tips-cfm-directly')) {
+                $('.tips-popup').hide();
+            }
+        })
+        $('.pay-table').each(function () {
+            var thisEle = $(this),
+                totalComissionVal = 0,
+                resVal = '';
+            totalComissionEle = thisEle.find('.payCm'),
+                comissionEle = thisEle.find('.payCm-t'),
+                thirdPartyVal = thisEle.find('.third-party-fee').text().replace(',', ''),
+                freightVal = thisEle.find('.freight').text().replace(',', '');
+            totalComissionEle.each(function () {
+                totalComissionVal += Number($(this).text().replace(',', ''));
+            })
+            resVal = (totalComissionVal - thirdPartyVal - freightVal).toFixed(2);
+            comissionEle.text(resVal);
+        })
+
+        $('.export').on('click', function () {
             window.print();
         })
+
+        function showTips(title, text) {
+            $('.tips-popup h4').text(title);
+            $('.tips-popup p').text(text);
+            $('.tips-popup').show();
+        }
     })()
 </script>
 </body>

+ 600 - 0
src/main/webapp/WEB-INF/views/modules/order/cmPayShopOtherPrintDetails.jsp

@@ -0,0 +1,600 @@
+<%@ 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-list-item {
+            margin-bottom: 30px
+        }
+
+        .pay-table {
+            width: 96%;
+            margin-left: 2%;
+            margin-bottom: 10px
+        }
+
+        .pay-table th {
+            background: #f9f9f9
+        }
+
+        .pay-table tr:first-child th {
+            background: #eee !important
+        }
+
+        .pay-table td {
+            background: #fff !important
+        }
+
+        .supplier-fee {
+            text-align: left !important;
+            padding-top: 20px !important;
+            padding-left: 20px !important;
+            white-space: nowrap
+        }
+
+        .need-to-pay {
+            width: 50px
+        }
+
+        .payment-form-bottom label {
+            width: 140px
+        }
+
+        .used-amount {
+            width: 80px;
+            margin-top: 6px
+        }
+
+        .process-details span {
+            width: 140px;
+            margin-left: 50px;
+            font-weight: 600
+        }
+
+        .process-for-label {
+            margin-left: 0 !important
+        }
+
+        .process-details div {
+            display: inline-block
+        }
+
+        .payment-btn {
+            width: 96%;
+            margin-left: 2%;
+            text-align: center;
+            height: 60px;
+            line-height: 60px;
+            margin-top: 30px
+        }
+
+        .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
+        }
+
+        .cfm-btn:active, .return-btn:active {
+            background: #ddd;
+            color: #fff
+        }
+
+        .mask {
+            width: 100%;
+            height: 100%;
+            position: fixed;
+            top: 0;
+            background: rgba(0, 0, 0, 0.7);
+            display: none
+        }
+
+        .tips-popup-content {
+            width: 40%;
+            height: auto;
+            padding-bottom: 30px;
+            background: #fff;
+            -webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px;
+            position: absolute;
+            top: 50%;
+            left: 50%;
+            transform: translate(-50%, -50%)
+        }
+
+        .tips-popup-content div {
+            width: 100%;
+            text-align: center
+        }
+
+        .tips-popup-content {
+            width: 30%
+        }
+
+        .tips-popup-content p {
+            text-align: center;
+            padding: 80px;
+            font-size: 20px
+        }
+
+        .tips-popup-content h4 {
+            padding-left: 10px;
+            height: 40px;
+            line-height: 40px;
+            border-bottom: 1px solid #eee;
+            margin-bottom: 20px
+        }
+
+        .tips-cfm-btn, .tips-cancel-btn, .export {
+            width: 100px;
+            height: 40px;
+            margin: auto;
+            -webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px;
+            background: #3daae9;
+            color: #fff;
+            border: none
+        }
+
+        .return-btn, .tips-cancel-btn {
+            background: #fff;
+            color: #555;
+            margin-left: 50px
+        }
+
+        .tips-cancel-btn {
+            border: 1px solid #ddd;
+            margin-left: 20px;
+            display: none
+        }
+
+        #close-btn1 {
+            top: 8px;
+            right: 10px;
+            width: 18px;
+            position: absolute;
+            cursor: pointer
+        }
+
+        .export {
+            float: right;
+            margin-right: 50px
+        }
+
+        .red {
+            color: red;
+        }
+
+        .payment-form-bottom .wipeImgs {
+            height: auto;
+            padding: 8px 0;
+        }
+
+        .wipeImgs img {
+            width: 120px;
+            height: 90px;
+            background-color: #eee;
+            margin-right: 15px;
+        }
+
+        .weishaIcon {
+            background: darkorange;
+            color: white;
+            margin: 0 0px;
+            padding: 0 3px;
+            font-style: normal;
+            font-size: 12px;
+            display: inline-block;
+            border-radius: 2px
+        }
+    </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
+        }
+
+        .nav-tabs {
+            display: none
+        }
+
+        .payment-form-top > div, .payment-form-bottom > div {
+            height: 30px;
+            line-height: 30px
+        }
+
+        .pay-table {
+            margin-bottom: 0
+        }
+    </style>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/order/cmPayShop/">付款管理</a></li>
+    <li class="active"><a href="${ctx}/order/cmPayShop/printDetail?id=${cmPayShop.id}">付款详情</a></li>
+</ul>
+<br/>
+<div class="payment-form">
+    <h4>付款单</h4>
+    <div class="payment-form-top">
+        <button class="export">打印</button>
+        <div>
+            <label><span class="required">* </span>付款单名称:</label>
+            <span>${cmPayShop.name}</span>
+        </div>
+        <div>
+            <label>供应商名称:</label>
+            <span>${cmPayShop.shopName}</span>
+        </div>
+        <div>
+            <label><em class="required">* </em>付款账号:</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>
+    <div class="payment-form-content">
+        <%--涛姐遍历下面这个table--%>
+        <c:forEach items="${cmPayShop.shopOrders}" var="s">
+            <table class="table table-striped table-bordered table-condensed pay-table">
+                <tr>
+                    <th>子订单编号(ID)</th>
+                    <th colspan="3">订单编号(ID)</th>
+                    <th>订单金额</th>
+                    <th>下单时间</th>
+                    <th colspan="2">经理折扣</th>
+                    <th>成本类型</th>
+                    <th>付第三方</th>
+                </tr>
+                <tr>
+                    <td>${s.shopOrderNo}(${s.shopOrderID})</td>
+                    <td colspan="3">${s.orderNo}(${s.orderID})</td>
+                    <td>${s.payTotalFee}</td>
+                    <td>${s.orderTime}</td>
+                    <td colspan="2">
+                        <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><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if
+                            test="${s.costType == '2'}">比例成本</c:if></td>
+                    <td class="third-party-fee"><fmt:formatNumber value="${s.shopOtherFee}" type="number"
+                                                                  pattern="#,##0.00"/></td>
+                </tr>
+                <tr>
+                    <th>供应商</th>
+                    <th colspan="3">客户</th>
+                    <th>机构运费</th>
+                    <th>供应商运费</th>
+                    <th>商品费</th>
+                    <th>付款状态</th>
+                    <th>应付税费</th>
+                    <th colspan="2">付供应商</th>
+                </tr>
+                <tr>
+                    <td>${s.shopName}</td>
+                    <td colspan="3">${s.buyer}<c:if test="${s.organizeID == 3}"></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>
+                    </td>
+                    <td class="freight"><fmt:formatNumber value="${s.shopPostFee}" type="number"
+                                                          pattern="#,##0.00"/></td>
+                    <td class="product-fee"><fmt:formatNumber value="${s.shopProductAmount}" type="number"
+                                                              pattern="#,##0.00"/>
+                    <td><c:if test="${s.payStatus == 1}"><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 class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
+                    <td class="supplier-fee">
+                        <div>
+                            <c:if test="${s.differenceType ne 1 && s.differenceType ne 2}">应付:<fmt:formatNumber
+                                    value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
+                            </c:if>
+                            <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
+                                <font color="black">${s.shouldPayShopAmount+s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已补差价:${s.differencePrice})</font>
+                            </c:if>
+                            <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
+                                <font color="black">${s.shouldPayShopAmount-s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已退差价:${s.differencePrice})</font>
+                            </c:if>
+                            ,已付:<fmt:formatNumber value="${s.payedShopAmount}" type="number" pattern="#,##0.00"/>
+                        </div>
+                        <div>
+                            <c:if test="${s.refundAmount > 0}">
+                                <span style="color:red">退款:<fmt:formatNumber value="${s.refundAmount}" type="number"
+                                                                             pattern="#,##0.00"/></span>,
+                            </c:if>
+                            待付:<fmt:formatNumber value="${s.wipePayment>0 ? 0 : s.waitPayShop}" type="number"
+                                                 pattern="#,##0.00"/>
+                        </div>
+                        <c:if test="${s.wipePayment > 0}">
+                            <div>
+                                付款抹平:<fmt:formatNumber value="${s.wipePayment}" type="number" pattern="#,##0.00"/>
+                            </div>
+                        </c:if>
+                    </td>
+                </tr>
+                <tr>
+                    <th>商品名</th>
+                    <th>规格</th>
+                    <th>数量<%--(赠品数)--%></th>
+                    <th>退货<%--数量--%></th>
+                    <th>供应商税率</th>
+                    <th>供应商税费(单)</th>
+                    <th colspan="2">供应商税费(总)</th>
+                    <th>成本(单)</th>
+                    <th>成本(总)</th>
+                </tr>
+                <c:forEach items="${s.newOrderProducts}" var="p" varStatus="pIndex">
+                    <tr class="pay-product-item">
+                        <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':''}">${empty p.returnedNum?0:p.returnedNum}</font></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 colspan="2" 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><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>
+        </c:forEach>
+    </div>
+    <div class="payment-form-bottom">
+        <div>
+            <label>付第三方金额:</label>
+            <span>${cmPayShop.totalAmount}</span>
+        </div>
+
+        <c:if test="${cmPayShop.payType ne '6'}">
+            <div>
+                <label style="font-weight: bold; font-size:18px">转账支付:</label>
+                <span id="transferAmount" style="font-weight: bold; font-size:18px"><fmt:formatNumber
+                        value="${cmPayShop.transferPayFee}" pattern="#,##0.00"/> </span>
+                <c:if test="${not empty cmPayShop.payType }">
+                    <label>付款银行:</label>
+                    <span id="payType">
+						<c:if test="${cmPayShop.payType eq 1}">
+                            建设银行7297
+                        </c:if>
+						<c:if test="${cmPayShop.payType eq 2}">
+                            中信银行0897
+                        </c:if>
+						<c:if test="${cmPayShop.payType eq 3}">
+                            中信银行7172
+                        </c:if>
+						<c:if test="${cmPayShop.payType eq 4}">
+                            广发银行0115
+                        </c:if>
+						<c:if test="${cmPayShop.payType eq 5}">
+                            广发银行5461
+                        </c:if>
+					</span>
+                </c:if>
+                <label>付款时间:</label>
+                <span>${cmPayShop.payTime}</span>
+            </div>
+        </c:if>
+        <div class="process-details">
+            <label>申请人:</label>
+            <div class="process-for-label">${cmPayShop.payType eq '6'? '系统自动':cmPayShop.applicantName}</div>
+            <span>申请时间:</span>
+            <div>${cmPayShop.applyTime}</div>
+            <span>审核人:</span>
+            <div>
+                <c:if test="${cmPayShop.status == 1 || cmPayShop.status == 2}">
+                    ${cmPayShop.payType eq '6'? '系统自动':cmPayShop.reviewerName}
+                </c:if>
+            </div>
+            <span>审核时间:</span>
+            <div>
+                <c:if test="${cmPayShop.status == 1 || cmPayShop.status == 2}">
+                    ${cmPayShop.reviewTime}
+                </c:if>
+            </div>
+        </div>
+        <div class="process-details process-details-last">
+            <label>审核状态:</label>
+            <div class="process-for-label">
+                <c:if test="${cmPayShop.status == '0'}">
+                    待审核
+                </c:if>
+                <c:if test="${cmPayShop.status == '1'}">
+                    审核通过
+                </c:if>
+                <c:if test="${cmPayShop.status == '2'}">
+                    <font color="red">审核不通过</font>
+                </c:if></div>
+            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            <c:if test="${cmPayShop.status == '1'}">
+                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>财务签名:</span>
+                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>审批人签名:</span>
+            </c:if>
+        </div>
+    </div>
+</div>
+<script>
+    (function () {
+        var payTableEle = $('.pay-table'),
+            payProductEle = $('.pay-product-item');
+        payTableEle.each(function (i, l) {
+            var productLength = $(this).find('.pay-product-item').length;
+            // 商品列表合并单元格
+            $(this).find('.mergeRows').attr('rowspan', productLength);
+        });
+
+        var payCm = 0;
+        $('.payCm').each(function () {
+            payCm += Number($(this).text().replace(',', ''));
+        });
+        $('.freight,.taxes').each(function () {
+            payCm -= Number($(this).text().replace(',', ''));
+        });
+        $('.payCm-t').text(payCm.toFixed(2).toLocaleString());
+
+        $('.tips-cancel-btn, #close-btn1').on('click', function () {
+            $('.tips-popup').hide();
+        })
+        $('.tips-cfm-directly').on('click', function () {
+            if ($('.tips-cfm-btn').hasClass('tips-cfm-directly')) {
+                $('.tips-popup').hide();
+            }
+        })
+
+        $('.export').on('click', function () {
+            window.print();
+        })
+
+        function showTips(title, text) {
+            $('.tips-popup h4').text(title);
+            $('.tips-popup p').text(text);
+            $('.tips-popup').show();
+        }
+    })()
+</script>
+</body>
+</html>

+ 6 - 3
src/main/webapp/WEB-INF/views/modules/order/cmPayShopPrintDetail.jsp

@@ -169,12 +169,15 @@
 						<c:if test="${s.payStatus == 3}"><font color="green">已付款</font></c:if></td>
 					<td class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
 					<td class="supplier-fee">
-						<div>应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
+						<div>
+							<c:if test="${s.differenceType ne 1 && s.differenceType ne 2}">应付:<fmt:formatNumber
+									value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
+							</c:if>
 							<c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
-								<font color="red">(需补差价¥${s.differencePrice})</font>
+								<font color="black">${s.shouldPayShopAmount+s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已补差价:${s.differencePrice})</font>
 							</c:if>
 							<c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
-								<font color="red">(需退差价¥${s.differencePrice})</font>
+								<font color="black">${s.shouldPayShopAmount-s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已退差价:${s.differencePrice})</font>
 							</c:if>
 							,已付:<fmt:formatNumber value="${s.payedShopAmount}" type="number" pattern="#,##0.00"/>
 						</div>

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

@@ -275,6 +275,7 @@
 				<div class="remark-wrapper">
 					<label>备注:</label>
 					<textarea id="refund-remark" name="remark" maxlength="200" cols="30" rows="10"></textarea>
+					<i><span class="count-change">0</span>/200</i>
 				</div>
 			</div>
 		</form>
@@ -294,6 +295,24 @@
 			<img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">
 		</div>
 	</div>
+
+	<script>
+		//监测从后台获取的可编辑文字、键盘输入的文字字数的变化,并赋值给span
+		$(function () {
+			var text = $('#refund-remark').val();
+			var len = text.length;
+			$('#refund-remark').next().find('span').html(len);
+			$('textarea').keyup(function () {
+				var text = $(this).val();
+				len = text.length;
+				if (len > 200) {
+					return false;
+				}
+				$(this).next().find('span').html(len);
+			})
+		});
+	</script>
+
 	<script>
 		(function () {
 		    var nullInputEle = '',

+ 24 - 782
src/main/webapp/WEB-INF/views/modules/order/newOrderList.jsp

@@ -6,686 +6,44 @@
     <title>订单管理</title>
     <meta name="decorator" content="default"/>
     <style type="text/css">
-        .table th {
-            text-align: center;
-        }
-
-        .table td {
-            text-align: center;
-        }
-
-        .data-title {
-            width: 100%;
-            display: table;
-        }
-
-        .data-title ul li {
-            word-break: break-all;
-            display: table-cell;
-            width: 100px;
-            border: 1px solid #000;
-            text-align: center;
-            height: 35px;
-            vertical-align: middle;
-            border-right: 0;
-            border-bottom: 0
-        }
-
-        .data-title ul {
-            margin-bottom: 0 !important;
-            display: table-row;
-        }
-
-        .data-title ul li:last-of-type {
-            width: 120px;
-            border-right: 1px solid #000000;
-        }
-
-        .data-title ul:last-of-type li {
-            border-bottom: 1px solid #000000
-        }
-
-        .data-title ul li:nth-child(6) {
-            width: 80px
-        }
-
-        .spileOrder li:nth-of-type(1) {
-            position: relative
-        }
-
-        .san {
-            width: 10px;
-            height: 10px;
-            border-top: 2px solid #000;
-            border-right: 2px solid #000;
-            transform: rotate(45deg);
-            position: absolute;
-            right: -2px;
-            top: 50%;
-            margin-top: -5px;
-            cursor: pointer
-        }
-
-        .red-waring {
-            margin: 0 !important;
-            background-color: #f3f3f3 !important;
-        }
-
-        .red-waring li {
-            border-color: red !important;
-        }
-
-        #biao1 {
-            position: absolute;
-            left: -9999px;
-            top: -9999px;
-            z-index: -99;
-            width: 1px;
-            height: 1px;
-        }
-
-        .operation-btn {
-            cursor: pointer;
-        }
-
-        .operation-block {
-            background: #fff;
-            position: absolute;
-            right: 2px;
-            padding: 10px;
-            border: 1px solid #666;
-            -webkit-border-radius: 5px;
-            -moz-border-radius: 5px;
-            border-radius: 5px;
-            z-index: 100001;
-            display: none;
-        }
-
-        .operation-block a {
-            display: block;
-            padding: 3px 0;
-        }
-
-        .refund-selector {
-            width: 150px;
-            height: 26px;
-            line-height: 26px;
-            text-indent: 10px;
-            background: #fff;
-            display: inline-block;
-            -webkit-border-radius: 3px;
-            -moz-border-radius: 3px;
-            border-radius: 3px;
-            border: 1px solid #ccc;
-            vertical-align: middle;
-            position: relative;
-            cursor: pointer;
-        }
-
-        .refund-selector ul {
-            z-index: 999;
-        }
-
-        .refund-selector li {
-            width: 100%;
-            text-indent: 10px;
-        }
-
-        .refund-selector li:hover {
-            background: #3875d7;
-            color: #fff;
-        }
-
-        .refund-arrow {
-            display: inline-block;
-            width: 18px;
-            height: 100%;
-            position: absolute;
-            right: 0;
-            top: 0;
-            border-left: 1px solid #aaa;
-            border-radius: 0 4px 4px 0;
-            background-clip: padding-box;
-            background: #eee;
-            background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
-            background-image: -webkit-linear-gradient(center bottom, #ccc 0, #eee 60%);
-            background-image: -moz-linear-gradient(center bottom, #ccc 0, #eee 60%);
-            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#cccccc', GradientType=0);
-            background-image: linear-gradient(top, #ccc 0, #eee 60%);
-        }
-
-        .refund-arrow b {
-            display: block;
-            width: 100%;
-            height: 100%;
-            background: url('/static/jquery-select2/3.4/select2.png') no-repeat 0 1px;
-        }
-
-        .refund-block1, .refund-block2 {
-            width: 100%;
-            position: absolute;
-            background: #fff;
-            -webkit-border-radius: 3px;
-            -moz-border-radius: 3px;
-            border-radius: 3px;
-            border: 1px solid #ccc;
-            margin: 0;
-            color: #666;
-            display: none;
-        }
-
-        .refund-more {
-            position: relative;
-        }
-
-        .refund-block1 {
-            top: 26px;
-        }
-
-        .refund-block2 {
-            left: 100%;
-            top: 0;
-        }
-
-        .refund-selector .refund-more:hover .refund-block2 {
-            display: block;
-        }
-
-        #searchForm {
-            line-height: 40px;
-        }
-
-        #searchForm .ul-form {
-            overflow: visible;
-        }
-
-        #searchForm {
-            white-space: nowrap;
-        }
-
-        #searchForm label {
-            margin-top: 15px;
-        }
-
-        .ul-form {
-            white-space: nowrap;
-            margin-left: -10px !important;
-        }
-
-        .ul-form label {
-            width: 90px;
-            text-align: right;
-        }
-
-        .time-space-symbols {
-            width: 100px;
-            display: inline-block;
-            text-align: center;
-        }
-
-        #btnSubmit {
-            width: 128px;
-            margin-left: 152px;
-        }
-
-        .select-ele {
-            width: 177px;
-        }
-
-        #auditBox {
-            padding: 20px;
-            line-height: 30px
-        }
-
-        #auditBox p {
-            font-size: 16px;
-            margin: 0 0 0 0;
-        }
-
-        #auditBox .note-div {
-            font-size: 16px;
-        }
-
-        .weishaIcon {
-            background: darkorange;
-            color: white;
-            margin: 0 0px;
-            padding: 0 3px;
-            font-style: normal;
-            font-size: 12px;
-            display: inline-block;
-            border-radius: 2px
-        }
+        .table th{text-align:center}
+        .table td{text-align:center}
+        .data-title{width:100%;display:table}
+        .data-title ul li{word-break:break-all;display:table-cell;width:100px;border:1px solid #000;text-align:center;height:35px;vertical-align:middle;border-right:0;border-bottom:0}
+        .data-title ul{margin-bottom:0 !important;display:table-row}
+        .data-title ul li:last-of-type{width:120px;border-right:1px solid #000000}
+        .data-title ul:last-of-type li{border-bottom:1px solid #000000}
+        .data-title ul li:nth-child(6){width:80px}
+        .spileOrder li:nth-of-type(1){position:relative}
+        .san{width:10px;height:10px;border-top:2px solid #000;border-right:2px solid #000;transform:rotate(45deg);position:absolute;right:-2px;top:50%;margin-top:-5px;cursor:pointer}
+        .red-waring{margin:0 !important;background-color:#f3f3f3 !important}
+        .red-waring li{border-color:red !important}
+        #biao1{position:absolute;left:-9999px;top:-9999px;z-index:-99;width:1px;height:1px}
+        #searchForm{line-height:40px}
+        #searchForm .ul-form{overflow:visible}
+        #searchForm{white-space:nowrap}
+        #searchForm label{margin-top:15px}
+        .ul-form{white-space:nowrap;margin-left:-10px !important}
+        .ul-form label{width:90px;text-align:right}
+        #btnSubmit{width:128px;margin-left:152px}
+        .select-ele{width:177px}
     </style>
-    <script type="text/javascript" src="${ctxStatic}/QRCode/jquery.qrcode.min.js"></script>
-    <script type="text/javascript" src="static/common/clipboard.min.js"></script>
     <script type="text/javascript">
-        function copyUrl2() {
-            var Url2 = document.getElementById("biao1");
-            Url2.select(); // 选择对象
-            document.execCommand("Copy"); // 执行浏览器复制命令
-//            alert("已复制好,可贴粘。");
-        }
-
-        $(document).ready(function () {
-            var lab = '';
-            var val = '';
-            var startRefundTime = $('#startRefundTime');
-            var endRefundTime = $('#endRefundTime');
-            startRefundTime.attr('disabled', 'disabled');
-            endRefundTime.attr('disabled', 'disabled');
-            startRefundTime.val('');
-            endRefundTime.val('');
-            switch ('${orderRefundType}') {
-                case '':
-                    lab = '全部';
-                    val = '';
-                    break;
-                case '0':
-                    lab = '无';
-                    val = '0';
-                    break;
-                case '1':
-                    lab = '全部状态';
-                    val = '1';
-                    break;
-                case '11':
-                    lab = '退款(退货)中';
-                    val = '11';
-                    break;
-                case '12':
-                    lab = '已完成';
-                    val = '12';
-                    startRefundTime.removeAttr('disabled');
-                    endRefundTime.removeAttr('disabled');
-                    startRefundTime.val('${startRefundTime}');
-                    endRefundTime.val('${endRefundTime}');
-                    break;
-                case '13':
-                    lab = '已取消';
-                    val = '13';
-                    break;
-                default:
-            }
-            $("#orderRefundType").val(val);
-            $('.refund-val').text(lab);
-            $('body').click(function (e) {
-                var target = $(e.target),
-                    opBlockEle = target.siblings('.operation-block');
-                if ((target.is('.operation-btn') && opBlockEle.css('display') == 'block') ||
-                    (!target.is('.operation-block') && !target.is('.operation-btn'))) {
-                    $('.operation-block').hide();
-                } else {
-                    $('.operation-block').hide();
-                    opBlockEle.show();
-                }
-            });
-
-            $('.refund-selector').on('click', function () {
-                var block1 = $('.refund-block1');
-                if (block1.css('display') === 'none') {
-                    $('.refund-block1').show();
-                }
-            });
-
-            $('.refund-options').on('click', function (e) {
-                var val = $(this).text();
-                $("#orderRefundType").val($(this).data('v'));
-                var startRefundTime = $('#startRefundTime');
-                var endRefundTime = $('#endRefundTime');
-                if ($(this).data('v') == '12') {
-                    startRefundTime.removeAttr('disabled');
-                    endRefundTime.removeAttr('disabled');
-                } else {
-                    startRefundTime.attr('disabled', 'disabled');
-                    endRefundTime.attr('disabled', 'disabled');
-                    startRefundTime.val('');
-                    endRefundTime.val('');
-                }
-                $('.refund-val').text(val);
-                $('.refund-block1').hide();
-                e.stopPropagation();
-            })
-            if ($(".operation-block").length > 0) {
-                var length = $(".operation-block").length;
-                for (var i = 0; i < length; i++) {
-                    var b = $(".operation-block").get(i);
-                    if ($(b).html().trim() == '') {
-                        $(b).hide();
-                        $(b).prev().hide();
-                    }
-                }
-            }
-
-        });
-
         function page(n, s) {
             $("#pageNo").val(n);
             $("#pageSize").val(s);
             $("#searchForm").submit();
             return false;
         }
-
-        // 二维码分享
-        function QRCodewin(orderId, orderNo) {
-            var html = '<div style="padding:10px;">订单号:' + orderNo + '' +
-                '<div class="code" style="text-align: center;"></div>' +
-                '</div>';
-            $.jBox(html, {
-                title: "订单二维码分享",
-                width: $(top.document).width() - 1700,
-                height: $(top.document).height() - 1600,
-                buttons: {'关闭': true}
-            });
-
-            var enCodeRedirectUrl;
-            var redirectUrl = '${fns:getConfig('caimei.crm.server')}oauth.action?orderId=' + orderId;
-            $.ajax({
-                url: "${ctx}/bulkpurchase/contractOrder/enCode",
-                data: {"redirectUrl": redirectUrl},
-                type: "POST",
-                async: false,
-                success: function (data) {
-                    enCodeRedirectUrl = data.enCodeRedirectUrl;
-                }
-            });
-            var shareUrl = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=${fns:getConfig('weixin.appId')}&redirect_uri=' + enCodeRedirectUrl + '&response_type=code&scope=snsapi_base&state=bulkpurchase#wechat_redirect';
-            $('.code').qrcode({
-                width: 150,
-                height: 150,
-                text: shareUrl
-            });
-        }
-
-        // 供应商链接
-        function shareShopLink(shopOrderID) {
-            var cpTxt = '${fns:getConfig('caimei.crm.server')}supplier/order/shopAuthorizedOrder.rpc?shopOrderID=' + shopOrderID;
-
-            var html = '<div style="padding:10px;">' + cpTxt +
-                '<div class="code" style="text-align: center;"></div>' +
-                '</div>';
-            $('#biao1').val(cpTxt);//设置值
-            $.jBox(html, {
-                title: "复制以下链接,可分享订单信息",
-                width: $(top.document).width() - 1400,
-                height: $(top.document).height() - 1600,
-                buttons: {'复制': 1, '关闭': true},
-//                buttons: { '关闭': true },
-                submit: function (v, h, f) {
-                    if (v == 1) {
-                        copyUrl2()
-//                        alert("1")
-//                        window.clipboardData.setData("text" , cpTxt);
-                    }
-                }
-            });
-        }
-
-        // 终止备注信息
-        function orderRemarkswin(orderStopRemarks) {
-            var html = "<div style='padding:10px;'><textarea id='remarks' name='remarks' rows='5' cols='12' readonly='true'>" + orderStopRemarks + "</textarea></div>";
-            $.jBox(html, {
-                title: "备注",
-                width: $(top.document).width() - 1600,
-                height: $(top.document).height() - 1600,
-                buttons: {'关闭': true}
-            });
-        }
-
-        // 订单终止弹窗
-        function orderStopwin(id, flag) {
-            var html = "<div style='padding:10px;'><font color='red'>*</font>备注:<textarea id='remarks' name='remarks' rows='5' cols='12'></textarea></div>";
-            var submit = function (v, h, f) {
-                if (f.remarks == '') {
-                    $.jBox.tip("请输入您填写备注信息", 'error', {focusId: "remarks"});
-                    return false;
-                }
-//				$.jBox.tip("备注:" + f.remarks);
-                location.href = "${ctx}/bulkpurchase/contractOrder/saveOrderStopInfo?id=" + id + "&flag=" + flag + "&orderStopRemarks=" + f.remarks;
-                return true;
-            };
-
-            $.jBox(html, {title: "确认终止订单?", submit: submit});
-        }
-
-
-        // 未分期确认订单
-        function openwin(id, flag) {
-            var submit = function (v, h, f) {
-                if (v == true) {
-                    location.href = "${ctx}/bulkpurchase/contractOrder/saveConfirmFlag?id=" + id + "&flag=" + flag;
-                }
-                return true;// close
-            };
-            // 自定义按钮
-            $.jBox.confirm("客户已确认了吗?", "确认订单", submit, {buttons: {'确认': true, '取消': false}});
-        }
-
-        // 分期确认订单
-        function stagesOpenwin(id, flag) {
-            var submit = function (v, h, f) {
-                if (v == true) {
-                    location.href = "${ctx}/bulkpurchase/contractOrder/saveStagesConfirmFlag?id=" + id + "&flag=" + flag;
-                }
-                return true;// close
-            };
-            // 自定义按钮
-            $.jBox.confirm("确认此订单可以生成?", "确认订单", submit, {buttons: {'确认': true, '取消': false}});
-        }
-
-        //编辑经理折扣
-        function modelShow(orderID) {
-            top.$.jBox("iframe:${ctx}/order/DiscountFee?orderID=" + orderID, {
-                iframeScrolling: 'yes',
-                top: 150,
-                width: 480,
-                height: 300,
-                persistent: true,
-                title: "编辑经理折扣",
-                buttons: {"确认": '1', "取消": '-1'},
-                submit: function (v, h, f) {
-                    //确定
-                    var $jboxFrame = top.$('#jbox-iframe');
-                    var $mainFrame = top.$('#mainFrame');
-                    if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
-                        var rechargeInfo = $jboxFrame[0].contentWindow.submit();
-                        var split = rechargeInfo.split(",");
-                        var payTotalFee = split[0];
-                        var discountFee = split[1];
-                        //取值,然后调用后台接口传入参数,最后刷新页面
-                        if (payTotalFee <= 0) {
-                            return false;
-                        }
-                        $.post("${ctx}/order/saveDiscountFee", {
-                            'discountFee': discountFee,
-                            'orderID': orderID,
-                            'payTotalFee': payTotalFee
-                        }, function (data) {
-                            if (true == data.success) {
-                                refresh();
-                                $.jBox.tip(data.msg, 'info', {timeout: 1000});
-                            } else {
-                                alertx(data.msg, 1000);
-                            }
-                        }, "JSON");//这里返回的类型有:json,html,xml,text
-                    }
-                    return true;
-                }, loaded: function (h) {   //隐藏滚动条
-                    $(".jbox-content", top.document).css("overflow-y", "hidden");
-                }
-            });
-        }
-
-
-        //订单商品备注
-        function remarks(orderID, shopOrderID) {
-            top.$.jBox("iframe:${ctx}/order/cmOrderRemark/remarksView?orderID=" + orderID + "&shopOrderID=" + shopOrderID, {
-                iframeScrolling: 'yes',
-                top: 150,
-                width: 400,
-                height: 480,
-                persistent: true,
-                title: "订单备注信息",
-                buttons: {"确认": '1', "关闭": '-1'},
-                submit: function (v, h, f) {
-                    //确定
-                    var $jboxFrame = top.$('#jbox-iframe');
-                    var $mainFrame = top.$('#mainFrame');
-                    if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
-                        var remarks = $jboxFrame[0].contentWindow.submit();
-//                        var arr = item.split(",");
-//                        var remarks = arr[0];
-                        if ('' == remarks) {
-                            alertx("备注信息不能为空!!!")
-                            return false;
-                        }
-                        saveRemarks(remarks, orderID, shopOrderID);
-                        return true;
-                    }
-                    return true;
-                },
-                loaded: function (h) {   //隐藏滚动条
-                    $(".jbox-content", top.document).css("overflow-y", "hidden");
-                }
-            });
-        }
-
-
-        function saveRemarks(remarks, orderID, shopOrderID) {
-            $.post("${ctx}/order/cmOrderRemark/addRemarks", {
-                "remarks": remarks, "orderID": orderID, "shopOrderID": shopOrderID
-            }, function (data) {
-                if (true == data.success) {
-                    refresh();
-                    $.jBox.tip(data.msg, 'info');
-                } else {
-                    $.jBox.tip(data.msg, 'error');
-                }
-            }, "JSON");//这里返回的类型有:json,html,xml,text
-        }
-
-        //修改订单状态弹窗
-        function updateOrderStatus(orderId) {
-            top.$.jBox("iframe:${ctx}/bulkpurchase/contractOrder/orderStatusEdit?orderId=" + orderId, {
-                iframeScrolling: 'yes',
-                top: 150,
-                width: 400,
-                height: 230,
-                persistent: true,
-                title: "更新订单状态",
-                buttons: {"确认修改": '1', "关闭": '-1'},
-                submit: function (v, h, f) {
-                    //确定
-                    var $jboxFrame = top.$('#jbox-iframe');
-                    var $mainFrame = top.$('#mainFrame');
-                    if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
-                        var item = $jboxFrame[0].contentWindow.submit();
-                        var arr = item.split(",");
-                        var orderStatus = arr[0];
-                        var updateDate = arr[1];
-                        if (updateDate == "") {
-                            alertx("时间不能为空!!!")
-                            return false;
-                        }
-                        saveOrderStatus(orderStatus, updateDate, orderId);
-
-                        return true;
-                    }
-                    return true;
-                }
-            });
-        }
-
-        function saveOrderStatus(orderStatus, updateDate, orderId) {
-            $.post("${ctx}/bulkpurchase/contractOrder/saveOrderStatus", {
-                'orderStatus': orderStatus, "updateDate": updateDate, "orderId": orderId
-            }, function (data) {
-                if (true == data.success) {
-                    refresh();
-                    $.jBox.tip(data.msg, 'info');
-                } else {
-                    $.jBox.tip(data.msg, 'error');
-                }
-            }, "JSON");//这里返回的类型有:json,html,xml,text
-        }
-
-        function refresh() {
-            window.location.href = "${ctx}/order/orderList/";
-        }
-
         function checkfun() {
             var orderID = $('#orderID').val();
             var reg = /^[0-9]*$/;
             if (!reg.test(orderID) && orderID.trim() != "") {
-                alertx("请输入正确的订单ID!");
-                // $('#orderID').val("");
-                return false;
-            }
+                    alertx("请输入正确的订单ID!");
+                    return false;
+                }
             return true;
         }
-
-        //抹平收款
-        function collection(orderId) {
-            $.post("${ctx}/order/gatheringData", {
-                'orderId': orderId
-            }, function (data) {
-                if (true == data.success) {
-                    var html = "<div id='auditBox'>" +
-                        "<P>确定抹平收款吗?抹平后该订单将变为已收款状态</p>" +
-                        "<P><span>订单金额:<b>¥" + Number(data.payTotalFee).toFixed(2) + "</b></span></p>" +
-                        "<P><span>应收金额:<b>¥" + Number(data.payableAmount).toFixed(2) + "</b><span style='color:#FF0000'>(账户余额抵扣: ¥<b>" + Number(data.balancePayFee).toFixed(2) + "</b>)</span></span></p>" +
-                        "<P><span>已收金额:<b>¥" + Number(data.associateAmount).toFixed(2) + "</b></span></p>" +
-                        "<div><div class='note-div'><span style='color:#FF0000'>*</span>备注</div></div>" +
-                        "<textarea name='auditNote' style='width: 100%;min-height:60px;'></textarea>" +
-                        "<div class='note-div' style='display: none' id='noteError'><span style='color:#FF0000'>请填写备注</span> </div>" +
-                        "</div>";
-                    $.jBox(html, {
-                        title: "确认提示", width: 500, height: 400, buttons: {"确定": '1', "取消": '-1'},
-                        submit: function (v, h, f) {
-                            if ('1' == v) {
-                                if ((Number(data.payTotalFee) - Number(data.associateAmount)) > 10) {
-                                    alertx("订单剩余应收金额大于¥10.00,不能抹平!");
-                                    return false;
-                                }
-                                var content = document.getElementsByName("auditNote")[0].value;
-                                if (content == '' || content == null) {
-                                    document.getElementById('noteError').style.display = 'block';
-                                    return false;
-                                }
-                                $.post("${ctx}/order/smoothOutCollection", {
-                                    'orderID': orderId,
-                                    'balanceAccountsRemark': content
-                                });
-                                window.location.href = "${ctx}/order/detail?id=" + orderId;
-                            }
-                        }
-                    });
-
-                } else {
-                    $.jBox.tip(data.msg, 'error');
-                }
-            }, "JSON");//这里返回的类型有:json,html,xml,text
-        };
-
-        //抹平收款备注
-        /*function moPingNote(orderId) {
-            $.post("${ctx}/order/gatheringData", {
-                'orderId': orderId
-            }, function (data) {
-                if (true == data.success) {
-                    var html = "<div id='auditBox'>" +
-                        "<P><span>订单金额:<b>¥" + Number(data.payTotalFee).toFixed(2) + "</b></span></p>" +
-                        "<P><span>应收金额:<b>¥" + Number(data.payableAmount).toFixed(2) + "</b><span style='color:#FF0000'>(账户余额抵扣: ¥<b>" + Number(data.balancePayFee).toFixed(2) + "</b>)</span></span></p>" +
-                        "<P><span>已收金额:<b>¥" + Number(data.associateAmount).toFixed(2) + "</b></span></p>" +
-                        "<P><span>备注:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+data.balanceAccountsRemark+"</p></span></p>" +
-                        "</div>";
-                    $.jBox(html, {
-                        title: "备注", width: 450, height: 300, buttons: {"关闭": true}
-                    })
-                }
-            })
-        }*/
-
     </script>
 </head>
 <body>
@@ -868,7 +226,6 @@
         <li>退款状态</li>
         <li>待审核退款</li>
         <li>订单金额</li>
-        <%--        <li>抹平金额</li>--%>
         <li>下单时间</li>
         <li>确认时间</li>
         <li>操作</li>
@@ -1028,121 +385,6 @@
             </li>
             <li class="operation-wrap">
                 <a href="${ctx}/order/detail?id=${order.orderID}">查看详情</a>
-                <a class="operation-btn">功能</a>
-                <div class="operation-block">
-                    <shiro:hasPermission name="order:order:edit">
-                        <%--包含订单充值商品就不显示--%>
-                        <c:if test="${empty order.rechargeGoods}">
-                            <c:if test="${order.status == 11 || order.status == 12 || order.status == 21 || order.status == 22 || order.status == 31 || order.status == 32}">
-                                <a href="${ctx}/order/toDeliveryPage?id=${order.orderID}">发货</a>
-                            </c:if>
-                            <c:if test="${order.receiptStatus == 2 && order.status != 6 && order.status != 7}">
-                                <a href="javascript:void(0);" onclick="collection(${order.orderID})">抹平收款</a>
-                            </c:if>
-                        </c:if>
-                        <%--<c:if test="${order.receiptStatus == 3 && order.confirmType != null && order.confirmType != ''}">
-                            <a href="javascript:void(0);" onclick="moPingNote(${order.orderID})">抹平收款备注</a>
-                        </c:if>--%>
-                        <%--采美订单确认/取消/修改订单--%>
-                        <c:if test="${order.organizeID == 0}">
-                            <c:if test="${order.status == 0}">
-                                <a href="${ctx}/order/confirmOrder?orderID=${order.orderID}"
-                                   onclick="return confirmx('是否确认订单?', this.href)">确认订单</a>
-                            </c:if>
-                            <c:if test="${order.status == 0 || order.status == 11}">
-                                <a href="${ctx}/order/cancelOrder?orderID=${order.orderID}"
-                                   onclick="return confirmx('是否取消订单?', this.href)">取消订单</a>
-                            </c:if>
-                            <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||
-				            order.status eq 23 || order.status eq 0}">
-                                <c:if test="${empty order.rechargeGoods && (order.ableUserMoney > 0 || order.status eq 0)}">
-                                    <c:if test="${order.postageOrderFlag == 0 && order.secondHandOrderFlag != 1}">
-                                        <a href="${ctx}/order/form?id=${order.orderID}">修改订单</a>
-                                    </c:if>
-                                    <c:if test="${order.postageOrderFlag == 0 && order.secondHandOrderFlag == 1}">
-                                        <a href="${ctx}/order/secondeProductOrderForm?id=${order.orderID}">修改订单</a>
-                                    </c:if>
-                                </c:if>
-                            </c:if>
-                            <c:if test="${order.status == 0}">
-                                <c:if test="${order.postageOrderFlag == 1}">
-                                    <a href="${ctx}/order/postageOrderForm?id=${order.orderID}">修改邮费订单</a>
-                                </c:if>
-                            </c:if>
-                        </c:if>
-                        <c:if test="${(order.organizeID == 0 or order.organizeID > 2) && order.status == 11 && order.payStatus == 1}">
-                            <a href="javascript:void(0);"
-                               onclick="modelShow('${order.orderID}')">编辑经理折扣</a>
-                        </c:if>
-                        <c:if test="${order.rebateFlag eq 0 && order.receiptStatus eq 1 && order.payStatus eq 1}">
-                            <a href="${ctx}/order/modifyRebate?orderId=${order.orderID}" onclick="return confirmx('确定将订单转为返佣订单吗?', this.href)">转为返佣订单</a>
-                        </c:if>
-                    </shiro:hasPermission>
-
-                    <shiro:hasPermission name="order:order:applyrefound">
-                        <c:if test="${order.status == 12 || order.status == 13 || order.status == 21 || order.status == 22 || order.status == 23 || order.status == 31 || order.status == 32 || order.status == 33 || order.status == 4 || order.status == 5}">
-                            <%--  返佣订单不能申请退款(退货) --%>
-                            <c:if test="${order.rebateOrder == '0'}">
-                                <%--如果存在审核收款则不允许申请:1不能申请,其它可以申请--%>
-                                <c:if test="${order.toAudit eq 1}">
-                                    <%--弹窗提示--%>
-                                    <a href="#" onclick="return alertx('订单存在未审核的收款,暂不能退款。请将收款审核通过后再操作退款。')">申请退款</a>
-                                </c:if>
-                                <c:if test="${order.toAudit ne 1}">
-                                    <%--如果存在退款记录在待审核或者审核不通过记录不允许继续退款--%>
-                                    <c:if test="${order.applyReturnedPurchaseFlag eq 1}">
-                                        <a href="${ctx}/bulkpurchase/cmRefundsProduct/applyRefound.rpc?orderID=${order.orderID}"
-                                           <c:if test="${order.status == 21 || order.status == 22 || order.status == 23}">onclick="return confirmx('部分收款的订单、申请退款只能申请全部退款!', this.href)"
-                                        </c:if>
-                                        >
-                                            申请退款
-                                        </a>
-                                    </c:if>
-                                    <c:if test="${order.applyReturnedPurchaseFlag ne 1}">
-                                        <font title="存在未处理完的申请,请前往退款列表处理!">申请退款</font>
-                                    </c:if>
-                                </c:if>
-                            </c:if>
-                        </c:if>
-                    </shiro:hasPermission>
-
-                    <shiro:hasPermission name="order:order:edit">
-                        <c:if test="${order.organizeID == 0}">
-                            <c:if test="${order.status == 11}">
-                                <c:if test="${order.splitFlag == 1}">
-                                    <a href="${ctx}/order/toSplit?id=${order.orderID}">
-                                        拆分订单
-                                    </a>
-                                </c:if>
-                            </c:if>
-                            <a href="javascript:" onclick="QRCodewin(${order.orderID},'${order.orderNo}')">分享二维码</a>
-                            <c:if test="${order.status ne 6 && order.status ne 7}">
-                                <a href="${ctx}/order/editclausecontent?id=${order.orderID}">修改售后条款</a>
-                            </c:if>
-                        </c:if>
-                        <c:if test="${order.status ne 0}">
-                            <a href="${ctx}/order/printOrder?orderID=${order.orderID}">打印发货单</a>
-                        </c:if>
-                        <%--<a href="/">供应商链接</a>--%>
-                        <a href="${ctx}/order/exportOrder?id=${order.orderID}">订单导出</a>
-                        <a href="${ctx}/order/cmOrderRemark/remarksViewNew.rpc?orderID=${order.orderID}&source=1">订单备注</a>
-                        <%--                        <a href="javascript:void(0);" onclick="remarks('${order.orderID}','')">备注</a>--%>
-                        <%--包含订单充值商品就不显示--%>
-                        <c:if test="${empty order.rechargeGoods}">
-                            <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 21 && order.status ne 6}">
-                                <a href="${ctx}/order/logisticsDetails?orderID=${order.orderID}">发货记录</a>
-                            </c:if>
-                            <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 6}">
-                                <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${order.orderID}&from=1">收退款记录
-                                </a>
-                            </c:if>
-                            <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 6}">
-                                <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByOrderID.rpc?orderID=${order.orderID}">退款(退货)记录
-                                </a>
-                            </c:if>
-                        </c:if>
-                    </shiro:hasPermission>
-                </div>
             </li>
         </ul>
     </c:forEach>

+ 4 - 0
src/main/webapp/WEB-INF/views/modules/order/orderDetail.jsp

@@ -368,6 +368,10 @@
                 </shiro:hasPermission>
 
                 <shiro:hasPermission name="order:order:edit">
+                    <c:if test="${(order.rebateOrder == '1' ) && (brokerage == 0) && (order.status != 0)}">
+                        <a href="${ctx}/order/toChangePay?orderId=${order.orderID}"
+                           onclick="return confirmx('确定将该返佣订单直接置为已收款和已付款状态吗?', this.href)">置为已收款已付款</a>
+                    </c:if>
                     <c:if test="${order.organizeID == 0}">
                         <c:if test="${order.status == 11}">
                             <c:if test="${order.splitFlag == 1}">

+ 6 - 3
src/main/webapp/WEB-INF/views/modules/order/paidShopOrderList.jsp

@@ -396,12 +396,15 @@
                     <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 ne 1 && s.differenceType ne 2 }">
+                        <font color="#E15616"><fmt:formatNumber value="${s.shouldPayShopAmount}" type="number"
+                                                                pattern="#,##0.00"/></font>
+                        </c:if>
                         <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
-                            <font color="red">(需补差价¥${s.differencePrice})</font>
+                            <font color="black">${s.shouldPayShopAmount+s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已补差价:${s.differencePrice})</font>
                         </c:if>
                         <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
-                            <font color="red">(需退差价¥${s.differencePrice})</font>
+                            <font color="black">${s.shouldPayShopAmount-s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已退差价:${s.differencePrice})</font>
                         </c:if>
                     </td>
                     <input type="hidden" class="payedShopAmount" value="${s.payedShopAmount}">

+ 357 - 292
src/main/webapp/WEB-INF/views/modules/order/payedAndRefundRecordList.jsp

@@ -1,93 +1,140 @@
 <%@ page contentType="text/html;charset=UTF-8" %>
-<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<%@ 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}
-        .payment th{text-align:center;background-color:#199ed8;color:#ffffff;height:25px}
-        .payment td{text-align:center}
-        .label-justify{float:left}
-        .text-left{display:flex;justify-content:center;-webkit-display:flex;-webkit-justify-content:center;-moz-display:flex;-moz-justify-content:center;-ms-display:flex;-ms-justify-content:center}
-        .zeroCost .message{
-            display:none;
-            position:absolute;
-            background:#FFF;
-            white-space:nowrap;
-            border:1px solid black;
+    <title>退/付款记录</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table th {
+            text-align: center
+        }
+
+        .table td {
+            text-align: center
+        }
+
+        .payment th {
+            text-align: center;
+            background-color: #199ed8;
+            color: #ffffff;
+            height: 25px
+        }
+
+        .payment td {
+            text-align: center
+        }
+
+        .label-justify {
+            float: left
+        }
 
+        .text-left {
+            display: flex;
+            justify-content: center;
+            -webkit-display: flex;
+            -webkit-justify-content: center;
+            -moz-display: flex;
+            -moz-justify-content: center;
+            -ms-display: flex;
+            -ms-justify-content: center
         }
-        .zeroCost:hover .message{
+
+        .zeroCost .message {
+            display: none;
+            position: absolute;
+            background: #FFF;
+            white-space: nowrap;
+            border: 1px solid black;
+
+        }
+
+        .zeroCost:hover .message {
             display: inline-block;
             color: black;
             padding: 5px;
             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}
+
+        .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 type="text/javascript">
+        function page(n, s) {
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
         }
-	</script>
+    </script>
 </head>
 <body>
-	<ul class="nav nav-tabs">
-        <c:if test="${operatingMode == 1}">
-		    <li><a href="${ctx}/shopOrder/payOrderList">付款列表</a></li>
-            <li><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
-            <li class="active"><a href="${ctx}/shopOrder/payedAndRefundRecordList?shopOrderID=${s.shopOrderID}&operatingMode=1">退/付款记录</a></li>
-        </c:if>
-        <c:if test="${operatingMode == 2}">
-            <li><a href="${ctx}/order/cmRefundShop/">退款列表</a></li>
-            <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 class="nav nav-tabs">
+    <c:if test="${operatingMode == 1}">
+        <li><a href="${ctx}/shopOrder/payOrderList">付款列表</a></li>
+        <li><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
+        <li class="active"><a
+                href="${ctx}/shopOrder/payedAndRefundRecordList?shopOrderID=${s.shopOrderID}&operatingMode=1">退/付款记录</a>
+        </li>
+    </c:if>
+    <c:if test="${operatingMode == 2}">
+        <li><a href="${ctx}/order/cmRefundShop/">退款列表</a></li>
+        <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">
-        <tr>
-            <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>成本类型</th>
-            <th>付第三方</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">${s.payTotalFee}</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}">
+</ul>
+<table class="table table-striped table-bordered table-condensed pay-table">
+    <tr>
+        <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>成本类型</th>
+        <th>付第三方</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">${s.payTotalFee}</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}">
@@ -97,246 +144,264 @@
                                         <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>
+            </c:if>
+            <c:if test="${s.discountTotalFee le 0}">¥0.00</c:if>
+        </td>
+        <td><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if
+                test="${s.costType == '2'}">比例成本</c:if></td>
+        <td class="third-party-fee">${s.shopOtherFee}</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 colspan="2">付供应商</th>
+    </tr>
+    <tr>
+        <td>${s.shopName}</td>
+        <td colspan="3">
+            <c:if test="${s.organizeID == 1}"><span class="org-note">星范</span></c:if>
+            ${s.buyer}
+            <c:if test="${s.organizeID == 3}"></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>
+        </td>
+        <td class="freight"><fmt:formatNumber value="${s.shopPostFee}" type="number" pattern="#,##0.00"/></td>
+        <td colspan="3" class="product-fee">${s.shopProductAmount}</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 test="${s.zeroCostFlag eq 1}">
+                    <a href="javascript:;" class="zeroCost"><span><img src="/static/images/info.jpg"
+                                                                       style="width: 15px;margin-bottom: 4px"></span>
+                        <div class="message">
+                            <span>商品成本为0,直接置为已付款,无需付款供应商</span>
+                        </div>
+                    </a>
+                </c:if>
+            </c:if>
+        </td>
+        <td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
+        <td colspan="2" class="supplier-fee">
+                <c:if test="${s.differenceType ne 1 && s.differenceType ne 2 }">
+                    <font color="#E15616"><fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/></font>
+                </c:if>
+            <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
+                <font color="black">${s.shouldPayShopAmount+s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已补差价:${s.differencePrice})</font>
+            </c:if>
+            <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
+                <font color="black">${s.shouldPayShopAmount-s.differencePrice}</font><font color="red">(原应付:${s.shouldPayShopAmount},已退差价:${s.differencePrice})</font>
+            </c:if>
+        </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><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if test="${s.costType == '2'}">比例成本</c:if></td>
-            <td class="third-party-fee">${s.shopOtherFee}</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 colspan="2">付供应商</th>
-        </tr>
-        <tr>
-            <td>${s.shopName}</td>
-            <td colspan="3">
-                <c:if test="${s.organizeID == 1}"><span class="org-note">星范</span></c:if>
-                ${s.buyer}<c:if test="${s.organizeID == 3}"></c:if>
+            <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>
-                        <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>
-                    </td>
-            <td class="freight"><fmt:formatNumber value="${s.shopPostFee}" type="number" pattern="#,##0.00"/></td>
-            <td colspan="3" class="product-fee">${s.shopProductAmount}</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 test="${s.zeroCostFlag eq 1}">
-                        <a href="javascript:;" class="zeroCost"><span><img src="/static/images/info.jpg" style="width: 15px;margin-bottom: 4px"></span>
-                            <div class="message">
-                                <span>商品成本为0,直接置为已付款,无需付款供应商</span>
-                            </div>
-                        </a>
-                    </c:if>
+            <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 colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
-            <td colspan="2" class="supplier-fee">
-                <div><span class="label-justify">应付:</span><fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/></div>
-                <div><span class="label-justify">已付:</span><fmt:formatNumber value="${s.payedShopAmount}" type="number" pattern="#,##0.00"/></div>
-                <div><span class="label-justify">待付:</span><fmt:formatNumber value="${s.shouldPayShopAmount - s.payedShopAmount}" type="number" pattern="#,##0.00"/></div>
-            </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>${(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 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>${(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>${(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><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>${(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>${(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><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>
-    <span style="font-weight:bold">付款记录</span>
-    <table id="contentTable" class="payment" width="70%" border="1">
-        <thead>
+            <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>
+<span style="font-weight:bold">付款记录</span>
+<table id="contentTable" class="payment" width="70%" border="1">
+    <thead>
+    <tr>
+        <th>序号</th>
+        <th>付款单ID</th>
+        <th>付款时间</th>
+        <th>付款方式</th>
+        <th>付款金额</th>
+    </tr>
+    </thead>
+    <tbody>
+    <c:forEach items="${pr}" var="p">
         <tr>
-            <th>序号</th>
-            <th>付款单ID</th>
-            <th>付款时间</th>
-            <th>付款方式</th>
-            <th>付款金额</th>
+            <td>${p.id}</td>
+            <td><a href="${ctx}/order/cmPayShop/applyDetail?id=${p.payShopID}">${p.payShopID}</a></td>
+            <td>${p.payTime}</td>
+            <td><c:if test="${p.payType == '1'}">
+                建设银行7297
+            </c:if>
+                <c:if test="${p.payType == '2'}">
+                    中信银行0897
+                </c:if>
+                <c:if test="${p.payType == '3'}">
+                    中信银行7172
+                </c:if>
+                <c:if test="${p.payType == '4'}">
+                    广发银行0115
+                </c:if>
+                <c:if test="${p.payType == '5'}">
+                    广发银行5461
+                </c:if>
+            </td>
+            <td>${p.payAmount}</td>
         </tr>
-        </thead>
-        <tbody>
-        <c:forEach items="${pr}" var="p">
-            <tr>
-                <td>${p.id}</td>
-                <td><a href="${ctx}/order/cmPayShop/applyDetail?id=${p.payShopID}">${p.payShopID}</a></td>
-                <td>${p.payTime}</td>
-                <td><c:if test="${p.payType == '1'}">
+    </c:forEach>
+    </tbody>
+</table>
+<br>
+<span style="font-weight:bold">退款记录</span>
+<table id="contentTable" class="payment" width="70%" border="1">
+    <thead>
+    <tr>
+        <th>序号</th>
+        <th>退款记录ID</th>
+        <th>退款时间</th>
+        <th width="350px">退款方式</th>
+        <th>退款金额</th>
+    </tr>
+    </thead>
+    <tbody>
+    <c:forEach items="${receipt}" var="r">
+        <tr>
+            <td>${r.id}</td>
+            <td><a href="${ctx}/order/cmDiscernReceipt/detail?id=${r.id}">${r.id}</a></td>
+            <td>${r.receiptDate}</td>
+            <td>
+                <div class="text-left">
+                    线下转账:
+                    <c:if test="${r.payType == '1'}">
                         建设银行7297
                     </c:if>
-                    <c:if test="${p.payType == '2'}">
+                    <c:if test="${r.payType == '2'}">
                         中信银行0897
                     </c:if>
-                    <c:if test="${p.payType == '3'}">
+                    <c:if test="${r.payType == '3'}">
                         中信银行7172
                     </c:if>
-                    <c:if test="${p.payType == '4'}">
+                    <c:if test="${r.payType == '4'}">
                         广发银行0115
                     </c:if>
-                    <c:if test="${p.payType == '5'}">
+                    <c:if test="${r.payType == '5'}">
                         广发银行5461
                     </c:if>
-                </td>
-                <td>${p.payAmount}</td>
-            </tr>
-        </c:forEach>
-        </tbody>
-    </table>
-    <br>
-    <span style="font-weight:bold">退款记录</span>
-    <table id="contentTable" class="payment" width="70%" border="1">
-        <thead>
-        <tr>
-            <th>序号</th>
-            <th>退款记录ID</th>
-            <th>退款时间</th>
-            <th width="350px">退款方式</th>
-            <th>退款金额</th>
+                    &nbsp&nbsp
+                    ¥${r.receiptAmount}<br>
+                </div>
+            </td>
+            <td>${r.receiptAmount}</td>
         </tr>
-        </thead>
-        <tbody>
-        <c:forEach items="${receipt}" var="r">
-            <tr>
-                <td>${r.id}</td>
-                <td><a href="${ctx}/order/cmDiscernReceipt/detail?id=${r.id}">${r.id}</a></td>
-                <td>${r.receiptDate}</td>
-                <td>
-                    <div class="text-left">
-                        线下转账:
-                        <c:if test="${r.payType == '1'}">
-                            建设银行7297
-                        </c:if>
-                        <c:if test="${r.payType == '2'}">
-                            中信银行0897
-                        </c:if>
-                        <c:if test="${r.payType == '3'}">
-                            中信银行7172
-                        </c:if>
-                        <c:if test="${r.payType == '4'}">
-                            广发银行0115
-                        </c:if>
-                        <c:if test="${r.payType == '5'}">
-                            广发银行5461
-                        </c:if>
-                        &nbsp&nbsp
-                        ¥${r.receiptAmount}<br>
-                    </div>
-                </td>
-                <td>${r.receiptAmount}</td>
-            </tr>
-        </c:forEach>
-        <c:forEach items="${rr}" var="r">
-            <tr>
-                <td>${r.id}</td>
-                <td><a href="${ctx}/order/cmRefundShop/toRefund?id=${r.refundShopID}">${r.refundShopID}</a></td>
-                <td>${r.refundTime}</td>
-                <td>
-                    <div class="text-left">
-                        线下转账:
-                        <c:if test="${r.cmRefundShop.refundType == '1'}">
-                            建设银行7297
-                        </c:if>
-                        <c:if test="${r.cmRefundShop.refundType == '2'}">
-                            中信银行0897
-                        </c:if>
-                        <c:if test="${r.cmRefundShop.refundType == '3'}">
-                            中信银行7172
-                        </c:if>
-                        <c:if test="${r.cmRefundShop.refundType == '4'}">
-                            广发银行0115
-                        </c:if>
-                        <c:if test="${r.cmRefundShop.refundType == '5'}">
-                            广发银行5461
-                        </c:if>
-                        &nbsp&nbsp
-                        <c:if test="${r.cmRefundShop.refundAmount > 0}">
-                            ¥${r.cmRefundShop.refundAmount}<br>
-                        </c:if>
-                        欠款账簿:&nbsp&nbsp¥${r.cmRefundShop.refundBalanceAmount}
-                    </div>
-                    <c:if test="${(r.cmRefundShop.refundAmount+r.cmRefundShop.refundBalanceAmount) != r.refundAmount}">
-                        <span style="color: #9c0408">(本次退款涉及其他子订单,每种退款方式的金额为多个子订单的该方式退款总和)</span>
+    </c:forEach>
+    <c:forEach items="${rr}" var="r">
+        <tr>
+            <td>${r.id}</td>
+            <td><a href="${ctx}/order/cmRefundShop/toRefund?id=${r.refundShopID}">${r.refundShopID}</a></td>
+            <td>${r.refundTime}</td>
+            <td>
+                <div class="text-left">
+                    线下转账:
+                    <c:if test="${r.cmRefundShop.refundType == '1'}">
+                        建设银行7297
+                    </c:if>
+                    <c:if test="${r.cmRefundShop.refundType == '2'}">
+                        中信银行0897
+                    </c:if>
+                    <c:if test="${r.cmRefundShop.refundType == '3'}">
+                        中信银行7172
                     </c:if>
-                </td>
-                <td>${r.refundAmount}</td>
-            </tr>
-        </c:forEach>
-        </tbody>
-    </table>
+                    <c:if test="${r.cmRefundShop.refundType == '4'}">
+                        广发银行0115
+                    </c:if>
+                    <c:if test="${r.cmRefundShop.refundType == '5'}">
+                        广发银行5461
+                    </c:if>
+                    &nbsp&nbsp
+                    <c:if test="${r.cmRefundShop.refundAmount > 0}">
+                        ¥${r.cmRefundShop.refundAmount}<br>
+                    </c:if>
+                    欠款账簿:&nbsp&nbsp¥${r.cmRefundShop.refundBalanceAmount}
+                </div>
+                <c:if test="${(r.cmRefundShop.refundAmount+r.cmRefundShop.refundBalanceAmount) != r.refundAmount}">
+                    <span style="color: #9c0408">(本次退款涉及其他子订单,每种退款方式的金额为多个子订单的该方式退款总和)</span>
+                </c:if>
+            </td>
+            <td>${r.refundAmount}</td>
+        </tr>
+    </c:forEach>
+    </tbody>
+</table>
 </body>
 <script>
 </script>

+ 6 - 7
src/main/webapp/WEB-INF/views/modules/user/newCmShopForm.jsp

@@ -299,12 +299,11 @@ function auditShop(shopId,userId) {
                         + "       <div class='bd-row'>"
                         + "           <span><font color='red'>*</font>原因:</span>"
                         + "           <div class='auditCheckBox'>"
-                        + "               <label><input name='auditCheckBox' type='checkbox' value='营业执照图片模糊'><span>营业执照图片模糊</span></label>"
-                        + "               <label><input name='auditCheckBox' type='checkbox' value='营业执照编号错误'><span>营业执照编号错误</span></label>"
-                        + "               <label><input name='auditCheckBox' type='checkbox' value='公司名称敏感'><span>公司名称敏感</span></label>"
-                        + "               <label><input name='auditCheckBox' type='checkbox' value='生产许可证错误'><span>生产许可证错误</span></label>"
-                        + "               <label><input name='auditCheckBox' type='checkbox' value='卫生许可证错误'><span>卫生许可证错误</span></label>"
-                        + "               <label><input name='auditCheckBox' type='checkbox' value='税务许可证错误'><span>税务许可证错误</span></label>"
+                        + "               <label><input name='auditCheckBox' type='checkbox' value='入驻资质不达标'><span>入驻资质不达标</span></label>"
+                        + "               <label><input name='auditCheckBox' type='checkbox' value='品牌评估不通过'><span>品牌评估不通过</span></label>"
+                        + "               <label><input name='auditCheckBox' type='checkbox' value='相关证照不清晰'><span>相关证照不清晰</span></label>"
+                        + "               <label><input name='auditCheckBox' type='checkbox' value='企业经营异常'><span>企业经营异常</span></label>"
+                        + "               <label><input name='auditCheckBox' type='checkbox' value='其他'><span>其他</span></label>"
                         + "           </div>"
                         + "       </div>"
                         + "       <div class='bd-row'>"
@@ -664,7 +663,7 @@ function loadTown(curTown) {
 							<font color="red">已下线</font>
 						</c:if>
 						<c:if test="${newCmShop.status eq 92}">
-							<font color="red">审核未通过</font>
+							<font color="red" style="border-bottom: red">审核未通过</font>
 						</c:if>
 						</td>
 

+ 6 - 7
src/main/webapp/WEB-INF/views/modules/user/newCmShopList.jsp

@@ -270,7 +270,7 @@
 								<font color="red">已下线</font>
 							</c:if>
 							<c:if test="${newCmShop.status eq 92}">
-								<font color="red" <c:if test="${not empty newCmShop.auditNote}">onclick="alertx('审核未通过原因:'+'${newCmShop.auditNote}')"</c:if> style="cursor:pointer" >审核未通过</font>
+								<font color="red" <c:if test="${not empty newCmShop.auditNote}">onclick="alertx('审核未通过原因:'+'${newCmShop.auditNote}')"</c:if> style="cursor:pointer;text-decoration: underline" >审核未通过</font>
 							</c:if>
 
 						<c:if test="${newCmShop.status eq 90}">
@@ -766,12 +766,11 @@ function auditShop(shopId,userId,townID,address,name,linkMan,contractMobile) {
                         + "       <div class='bd-row'>"
                         + "           <span><font color='red'>*</font>原因:</span>"
                         + "           <div class='auditCheckBox'>"
-                        + "               <label><input name='auditCheckBox' type='checkbox' value='营业执照图片模糊'><span>营业执照图片模糊</span></label>"
-                        + "               <label><input name='auditCheckBox' type='checkbox' value='营业执照编号错误'><span>营业执照编号错误</span></label>"
-                        + "               <label><input name='auditCheckBox' type='checkbox' value='公司名称敏感'><span>公司名称敏感</span></label>"
-                        + "               <label><input name='auditCheckBox' type='checkbox' value='生产许可证错误'><span>生产许可证错误</span></label>"
-                        + "               <label><input name='auditCheckBox' type='checkbox' value='卫生许可证错误'><span>卫生许可证错误</span></label>"
-                        + "               <label><input name='auditCheckBox' type='checkbox' value='税务许可证错误'><span>税务许可证错误</span></label>"
+                        + "               <label><input name='auditCheckBox' type='checkbox' value='入驻资质不达标'><span>入驻资质不达标</span></label>"
+                        + "               <label><input name='auditCheckBox' type='checkbox' value='品牌评估不通过'><span>品牌评估不通过</span></label>"
+                        + "               <label><input name='auditCheckBox' type='checkbox' value='相关证照不清晰'><span>相关证照不清晰</span></label>"
+                        + "               <label><input name='auditCheckBox' type='checkbox' value='企业经营异常'><span>企业经营异常</span></label>"
+                        + "               <label><input name='auditCheckBox' type='checkbox' value='其他'><span>其他</span></label>"
                         + "           </div>"
                         + "       </div>"
                         + "       <div class='bd-row'>"