|
|
/**
|
|
|
* 发票信息
|
|
|
* @author: wsl<shuiling.wang@yoho.cn>
|
|
|
* @date: 2016/6/14
|
|
|
*/
|
|
|
|
|
|
var $ = require('jquery');
|
|
|
|
|
|
var $invoiceNotice = $('.invoice-notice'),
|
|
|
$companyArea = $('.company-area');
|
|
|
|
|
|
require('../common');
|
|
|
|
|
|
function chooseAction(pDom, dom) {
|
|
|
if (dom.hasClass('icon-cb-radio')) {
|
|
|
return;
|
|
|
} else {
|
|
|
pDom.find('.choose').removeClass('icon-cb-radio icon-radio').addClass('icon-radio');
|
|
|
dom.removeClass('icon-radio').addClass('icon-cb-radio');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 发票抬头、发票内容选择
|
|
|
$('.invoice-top span, .invoice-cont li').on('touchstart', function(e) {
|
|
|
chooseAction($(this).parent(), $(this).find('.choose'));
|
|
|
|
|
|
if ($(this).parent().hasClass('invoice-cont')) {
|
|
|
$('.choose-cont').html($(this).text());
|
|
|
}
|
|
|
|
|
|
if ($(this).text() === '单位') {
|
|
|
$companyArea.slideDown();
|
|
|
}
|
|
|
|
|
|
if ($(this).text() === '个人') {
|
|
|
$companyArea.slideUp();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// 发票类型选择
|
|
|
$('.invoice-type span').on('touchstart', function() {
|
|
|
if ($(this).hasClass('on')) {
|
|
|
return;
|
|
|
} else {
|
|
|
$(this).addClass('on').siblings().removeClass('on');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// 发票须知
|
|
|
$('.invoice-btn').on('touchstart', function() {
|
|
|
$invoiceNotice.fadeIn();
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
$('.think-ok, .mask-bg').on('touchstart', function() {
|
|
|
$invoiceNotice.fadeOut();
|
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|