zhijiezhao 3 lat temu
rodzic
commit
136217ccb9

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

@@ -1,267 +1,65 @@
 <%@ 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
-        }
-
-        .refund-form h4 {
-            width: 96%;
-            margin-left: 2%;
-            padding-bottom: 20px;
-            text-align: center;
-            border-bottom: 1px solid #eee
-        }
-
-        .required {
-            color: red
-        }
-
-        .refund-form label {
-            width: 100px;
-            text-align: right;
-            vertical-align: middle;
-            font-weight: 600
-        }
-
-        .refund-form-top {
-            padding: 10px 0
-        }
-
-        .refund-form-top > div, .refund-form-bottom > div {
-            width: 94%;
-            margin-left: 3%;
-            height: 50px;
-            line-height: 50px;
-            border-bottom: 1px solid #eee;
-            white-space: nowrap
-        }
-
-        .refund-form-top input {
-            vertical-align: baseline
-        }
-
-        .refund-form-top > div:last-child span {
-            margin-left: 15px
-        }
-
-        .refund-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
-        }
-
+        .table th{text-align:center}
+        .table td{text-align:center}
+        .refund-form h4{width:96%;margin-left:2%;padding-bottom:20px;text-align:center;border-bottom:1px solid #eee}
+        .required{color:red}
+        .refund-form label{width:100px;text-align:right;vertical-align:middle;font-weight:600}
+        .refund-form-top{padding:10px 0}
+        .refund-form-top>div,.refund-form-bottom>div{width:94%;margin-left:3%;height:50px;line-height:50px;border-bottom:1px solid #eee;white-space:nowrap}
+        .refund-form-top input{vertical-align:baseline}
+        .refund-form-top>div:last-child span{margin-left:15px}
+        .refund-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
-        }
-
-        .refund-form-bottom label {
-            width: 110px
-        }
-
-        .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
-        }
-
-        .refund-btn {
-            width: 96%;
-            margin-left: 2%;
-            text-align: center;
-            height: 60px;
-            line-height: 60px;
-            margin-top: 30px
-        }
-
-        .refund-btn button {
-            width: 100px;
-            height: 35px;
-            -webkit-border-radius: 5px;
-            -moz-border-radius: 5px;
-            border-radius: 5px;
-            border: none;
-            border: 1px solid #ddd
-        }
-
-        .refund-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 {
-            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
-        }
-
-        .remark-wrapper {
-            height: auto !important;
-            padding: 0px 0 8px 0
-        }
-
-        .remark-wrapper textarea {
-            width: 400px;
-            height: 150px;
-            vertical-align: text-top;
-            resize: none
-        }
-
-        .refund-methods {
-            height: auto !important
-        }
-
-        .refund-methods > div {
-            display: inline-block
-        }
-
-        .refund-methods label {
-            vertical-align: top;
-            line-height: 50px
-        }
-
-        .weishaIcon {
-            background: darkorange;
-            color: white;
-            margin: 0 0px;
-            padding: 0 3px;
-            font-style: normal;
-            font-size: 12px;
-            display: inline-block;
-            border-radius: 2px
-        }
+        .need-to-pay{width:90px}
+        .refund-form-bottom label{width:110px}
+        .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}
+        .refund-btn{width:96%;margin-left:2%;text-align:center;height:60px;line-height:60px;margin-top:30px}
+        .refund-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px solid #ddd}
+        .refund-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{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}
+        .remark-wrapper{height:auto !important;padding:0px 0 8px 0}
+        .remark-wrapper textarea{width:400px;height:150px;vertical-align:text-top;resize:none}
+        .refund-methods{height:auto !important}
+        .refund-methods>div{display:inline-block}
+        .refund-methods label{vertical-align:top;line-height:50px}
+        .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">
-        $(document).ready(function () {
+        $(document).ready(function() {
             //$("#name").focus();
             $("#inputForm").validate({
-                submitHandler: function (form) {
+                submitHandler: function(form){
                     loading('正在提交,请稍等...');
                     form.submit();
                 },
                 errorContainer: "#messageBox",
-                errorPlacement: function (error, element) {
+                errorPlacement: function(error, element) {
                     $("#messageBox").text("输入有误,请先更正。");
-                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
                         error.appendTo(element.parent().parent());
                     } else {
                         error.insertAfter(element);
@@ -275,8 +73,7 @@
 <ul class="nav nav-tabs">
     <li><a href="${ctx}/order/cmRefundShop/">退款列表</a></li>
     <li class="active"><a href="${ctx}/order/cmRefundShop/toRefund?id=${cmRefundShop.id}">退款详情</a></li>
-</ul>
-<br/>
+</ul><br/>
 <div class="refund-form">
     <div class="refund-form-top">
         <div>
@@ -288,82 +85,30 @@
         <c:forEach items="${cmRefundShop.shopOrders}" var="s">
             <table class="table table-striped table-bordered table-condensed pay-table">
                 <tr>
-                    <th>订单编号(ID)</th>
-                    <th colspan="3">客户</th>
-                    <th colspan="2">下单时间</th>
-                    <th>订单金额</th>
-                    <th colspan="3">所有子订单</th>
-                    <th>订单总佣金</th>
-                    <th>机构运费</th>
+                    <th>子订单编号(ID)</th>
+                    <th colspan="3">订单编号(ID)</th>
+                    <th colspan="2">订单金额</th>
+                    <th colspan="3">下单时间</th>
                     <th>收款状态</th>
-                    <th colspan="3">收款金额</th>
-                    <th>经理折扣</th>
-                    <th>优惠券</th>
-                <tr/>
+                    <th>收款金额</th>
+                    <th colspan="3">经理折扣</th>
+                    <th>成本类型</th>
+                    <th>付第三方</th>
+                </tr>
                 <tr>
-                    <td> ${s.orderNo}(${s.orderID})</td>
-                    <td colspan="3"> ${s.buyer}</td>
-                    <td colspan="2"> ${s.orderTime}</td>
-                    <td>${s.payTotalFee}</td>
-                    <td colspan="3">
-                        <c:forEach items="${s.shopOrderNos}" var="cs">
-                            ${cs}<br/>
-                        </c:forEach></td>
-                    <td>${s.income}</td>
-                    <td>
-                        <label class="clubFreight"  style="display: none">
-                            <c:choose>
-                                <c:when test="${s.freight != -1 && s.freight != 0 && s.freight != -2 && s.returnedFreightFlag ne true}">
-                                    <fmt:formatNumber value="${s.freight}"/>
-                                </c:when>
-                                <c:otherwise>
-                                    <fmt:formatNumber value="0"/>
-                                </c:otherwise>
-                            </c:choose>
-                        </label>
-                        <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 gt 0}">
-                            (采美豆抵用${s.userBeans})
-                        </c:if>
-                    </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}/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">
-                        <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
-                           style="text-decoration: underline">${s.receiptTotalFee}</a>
-                    </td>
-                    <td>
-                        <label class="discountFee"  style="display: none">
-                            <c:choose>
-                                <c:when test="${s.discountTotalFee gt 0 && s.discountTotalFee gt s.returnedPurchaseTotalFee}">
-                                    <fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}"/>
-                                </c:when>
-                                <c:otherwise>
-                                    0
-                                </c:otherwise>
-                            </c:choose>
-                        </label>
                         <c:if test="${s.discountTotalFee gt 0}">
                             <c:if test="${s.discountTotalFee gt s.returnedPurchaseTotalFee}">
-                                <fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}"
-                                                  type="currency"/>
+                                <fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}" type="currency"/>
                             </c:if>
                             <c:if test="${s.discountTotalFee le s.returnedPurchaseTotalFee}">
                                 ¥0.00
@@ -382,70 +127,52 @@
                         </c:if>
                         <c:if test="${s.discountTotalFee le 0}">¥0.00</c:if>
                     </td>
-                    <td>${s.couponAmount} </td>
-                <tr/>
+                    <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>子订单编号(ID)</th>
-                    <th colspan="3"> 供应商</th>
-                    <th colspan="3">子订单佣金</th>
-                    <th colspan="3">商品费</th>
-                    <th>应付税费</th>
+                    <th>供应商</th>
+                    <th colspan="3">客户</th>
+                    <th>机构运费</th>
                     <th>供应商运费</th>
-                    <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.shopOrderNo}(${s.shopOrderID})</td>
-                    <td colspan="3">${s.shopName}</td>
-                    <td colspan="3" class="payCm-t">子订单佣金</td>
-                    <td colspan="3" class="product-fee">${s.shopProductAmount}</td>
-
-                    <td class="taxes">
-                        <fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/>
+                    <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 class="freight"><fmt:formatNumber value="${s.shopPostFee}" type="number"
-                                                          pattern="#,##0.00"/></td>
-
                     <td>
-                        <c:if test="${s.payStatus == 1 || empty s.payStatus || s.payStatus == 0}"><font
-                                color="red">待付款</font></c:if>
+                        <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="3" 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="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>
-							,</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 class="third-party-fee">${s.shopOtherFee}</td>
-
-                    <td>
-                        <c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if>
-                        <c:if test="${s.costType == '2'}">比例成本</c:if>
+                    <td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
+                    <td colspan="2" class="supplier-fee">
+                        <div>应付:${s.shouldPayShopAmount}, 已付:<span class="payed">${s.payedShopAmount}</span>
+                            <c:if test="${s.wipePayment > 0}"><font color="red">(付款抹平¥${s.wipePayment})</font></c:if>
+                        </div>
+                        <div>退款:${s.refundAmount}</div>
                     </td>
                 </tr>
                 <tr>
@@ -453,11 +180,9 @@
                     <th>规格</th>
                     <th>数量<%--(赠品)--%></th>
                     <th>退货</th>
-                    <th colspan="3">单价</th>
+                    <th colspan="2">单价</th>
                     <th colspan="3">机构税率 / 单税费 / 总税费</th>
-                    <th>总价</th>
-                    <th>佣金(单)</th>
-                    <th>佣金(总)</th>
+                    <th colspan="2">总价</th>
                     <th colspan="3">供应商税率 / 单税费 / 总税费</th>
                     <th>成本(单)</th>
                     <th>成本(总)</th>
@@ -476,8 +201,7 @@
                             <c:if test="${p.presentNum > 0}">(赠:${p.presentNum})</c:if>
                         </td>
                         <td><font color="${p.returnedNum>0?'red':''}">${p.returnedNum}</font></td>
-                        <td colspan="3"><fmt:formatNumber value="${empty p.touchPrice?p.discountPrice:p.touchPrice}"
-                                                          type="number" pattern="#,##0.00"/>
+                        <td colspan="2">${empty p.touchPrice?p.discountPrice:p.touchPrice }
                             <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)?'不含税-能开票':'不含税-不能开票'})
