...
|
...
|
@@ -28,7 +28,7 @@ function validateInvoice($el) { |
|
|
$el.find('.invoice-title-tip').removeClass('hide');
|
|
|
}
|
|
|
|
|
|
if ($el.invoiceType === 2 && $el.invoiceMobile !== mobile) {
|
|
|
if ($el.invoiceType === 2 && $('#address-list li.address.focus').data('mobile') !== mobile) {
|
|
|
if (!/[1][34578][0-9]{9}/.test(mobile)) {
|
|
|
pass = false;
|
|
|
$el.find('.invoice-mobile-tip').removeClass('hide');
|
...
|
...
|
@@ -49,13 +49,25 @@ function invoiceDialogFactory() { |
|
|
btnClass: ['save-invoice'],
|
|
|
name: '保存发票信息',
|
|
|
cb: function() {
|
|
|
var $el = invoice.$el;
|
|
|
var $el = invoice.$el,
|
|
|
$addressFocus;
|
|
|
|
|
|
var mobile = '',
|
|
|
invoiceMobile;
|
|
|
|
|
|
if (validateInvoice($el)) {
|
|
|
|
|
|
if ($el.invoiceType === 2) {
|
|
|
|
|
|
$addressFocus = $('#address-list li.address.focus');
|
|
|
invoiceMobile = $invoiceMobile.val();
|
|
|
mobile = $addressFocus.data('mobile') !== invoiceMobile ?
|
|
|
invoiceMobile : $addressFocus.data('complete-mobile');
|
|
|
}
|
|
|
|
|
|
$invoiceContent.html(checkedInvoiceTpl({
|
|
|
invoiceType: $el.invoiceType,
|
|
|
invoiceMobile: $el.invoiceType === 2 ? $invoiceMobile.val() : '',
|
|
|
invoiceMobile: mobile,
|
|
|
invoiceTypeName: $el.invoiceTypeName,
|
|
|
invoiceTitle: $el.invoiceTitleType === 1 ? '个人' : $invoiceTitleInput.val(),
|
|
|
content: $el.invoiceContent,
|
...
|
...
|
@@ -139,7 +151,7 @@ function showInvoiceDialog() { |
|
|
}
|
|
|
}
|
|
|
|
|
|
//设置默认收货地址手机号
|
|
|
// 设置默认收货地址手机号
|
|
|
$invoiceMobile.val(mobile.toString().substr(0, 3) + '****' + mobile.toString().substr(7));
|
|
|
|
|
|
// 设置radio选中
|
...
|
...
|
|