Authored by 张丽霞

电子发票

@@ -441,7 +441,7 @@ @@ -441,7 +441,7 @@
441 </div> 441 </div>
442 </div> 442 </div>
443 443
444 - <div class="invoice-list invoice-phone hide"> 444 + <div class="invoice-list invoice-phone">
445 <span class="invoice-star">*</span> 445 <span class="invoice-star">*</span>
446 <span class="invoice-list-type">收票人手机</span> 446 <span class="invoice-list-type">收票人手机</span>
447 <div class="invoice-line first-line input-line"> 447 <div class="invoice-line first-line input-line">
@@ -890,13 +890,10 @@ function saveReceiptInfo() { @@ -890,13 +890,10 @@ function saveReceiptInfo() {
890 receiptType, 890 receiptType,
891 receiptContent, 891 receiptContent,
892 verifymobile, 892 verifymobile,
893 - invoiceType,  
894 receiptTypeID, 893 receiptTypeID,
895 invoiceTypeInt, 894 invoiceTypeInt,
896 finalReceiptMobile; 895 finalReceiptMobile;
897 896
898 - invoiceType = '个人';  
899 -  
900 if ($eReceiptBtn.hasClass('receipt-type-selected')) { 897 if ($eReceiptBtn.hasClass('receipt-type-selected')) {
901 receiptType = "电子发票"; 898 receiptType = "电子发票";
902 invoiceTypeInt = '2'; 899 invoiceTypeInt = '2';
@@ -905,14 +902,15 @@ function saveReceiptInfo() { @@ -905,14 +902,15 @@ function saveReceiptInfo() {
905 invoiceTypeInt = '1'; 902 invoiceTypeInt = '1';
906 } 903 }
907 904
908 - if (receiptTitle !== "个人") {  
909 - invoiceType = '单位'; 905 + if (receiptTitle === "单位") {
910 $('.input-line').each(function(){ 906 $('.input-line').each(function(){
911 if ($(this).find('input').val() === '') { 907 if ($(this).find('input').val() === '') {
912 $(this).find('.enpty-input').removeClass('hide'); 908 $(this).find('.enpty-input').removeClass('hide');
913 passInfoVerify = false; 909 passInfoVerify = false;
914 }; 910 };
915 }) 911 })
  912 + };
  913 +
916 finalReceiptMobile = $('#input-mobile').val(); 914 finalReceiptMobile = $('#input-mobile').val();
917 if (finalReceiptMobile === receiptMobileStar) { 915 if (finalReceiptMobile === receiptMobileStar) {
918 finalReceiptMobile = receiptMobile; 916 finalReceiptMobile = receiptMobile;
@@ -920,6 +918,11 @@ function saveReceiptInfo() { @@ -920,6 +918,11 @@ function saveReceiptInfo() {
920 verifymobile = /[0-9]{11}/; 918 verifymobile = /[0-9]{11}/;
921 if (!verifymobile.test(finalReceiptMobile)) { 919 if (!verifymobile.test(finalReceiptMobile)) {
922 $('.invoice-phone .enpty-input').removeClass('hide'); 920 $('.invoice-phone .enpty-input').removeClass('hide');
  921 + if (finalReceiptMobile.length === 0) {
  922 + $('.invoice-phone .enpty-input').html('&#xe626; 请填写手机号码');
  923 + } else {
  924 + $('.invoice-phone .enpty-input').html('&#xe626; 手机号码不正确');
  925 + }
923 passInfoVerify = false; 926 passInfoVerify = false;
924 } 927 }
925 } 928 }
@@ -932,13 +935,11 @@ function saveReceiptInfo() { @@ -932,13 +935,11 @@ function saveReceiptInfo() {
932 receiptTitle = $('#input-organization-name').val(); 935 receiptTitle = $('#input-organization-name').val();
933 } 936 }
934 937
935 - }  
936 -  
937 receiptContent = $('input[name="content"]:checked').val(); 938 receiptContent = $('input[name="content"]:checked').val();
938 receiptTypeID = $('input[name="content"]:checked').data('receiptid'); 939 receiptTypeID = $('input[name="content"]:checked').data('receiptid');
939 940
940 $('.invoice-type').html(receiptType); 941 $('.invoice-type').html(receiptType);
941 - $('.invoice-partment').html(invoiceType); 942 + $('.invoice-partment').html(receiptTitle);
942 $('.invoice-kind').html(receiptContent); 943 $('.invoice-kind').html(receiptContent);
943 944
944 $('.invoice-upload-type').html(invoiceTypeInt); 945 $('.invoice-upload-type').html(invoiceTypeInt);
@@ -986,11 +987,9 @@ $('.invoice-title').change(function(){ @@ -986,11 +987,9 @@ $('.invoice-title').change(function(){
986 receiptTitle = "个人"; 987 receiptTitle = "个人";
987 $('.invoice-title').addClass('invoice-title-personal-hight'); 988 $('.invoice-title').addClass('invoice-title-personal-hight');
988 $('.invoice-title .input-line').addClass('hide'); 989 $('.invoice-title .input-line').addClass('hide');
989 - $('.invoice-phone').addClass('hide');  
990 } else { 990 } else {
991 receiptTitle = "单位"; 991 receiptTitle = "单位";
992 $('.invoice-title').removeClass('invoice-title-personal-hight'); 992 $('.invoice-title').removeClass('invoice-title-personal-hight');
993 $('.invoice-title .input-line').removeClass('hide'); 993 $('.invoice-title .input-line').removeClass('hide');
994 - $('.invoice-phone').removeClass('hide');  
995 } 994 }
996 }) 995 })