...
|
...
|
@@ -13,7 +13,9 @@ var $goodsTable = $('#goods-table'), |
|
|
$refundType = $('input[name="refund-type"]'),
|
|
|
$province = $('#province'),
|
|
|
$city = $('#city'),
|
|
|
$areaCode = $('#area');
|
|
|
$areaCode = $('#area'),
|
|
|
$bankNameSpan = $('#bank-name-span'),
|
|
|
$bankId = $('#bank-id');
|
|
|
|
|
|
var $refundInfo = $('#refund-pay-info'),
|
|
|
$payYoho = $refundInfo.find('.type-yoho'),
|
...
|
...
|
@@ -34,8 +36,8 @@ var pageType = 0, // 0-换货 1-退货 |
|
|
disPhone = '',
|
|
|
verifyTip = '',
|
|
|
colorSize = {},
|
|
|
timer;
|
|
|
|
|
|
timer,
|
|
|
needSubbranch = '';
|
|
|
require('../../plugin/jquery.qupload');
|
|
|
|
|
|
if (defaultPhone) {
|
...
|
...
|
@@ -86,6 +88,7 @@ function setBackInput(type) { |
|
|
$payYoho.hide();
|
|
|
if (type === 2) {
|
|
|
$payBank.show();
|
|
|
switchSubBank();
|
|
|
$payAli.hide();
|
|
|
$payYoho.hide();
|
|
|
} else if (type === 3) {
|
...
|
...
|
@@ -137,6 +140,22 @@ $reasons.change(function() { |
|
|
}
|
|
|
});
|
|
|
|
|
|
// 选择退款银行
|
|
|
$bankId.change(function() {
|
|
|
switchSubBank();
|
|
|
});
|
|
|
|
|
|
// 切换支行银行信息
|
|
|
function switchSubBank() {
|
|
|
needSubbranch = $bankId.children('option:selected').attr('data');
|
|
|
if (needSubbranch === 'Y') {
|
|
|
$bankNameSpan.removeClass('hide');
|
|
|
} else {
|
|
|
$bankNameSpan.addClass('hide');
|
|
|
}
|
|
|
$refundInfo.find('input[name="bank-name"]').val('');
|
|
|
}
|
|
|
|
|
|
$checkBox.change(function() {
|
|
|
var $par = $(this).parent().parent();
|
|
|
|
...
|
...
|
@@ -313,16 +332,15 @@ function packRefundInfo() { |
|
|
}
|
|
|
|
|
|
if (res.payment.return_amount_mode === 2) {
|
|
|
res.payment.province = $province.val();
|
|
|
res.payment.city = $city.val();
|
|
|
res.payment.area_code = $areaCode.val();
|
|
|
if (!verifyTip && !res.payment.area_code * 1) {
|
|
|
verifyTip = '请选择银行所在地';
|
|
|
}
|
|
|
res.payment.bank_id = $bankId.val() * 1;
|
|
|
res.payment.head_bank_name = $bankId.children('option:selected').text();;
|
|
|
|
|
|
if (!verifyTip && res.payment.bank_id === 0) {
|
|
|
verifyTip = '请选择银行';
|
|
|
}
|
|
|
res.payment.bank_name = $.trim($refundInfo.find('input[name="bank-name"]').val());
|
|
|
if (!verifyTip && !res.payment.bank_name) {
|
|
|
verifyTip = '请填写银行名称';
|
|
|
if (!verifyTip && !res.payment.bank_name && needSubbranch === 'Y') {
|
|
|
verifyTip = '请填写支行行名称';
|
|
|
}
|
|
|
|
|
|
res.payment.payee_name = $.trim($refundInfo.find('input[name="payee-name"]').val());
|
...
|
...
|
|