Authored by 周少峰

Merge branch 'feature/returns' into release/5.3

... ... @@ -233,24 +233,19 @@
<p class="type-alipay type-alipay-tips">支付宝需经过实名认证!</p>
<table class="refund-pay-table">
<tr class="type-bank">
<td class="td1">银行所在地:</td>
<td>收款银行:</td>
<td>
<select id="province">
<option value="0">请选择省份</option>
</select>
<select id="city">
<option value="0">请选择城市</option>
</select>
<select id="area">
<option value="0">请选择区县</option>
<select name="bank_id" id="bank-id">
{{# returnBankMode}}
<option value="{{id}}" data="{{needSubbranch}}">{{title}}</option>
{{/ returnBankMode}}
</select>
<span class="hide" id="bank-name-span">
<input type="text" name="bank-name" id="bank-name" >&nbsp;例:江苏省南京市奥体支行
</span>
</td>
</tr>
<tr class="type-bank">
<td>收款银行:</td>
<td><input type="text" name="bank-name" id="bank-name">&nbsp;例:招商银行</td>
</tr>
<tr class="type-bank">
<td>收款人姓名:</td>
<td><input type="text" name="payee-name" id="payee-name">&nbsp;例:李白</td>
</tr>
... ...
... ... @@ -28,7 +28,7 @@
{{/if}}
<div class="detail-container">
{{# express}}
<h2>请填写寄回快递单号,以便我们查询</h2>
<h2>{{noticeTitle}}</h2>
<div class="courier-code{{#unless id}} in-edit{{/unless}}">
{{#with detail}}
<ul style="display: none;">
... ...
... ... @@ -4,5 +4,5 @@
{{^}}
<img class="help-us-icon" src="//cdn.yoho.cn/yohobuy/assets/img/home/help-us.svg">
{{/if}}
客服电话:400-889-9646 08:00-22:30(周一至周日)
客服电话:400-889-9646 09:00-22:30(周一至周日)
</p>
\ No newline at end of file
... ...
... ... @@ -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());
... ...
... ... @@ -155,6 +155,7 @@ class ReturnsModel
$detail['express']['id'] = isset($res['notice']['express_id']) ? $res['notice']['express_id'] : '';
$detail['express']['company'] = isset($res['notice']['express_company']) ? $res['notice']['express_company'] : '';
$detail['express']['number'] = isset($res['notice']['express_number']) ? $res['notice']['express_number'] : '';
$detail['express']['noticeTitle'] = isset($res['notice']['title']) ? $res['notice']['title'] : '';
}
foreach ($res['statusList'] as $key => $value) {
$detail['statusList'][$key]['act'] = ($value['act'] == 'Y') ? true : false;
... ... @@ -357,6 +358,7 @@ class ReturnsModel
}
}
$result['returnAmountMode'] = $data['data']['return_amount_mode'];
$result['returnBankMode'] = isset($data['data']['return_bank_mode']) ? $data['data']['return_bank_mode'] : '';
}
//面包屑-左侧导航
... ...
... ... @@ -21,8 +21,8 @@ define('USE_INTER_FACE_SHUNT', false);//分流开关
//define('API_OLD', 'http://test2.open.yohobuy.com/');
#dev环境
define('API_URL', 'http://api-test2.yohops.com:9999');
define('SERVICE_URL', 'http://service-test2.yohops.com:9999/');
define('API_URL', 'http://api-test3.yohops.com:9999');
define('SERVICE_URL', 'http://service-test3.yohops.com:9999/');
define('YOHOBUY_URL', 'http://www.yohobuy.com/');
define('SERVICE_NOTIFY', 'http://test2.open.yohobuy.com/');
define('API_OLD', 'http://devservice.yoho.cn:58077/');
... ...