|
@@ -174,9 +174,10 @@
|
|
|
<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="${s.payedShopAmount-s.refundsAmount-s.shouldPayShopAmount}" class="refund refundMoneyInput" ></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>
|
|
@@ -248,10 +249,10 @@
|
|
|
<div class="refund-methods">
|
|
|
<label>接收退款方式:</label>
|
|
|
<div>
|
|
|
- <div class="refund-wrapper">
|
|
|
+ <%--<div class="refund-wrapper">
|
|
|
<input type="checkbox" class="refund-checkbox" name="refundWay" value="11" checked>线下转账 
|
|
|
<select name="refundType" id="">
|
|
|
- <%--<option value="6">账户余额</option>--%>
|
|
|
+ <%–<option value="6">账户余额</option>–%>
|
|
|
<option value="1">建设银行7297</option>
|
|
|
<option value="2">中信银行0897</option>
|
|
|
<option value="3">中信银行7172</option>
|
|
@@ -260,10 +261,13 @@
|
|
|
<option value="6">虚拟银行0000</option>
|
|
|
</select>
|
|
|
<input type="number" name="refundAmount" class="refund-amount" value="0.00">
|
|
|
- </div>
|
|
|
+ </div>--%>
|
|
|
<div class="refund-wrapper">
|
|
|
- <input type="checkbox" class="refund-checkbox" name="refundWay" value="22">欠款账簿
|
|
|
- <input type="number" name="refundBalanceAmount" class="refund-amount" value="0.00">
|
|
|
+ <%--<input type="checkbox" class="refund-checkbox" name="refundWay" value="22" checked>--%>
|
|
|
+ 欠款账簿
|
|
|
+ <input type="hidden" name="refundBalanceAmount" class="refund-amount" value="0.00">
|
|
|
+ <input type="hidden" name="refundWay" value="22">
|
|
|
+ <span id="refundBalanceAmount">0.00</span>
|
|
|
</div>
|
|
|
<input type="hidden" name="shopID" value="${cmRefundShop.shopID}">
|
|
|
</div>
|
|
@@ -322,29 +326,31 @@
|
|
|
var thisEle = $(this), wrapper = thisEle.parents(".supplier-fee"),
|
|
|
thisVal = thisEle.val(),
|
|
|
totalAmount = 0,
|
|
|
- alreadyPaid = Number(wrapper.find('.need-refund').text());
|
|
|
- //alreadyPaid = Number(wrapper.find('.need-refund').text().replace('待退:',''));
|
|
|
+ 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);
|
|
|
+ $('#refundBalanceAmount').text(totalAmount);
|
|
|
$('#totalRefundAmount-hidden').val(totalAmount);
|
|
|
+ $('.refund-amount').val(totalAmount);
|
|
|
var refundInfo = wrapper.find('.refundInfo');
|
|
|
refundInfo.val(refundInfo.attr('data-shoporderid') + '_' + thisVal);
|
|
|
});
|
|
|
|
|
|
- $('.refund-amount').on('input',function() {
|
|
|
+ /*$('.refund-amount').on('input',function() {
|
|
|
var thisVal = $(this).val();
|
|
|
if(thisVal < 0) {
|
|
|
$(this).val(0);
|
|
|
}
|
|
|
- })
|
|
|
+ })*/
|
|
|
|
|
|
function showTips(title,text) {
|
|
|
$('.tips-popup h4').text(title);
|
|
@@ -363,10 +369,9 @@
|
|
|
}
|
|
|
})
|
|
|
$('.refund-cfm-btn').on('click',function() {
|
|
|
- var totalRefundAmount = $('#totalRefundAmount').text(),
|
|
|
+ /*var totalRefundAmount = $('#totalRefundAmount').text(),
|
|
|
refundCheckbox = $('.refund-checkbox:checked'),
|
|
|
- // totalRefundAmountInput = $('#refundMoneyInput').val(),//退款金额输入框
|
|
|
- inputTotalAmount = 0;
|
|
|
+ inputTotalAmount = 0;*/
|
|
|
var isNullFlag = false;
|
|
|
$('.refund').each(function (index, ele) {
|
|
|
var _thisVal = $(this).val();
|
|
@@ -377,19 +382,19 @@
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- if(refundCheckbox.length < 1) {
|
|
|
+ /* 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(){
|
|
|
+ /*refundCheckbox.each(function(){
|
|
|
var wrapper = $(this).closest('.refund-wrapper'),
|
|
|
thisAmount = wrapper.find('.refund-amount');
|
|
|
inputTotalAmount += Number(thisAmount.val());
|
|
@@ -400,8 +405,7 @@
|
|
|
showTips('确认提示','各退款方式的金额之和不等于退款总金额,请重新计算后再提交申请。');
|
|
|
$('.tips-cancel-btn').hide();
|
|
|
return false;
|
|
|
- }
|
|
|
-
|
|
|
+ }*/
|
|
|
$('.tips-cfm-btn').removeClass('tips-cfm-directly');
|
|
|
$('.tips-cancel-btn').show();
|
|
|
showTips('确认提示','确定操作已退付款?');
|