|
|
@ -49,20 +49,24 @@
|
|
|
|
<%= render :partial => 'upload_img', :locals => {:training => @training} %>
|
|
|
|
<%= render :partial => 'upload_img', :locals => {:training => @training} %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="infoBar mb10">
|
|
|
|
<div class="infoBar mb10">
|
|
|
|
<p>费用明细</p>
|
|
|
|
<p>费用明细<span class="color-orange" id="percentPay">(3人及以上8折优惠)</span></p>
|
|
|
|
<p class="break-word justify moneyDetail">大数据培训缴费</p>
|
|
|
|
<p class="break-word justify moneyDetail">含会议注册费、场地费、培训费、教材资料费、餐费、专家差率费等</p>
|
|
|
|
<div style="text-align: right">
|
|
|
|
<p class="clearfix">
|
|
|
|
<p class="inline">
|
|
|
|
<input type="hidden" name="enlistNum" value="1"/>
|
|
|
|
<input type="hidden" name="enlistN" value="<%= @training.training_payinfo.num %>"/>
|
|
|
|
<input type="hidden" name="enlistMoney" value="3000"/>
|
|
|
|
<span class="fl mr10 font-12"><span id="enlistNum"><%= @training.training_payinfo.num %></span>人</span>
|
|
|
|
<span class="fl red mr5 font-16">¥<span id="enlistM">3000</span></span>
|
|
|
|
<span class="fl font-16">
|
|
|
|
<span class="lastPrice"></span>
|
|
|
|
<a href="javascript:void(0)" class="minusNum"><i class="iconfont icon-default sky_blue font-18"></i></a>
|
|
|
|
<span class="fr font-16">
|
|
|
|
<span class="red mr5">¥<span id="enlistMoney"><%= @pay_fee * @training.training_payinfo.num %></span></span>
|
|
|
|
<a href="javascript:void(0)" class="minusNum" onclick="minusNum(this)">
|
|
|
|
<a href="javascript:void(0)" class="plusNum"><i class="iconfont icon-roundaddfill blue font-18"></i></a>
|
|
|
|
<i class="iconfont icon-default sky_blue font-18"></i>
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<span class="mr5 ml5 font-14"><span id="enlistN">1</span>人</span>
|
|
|
|
|
|
|
|
<a href="javascript:void(0)" class="plusNum" onclick="plusNum(this)">
|
|
|
|
|
|
|
|
<i class="iconfont icon-roundaddfill blue font-18"></i>
|
|
|
|
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p style="height: 44px;"></p>
|
|
|
|
<p style="height: 44px;"></p>
|
|
|
|
<div class="bottomBtn <%= @training.training_payinfo.pay_type.to_i ==3 ? "" : "none" %>" id="offlinePaySubmitBtn">
|
|
|
|
<div class="bottomBtn <%= @training.training_payinfo.pay_type.to_i ==3 ? "" : "none" %>" id="offlinePaySubmitBtn">
|
|
|
|
<a href="<%= enroll_training_path(id: 'bigdata_hnjcxy_2019') %>" class="leftbtn">返回</a>
|
|
|
|
<a href="<%= enroll_training_path(id: 'bigdata_hnjcxy_2019') %>" class="leftbtn">返回</a>
|
|
|
@ -76,7 +80,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!--发票<div class="billDownNav downNav">
|
|
|
|
<div class="billDownNav downNav">
|
|
|
|
<div class="pr billPanel">
|
|
|
|
<div class="pr billPanel">
|
|
|
|
<p class="clearfix mb10">
|
|
|
|
<p class="clearfix mb10">
|
|
|
|
<span class="fl billBigTitle">发票抬头</span>
|
|
|
|
<span class="fl billBigTitle">发票抬头</span>
|
|
|
@ -97,7 +101,7 @@
|
|
|
|
<p style="height:48px;"></p>
|
|
|
|
<p style="height:48px;"></p>
|
|
|
|
<a href="javascript:void(0)" class="submitBillInfo" id="commonSubmit" onclick="submitBillInfo();">确定</a>
|
|
|
|
<a href="javascript:void(0)" class="submitBillInfo" id="commonSubmit" onclick="submitBillInfo();">确定</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>-->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="payTypeDownNav downNav">
|
|
|
|
<div class="payTypeDownNav downNav">
|
|
|
|
<div class="pr billPanel">
|
|
|
|
<div class="pr billPanel">
|
|
|
@ -143,13 +147,13 @@
|
|
|
|
aboutPayType();
|
|
|
|
aboutPayType();
|
|
|
|
|
|
|
|
|
|
|
|
//初始化发票类型
|
|
|
|
//初始化发票类型
|
|
|
|
InitBill(userInfo);
|
|
|
|
//InitBill(userInfo);
|
|
|
|
|
|
|
|
|
|
|
|
//切换发票类型
|
|
|
|
//切换发票类型
|
|
|
|
$(".billType li").on("click", function () {
|
|
|
|
$(".billType li").on("click", function () {
|
|
|
|
$(".billType li").removeClass("active");
|
|
|
|
$(".billType li").removeClass("active");
|
|
|
|
$(this).addClass("active");
|
|
|
|
$(this).addClass("active");
|
|
|
|
billTypeShowFun(parseInt($(this).index()),userInfo);
|
|
|
|
billTypeShowFun(parseInt($(this).index()));
|
|
|
|
})
|
|
|
|
})
|
|
|
|
//关闭弹窗
|
|
|
|
//关闭弹窗
|
|
|
|
$(".billClose").on("click", function () {
|
|
|
|
$(".billClose").on("click", function () {
|
|
|
@ -227,35 +231,56 @@
|
|
|
|
//上传头像
|
|
|
|
//上传头像
|
|
|
|
InitPhoto();
|
|
|
|
InitPhoto();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
//加减报名人数
|
|
|
|
//加减报名人数
|
|
|
|
$(".minusNum").click(function(){
|
|
|
|
function minusNum(item){
|
|
|
|
var num=parseInt($("#enlistNum").html());
|
|
|
|
var num=parseInt($("#enlistN").html());
|
|
|
|
var money=parseFloat($("#enlistMoney").html()).toFixed(2);
|
|
|
|
var money=parseFloat(3000).toFixed(2);
|
|
|
|
|
|
|
|
var percent=$("#percentPay");
|
|
|
|
if(num>1){
|
|
|
|
if(num>1){
|
|
|
|
money=parseFloat(parseFloat(money)-parseFloat(money)/parseFloat(num)).toFixed(2);
|
|
|
|
|
|
|
|
num=num-1;
|
|
|
|
num=num-1;
|
|
|
|
$("#enlistNum").html(num);
|
|
|
|
|
|
|
|
$("#enlistMoney").html(money);
|
|
|
|
|
|
|
|
if(num == 1){
|
|
|
|
if(num == 1){
|
|
|
|
$(".icon-default").removeClass("blue").addClass("sky_blue");
|
|
|
|
$(".icon-default").removeClass("blue").addClass("sky_blue");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$("input[name='enlistN']").val(num);
|
|
|
|
money=parseFloat(parseFloat(money) *num).toFixed(2);
|
|
|
|
|
|
|
|
if($(percent).length>0 && num>2){
|
|
|
|
|
|
|
|
$(".lastPrice").html("¥"+ money);
|
|
|
|
|
|
|
|
money = parseFloat(parseFloat(money) *0.8);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
$(".lastPrice").html("");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$("#enlistN").html(num);
|
|
|
|
|
|
|
|
$("#enlistM").html(money);
|
|
|
|
|
|
|
|
$("#enlistNum").val(num);
|
|
|
|
|
|
|
|
$("#enlistMoney").val(money);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
$(".plusNum").click(function(){
|
|
|
|
|
|
|
|
var num=parseInt($("#enlistNum").html());
|
|
|
|
|
|
|
|
if(num==1){
|
|
|
|
|
|
|
|
$(".icon-default").removeClass("sky_blue").addClass("blue");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var money=parseFloat($("#enlistMoney").html()).toFixed(2);
|
|
|
|
function plusNum(item){
|
|
|
|
money=parseFloat(parseFloat(money)+parseFloat(money)/parseFloat(num)).toFixed(2);
|
|
|
|
var num=parseInt($("#enlistN").html());
|
|
|
|
|
|
|
|
var money=parseFloat(3000).toFixed(2);
|
|
|
|
|
|
|
|
var percent=$("#percentPay");
|
|
|
|
|
|
|
|
|
|
|
|
num=num+1;
|
|
|
|
num=num+1;
|
|
|
|
|
|
|
|
if(num > 1){
|
|
|
|
|
|
|
|
$(".icon-default").removeClass("sky_blue").addClass("blue");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
money=parseFloat(parseFloat(money) *num).toFixed(2);
|
|
|
|
|
|
|
|
|
|
|
|
$("#enlistNum").html(num);
|
|
|
|
if($(percent).length>0 && num>2){
|
|
|
|
$("#enlistMoney").html(money);
|
|
|
|
$(".lastPrice").html("¥"+ money);
|
|
|
|
$("input[name='enlistN']").val(num);
|
|
|
|
money = parseFloat(parseFloat(money) * 0.8).toFixed(2);
|
|
|
|
})
|
|
|
|
}else{
|
|
|
|
})
|
|
|
|
$(".lastPrice").html("");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#enlistN").html(num);
|
|
|
|
|
|
|
|
$("#enlistM").html(money);
|
|
|
|
|
|
|
|
$("#enlistNum").val(num);
|
|
|
|
|
|
|
|
$("#enlistMoney").val(money);
|
|
|
|
|
|
|
|
$("input[name='enlistNum']").val(num);
|
|
|
|
|
|
|
|
}
|
|
|
|
//页面加载时,初始化发票类型
|
|
|
|
//页面加载时,初始化发票类型
|
|
|
|
function InitBill(userInfo){
|
|
|
|
function InitBill(userInfo){
|
|
|
|
var index=2;
|
|
|
|
var index=2;
|
|
|
@ -272,7 +297,7 @@
|
|
|
|
$(".billType li").eq(index).addClass("active");
|
|
|
|
$(".billType li").eq(index).addClass("active");
|
|
|
|
billTypeShowFun(index,userInfo);
|
|
|
|
billTypeShowFun(index,userInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function billTypeShowFun(index,userInfo){
|
|
|
|
function billTypeShowFun(index){
|
|
|
|
if (parseInt(index) == 0) {
|
|
|
|
if (parseInt(index) == 0) {
|
|
|
|
$(".needWrite").removeClass("none");
|
|
|
|
$(".needWrite").removeClass("none");
|
|
|
|
$(".billUnit").attr("placeholder", "请填写公司单位名称").val(userInfo.school);
|
|
|
|
$(".billUnit").attr("placeholder", "请填写公司单位名称").val(userInfo.school);
|
|
|
|