...
|
...
|
@@ -11,14 +11,15 @@ var $ = require('yoho.jquery'), |
|
|
$eReceiptBtn = $('.receipt-type .e-receipt'),
|
|
|
$paperReceiptBtn = $('.receipt-type .paper-receipt');
|
|
|
|
|
|
var address = require('./address');
|
|
|
var address = require('./address'),
|
|
|
receiptTitle = "个人";
|
|
|
|
|
|
var dialog = require('../common/dialog');
|
|
|
|
|
|
var accMul = function(arg1, arg2) {
|
|
|
var m = 0,
|
|
|
s1 = arg1.toString(),
|
|
|
s2 = arg2.toString();
|
|
|
s1 = arg1.toString(),
|
|
|
s2 = arg2.toString();
|
|
|
|
|
|
try {
|
|
|
m += s1.split('.')[1].length;
|
...
|
...
|
@@ -875,9 +876,47 @@ $invoiceCheck.click(function(){ |
|
|
});
|
|
|
|
|
|
//电子发票
|
|
|
$receiptInfoSaveBtn.click(function(){
|
|
|
function saveReceiptInfo() {
|
|
|
var passInfoVerify = true,
|
|
|
receiptType,
|
|
|
receiptContent,
|
|
|
receiptMobile,
|
|
|
verifymobile;
|
|
|
|
|
|
|
|
|
if ($eReceiptBtn.hasClass('receipt-type-selected')) {
|
|
|
receiptType = "电子发票";
|
|
|
} else {
|
|
|
receiptType = "纸质发票";
|
|
|
}
|
|
|
|
|
|
if (receiptTitle !== "个人") {
|
|
|
$('.input-line').each(function(){
|
|
|
if ($(this).find('input').val() === '') {
|
|
|
$(this).find('.enpty-input').removeClass('hide');
|
|
|
passInfoVerify = false;
|
|
|
};
|
|
|
})
|
|
|
receiptMobile = $('#input-mobile').val();
|
|
|
verifymobile = /[0-9]{11}/;
|
|
|
if (!verifymobile.test(receiptMobile)) {
|
|
|
$('.invoice-phone .enpty-input').removeClass('hide');
|
|
|
passInfoVerify = false;
|
|
|
};
|
|
|
if (!passInfoVerify) {
|
|
|
return;
|
|
|
} else {
|
|
|
receiptTitle = $('#input-organization-name').val();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
receiptContent = $('input[name="content"]:checked').val();
|
|
|
|
|
|
$receiptInfo.addClass('hide');
|
|
|
$('.invoice-content').removeClass('hide');
|
|
|
}
|
|
|
$receiptInfoSaveBtn.click(function(){
|
|
|
saveReceiptInfo();
|
|
|
});
|
|
|
|
|
|
$receiptInfoCancelBtn.click(function(){
|
...
|
...
|
@@ -905,12 +944,12 @@ $paperReceiptBtn.click(function(){ |
|
|
$('.invoice-title').change(function(){
|
|
|
var selectType = $('input[name="title"]:checked').val();
|
|
|
if (selectType === "1") {
|
|
|
console.log('个人');
|
|
|
receiptTitle = "个人";
|
|
|
$('.invoice-title').addClass('invoice-title-personal-hight');
|
|
|
$('.invoice-title .input-line').addClass('hide');
|
|
|
$('.invoice-phone').addClass('hide');
|
|
|
} else {
|
|
|
console.log('单位');
|
|
|
receiptTitle = "单位";
|
|
|
$('.invoice-title').removeClass('invoice-title-personal-hight');
|
|
|
$('.invoice-title .input-line').removeClass('hide');
|
|
|
$('.invoice-phone').removeClass('hide');
|
...
|
...
|
|