@@ -491,22 +215,10 @@
                                 ---
                             </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><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 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>
@@ -514,15 +226,11 @@
                                 ---
                             </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 class="p-costprice"><fmt:formatNumber value="${p.costPrice}" type="number"
-                                                                  pattern="#,##0.00"/></td>
-                        <td><fmt:formatNumber value="${p.costPrice * (p.num + p.presentNum - p.returnedNum)}"
-                                              type="number" pattern="#,##0.00"/></td>
+                        <td 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>
@@ -531,17 +239,15 @@
     <c:if test="${cmRefundShop.recordRefundType ne 5}">
         <div class="refund-form-bottom">
             <div style="text-align: center">
-                <label style="text-align: right">退款总金额:</label><span
-                    id="totalRefundAmount">${cmRefundShop.refundAmount+cmRefundShop.refundBalanceAmount}</span>
-                <input type="hidden" id="totalRefundAmount-hidden" name="refundAmount"
-                       value="${cmRefundShop.refundAmount}">
+                <label style="text-align: right">退款总金额:</label><span id="totalRefundAmount">${cmRefundShop.refundAmount+cmRefundShop.refundBalanceAmount}</span>
+                <input type="hidden" id="totalRefundAmount-hidden" name="refundAmount" value="${cmRefundShop.refundAmount}">
                 <input type="hidden" id="totalAmount-hidden" name="totalAmount" value="${cmRefundShop.refundAmount}">
             </div>
             <div class="refund-methods">
                 <label>接收退款方式:</label>
                 <div>
                     <div class="refund-wrapper">
