...
|
...
|
@@ -8,7 +8,8 @@ var $ = require('yoho-jquery'), |
|
|
tip = require('../plugin/tip');
|
|
|
|
|
|
var $currAmt = $('.repayment-bottom').find('.curr-amt'),
|
|
|
$currFee = $('.repayment-bottom').find('.curr-fee');
|
|
|
$currFee = $('.repayment-bottom').find('.curr-fee'),
|
|
|
$servePrice = $('.serve-price');
|
|
|
|
|
|
require('./overdue-notice');
|
|
|
|
...
|
...
|
@@ -72,13 +73,19 @@ $('.repay-list label').on('click', function() { |
|
|
}
|
|
|
}
|
|
|
|
|
|
if (parseFloat($currFee.html()) > 0) {
|
|
|
$servePrice.show();
|
|
|
} else {
|
|
|
$servePrice.hide();
|
|
|
}
|
|
|
|
|
|
setTimeout(function() {
|
|
|
count = $('.repay-list input:checked').length;
|
|
|
$('#repayment-total').prop('checked', count === $('.repay-list li').length);
|
|
|
}, 0);
|
|
|
});
|
|
|
|
|
|
// 全选||全不选
|
|
|
//全选||全不选
|
|
|
$('.repayment-bottom label').on('click', function() {
|
|
|
var totalAmt = 0;
|
|
|
var totalFee = 0;
|
...
|
...
|
@@ -87,6 +94,7 @@ $('.repayment-bottom label').on('click', function() { |
|
|
$('.repay-list input').prop('checked', false);
|
|
|
$currAmt.html('0.00');
|
|
|
$currFee.html('0.00');
|
|
|
$servePrice.hide();
|
|
|
} else {
|
|
|
$('.repay-list input').prop('checked', true);
|
|
|
$('.repay-list li').each(function() {
|
...
|
...
|
@@ -96,6 +104,12 @@ $('.repayment-bottom label').on('click', function() { |
|
|
|
|
|
$currAmt.html(totalAmt.toFixed(2));
|
|
|
$currFee.html(totalFee.toFixed(2));
|
|
|
|
|
|
if (parseFloat($currFee.html()) > 0) {
|
|
|
$servePrice.show();
|
|
|
} else {
|
|
|
$servePrice.hide();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
...
|
...
|
@@ -118,6 +132,35 @@ $('.repayment-btn').on('click', function() { |
|
|
encodeURIComponent(JSON.stringify(list)) + ',"amount":' + (+$currAmt.html()) + '}}');
|
|
|
});
|
|
|
|
|
|
// const repayment = new Repayment({
|
|
|
// onGetSelection: function() {
|
|
|
// const ret = [];
|
|
|
|
|
|
// $(`${CHECKBOX_SELECTOR}:checked`).each(function(key, item) {
|
|
|
// const li = $(item).parents('li');
|
|
|
|
|
|
// const data = {
|
|
|
// index: key,
|
|
|
// orderCode: li.attr('data-billno'),
|
|
|
// termNo: li.attr('data-termNo'),
|
|
|
// amount: parseFloat(li.attr('data-currNoFeeAmt')),
|
|
|
// fee: parseFloat(li.attr('data-currfee')) + 0
|
|
|
// };
|
|
|
|
|
|
// ret.push(data);
|
|
|
// });
|
|
|
|
|
|
// return ret;
|
|
|
// },
|
|
|
// onDeselectAll: function() {
|
|
|
// $(`${CHECKBOX_SELECTOR}:checked`).prop('checked', false);
|
|
|
// return [];
|
|
|
// },
|
|
|
// onSelectAll: function() {
|
|
|
// $(`${CHECKBOX_SELECTOR}:not(:checked)`).prop('checked', true);
|
|
|
// return this.getSelection();
|
|
|
// }
|
|
|
// });
|
|
|
|
|
|
// 跳转到还款详情
|
|
|
window.jumpDetail = function(id) {
|
...
|
...
|
|