Authored by runner

Merge branch 'release/4.8' of http://git.yoho.cn/fe/YOHOBUYWAP into release/4.8

... ... @@ -13924,7 +13924,7 @@ $invoice.on('touchend', '.checkbox', function() {
orderInfo('invoicesType', null);
orderInfo('invoiceTitle', null);
}
orderCont = window.cookie('order-info') && JSON.parse(window.cookie('order-info'));
invoiceInit();
});
... ... @@ -14192,6 +14192,10 @@ if (orderInfo('address') && orderInfo('address').is_support === 'N') {
orderCompute();
}
orderInfo('address', {
address_id: $('.address-wrap').attr('data-id')
});
// 初始化发票信息内容
invoiceInit();
});
... ... @@ -14275,7 +14279,7 @@ var $invoiceNotice = $('.invoice-notice'),
$copyTel = $('.copy-tel'),
isModifyTel = false;
var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/,
var myreg = /^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/,
linkUrl = '/cart/index/orderEnsure?cartType=ordinary';
require("js/common");
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
... ... @@ -22,7 +22,7 @@ var $invoiceNotice = $('.invoice-notice'),
$copyTel = $('.copy-tel'),
isModifyTel = false;
var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/,
var myreg = /^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/,
linkUrl = '/cart/index/orderEnsure?cartType=ordinary';
require('../common');
... ...
... ... @@ -145,7 +145,7 @@ $invoice.on('touchend', '.checkbox', function() {
orderInfo('invoicesType', null);
orderInfo('invoiceTitle', null);
}
orderCont = window.cookie('order-info') && JSON.parse(window.cookie('order-info'));
invoiceInit();
});
... ... @@ -413,5 +413,9 @@ if (orderInfo('address') && orderInfo('address').is_support === 'N') {
orderCompute();
}
orderInfo('address', {
address_id: $('.address-wrap').attr('data-id')
});
// 初始化发票信息内容
invoiceInit();
\ No newline at end of file
... ...
... ... @@ -314,6 +314,7 @@
}
.invoice-title {
text-align: right;
width: 450px;
overflow: hidden;
white-space: nowrap;
... ...
... ... @@ -82,7 +82,7 @@
</li>
<li>
<span>发票抬头</span>
<span class="invoice-fr">{{title}}</span>
<span class="invoice-fr invoice-title">{{title}}</span>
</li>
<li>
<span>发票内容</span>
... ...
... ... @@ -370,16 +370,28 @@ class IndexController extends AbstractAction
}
$cookieData = $this->getCookie('order-info', null); //从缓存中获取电子发票信息
$orderInfo = json_decode($cookieData, true);
//当没有地址时显示用户号码
$userData = UserData::userData($uid);
$userMobile = empty($userData['data']) || empty($userData['data']['mobile']) ? '' : $userData['data']['mobile']; //用户手机
$mobile = $userMobile;
$addresslist = UserData::addressTextData($uid); //获取地址列表
if (!empty($orderInfo['receiverMobile']) && $orderInfo['isModifyTel'] == true) {
$mobile = $orderInfo['receiverMobile']; //用户号码
} else {
//获取用户所选地址的手机号码
foreach ($addresslist['data'] as $addresskey) {
if ($addresskey['address_id'] == $orderInfo['address']['address_id'])
$mobile = $addresskey['mobile'];
do{
if (empty($orderInfo['receiverMobile']) && !isset($orderInfo['address']['address_id'])) {
break;
}
//用户手动修改号码后直接去修改后号码
if (!empty($orderInfo['receiverMobile']) && $orderInfo['isModifyTel'] == true) {
$mobile = $orderInfo['receiverMobile']; //用户号码
}
else {
//未手动修改获取用户所选地址的手机号码
foreach ($addresslist['data'] as $addresskey) {
if ($addresskey['address_id'] == $orderInfo['address']['address_id'])
$mobile = $addresskey['mobile'];
}
}
}
while(false);
if (!empty($orderInfo['invoiceType']) && !empty($orderInfo['invoiceTitle'])) {
$invoiceType = $orderInfo['invoiceType']; //发票类型ID
... ...