Authored by 张丽霞

电子发票

... ... @@ -441,7 +441,7 @@
</div>
</div>
<div class="invoice-list invoice-phone hide">
<div class="invoice-list invoice-phone">
<span class="invoice-star">*</span>
<span class="invoice-list-type">收票人手机</span>
<div class="invoice-line first-line input-line">
... ...
... ... @@ -890,12 +890,9 @@ function saveReceiptInfo() {
receiptType,
receiptContent,
verifymobile,
invoiceType,
receiptTypeID,
invoiceTypeInt,
finalReceiptMobile;
invoiceType = '个人';
if ($eReceiptBtn.hasClass('receipt-type-selected')) {
receiptType = "电子发票";
... ... @@ -905,40 +902,44 @@ function saveReceiptInfo() {
invoiceTypeInt = '1';
}
if (receiptTitle !== "个人") {
invoiceType = '单位';
if (receiptTitle === "单位") {
$('.input-line').each(function(){
if ($(this).find('input').val() === '') {
$(this).find('.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;
};
finalReceiptMobile = $('#input-mobile').val();
if (finalReceiptMobile === receiptMobileStar) {
finalReceiptMobile = receiptMobile;
} else {
verifymobile = /[0-9]{11}/;
if (!verifymobile.test(finalReceiptMobile)) {
$('.invoice-phone .enpty-input').removeClass('hide');
if (finalReceiptMobile.length === 0) {
$('.invoice-phone .enpty-input').html('&#xe626; 请填写手机号码');
} else {
$('.invoice-phone .enpty-input').html('&#xe626; 手机号码不正确');
}
passInfoVerify = false;
}
if (!passInfoVerify) {
return;
} else {
$('.invoice-title .enpty-input').addClass('hide');
$('.invoice-phone .enpty-input').addClass('hide');
receiptTitle = $('#input-organization-name').val();
}
}
if (!passInfoVerify) {
return;
} else {
$('.invoice-title .enpty-input').addClass('hide');
$('.invoice-phone .enpty-input').addClass('hide');
receiptTitle = $('#input-organization-name').val();
}
receiptContent = $('input[name="content"]:checked').val();
receiptTypeID = $('input[name="content"]:checked').data('receiptid');
$('.invoice-type').html(receiptType);
$('.invoice-partment').html(invoiceType);
$('.invoice-partment').html(receiptTitle);
$('.invoice-kind').html(receiptContent);
$('.invoice-upload-type').html(invoiceTypeInt);
... ... @@ -986,11 +987,9 @@ $('.invoice-title').change(function(){
receiptTitle = "个人";
$('.invoice-title').addClass('invoice-title-personal-hight');
$('.invoice-title .input-line').addClass('hide');
$('.invoice-phone').addClass('hide');
} else {
receiptTitle = "单位";
$('.invoice-title').removeClass('invoice-title-personal-hight');
$('.invoice-title .input-line').removeClass('hide');
$('.invoice-phone').removeClass('hide');
}
})
... ...