Authored by 张丽霞

电子发票bug

@@ -288,7 +288,7 @@ @@ -288,7 +288,7 @@
288 <div class="invoice-type mes">电子发票</div> 288 <div class="invoice-type mes">电子发票</div>
289 <div class="invoice-partment mes">个人</div> 289 <div class="invoice-partment mes">个人</div>
290 <div class="invoice-kind mes">服装</div> 290 <div class="invoice-kind mes">服装</div>
291 - <div class="revise mes">修改</div> 291 + <div class="revise mes curser-button">修改</div>
292 </div> 292 </div>
293 <div class='invoice-upload hide'> 293 <div class='invoice-upload hide'>
294 <div class="invoice-upload-type"></div> 294 <div class="invoice-upload-type"></div>
@@ -917,7 +917,7 @@ function saveReceiptInfo() { @@ -917,7 +917,7 @@ function saveReceiptInfo() {
917 if (finalReceiptMobile === receiptMobileStar) { 917 if (finalReceiptMobile === receiptMobileStar) {
918 finalReceiptMobile = receiptMobile; 918 finalReceiptMobile = receiptMobile;
919 } else { 919 } else {
920 - verifymobile = /[0-9]{11}/; 920 + verifymobile = /[1][34578][0-9]{9}/;
921 if (!verifymobile.test(finalReceiptMobile)) { 921 if (!verifymobile.test(finalReceiptMobile)) {
922 $('.invoice-phone .enpty-input').removeClass('hide'); 922 $('.invoice-phone .enpty-input').removeClass('hide');
923 if (finalReceiptMobile.length === 0) { 923 if (finalReceiptMobile.length === 0) {
@@ -954,6 +954,44 @@ function saveReceiptInfo() { @@ -954,6 +954,44 @@ function saveReceiptInfo() {
954 $receiptInfo.addClass('hide'); 954 $receiptInfo.addClass('hide');
955 $('.invoice-content-outter').removeClass('hide'); 955 $('.invoice-content-outter').removeClass('hide');
956 } 956 }
  957 +
  958 +function rejustReceiptInfo() {
  959 + var inviceType = $('.invoice-type').html(),
  960 + invoicePartment = $('.invoice-partment').html(),
  961 + invoiceKind = $('.invoice-kind').html(),
  962 + invoiceMobile,
  963 + invoiceMobileStar;
  964 + if (inviceType === "电子发票") {
  965 + $eReceiptBtn.trigger("click");
  966 + } else {
  967 + $paperReceiptBtn.trigger("click");
  968 + }
  969 +
  970 + if (invoicePartment === "个人") {
  971 + $("input[name='title']").eq(0).attr("checked","checked");
  972 + $('.invoice-title').addClass('invoice-title-personal-hight');
  973 + $('.invoice-title .input-line').addClass('hide');
  974 + } else {
  975 + $("input[name='title']").eq(1).attr("checked","checked");
  976 + $('.invoice-title').removeClass('invoice-title-personal-hight');
  977 + $('.invoice-title .input-line').removeClass('hide');
  978 + $('#input-organization-name').val(invoicePartment);
  979 + }
  980 +
  981 + $("input[name='content']").each(function(){
  982 + if ($(this).attr('value') === invoiceKind) {
  983 + $(this).attr("checked","checked");
  984 + };
  985 + })
  986 +
  987 + invoiceMobile = $('.invoice-upload-mobile').html()
  988 + invoiceMobileStar = invoiceMobile.substr(0, 3) + '****' + invoiceMobile.substr(7);
  989 +
  990 + if ($('#input-mobile').val() !== invoiceMobileStar) {
  991 + $('#input-mobile').val(invoiceMobileStar);
  992 + };
  993 +}
  994 +
957 $receiptInfoSaveBtn.click(function(){ 995 $receiptInfoSaveBtn.click(function(){
958 saveReceiptInfo(); 996 saveReceiptInfo();
959 }); 997 });
@@ -971,6 +1009,7 @@ $receiptInfoCancelBtn.click(function(){ @@ -971,6 +1009,7 @@ $receiptInfoCancelBtn.click(function(){
971 1009
972 $('.revise').click(function(){ 1010 $('.revise').click(function(){
973 $receiptInfo.removeClass('hide'); 1011 $receiptInfo.removeClass('hide');
  1012 + rejustReceiptInfo();
974 }); 1013 });
975 1014
976 $eReceiptBtn.click(function(){ 1015 $eReceiptBtn.click(function(){