|
@@ -248,28 +248,25 @@
|
|
</div>
|
|
</div>
|
|
<div class="refund-methods">
|
|
<div class="refund-methods">
|
|
<label>接收退款方式:</label>
|
|
<label>接收退款方式:</label>
|
|
- <div>
|
|
|
|
- <%--<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="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>
|
|
|
|
- <input type="number" name="refundAmount" class="refund-amount" value="0.00">
|
|
|
|
- </div>--%>
|
|
|
|
- <div class="refund-wrapper">
|
|
|
|
- <%--<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 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>
|
|
</div>
|
|
</div>
|
|
<div class="remark-wrapper">
|
|
<div class="remark-wrapper">
|
|
@@ -356,20 +353,44 @@
|
|
$('.refund').each(function (index, ele) {
|
|
$('.refund').each(function (index, ele) {
|
|
totalAmount+= Number($(this).val());
|
|
totalAmount+= Number($(this).val());
|
|
});
|
|
});
|
|
- $('#totalRefundAmount').text(totalAmount);
|
|
|
|
- $('#refundBalanceAmount').text(totalAmount);
|
|
|
|
- $('#totalRefundAmount-hidden').val(totalAmount);
|
|
|
|
- $('.refund-amount').val(totalAmount);
|
|
|
|
|
|
+ $('#totalRefundAmount').text(totalAmount.toFixed(2));
|
|
|
|
+ $('#refundBalanceAmount').val(totalAmount);
|
|
|
|
+ /*$('#totalRefundAmount-hidden').val(totalAmount);
|
|
|
|
+ $('.refund-amount').val(totalAmount);*/
|
|
var refundInfo = wrapper.find('.refundInfo');
|
|
var refundInfo = wrapper.find('.refundInfo');
|
|
refundInfo.val(refundInfo.attr('data-shoporderid') + '_' + thisVal);
|
|
refundInfo.val(refundInfo.attr('data-shoporderid') + '_' + thisVal);
|
|
});
|
|
});
|
|
-
|
|
|
|
- /*$('.refund-amount').on('input',function() {
|
|
|
|
- var thisVal = $(this).val();
|
|
|
|
- if(thisVal < 0) {
|
|
|
|
- $(this).val(0);
|
|
|
|
|
|
+ $('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);
|
|
}
|
|
}
|
|
- })*/
|
|
|
|
|
|
+ });
|
|
|
|
+ $('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);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
|
|
function showTips(title,text) {
|
|
function showTips(title,text) {
|
|
$('.tips-popup h4').text(title);
|
|
$('.tips-popup h4').text(title);
|