Authored by 张丽霞

电子发票手机号格式

... ... @@ -11,8 +11,11 @@ var $ = require('yoho.jquery'),
$eReceiptBtn = $('.receipt-type .e-receipt'),
$paperReceiptBtn = $('.receipt-type .paper-receipt');
var address = require('./address'),
receiptTitle = "个人";
receiptTitle = "个人",
receiptMobile = $('#input-mobile').val(),
receiptMobileStar;
var dialog = require('../common/dialog');
... ... @@ -876,15 +879,21 @@ $invoiceCheck.click(function(){
});
//电子发票
(function receiptMobileToStarString(numb) {
receiptMobileStar = numb.substr(0, 3) + '****' + numb.substr(7);
$('#input-mobile').val(receiptMobileStar);
}(receiptMobile));
function saveReceiptInfo() {
var passInfoVerify = true,
receiptType,
receiptContent,
receiptMobile,
verifymobile,
invoiceType,
receiptTypeID,
invoiceTypeInt;
invoiceTypeInt,
finalReceiptMobile;
invoiceType = '个人';
... ... @@ -904,12 +913,17 @@ function saveReceiptInfo() {
passInfoVerify = false;
};
})
receiptMobile = $('#input-mobile').val();
verifymobile = /[*0-9]{11}/;
if (!verifymobile.test(receiptMobile)) {
$('.invoice-phone .enpty-input').removeClass('hide');
passInfoVerify = false;
};
finalReceiptMobile = $('#input-mobile').val();
if (finalReceiptMobile === receiptMobileStar) {
finalReceiptMobile = receiptMobile;
} else {
verifymobile = /[0-9]{11}/;
if (!verifymobile.test(finalReceiptMobile)) {
$('.invoice-phone .enpty-input').removeClass('hide');
passInfoVerify = false;
}
}
if (!passInfoVerify) {
return;
} else {
... ... @@ -917,6 +931,7 @@ function saveReceiptInfo() {
$('.invoice-phone .enpty-input').addClass('hide');
receiptTitle = $('#input-organization-name').val();
}
}
receiptContent = $('input[name="content"]:checked').val();
... ... @@ -928,7 +943,7 @@ function saveReceiptInfo() {
$('.invoice-upload-type').html(invoiceTypeInt);
$('.invoice-upload-content').html(receiptTypeID);
$('.invoice-upload-mobile').html(receiptMobile);
$('.invoice-upload-mobile').html(finalReceiptMobile);
$('.invoice-upload-title').html(receiptTitle);
$receiptInfo.addClass('hide');
... ...