Browse Source

付第三方

zhijiezhao 1 year ago
parent
commit
9c5bdc6a94

+ 2 - 0
src/main/java/com/caimei/modules/order/dao/NewShopOrderDao.java

@@ -205,4 +205,6 @@ public interface NewShopOrderDao extends CrudDao<NewShopOrder> {
     OtherFeeDto findCmProfit(Integer shopOrderId);
 
     List<NewShopOrder> findByShopOrderIDsNot(@Param("ids") List<String> ids);
+
+    List<NewShopOrder> findPayOtherList(NewShopOrder shopOrder);
 }

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

@@ -1111,4 +1111,16 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
     public Double findProfit(Integer shopOrderID) {
         return newShopOrderDao.findCmProfit(shopOrderID).getCmProfit();
     }
+
+    public Page<NewShopOrder> findOtherList(Page<NewShopOrder> page, NewShopOrder shopOrder) {
+        shopOrder.setPage(page);
+        if (StringUtils.isNotBlank(shopOrder.getPayStatus())) {
+            String[] split = shopOrder.getPayStatus().split(",");
+            shopOrder.setPs(split);
+        }
+        List<NewShopOrder> payOrderList = newShopOrderDao.findPayOtherList(shopOrder);
+        page.setList(payOrderList);
+        setValue(payOrderList);
+        return page;
+    }
 }

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

@@ -111,6 +111,29 @@ public class CmShopOrderController extends BaseController {
         return "modules/order/cmPayShopList";
     }
 
+
+    @RequiresPermissions("order:cmPayShop:view")
+    @RequestMapping("payOtherList")
+    public String payOtherList(NewShopOrder newShopOrder, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if (null != newShopOrder.getStartTime() && !"".equals(newShopOrder.getStartTime()) && !newShopOrder.getStartTime().endsWith("00:00:00")) {
+            model.addAttribute("startTime", newShopOrder.getStartTime());
+            newShopOrder.setStartTime(newShopOrder.getStartTime().trim() + " 00:00:00");
+        }
+        if (null != newShopOrder.getEndTime() && !"".equals(newShopOrder.getEndTime()) && !newShopOrder.getEndTime().endsWith("23:59:59")) {
+            model.addAttribute("endTime", newShopOrder.getEndTime());
+            newShopOrder.setEndTime(newShopOrder.getEndTime().trim() + " 23:59:59");
+        }
+        Page<NewShopOrder> page = newShopOrderService.findOtherList(new Page<>(request, response), newShopOrder);
+
+        //获取组织列表
+        List<CmUserOrganize> cmUserOrganizeList = cmUserOrganizeService.findOrganize();
+        model.addAttribute("cmUserOrganizeList", cmUserOrganizeList);
+        model.addAttribute("page", page);
+        model.addAttribute("operatingMode", newShopOrder.getOperatingMode());
+        //已付款子订单页面
+        return "modules/order/paidShopOtherList";
+    }
+
     /**
      * 申请付第三方
      *

+ 87 - 0
src/main/resources/mappings/modules/order/ShopOrderMapper.xml

@@ -2791,6 +2791,93 @@
         </if>
     </select>
 
+    <select id="findPayOtherList" resultType="com.caimei.modules.order.entity.NewShopOrder">
+        select<include refid="shopOrderColumns"/>,
+        co.payTotalFee AS payTotalFee,
+        ifnull(a.supplierFreight,0) as supplierFreight,
+        ifnull(a.rebateOrder,0) as rebateOrder,
+        bou.name AS buyer,
+        s.name AS shopName,
+        c.name AS clubName,
+        a.onlinePayWays,
+        ifnull(a.cmAccountType,0) as cmAccountType,
+        cdr.payWay AS payWay,
+        ifnull(a.cmShopOtherFee,0) as cmShopOtherFee
+        from cm_shop_order a
+        left join cm_pay_shop_record cpsr on a.shopOrderID = cpsr.shopOrderID
+        left join bp_order_userinfo bou on bou.orderId = a.orderID
+        left join cm_order co on co.orderID = a.orderID
+        LEFT JOIN cm_receipt_order_relation cror ON cror.orderId = co.orderId and cror.delFlag = 0
+        LEFT JOIN cm_discern_receipt cdr ON cror.receiptID = cdr.id and cdr.delFlag = 0
+        left join shop s on s.shopID = a.shopID
+        LEFT JOIN club c ON c.userID = a.userID
+        <where>
+            s.AccountOwnership = 1
+            and a.shopStatus not in (4, 5)
+            and IFNULL(cdr.receiptType,0) not in (10,11)
+            and cdr.payWay = 2
+            <if test="startTime != null and startTime != ''">
+                AND (a.orderTime &gt; #{startTime} OR a.orderTime = #{startTime})
+            </if>
+            <if test="endTime != null and endTime != ''">
+                AND (a.orderTime &lt; #{endTime} OR a.orderTime = #{endTime})
+            </if>
+            <if test="orderID != null and orderID != ''">
+                AND a.orderID = #{orderID}
+            </if>
+            <if test="organizeID != null and organizeID != 9999">
+                AND co.organizeID = #{organizeID}
+            </if>
+            <if test="organizeID == 9999 ">
+                AND co.orderType = 2
+            </if>
+            <if test="orderNo != null and orderNo != ''">
+                AND a.orderNo like concat('%', #{orderNo} ,'%')
+            </if>
+            <if test="ps != null and ps.length>0 ">
+                AND a.payStatus in
+                <foreach item="item" index="index" collection="ps" open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="shopName != null and shopName != ''">
+                AND s.name like concat('%', #{shopName} ,'%')
+            </if>
+            <if test="buyer != null and buyer != ''">
+                AND bou.name like concat('%', #{buyer} ,'%')
+            </if>
+            <if test="clubName != null and clubName != ''">
+                AND c.name like concat('%', #{clubName} ,'%')
+            </if>
+            <if test="shopOrderID != null and shopOrderID != ''">
+                AND a.shopOrderID = #{shopOrderID}
+            </if>
+            <if test="shopOrderNo != null and shopOrderNo != ''">
+                AND a.shopOrderNo like concat('%', #{shopOrderNo} ,'%')
+            </if>
+            <if test="operatingMode != null and operatingMode == '1'.toString()">
+                and a.payStatus != 3 and co.status NOT IN (6,7)
+            </if>
+            <if test="operatingMode != null and operatingMode == '2'.toString()">
+                and a.payStatus != 1 and co.status != 6
+            </if>
+            <if test="operatingMode != null and operatingMode == '3'.toString()">
+                and a.payStatus = 3 and co.status NOT IN (6,7)
+            </if>
+            and a.shopStatus != 0
+            and co.delFlag = 0
+            and a.delFlag = 0
+            and (a.organizeID!=4 or a.organizeID is null)
+            and a.shopID != 998
+            and co.orderID not in (
+            SELECT orderID FROM cm_order_product WHERE productID IN
+            (6060, 6061, 6062, 6063, 6064, 6065, 6066, 6067, 6068, 6069) GROUP BY orderID
+            )
+        </where>
+        group by a.shopOrderID
+        ORDER BY a.shopOrderID DESC
+    </select>
+
     <insert id="addCmShopOrder" parameterType="com.caimei.modules.order.entity.NewShopOrder" useGeneratedKeys="true"
             keyProperty="shopOrderID">
         insert into cm_shop_order

+ 568 - 0
src/main/webapp/WEB-INF/views/modules/order/paidShopOtherList.jsp

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