Authored by 王水玲

发票bug 修改

... ... @@ -16,6 +16,7 @@ var $invoiceNotice = $('.invoice-notice'),
$invoiceType = $('.invoice-type'),
$tel = $('.tel'),
$company = $('.company'),
$telArea = $('.tel-area'),
orderInfo = order.orderInfo,
$chooseContLi = $('.invoice-cont').find('.icon-cb-radio').parent();
... ... @@ -51,7 +52,7 @@ function confirmAction() {
cont = $chooseCont.data('id');
if ($editFlag.val() === 'true') {
if (!myreg.test($tel.attr('data-tel'))) {
if (type === '2' && !myreg.test($tel.attr('data-tel'))) {
tip.show('请输入正确手机号');
$tel.focus();
return false;
... ... @@ -118,6 +119,13 @@ $('.invoice-type span').on('touchstart', function() {
} else {
$(this).addClass('on').siblings().removeClass('on');
$editFlag.val('true');
// 纸质发票不显示手机号
if ($(this).index() === 1) {
$telArea.slideUp();
} else {
$telArea.slideDown();
}
}
});
... ...
... ... @@ -12,6 +12,14 @@
color: #444;
font-size: 28px;
float: left;
position: relative;
.txt-point {
position: absolute;
left: -15px;
top: 5px;
display: block;
}
}
.invoice-form {
... ... @@ -20,6 +28,7 @@
padding: 0 30px;
box-sizing: border-box;
overflow: hidden;
padding-bottom: 15px;
li {
width: 100%;
... ... @@ -30,11 +39,7 @@
}
li:first-child {
margin-bottom: 15px;
}
li:last-child {
margin-bottom: 10px;
margin-bottom: 5px;
}
.company {
... ...
... ... @@ -18,8 +18,8 @@
{{/invoiceTitle}}
</div>
</li>
<li>
<span class="title">*发票人手机:</span>
<li {{#isPaper}}style="display: none;"{{/isPaper}} class="tel-area">
<span class="title"><i class="txt-point">*</i>发票人手机:</span>
<span class="phone">
<input type="text" name="tel" data-tel="{{completeTel}}" class="tel {{#phone}}istel{{/phone}}" value="{{phone}}" placeholder="可通过手机号在发票服务平台查询">
</span>
... ...
... ... @@ -384,6 +384,7 @@ class IndexController extends AbstractAction
'completeTel' => $mobile,
'isCompany' => $invoice_Top =='单位' ? false : true,
'companyName' => $invoices_title,
'isPaper' => $invoices_type == 1 ? true : false,
'invoicesType' => array(
array(
'id' => '2',
... ...