Authored by 张丽霞

fix电子发票手机号修改没有更新bug

@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 <div class="order-ensure-page yoho-page clearfix"> 2 <div class="order-ensure-page yoho-page clearfix">
3 {{# orderEnsure}} 3 {{# orderEnsure}}
4 <div class="order-edit"> 4 <div class="order-edit">
  5 + <input type="hidden" id="recordMobileNumb" value="{{receiverMobile}}">
5 <div class="order-title"> 6 <div class="order-title">
6 <ul> 7 <ul>
7 <li class="first">查看购物车</li> 8 <li class="first">查看购物车</li>
@@ -194,6 +194,7 @@ exports.getUserAddressList = function() { @@ -194,6 +194,7 @@ exports.getUserAddressList = function() {
194 isHide = 'active address_select'; 194 isHide = 'active address_select';
195 hasDefault++; 195 hasDefault++;
196 addressText = '默认地址'; 196 addressText = '默认地址';
  197 + $('#recordMobileNumb').val(addressData[i].completeMobile);
197 198
198 } else { 199 } else {
199 isChecked = ''; 200 isChecked = '';
@@ -208,6 +209,7 @@ exports.getUserAddressList = function() { @@ -208,6 +209,7 @@ exports.getUserAddressList = function() {
208 '" data-areaCode="' + addressData[i].areaCode + 209 '" data-areaCode="' + addressData[i].areaCode +
209 '" data-addressDesc="' + addressData[i].addressDesc + 210 '" data-addressDesc="' + addressData[i].addressDesc +
210 '" data-mobile="' + addressData[i].mobile + 211 '" data-mobile="' + addressData[i].mobile +
  212 + '" data-completeMobile="' + addressData[i].completeMobile +
211 '" data-phoneNum="' + addressData[i].phoneNum + 213 '" data-phoneNum="' + addressData[i].phoneNum +
212 '" data-phoneCode="' + addressData[i].phoneCode + 214 '" data-phoneCode="' + addressData[i].phoneCode +
213 '" data-zipCode="' + addressData[i].zipCode + 215 '" data-zipCode="' + addressData[i].zipCode +
@@ -448,7 +450,6 @@ exports.saveAddress = function() { @@ -448,7 +450,6 @@ exports.saveAddress = function() {
448 var telCodeReg = /^[0-9]{3,5}$/; 450 var telCodeReg = /^[0-9]{3,5}$/;
449 var telReg = /^[0-9]{5,10}$/; 451 var telReg = /^[0-9]{5,10}$/;
450 452
451 -  
452 function hasText(val) { 453 function hasText(val) {
453 454
454 if (val === telCode) { 455 if (val === telCode) {
@@ -479,7 +480,7 @@ exports.saveAddress = function() { @@ -479,7 +480,7 @@ exports.saveAddress = function() {
479 .find('input[name="address"]').attr('checked', 'checked'); 480 .find('input[name="address"]').attr('checked', 'checked');
480 481
481 $('.address-list span').removeAttr('expand'); 482 $('.address-list span').removeAttr('expand');
482 - 483 + $('#recordMobileNumb').val($('.exist-address-list li.active input').attr('data-completemobile'));
483 refreshAddressStatus(); 484 refreshAddressStatus();
484 485
485 } 486 }
@@ -521,6 +522,7 @@ exports.saveAddress = function() { @@ -521,6 +522,7 @@ exports.saveAddress = function() {
521 if (!!$saveBtn.attr('data-id')) { 522 if (!!$saveBtn.attr('data-id')) {
522 postData.id = $saveBtn.attr('data-id'); 523 postData.id = $saveBtn.attr('data-id');
523 } 524 }
  525 + $('#recordMobileNumb').val(phone);
524 526
525 $.ajax({ 527 $.ajax({
526 type: 'post', 528 type: 'post',
@@ -649,7 +651,6 @@ exports.saveAddress = function() { @@ -649,7 +651,6 @@ exports.saveAddress = function() {
649 }; 651 };
650 652
651 653
652 -  
653 // 支付及送货时间选择 654 // 支付及送货时间选择
654 $('.pay-time-modify .pay-btn').click(function() { 655 $('.pay-time-modify .pay-btn').click(function() {
655 656
@@ -14,7 +14,7 @@ var $ = require('yoho.jquery'), @@ -14,7 +14,7 @@ var $ = require('yoho.jquery'),
14 14
15 var address = require('./address'), 15 var address = require('./address'),
16 receiptTitle = "个人", 16 receiptTitle = "个人",
17 - receiptMobile = $('#input-mobile').val(), 17 + receiptMobile = $('#recordMobileNumb').val(),
18 receiptMobileStar; 18 receiptMobileStar;
19 19
20 var dialog = require('../common/dialog'); 20 var dialog = require('../common/dialog');
@@ -865,6 +865,11 @@ $('.bag').find('ul').each(function() { @@ -865,6 +865,11 @@ $('.bag').find('ul').each(function() {
865 865
866 $invoiceCheck.click(function(){ 866 $invoiceCheck.click(function(){
867 867
  868 + receiptMobile = $('#recordMobileNumb').val(),
  869 + (function receiptMobileToStarString(numb) {
  870 + receiptMobileStar = numb.substr(0, 3) + '****' + numb.substr(7);
  871 + $('#input-mobile').val(receiptMobileStar);
  872 + }(receiptMobile));
868 if ($invoiceCheck.hasClass('active')) { 873 if ($invoiceCheck.hasClass('active')) {
869 $invoiceCheck.removeAttr('checked'); 874 $invoiceCheck.removeAttr('checked');
870 $invoiceCheck.removeClass('active'); 875 $invoiceCheck.removeClass('active');
@@ -879,12 +884,8 @@ $invoiceCheck.click(function(){ @@ -879,12 +884,8 @@ $invoiceCheck.click(function(){
879 } 884 }
880 }); 885 });
881 886
882 -//电子发票  
883 887
884 -(function receiptMobileToStarString(numb) {  
885 - receiptMobileStar = numb.substr(0, 3) + '****' + numb.substr(7);  
886 - $('#input-mobile').val(receiptMobileStar);  
887 -}(receiptMobile)); 888 +//电子发票
888 889
889 function saveReceiptInfo() { 890 function saveReceiptInfo() {
890 var passInfoVerify = true, 891 var passInfoVerify = true,