-                        <c:if test="${cmRefundShop.refundWay == '1'||cmRefundShop.refundWay == '3'||cmRefundShop.refundWay == '4'}">
+                        <c:if test="${cmRefundShop.refundWay == '1'||cmRefundShop.refundWay == '3'}">
                             线下转账:
                             <c:if test="${cmRefundShop.refundType == '1'}">
                                 建设银行7297
@@ -562,9 +268,6 @@
                                 虚拟银行0000
                             </c:if>
                             ,¥${cmRefundShop.refundAmount}
-                            <c:if test="${cmRefundShop.refundWay eq 4}">
-                                ,${cmRefundShop.crmOperatorName}确认(CRM收款:${cmRefundShop.operatTime})
-                            </c:if>
                         </c:if>
                     </div>
                     <div class="refund-wrapper">
@@ -584,19 +287,16 @@
 </div>
 <c:if test="${cmRefundShop.recordRefundType eq 5}">
     <div style="margin-left: 35px">
-        <div style="font-weight: bold;width: 100%;float: left;"><span
-                style="float: left;">${cmRefundShop.shopDifference.systemName}</span><span
-                style="float: left;margin-left:10px;"><fmt:formatDate value="${cmRefundShop.shopDifference.updateTime}"
-                                                                      pattern="yyyy-MM-dd HH:mm"/></span></div>
+        <div style="font-weight: bold;width: 100%;float: left;"><span style="float: left;">${cmRefundShop.shopDifference.systemName}</span><span style="float: left;margin-left:10px;"><fmt:formatDate value="${cmRefundShop.shopDifference.updateTime}" pattern="yyyy-MM-dd HH:mm"/></span></div>
         <br><br>
         <div>
-            <ul><b>差价类型:</b>${cmRefundShop.shopDifference.type eq 1 ? "成本上升":"成本降低"}</ul>
+            <ul><b>差价类型:</b>${cmRefundShop.shopDifference.type eq 1 ? "少付":"多付"}</ul>
             <ul><b>差价金额:</b>${cmRefundShop.shopDifference.differencePrice}</ul>
             <c:if test="${not empty cmRefundShop}">
                 <ul><b>接收退款方式:</b></ul>
                 <div style="margin-left: 100px">
                     <div class="refund-wrapper">
-                        <c:if test="${cmRefundShop.refundWay == '1'||cmRefundShop.refundWay == '3'||cmRefundShop.refundWay == '4'}">
+                        <c:if test="${cmRefundShop.refundWay == '1'||cmRefundShop.refundWay == '3'}">
                             线下转账:
                             <c:if test="${cmRefundShop.refundType == '1'}">
                                 建设银行7297
@@ -617,9 +317,6 @@
                                 虚拟银行0000
                             </c:if>
                             ,¥${cmRefundShop.refundAmount}
-                            <c:if test="${cmRefundShop.refundWay eq 4}">
-                                ,${cmRefundShop.crmOperatorName}确认(CRM收款:${cmRefundShop.operatTime})
-                            </c:if>
                         </c:if>
                     </div>
                     <div class="refund-wrapper">
