|
|
|
@ -142,10 +142,11 @@
|
|
|
|
|
// 2 支付宝支付
|
|
|
|
|
// 3 银行卡支付
|
|
|
|
|
// payType: <%#= @training.training_payinfo.pay_type.to_i %>,
|
|
|
|
|
newPayinfo: <%= @training.training_payinfo.new_record? %>,
|
|
|
|
|
payType: 3,
|
|
|
|
|
//发票抬头
|
|
|
|
|
//为空则代表不需要发票
|
|
|
|
|
invoiceTitle: '<%= @training.training_payinfo.invoice_title %>',
|
|
|
|
|
invoiceTitle: '<%= @training.training_payinfo.invoice_title || @training.school %>',
|
|
|
|
|
//税号
|
|
|
|
|
invoiceNo: '<%= @training.training_payinfo.invoice_no %>'
|
|
|
|
|
};
|
|
|
|
@ -305,13 +306,15 @@
|
|
|
|
|
function InitBill(userInfo){
|
|
|
|
|
var index=0;
|
|
|
|
|
$("#billDemand").html("单位").attr("status",0);
|
|
|
|
|
if(userInfo.invoiceTitle == "" && userInfo.invoiceNo == ""){
|
|
|
|
|
if (!userInfo.newPayinfo) {
|
|
|
|
|
if(userInfo.invoiceTitle == "" && userInfo.invoiceNo == ""){
|
|
|
|
|
index=2;
|
|
|
|
|
$("#billDemand").html("不需要").attr("status",2);
|
|
|
|
|
}
|
|
|
|
|
if(userInfo.invoiceTitle != "" && userInfo.invoiceNo == ""){
|
|
|
|
|
}
|
|
|
|
|
if(userInfo.invoiceTitle != "" && userInfo.invoiceNo == ""){
|
|
|
|
|
index=1;
|
|
|
|
|
$("#billDemand").html("个人").attr("status",1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$(".billType li").removeClass("active");
|
|
|
|
|
$(".billType li").eq(index).addClass("active");
|
|
|
|
|