Showing
4 changed files
with
22 additions
and
8 deletions
@@ -16,6 +16,7 @@ var $invoiceNotice = $('.invoice-notice'), | @@ -16,6 +16,7 @@ var $invoiceNotice = $('.invoice-notice'), | ||
16 | $invoiceType = $('.invoice-type'), | 16 | $invoiceType = $('.invoice-type'), |
17 | $tel = $('.tel'), | 17 | $tel = $('.tel'), |
18 | $company = $('.company'), | 18 | $company = $('.company'), |
19 | + $telArea = $('.tel-area'), | ||
19 | orderInfo = order.orderInfo, | 20 | orderInfo = order.orderInfo, |
20 | $chooseContLi = $('.invoice-cont').find('.icon-cb-radio').parent(); | 21 | $chooseContLi = $('.invoice-cont').find('.icon-cb-radio').parent(); |
21 | 22 | ||
@@ -51,7 +52,7 @@ function confirmAction() { | @@ -51,7 +52,7 @@ function confirmAction() { | ||
51 | cont = $chooseCont.data('id'); | 52 | cont = $chooseCont.data('id'); |
52 | 53 | ||
53 | if ($editFlag.val() === 'true') { | 54 | if ($editFlag.val() === 'true') { |
54 | - if (!myreg.test($tel.attr('data-tel'))) { | 55 | + if (type === '2' && !myreg.test($tel.attr('data-tel'))) { |
55 | tip.show('请输入正确手机号'); | 56 | tip.show('请输入正确手机号'); |
56 | $tel.focus(); | 57 | $tel.focus(); |
57 | return false; | 58 | return false; |
@@ -118,6 +119,13 @@ $('.invoice-type span').on('touchstart', function() { | @@ -118,6 +119,13 @@ $('.invoice-type span').on('touchstart', function() { | ||
118 | } else { | 119 | } else { |
119 | $(this).addClass('on').siblings().removeClass('on'); | 120 | $(this).addClass('on').siblings().removeClass('on'); |
120 | $editFlag.val('true'); | 121 | $editFlag.val('true'); |
122 | + | ||
123 | + // 纸质发票不显示手机号 | ||
124 | + if ($(this).index() === 1) { | ||
125 | + $telArea.slideUp(); | ||
126 | + } else { | ||
127 | + $telArea.slideDown(); | ||
128 | + } | ||
121 | } | 129 | } |
122 | }); | 130 | }); |
123 | 131 |
@@ -12,6 +12,14 @@ | @@ -12,6 +12,14 @@ | ||
12 | color: #444; | 12 | color: #444; |
13 | font-size: 28px; | 13 | font-size: 28px; |
14 | float: left; | 14 | float: left; |
15 | + position: relative; | ||
16 | + | ||
17 | + .txt-point { | ||
18 | + position: absolute; | ||
19 | + left: -15px; | ||
20 | + top: 5px; | ||
21 | + display: block; | ||
22 | + } | ||
15 | } | 23 | } |
16 | 24 | ||
17 | .invoice-form { | 25 | .invoice-form { |
@@ -20,6 +28,7 @@ | @@ -20,6 +28,7 @@ | ||
20 | padding: 0 30px; | 28 | padding: 0 30px; |
21 | box-sizing: border-box; | 29 | box-sizing: border-box; |
22 | overflow: hidden; | 30 | overflow: hidden; |
31 | + padding-bottom: 15px; | ||
23 | 32 | ||
24 | li { | 33 | li { |
25 | width: 100%; | 34 | width: 100%; |
@@ -30,11 +39,7 @@ | @@ -30,11 +39,7 @@ | ||
30 | } | 39 | } |
31 | 40 | ||
32 | li:first-child { | 41 | li:first-child { |
33 | - margin-bottom: 15px; | ||
34 | - } | ||
35 | - | ||
36 | - li:last-child { | ||
37 | - margin-bottom: 10px; | 42 | + margin-bottom: 5px; |
38 | } | 43 | } |
39 | 44 | ||
40 | .company { | 45 | .company { |
@@ -18,8 +18,8 @@ | @@ -18,8 +18,8 @@ | ||
18 | {{/invoiceTitle}} | 18 | {{/invoiceTitle}} |
19 | </div> | 19 | </div> |
20 | </li> | 20 | </li> |
21 | - <li> | ||
22 | - <span class="title">*发票人手机:</span> | 21 | + <li {{#isPaper}}style="display: none;"{{/isPaper}} class="tel-area"> |
22 | + <span class="title"><i class="txt-point">*</i>发票人手机:</span> | ||
23 | <span class="phone"> | 23 | <span class="phone"> |
24 | <input type="text" name="tel" data-tel="{{completeTel}}" class="tel {{#phone}}istel{{/phone}}" value="{{phone}}" placeholder="可通过手机号在发票服务平台查询"> | 24 | <input type="text" name="tel" data-tel="{{completeTel}}" class="tel {{#phone}}istel{{/phone}}" value="{{phone}}" placeholder="可通过手机号在发票服务平台查询"> |
25 | </span> | 25 | </span> |
@@ -384,6 +384,7 @@ class IndexController extends AbstractAction | @@ -384,6 +384,7 @@ class IndexController extends AbstractAction | ||
384 | 'completeTel' => $mobile, | 384 | 'completeTel' => $mobile, |
385 | 'isCompany' => $invoice_Top =='单位' ? false : true, | 385 | 'isCompany' => $invoice_Top =='单位' ? false : true, |
386 | 'companyName' => $invoices_title, | 386 | 'companyName' => $invoices_title, |
387 | + 'isPaper' => $invoices_type == 1 ? true : false, | ||
387 | 'invoicesType' => array( | 388 | 'invoicesType' => array( |
388 | array( | 389 | array( |
389 | 'id' => '2', | 390 | 'id' => '2', |
-
Please register or login to post a comment