@@ -627,8 +324,7 @@
                             <b>余额账户:</b>¥${cmRefundShop.refundBalanceAmount}
                         </c:if>
                     </div>
-                </div>
-                <br>
+                </div><br>
             </c:if>
             <ul><b>备注内容:</b>${cmRefundShop.shopDifference.remark}</ul>
             <ul><b>图片:</b>
@@ -656,71 +352,54 @@
 </body>
 <script>
     (function () {
-        $('.tips-cancel-btn, #close-btn1').on('click', function () {
+        $('.tips-cancel-btn, #close-btn1').on('click',function() {
             $('.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(',', ''),
-                clubFreight = Number(thisEle.find('.clubFreight').text().replace(',', '')),
-                discountFee = Number(thisEle.find('.discountFee').text().replace(',', ''));
-            totalComissionEle.each(function () {
-                totalComissionVal += Number($(this).text().replace(',', ''));
-            })
-            resVal = (totalComissionVal + clubFreight - discountFee - thirdPartyVal - freightVal).toFixed(2);
-            comissionEle.text(resVal);
-        })
-
-        $('body').on('input propertychange', '.refund', function () {
+        $('body').on('input propertychange','.refund',function() {
             var thisEle = $(this), wrapper = thisEle.parents(".supplier-fee"),
                 thisVal = thisEle.val(),
                 totalAmount = 0,
                 alreadyPaid = Number(wrapper.find('.payed').text());
             //alreadyPaid = Number(wrapper.find('div:nth-child(2)').text().replace('已付:',''));
-            if (thisVal.length > 8) {
-                wrapper.find('.refund').val(thisVal.slice(0, 8));
+            if(thisVal.length > 8){
+                wrapper.find('.refund').val(thisVal.slice(0,8));
             }
-            if ((thisVal > alreadyPaid)) {
+            if((thisVal > alreadyPaid) ) {
                 thisEle.val(alreadyPaid);
             }
             if (thisVal < 0) {
                 thisEle.val(0);
             }
             $('.refund').each(function (index, ele) {
-                totalAmount += Number($(this).val());
+                totalAmount+= Number($(this).val());
                 $('#totalRefundAmount').text(totalAmount);
             });
             var refundInfo = thisEle.next("input[name='refundInfo']");
             refundInfo.val(refundInfo.attr('data-shoporderid') + '_' + thisEle.val());
         });
 
-        function showTips(title, text) {
+        function showTips(title,text) {
             $('.tips-popup h4').text(title);
             $('.tips-popup p').text(text);
             $('.tips-popup').show();
         }
 
-        $('.tips-cfm-directly').on('click', function () {
-            if ($('.tips-cfm-btn').hasClass('tips-cfm-directly')) {
+        $('.tips-cfm-directly').on('click',function() {
+            if($('.tips-cfm-btn').hasClass('tips-cfm-directly')) {
                 $('.tips-popup').hide();
             } else {
                 $('#form').submit();
             }
         })
-        $('.refund-cfm-btn').on('click', function () {
+        $('.refund-cfm-btn').on('click',function() {
             var totalRefundAmount = $('#totalRefundAmount').text();
-            if (!totalRefundAmount.trim()) {
-                showTips('信息提示', '退款金额不能为空');
+            if(!totalRefundAmount.trim()) {
+                showTips('信息提示','退款金额不能为空');
             } else {
                 $('.tips-cfm-btn').removeClass('tips-cfm-directly');
                 $('.tips-cancel-btn').show();
-                showTips('确认提示', '确定操作已退付款?');
+                showTips('确认提示','确定操作已退付款?');
             }
         })
     })()

+ 275 - 382
src/main/webapp/WEB-INF/views/modules/order/cmRefundShopForm.jsp

@@ -74,99 +74,46 @@
 	</script>
 </head>
 <body>
-	<ul class="nav nav-tabs">
-		<li><a href="${ctx}/order/cmRefundShop/">退款列表</a></li>
-		<li class="active"><a href="${ctx}/order/cmRefundShop/form">提交退款</a></li>
-	</ul><br/>
-	<div class="refund-form">
-		<div class="refund-form-top">
-			<div>
-				<label>退款供应商:</label>
-				<span>${cmRefundShop.shopName}</span>
-			</div>
+<ul class="nav nav-tabs">
+	<li><a href="${ctx}/order/cmRefundShop/">退款列表</a></li>
+	<li class="active"><a href="${ctx}/order/cmRefundShop/form">提交退款</a></li>
+</ul><br/>
+<div class="refund-form">
+	<div class="refund-form-top">
+		<div>
+			<label>退款供应商:</label>
+			<span>${cmRefundShop.shopName}</span>
 		</div>
-		<form id="refundForm" action="${ctx}/order/cmRefundShop/refund" method="post">
-			<div class="refund-form-content">
-				<c:forEach items="${cmRefundShop.shopOrders}" var="s">
+	</div>
+	<form id="refundForm" action="${ctx}/order/cmRefundShop/refund" method="post">
+		<div class="refund-form-content">
+			<c:forEach items="${cmRefundShop.shopOrders}" var="s">
 				<table class="table table-striped table-bordered table-condensed pay-table">
 					<tr>
-						<th>订单编号(ID)</th>
-						<th colspan="3">客户</th>
-						<th colspan="2">下单时间</th>
-						<th>订单金额</th>
-						<th colspan="3">所有子订单</th>
-						<th>订单总佣金</th>
-						<th>机构运费</th>
+						<th>子订单编号(ID)</th>
+						<th colspan="3">订单编号(ID)</th>
+						<th colspan="2">订单金额</th>
+						<th colspan="3">下单时间</th>
 						<th>收款状态</th>
-						<th colspan="3">收款金额</th>
-						<th>经理折扣</th>
-						<th>优惠券</th>
-					<tr/>
+						<th>收款金额</th>
+						<th colspan="3">经理折扣</th>
+						<th>成本类型</th>
+						<th>付第三方</th>
+					</tr>
 					<tr>
-						<td> ${s.orderNo}(${s.orderID})</td>
-						<td colspan="3"> ${s.buyer}</td>
-						<td colspan="2"> ${s.orderTime}</td>
-						<td>${s.payTotalFee}</td>
-						<td colspan="3">
-						<c:forEach items="${s.shopOrderNos}" var="cs">
-							${cs}<br/>
-						</c:forEach>
-						</td>
-						<td>${s.income}</td>
-						<td>
-							<label class="clubFreight"  style="display: none">
-								<c:choose>
-									<c:when test="${s.freight != -1 && s.freight != 0 && s.freight != -2 && s.returnedFreightFlag ne true}">
-										<fmt:formatNumber value="${s.freight}"/>
-									</c:when>
-									<c:otherwise>
-										<fmt:formatNumber value="0"/>
-									</c:otherwise>
-								</c:choose>
-							</label>
-							<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 gt 0}">
-								(采美豆抵用${s.userBeans})
-							</c:if>
-						</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}/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">
-							<a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
-							   style="text-decoration: underline">${s.receiptTotalFee}</a>
-						</td>
-						<td>
-							<label class="discountFee"  style="display: none">
-								<c:choose>
-									<c:when test="${s.discountTotalFee gt 0 && s.discountTotalFee gt s.returnedPurchaseTotalFee}">
-										<fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}"/>
-									</c:when>
-									<c:otherwise>
-										0
-									</c:otherwise>
-								</c:choose>
-							</label>
 							<c:if test="${s.discountTotalFee gt 0}">
 								<c:if test="${s.discountTotalFee gt s.returnedPurchaseTotalFee}">
-									<fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}"
-													  type="currency"/>
+									<fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}" type="currency"/>
 								</c:if>
 								<c:if test="${s.discountTotalFee le s.returnedPurchaseTotalFee}">
 									¥0.00
@@ -185,70 +132,52 @@
 							</c:if>
 							<c:if test="${s.discountTotalFee le 0}">¥0.00</c:if>
 						</td>
-						<td>${s.couponAmount} </td>
-					<tr/>
+						<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>子订单编号(ID)</th>
-						<th colspan="3"> 供应商</th>
-						<th colspan="3">子订单佣金</th>
-						<th colspan="3">商品费</th>
-						<th>应付税费</th>
+						<th>供应商</th>
+						<th colspan="3">客户</th>
+						<th>机构运费</th>
 						<th>供应商运费</th>
-						<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.shopOrderNo}(${s.shopOrderID})</td>
-						<td colspan="3">${s.shopName}</td>
-						<td colspan="3" class="payCm-t">子订单佣金</td>
-						<td colspan="3" class="product-fee">${s.shopProductAmount}</td>
-
-						<td class="taxes">
-							<fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/>
-						</td>
-
-						<td class="freight"><fmt:formatNumber value="${s.shopPostFee}" type="number"
-															  pattern="#,##0.00"/></td>
-
+						<td>${s.shopName}</td>
+						<td colspan="3">${s.buyer}<c:if test="${s.organizeID == 3}"></c:if></td>
 						<td>
-							<c:if test="${s.payStatus == 1 || empty s.payStatus || s.payStatus == 0}"><font
-									color="red">待付款</font></c:if>
-							<c:if test="${s.payStatus == 2}"><font color="#ff8c00">部分付款</font></c:if>
-							<c:if test="${s.payStatus == 3}"><font color="green">已付款</font></c:if>
-						</td>
-
-						<td colspan="3" class="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 test="${s.freight == 0}">
+								包邮
 							</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 test="${s.freight == -1}">
+								到付
 							</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 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>
-							,</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 class="third-party-fee">${s.shopOtherFee}</td>
-
-						<td>
-							<c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if>
-							<c:if test="${s.costType == '2'}">比例成本</c:if>
+						<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="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
+						<td colspan="2" class="supplier-fee">
+							<div>应付:${s.shouldPayShopAmount}, 已付:${s.payedShopAmount}
+								<c:if test="${s.wipePayment > 0}"><font color="red">(付款抹平¥${s.wipePayment})</font></c:if>
+							</div>
+							<div>已退:${s.refundsAmount}<%--, 待退:<span class="need-refund"><fmt:formatNumber value="${s.payedShopAmount-s.refundsAmount-s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/></span>--%></div>
+							<div>退款:<input type="number" value="0" class="refund refundMoneyInput" ></div>
+							<input type="hidden" data-shoporderid="${s.shopOrderID}" name="refundInfo" class="refundInfo" value="${s.shopOrderID}_${s.payedShopAmount-s.refundsAmount-s.shouldPayShopAmount}">
+							<input type="hidden" class="need-refund" value="${s.payedShopAmount-s.refundsAmount}">
 						</td>
 					</tr>
 					<tr>
@@ -256,11 +185,9 @@
 						<th>规格</th>
 						<th>数量<%--(赠品)--%></th>
 						<th>退货</th>
-						<th colspan="3">单价</th>
+						<th colspan="2">单价</th>
 						<th colspan="3">机构税率 / 单税费 / 总税费</th>
-						<th>总价</th>
-						<th>佣金(单)</th>
-						<th>佣金(总)</th>
+						<th colspan="2">总价</th>
 						<th colspan="3">供应商税率 / 单税费 / 总税费</th>
 						<th>成本(单)</th>
 						<th>成本(总)</th>
@@ -279,12 +206,11 @@
 								<c:if test="${p.presentNum > 0}">(赠:${p.presentNum})</c:if>
 							</td>
 							<td><font color="${p.returnedNum>0?'red':''}">${p.returnedNum}</font></td>
-							<td colspan="3"><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">
+									<font color="red">
 										(${p.includedTax eq 1?'含税':(p.invoiceType eq 1 or p.invoiceType eq 2)?'不含税-能开票':'不含税-不能开票'})
-									</label>
+									</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>
@@ -294,22 +220,10 @@
 									---
 								</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><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 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>
@@ -317,247 +231,226 @@
 									---
 								</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 class="p-costprice"><fmt:formatNumber value="${p.costPrice}" type="number"
-																	  pattern="#,##0.00"/></td>
-							<td><fmt:formatNumber value="${p.costPrice * (p.num + p.presentNum - p.returnedNum)}"
-												  type="number" pattern="#,##0.00"/></td>
+							<td 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>
+			</c:forEach>
+		</div>
+		<div class="refund-form-bottom">
+			<div style="text-align: center">
+				<label style="text-align: right">退款总金额:</label><span id="totalRefundAmount">${cmRefundShop.refundAmount}</span>
+				<input type="hidden" id="totalAmount-hidden" name="totalAmount" value="${cmRefundShop.refundAmount}">
 			</div>
-			<div class="refund-form-bottom">
-				<div style="text-align: center">
-					<label style="text-align: right">退款总金额:</label><span id="totalRefundAmount">${cmRefundShop.refundAmount}</span>
-					<input type="hidden" id="totalAmount-hidden" name="totalAmount" value="${cmRefundShop.refundAmount}">
-				</div>
-				<div class="refund-methods">
-					<label>接收退款方式:</label>
-					<div class="refund-wrapper">
-						欠款账簿
-						<input type="number" name="refundBalanceAmount" id="refundBalanceAmount" class="refund-amount" value="0">
-						<br>
-						虚拟银行
-						<input type="number" name="refundAmount" id="refundAmount" class="refund-amount" value="0">
-					</div>
-					<%--<div class="refund-wrapper">
-						<select name="refundType" id="">
-							&lt;%&ndash;<option value="6">账户余额</option>&ndash;%&gt;
-							<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>
-							<option value="6">虚拟银行0000</option>
-						</select>
-					</div>--%>
-					<input type="hidden" name="shopID" value="${cmRefundShop.shopID}">
-					</div>
+			<div class="refund-methods">
+				<label>接收退款方式:</label>
+				<div class="refund-wrapper">
+					欠款账簿
+					<input type="number" name="refundBalanceAmount" id="refundBalanceAmount" class="refund-amount" value="0">
+					<br>
+					虚拟银行
+					<input type="number" name="refundAmount" id="refundAmount" class="refund-amount" value="0">
 				</div>
-				<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>
-	</div>
-	<div class="refund-btn">
-		<button class="refund-cfm-btn">确定</button>
-		<button class="return-btn" onclick="javascript:history.go(-1);">返回</button>
-	</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 class="refund-wrapper">
+                    <select name="refundType" id="">
+                        &lt;%&ndash;<option value="6">账户余额</option>&ndash;%&gt;
+                        <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>
+                        <option value="6">虚拟银行0000</option>
+                    </select>
+                </div>--%>
+				<input type="hidden" name="shopID" value="${cmRefundShop.shopID}">
 			</div>
-			<img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">
 		</div>
+		<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>
+</div>
+<div class="refund-btn">
+	<button class="refund-cfm-btn">确定</button>
+	<button class="return-btn" onclick="javascript:history.go(-1);">返回</button>
+</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>
-		//监测从后台获取的可编辑文字、键盘输入的文字字数的变化,并赋值给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 = '',
-                refundValArr =[],
-                isflg = false;
-            //合并单元格
-            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('.mergeRows').attr('rowspan',productLength);*/
-            });
+<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>
 
-			$('.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(',', ''),
-						clubFreight = Number(thisEle.find('.clubFreight').text().replace(',','')),
-						discountFee = Number(thisEle.find('.discountFee').text().replace(',',''));
-				totalComissionEle.each(function () {
-					totalComissionVal += Number($(this).text().replace(',', ''));
-				})
-				resVal = (totalComissionVal + clubFreight - discountFee - thirdPartyVal - freightVal).toFixed(2);
-				comissionEle.text(resVal);
-			})
+<script>
+	(function () {
+		var nullInputEle = '',
+				refundValArr =[],
+				isflg = false;
+		//合并单元格
+		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('.mergeRows').attr('rowspan',productLength);*/
+		});
 
-			$('.tips-cancel-btn, #close-btn1').on('click',function() {
-				$('.tips-popup').hide();
-                if(isflg) {
-                    nullInputEle.select();
-                }
+		$('.tips-cancel-btn, #close-btn1').on('click',function() {
+			$('.tips-popup').hide();
+			if(isflg) {
+				nullInputEle.select();
+			}
+		});
+		$('.refund').each(function (index,item) {
+			var _value = parseFloat($(this).val()).toFixed(2);
+			refundValArr.push(_value);
+		});
+		$.each(refundValArr,function(i,ele){
+			$('.refund').eq(i).val(ele);
+		})
+		$('body').on('input propertychange','.refund',function() {
+			var thisEle = $(this), wrapper = thisEle.parents(".supplier-fee"),
+					thisVal = thisEle.val(),
+					totalAmount = 0,
+					alreadyPaid = Number(wrapper.find('.need-refund').val());
+			if(thisVal.length > 8){
+				wrapper.find('.refund').val(thisVal.slice(0,8));
+			}
+			if((thisVal > alreadyPaid) ) {
+				thisEle.val(alreadyPaid);
+				thisVal = alreadyPaid;
+			}
+			$('.refund').each(function (index, ele) {
+				totalAmount+= Number($(this).val());
 			});
-            $('.refund').each(function (index,item) {
-                var _value = parseFloat($(this).val()).toFixed(2);
-                    refundValArr.push(_value);
-            });
-            $.each(refundValArr,function(i,ele){
-                $('.refund').eq(i).val(ele);
-            })
-			$('body').on('input propertychange','.refund',function() {
-				var thisEle = $(this), wrapper = thisEle.parents(".supplier-fee"),
-						thisVal = thisEle.val(),
-						totalAmount = 0,
-						alreadyPaid = Number(wrapper.find('.need-refund').val());
-				if(thisVal.length > 8){
-					wrapper.find('.refund').val(thisVal.slice(0,8));
-				}
-				if((thisVal > alreadyPaid) ) {
-					thisEle.val(alreadyPaid);
-					thisVal = alreadyPaid;
-				}
-				$('.refund').each(function (index, ele) {
-					totalAmount+= Number($(this).val());
+			$('#totalRefundAmount').text(totalAmount.toFixed(2));
+			$('#refundBalanceAmount').val(totalAmount);
+			/*$('#totalRefundAmount-hidden').val(totalAmount);
+            $('.refund-amount').val(totalAmount);*/
+			var refundInfo = wrapper.find('.refundInfo');
+			refundInfo.val(refundInfo.attr('data-shoporderid') + '_' + thisVal);
+		});
+		$('body').on('input propertychange','#refundBalanceAmount',function() {
+			var thisVal = $(this).val()*1;
+			var totalAmount = $('#totalRefundAmount').text()*1;
+			if (thisVal > totalAmount) {
+				alertx("金额不能大于退款总金额", function(){
+					$('#refundBalanceAmount').val(totalAmount);
+					$('#refundAmount').val(0);
 				});
-				$('#totalRefundAmount').text(totalAmount.toFixed(2));
-				$('#refundBalanceAmount').val(totalAmount);
-				/*$('#totalRefundAmount-hidden').val(totalAmount);
-				$('.refund-amount').val(totalAmount);*/
-				var refundInfo = wrapper.find('.refundInfo');
-				refundInfo.val(refundInfo.attr('data-shoporderid') + '_' + thisVal);
-			});
-			$('body').on('input propertychange','#refundBalanceAmount',function() {
-				var thisVal = $(this).val()*1;
-				var totalAmount = $('#totalRefundAmount').text()*1;
-				if (thisVal > totalAmount) {
-					alertx("金额不能大于退款总金额", function(){
-						$('#refundBalanceAmount').val(totalAmount);
-						$('#refundAmount').val(0);
-					});
-				} else {
-					if(thisVal < 0) {
-						$(this).val(0);
-					}
-					var totalAmount = $('#totalRefundAmount').text()*1;
-					$('#refundAmount').val(totalAmount - thisVal);
+			} else {
+				if(thisVal < 0) {
+					$(this).val(0);
 				}
-			});
-			$('body').on('input propertychange','#refundAmount',function() {
-				var thisVal = $(this).val()*1;
 				var totalAmount = $('#totalRefundAmount').text()*1;
-				if (thisVal > totalAmount) {
-					alertx("金额不能大于退款总金额",function(){
-						$('#refundAmount').val(totalAmount);
-						$('#refundBalanceAmount').val(0);
-					});
-				} else {
-					if(thisVal < 0) {
-						$(this).val(0);
-					}
-					$('#refundBalanceAmount').val(totalAmount - thisVal);
+				$('#refundAmount').val(totalAmount - thisVal);
+			}
+		});
+		$('body').on('input propertychange','#refundAmount',function() {
+			var thisVal = $(this).val()*1;
+			var totalAmount = $('#totalRefundAmount').text()*1;
+			if (thisVal > totalAmount) {
+				alertx("金额不能大于退款总金额",function(){
+					$('#refundAmount').val(totalAmount);
+					$('#refundBalanceAmount').val(0);
+				});
+			} else {
+				if(thisVal < 0) {
+					$(this).val(0);
 				}
-			});
-
-			function showTips(title,text) {
-				$('.tips-popup h4').text(title);
-				$('.tips-popup p').text(text);
-				$('.tips-popup').show();
+				$('#refundBalanceAmount').val(totalAmount - thisVal);
 			}
+		});
+
+		function showTips(title,text) {
+			$('.tips-popup h4').text(title);
+			$('.tips-popup p').text(text);
+			$('.tips-popup').show();
+		}
 
-			$('.tips-cfm-directly').on('click',function() {
-				if($('.tips-cfm-btn').hasClass('tips-cfm-directly')) {
-					$('.tips-popup').hide();
-				} else {
-					$('#refundForm').submit();
+		$('.tips-cfm-directly').on('click',function() {
+			if($('.tips-cfm-btn').hasClass('tips-cfm-directly')) {
+				$('.tips-popup').hide();
+			} else {
+				$('#refundForm').submit();
+			}
+			if(isflg) {
+				nullInputEle.select();
+			}
+		})
+		$('.refund-cfm-btn').on('click',function() {
+			/*var totalRefundAmount = $('#totalRefundAmount').text(),
+                refundCheckbox = $('.refund-checkbox:checked'),
+                inputTotalAmount = 0;*/
+			var isNullFlag = false;
+			$('.refund').each(function (index, ele) {
+				var _thisVal = $(this).val();
+				if( _thisVal <= 0){
+					isflg =true;
+					isNullFlag = true;
+					nullInputEle = $(this);
 				}
-				if(isflg) {
-                    nullInputEle.select();
-                }
-			})
-			$('.refund-cfm-btn').on('click',function() {
-				/*var totalRefundAmount = $('#totalRefundAmount').text(),
-					refundCheckbox = $('.refund-checkbox:checked'),
-					inputTotalAmount = 0;*/
-				var isNullFlag = false;
-                $('.refund').each(function (index, ele) {
-                    var _thisVal = $(this).val();
-                    if( _thisVal <= 0){
-                        isflg =true;
-                        isNullFlag = true;
-                        nullInputEle = $(this);
-					}
-                });
+			});
 
-               /* if(refundCheckbox.length < 1) {
-                    $('.tips-cfm-btn').addClass('tips-cfm-directly');
-                    $('.tips-cancel-btn').hide();
-                    showTips('信息提示','请勾选接收退款方式');
-                    return false;
-                }*/
-                if(isNullFlag){
-                    $('.tips-cfm-btn').addClass('tips-cfm-directly');
-                    $('.tips-cancel-btn').hide();
-                    showTips('信息提示','退款金额不能为空');
-                    return false;
-                }
-                /*refundCheckbox.each(function(){
-                    var wrapper = $(this).closest('.refund-wrapper'),
-                        thisAmount = wrapper.find('.refund-amount');
-                    inputTotalAmount += Number(thisAmount.val());
-                    console.log('===',inputTotalAmount);
-                })
-                if(inputTotalAmount !== Number(totalRefundAmount)) {
-                    $('.tips-cfm-btn').addClass('tips-cfm-directly');
-                    showTips('确认提示','各退款方式的金额之和不等于退款总金额,请重新计算后再提交申请。');
-                    $('.tips-cancel-btn').hide();
-                    return false;
-                }*/
-                $('.tips-cfm-btn').removeClass('tips-cfm-directly');
-                $('.tips-cancel-btn').show();
-                showTips('确认提示','确定操作已退付款?');
-			})
-		})()
-	</script>
+			/* if(refundCheckbox.length < 1) {
+                 $('.tips-cfm-btn').addClass('tips-cfm-directly');
+                 $('.tips-cancel-btn').hide();
+                 showTips('信息提示','请勾选接收退款方式');
+                 return false;
+             }*/
+			if(isNullFlag){
+				$('.tips-cfm-btn').addClass('tips-cfm-directly');
+				$('.tips-cancel-btn').hide();
+				showTips('信息提示','退款金额不能为空');
+				return false;
+			}
+			/*refundCheckbox.each(function(){
+                var wrapper = $(this).closest('.refund-wrapper'),
+                    thisAmount = wrapper.find('.refund-amount');
+                inputTotalAmount += Number(thisAmount.val());
+                console.log('===',inputTotalAmount);
+            })
+            if(inputTotalAmount !== Number(totalRefundAmount)) {
+                $('.tips-cfm-btn').addClass('tips-cfm-directly');
+                showTips('确认提示','各退款方式的金额之和不等于退款总金额,请重新计算后再提交申请。');
+                $('.tips-cancel-btn').hide();
+                return false;
+            }*/
+			$('.tips-cfm-btn').removeClass('tips-cfm-directly');
+			$('.tips-cancel-btn').show();
+			showTips('确认提示','确定操作已退付款?');
+		})
+	})()
+</script>
 </body>
 </html>