|
@@ -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="">
|
|
|
- <%–<option value="6">账户余额</option>–%>
|
|
|
- <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="">
|
|
|
+ <%–<option value="6">账户余额</option>–%>
|
|
|
+ <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>
|