|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
<form action="/trainings/update_payinfo" method="post" accept-charset="UTF-8" enctype="multipart/form-data">
|
|
|
|
|
<div style="padding-top: 10px">
|
|
|
|
|
<div class="showPanel" id="payTypeLine" NavShow>
|
|
|
|
|
<%= hidden_field_tag(:friendly_id, @friendly_id) %>
|
|
|
|
|
|
|
|
|
|
<div class="showPanel" id="payTypeLine" <%= @training.training_payinfo.not_payed? ? 'NavShow' : '' %>>
|
|
|
|
|
<p class="clearfix pr">
|
|
|
|
|
<label>支付方式</label>
|
|
|
|
|
<span class="mr5" style="margin-right: 24px;" id="payTypeName"><%= @training.training_payinfo.pay_type.to_i == 3 ? "线下支付" : "微信支付" %></span>
|
|
|
|
@ -15,89 +17,118 @@
|
|
|
|
|
<div class="flex1 accountRight">
|
|
|
|
|
<li class="df">
|
|
|
|
|
<label class="fl">账 号:</label>
|
|
|
|
|
<p class="fl flex1 break-word">800190320609016</p>
|
|
|
|
|
<p class="fl flex1 break-word">1901008009200085901</p>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="df">
|
|
|
|
|
<label class="fl">户 名:</label>
|
|
|
|
|
<p class="fl flex1">湖南酷得网络科技有限公司</p>
|
|
|
|
|
<p class="fl flex1">长沙智擎信息技术有限公司</p>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="df">
|
|
|
|
|
<label class="fl">开户行:</label>
|
|
|
|
|
<p class="fl flex1">长沙银行股份有限公司四方支行</p>
|
|
|
|
|
<p class="fl flex1">工商银行长沙市岳麓山支行</p>
|
|
|
|
|
</li>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<p class="payTip">完成线下支付后,请将支付截图粘贴到备注中,以便财务审核</p>
|
|
|
|
|
<p class="payTip">完成银行转账后,请上传转账凭证,由会务组审核</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!--发票<div class="infoBar mb10">
|
|
|
|
|
<p class="clearfix" id="billLine" NavShow>
|
|
|
|
|
<span class="grey fl">发票</span>
|
|
|
|
|
<label class="fr" id="billDemand" status=2 style="margin-right: 24px;">不需要</label>
|
|
|
|
|
<i class="iconfont icon-gengduo1 rightArrow" style="color: #323232;right: 14px"></i>
|
|
|
|
|
<div class="infoBar mb10">
|
|
|
|
|
<!-- <p class="clearfix" id="billLine" NavShow>-->
|
|
|
|
|
<!-- <span class="grey fl">发票</span>-->
|
|
|
|
|
<!-- <label class="fr" id="billDemand" status=2 style="margin-right: 24px;">不需要</label>-->
|
|
|
|
|
<!-- <i class="iconfont icon-gengduo1 rightArrow" style="color: #323232;right: 14px"></i>-->
|
|
|
|
|
<!-- </p>-->
|
|
|
|
|
<p class="clearfix" id="billRemark">
|
|
|
|
|
<span class="grey fl">发票抬头</span>
|
|
|
|
|
<input type="text" name="invoice_title" class="right_input" placeholder="请填写发票抬头"
|
|
|
|
|
value="<%= @training.training_payinfo.try(:invoice_title) || @training.school %>"/>
|
|
|
|
|
</p>
|
|
|
|
|
<p class="clearfix" id="billRemark">
|
|
|
|
|
<span class="grey fl">税务登记号</span>
|
|
|
|
|
<input type="text" name="invoice_no" class="right_input" placeholder="请填写税务登记号"
|
|
|
|
|
value="<%= @training.training_payinfo.try(:invoice_no) %>"/>
|
|
|
|
|
</p>
|
|
|
|
|
<p class="clearfix" id="billRemark">
|
|
|
|
|
<span class="grey fl">发票内容</span>
|
|
|
|
|
<input type="text" name="invoice_content" class="right_input"
|
|
|
|
|
value="<%#= @training.training_payinfo.invoice_content.presence || '会议注册费' %>"/>
|
|
|
|
|
value="<%= @training.training_payinfo.try(:invoice_content).presence || '会议注册费' %>"/>
|
|
|
|
|
</p>
|
|
|
|
|
</div>-->
|
|
|
|
|
</div>
|
|
|
|
|
<div class="infoBar mb10">
|
|
|
|
|
<p>备注</p>
|
|
|
|
|
<textarea class="remarkAccount" name="info" id="info"><%= @training.training_payinfo.info %></textarea>
|
|
|
|
|
<textarea class="remarkAccount" name="info" id="info" placeholder="请您在此输入您的留言"><%= @training.training_payinfo.info %></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="infoBar mb10 pay-image <%= @training.training_payinfo.pay_type.to_i == 3 ? "" : "none" %>">
|
|
|
|
|
<p>上传转账凭证</p>
|
|
|
|
|
<!--图片上传-->
|
|
|
|
|
<%= render :partial => 'upload_img', :locals => {:training => @training} %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="infoBar mb10">
|
|
|
|
|
<p>费用明细</p>
|
|
|
|
|
<p class="break-word justify moneyDetail">大数据培训缴费</p>
|
|
|
|
|
<div style="text-align: right">
|
|
|
|
|
<p class="inline">
|
|
|
|
|
<input type="hidden" name="enlistN" value="<%= @training.training_payinfo.num %>"/>
|
|
|
|
|
<span class="fl mr10 font-12"><span id="enlistNum"><%= @training.training_payinfo.num %></span>人</span>
|
|
|
|
|
<span class="fl font-16">
|
|
|
|
|
<a href="javascript:void(0)" class="minusNum"><i class="iconfont icon-default sky_blue font-18"></i></a>
|
|
|
|
|
<span class="red mr5">¥<span id="enlistMoney"><%= @pay_fee * @training.training_payinfo.num %></span></span>
|
|
|
|
|
<a href="javascript:void(0)" class="plusNum"><i class="iconfont icon-roundaddfill blue font-18"></i></a>
|
|
|
|
|
</span>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<p>费用明细
|
|
|
|
|
<% if @training.training_type == 3 %>
|
|
|
|
|
<span class="color-orange" id="percentPay">(3人及以上8折优惠)</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
</p>
|
|
|
|
|
<p class="break-word justify moneyDetail">含会务费、培训费、教材资料费、餐费、专家差旅费等</p>
|
|
|
|
|
<p class="clearfix">
|
|
|
|
|
<input type="hidden" name="enlistNum" value="<%= @training.training_payinfo.num || 1 %>"/>
|
|
|
|
|
<input type="hidden" name="enlistMoney" value="<%= @training.training_payinfo.fee || @training.registration_fee %>"/>
|
|
|
|
|
<span class="fl red mr5 font-16">¥<span id="enlistM"><%= @training.training_payinfo.fee || @training.registration_fee %></span></span>
|
|
|
|
|
<span class="lastPrice"></span>
|
|
|
|
|
<span class="fr font-16">
|
|
|
|
|
<% if @training.training_payinfo.not_payed? %>
|
|
|
|
|
<a href="javascript:void(0)" class="minusNum" onclick="minusNum(this)">
|
|
|
|
|
<i class="iconfont icon-default sky_blue font-18"></i>
|
|
|
|
|
</a>
|
|
|
|
|
<span class="mr5 ml5 font-14"><span id="enlistN"><%= @training.training_payinfo.num || 1 %></span>人</span>
|
|
|
|
|
<a href="javascript:void(0)" class="plusNum" onclick="plusNum(this)">
|
|
|
|
|
<i class="iconfont icon-roundaddfill blue font-18"></i>
|
|
|
|
|
</a>
|
|
|
|
|
<% else %>
|
|
|
|
|
<span class="mr5 ml5 font-14"><span id="enlistN"><%= @training.training_payinfo.num || 1 %></span>人</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
</span>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<p style="height: 44px;"></p>
|
|
|
|
|
<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="javascript:void(0)" class="rightbtn" id="submitFormBtn">提交</a>
|
|
|
|
|
<div class="bottomBtn <%= @training.training_payinfo.pay_type.to_i == 1 ? "none" : "" %>" id="offlinePaySubmitBtn">
|
|
|
|
|
<a href="<%= training_path(id: @friendly_id, disable_redirect: true) %>" class="leftbtn">返回</a>
|
|
|
|
|
<a href="javascript:void(0)" class="rightbtn" id="submitFormBtn"><%= @training.training_payinfo.new_record? ? '完成转账' : '提交' %></a>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="bottomBtn <%= @training.training_payinfo.pay_type.to_i ==3 ? "none" : "" %>" id="paySubmitBtn">
|
|
|
|
|
<a href="<%= enroll_training_path(id: 'bigdata_hnjcxy_2019') %>" class="leftbtn">返回</a>
|
|
|
|
|
<a href="javascript:void(0)" class="rightbtn" id="payBtn">立即支付</a>
|
|
|
|
|
<div class="bottomBtn <%= @training.training_payinfo.pay_type.to_i == 1 ? "" : "none" %>" id="paySubmitBtn">
|
|
|
|
|
<a href="<%= training_path(id: @friendly_id, disable_redirect: true) %>" class="leftbtn">返回</a>
|
|
|
|
|
<% if @training.training_payinfo.not_payed? %>
|
|
|
|
|
<a href="javascript:void(0)" class="rightbtn" id="payBtn">立即支付</a>
|
|
|
|
|
<% else %>
|
|
|
|
|
<a href="javascript:void(0)" class="rightbtn" id="submitWxpayFormBtn">提交</a>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!--发票<div class="billDownNav downNav">
|
|
|
|
|
<div class="pr billPanel">
|
|
|
|
|
<p class="clearfix mb10">
|
|
|
|
|
<span class="fl billBigTitle">发票抬头</span>
|
|
|
|
|
<a href="javascript:void(0)" class="fr" id="closeTypeNav"><i class="iconfont icon-guanbi billClose"></i></a>
|
|
|
|
|
</p>
|
|
|
|
|
<ul class="clearfix billType">
|
|
|
|
|
<li>单位</li>
|
|
|
|
|
<li>个人</li>
|
|
|
|
|
<li class="active">不需要</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<p class="clearfix needWrite none">
|
|
|
|
|
<span class="fl billSmallTitle mb10">发票抬头</span>
|
|
|
|
|
</p>
|
|
|
|
|
<ul class="clearfix needWrite none">
|
|
|
|
|
<input placeholder="请填写公司单位名称" name="invoice_title" class="billInput billUnit"/>
|
|
|
|
|
<input placeholder="请填写税务登记号" name="invoice_no" class="billInput taxNumber"/>
|
|
|
|
|
</ul>
|
|
|
|
|
<p style="height:48px;"></p>
|
|
|
|
|
<a href="javascript:void(0)" class="submitBillInfo" id="commonSubmit" onclick="submitBillInfo();">确定</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>-->
|
|
|
|
|
<!-- <div class="billDownNav downNav">-->
|
|
|
|
|
<!-- <div class="pr billPanel">-->
|
|
|
|
|
<!-- <p class="clearfix mb10">-->
|
|
|
|
|
<!-- <span class="fl billBigTitle">发票类型</span>-->
|
|
|
|
|
<!-- <a href="javascript:void(0)" class="fr" id="closeTypeNav"><i class="iconfont icon-guanbi billClose"></i></a>-->
|
|
|
|
|
<!-- </p>-->
|
|
|
|
|
<!-- <ul class="clearfix billType">-->
|
|
|
|
|
<!-- <li>个人</li>-->
|
|
|
|
|
<!-- <li>单位</li>-->
|
|
|
|
|
<!-- </ul>-->
|
|
|
|
|
<!-- <p class="clearfix needWrite none">-->
|
|
|
|
|
<!-- <span class="fl billSmallTitle mb10">发票信息</span>-->
|
|
|
|
|
<!-- </p>-->
|
|
|
|
|
<!-- <ul class="clearfix needWrite none">-->
|
|
|
|
|
<!-- <input placeholder="请填写公司单位名称" name="invoice_title" class="billInput billUnit"/>-->
|
|
|
|
|
<!-- <input placeholder="请填写税务登记号" name="invoice_no" class="billInput taxNumber"/>-->
|
|
|
|
|
<!-- </ul>-->
|
|
|
|
|
<!-- <p style="height:48px;"></p>-->
|
|
|
|
|
<!-- <a href="javascript:void(0)" class="submitBillInfo" id="commonSubmit" onclick="submitBillInfo();">确定</a>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
|
|
|
|
|
<div class="payTypeDownNav downNav">
|
|
|
|
|
<div class="pr billPanel">
|
|
|
|
@ -111,7 +142,7 @@
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<input type="hidden" id="pay_type" name="pay_type" value="<%= @training.training_payinfo.pay_type.presence || 1 %>">
|
|
|
|
|
<input type="hidden" id="pay_type" name="pay_type" value="<%= @training.training_payinfo.pay_type.presence || 3 %>">
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
<!--<script src="https://cdn.jsdelivr.net/npm/eruda" type="text/javascript"></script>-->
|
|
|
|
@ -120,57 +151,57 @@
|
|
|
|
|
//
|
|
|
|
|
// eruda.init();
|
|
|
|
|
|
|
|
|
|
// var userInfo = {
|
|
|
|
|
// name: '<%= @training.name %>',
|
|
|
|
|
// school: '<%= @training.school %>',
|
|
|
|
|
// //支付方式,默认为0
|
|
|
|
|
// // 1 微信支付
|
|
|
|
|
// // 2 支付宝支付
|
|
|
|
|
// // 3 银行卡支付
|
|
|
|
|
// payType: <%#= @training.training_payinfo.pay_type.to_i %>,
|
|
|
|
|
//
|
|
|
|
|
// //发票抬头
|
|
|
|
|
// //为空则代表不需要发票
|
|
|
|
|
// invoiceTitle: '<%#= @training.training_payinfo.invoice_title %>',
|
|
|
|
|
//
|
|
|
|
|
// //税号
|
|
|
|
|
// invoiceNo: '<%#= @training.training_payinfo.invoice_no %>'
|
|
|
|
|
// };
|
|
|
|
|
var userInfo = {
|
|
|
|
|
name: '<%= @training.name %>',
|
|
|
|
|
school: '<%= @training.school %>',
|
|
|
|
|
//支付方式,默认为0
|
|
|
|
|
// 1 微信支付
|
|
|
|
|
// 2 支付宝支付
|
|
|
|
|
// 3 银行卡支付
|
|
|
|
|
// payType: <%#= @training.training_payinfo.pay_type.to_i %>,
|
|
|
|
|
newPayinfo: <%= @training.training_payinfo.new_record? %>,
|
|
|
|
|
payType: 3,
|
|
|
|
|
//发票抬头
|
|
|
|
|
//为空则代表不需要发票
|
|
|
|
|
invoiceTitle: '<%= @training.training_payinfo.invoice_title || @training.school %>',
|
|
|
|
|
//税号
|
|
|
|
|
invoiceNo: '<%= @training.training_payinfo.invoice_no %>'
|
|
|
|
|
};
|
|
|
|
|
//点击弹出发票弹框
|
|
|
|
|
//aboutBillType(userInfo);
|
|
|
|
|
// aboutBillType(userInfo);
|
|
|
|
|
|
|
|
|
|
//点击弹出支付方式弹框
|
|
|
|
|
aboutPayType();
|
|
|
|
|
|
|
|
|
|
//初始化发票类型
|
|
|
|
|
/*InitBill(userInfo);*/
|
|
|
|
|
// InitBill(userInfo);
|
|
|
|
|
|
|
|
|
|
//切换发票类型
|
|
|
|
|
/*$(".billType li").on("click", function () {
|
|
|
|
|
$(".billType li").removeClass("active");
|
|
|
|
|
$(this).addClass("active");
|
|
|
|
|
billTypeShowFun(parseInt($(this).index()),userInfo);
|
|
|
|
|
})*/
|
|
|
|
|
//关闭弹窗
|
|
|
|
|
$(".billClose").on("click", function () {
|
|
|
|
|
hideNav($(".downNav"));
|
|
|
|
|
});
|
|
|
|
|
// $(".billType li").on("click", function () {
|
|
|
|
|
// $(".billType li").removeClass("active");
|
|
|
|
|
// $(this).addClass("active");
|
|
|
|
|
// billTypeShowFun(parseInt($(this).index()), userInfo);
|
|
|
|
|
// })
|
|
|
|
|
// //关闭弹窗
|
|
|
|
|
// $(".billClose").on("click", function () {
|
|
|
|
|
// hideNav($(".downNav"));
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
//延迟支付,直接提交
|
|
|
|
|
$('#delayPayBtn').on('click', function () {
|
|
|
|
|
if($("#billDemand").attr("status")==2){
|
|
|
|
|
$(".billInput").val('');
|
|
|
|
|
}
|
|
|
|
|
if(!checkBillInfo()){ return }
|
|
|
|
|
|
|
|
|
|
alert("报名成功,请尽快支付");
|
|
|
|
|
$('form').submit();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(".billInput").on("blur",function(){
|
|
|
|
|
document.body && (document.body.scrollTop = document.body.scrollTop);
|
|
|
|
|
})
|
|
|
|
|
//立即支付
|
|
|
|
|
$('#payBtn').on('click', function () {
|
|
|
|
|
if(!checkBillInfo()){ return }
|
|
|
|
|
|
|
|
|
|
if($("#billDemand").attr("status")==2){
|
|
|
|
|
$(".billInput").val('');
|
|
|
|
|
}
|
|
|
|
|
var postData = $('form').serialize();
|
|
|
|
|
postData += '&js=true'
|
|
|
|
|
console.log(postData);
|
|
|
|
@ -201,7 +232,7 @@
|
|
|
|
|
// 使用以上方式判断前端返回,微信团队郑重提示:
|
|
|
|
|
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
window.location.href = "/trainings/bigdata_hnjcxy_2019/result";
|
|
|
|
|
window.location.href = "/trainings/<%= @friendly_id %>/result";
|
|
|
|
|
}, 500);
|
|
|
|
|
} else if (res.err_msg == 'get_brand_wcpay_request:cancel') {
|
|
|
|
|
|
|
|
|
@ -219,80 +250,109 @@
|
|
|
|
|
|
|
|
|
|
//线下支付提交
|
|
|
|
|
$('#submitFormBtn').on('click', function () {
|
|
|
|
|
if($("#billDemand").attr("status")==2){
|
|
|
|
|
$(".billInput").val('');
|
|
|
|
|
if(!checkBillInfo()){ return; }
|
|
|
|
|
|
|
|
|
|
<% if @training.training_payinfo.blank? || (@training.training_payinfo.not_payed? && @training.training_payinfo.attachment.blank?) %>
|
|
|
|
|
var image = $("input[name='image']").val()
|
|
|
|
|
if (!image || image.length < 0) {
|
|
|
|
|
alert('请先上传支付凭证');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$('form').submit();
|
|
|
|
|
<% end %>
|
|
|
|
|
$('form').submit();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 微信支付后修改内容提交
|
|
|
|
|
$("#submitWxpayFormBtn").on('click', function () {
|
|
|
|
|
if(!checkBillInfo()){ return; }
|
|
|
|
|
$('form').submit();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//上传头像
|
|
|
|
|
InitPhoto();
|
|
|
|
|
|
|
|
|
|
//加减报名人数
|
|
|
|
|
$(".minusNum").click(function(){
|
|
|
|
|
var num=parseInt($("#enlistNum").html());
|
|
|
|
|
var money=parseFloat($("#enlistMoney").html()).toFixed(2);
|
|
|
|
|
if(num>1){
|
|
|
|
|
money=parseFloat(parseFloat(money)-parseFloat(money)/parseFloat(num)).toFixed(2);
|
|
|
|
|
num=num-1;
|
|
|
|
|
$("#enlistNum").html(num);
|
|
|
|
|
$("#enlistMoney").html(money);
|
|
|
|
|
if(num==1){
|
|
|
|
|
$(".icon-default").removeClass("blue").addClass("sky_blue");
|
|
|
|
|
}
|
|
|
|
|
$("input[name='enlistN']").val(num);
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//加减报名人数
|
|
|
|
|
function minusNum(item){
|
|
|
|
|
var num=parseInt($("#enlistN").html());
|
|
|
|
|
var money=parseFloat(<%= @training.registration_fee %>).toFixed(2);
|
|
|
|
|
var percent=$("#percentPay");
|
|
|
|
|
if(num>1){
|
|
|
|
|
num=num-1;
|
|
|
|
|
if(num == 1){
|
|
|
|
|
$(".icon-default").removeClass("blue").addClass("sky_blue");
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
$(".plusNum").click(function(){
|
|
|
|
|
var num=parseInt($("#enlistNum").html());
|
|
|
|
|
if(num==1){
|
|
|
|
|
$(".icon-default").removeClass("sky_blue").addClass("blue");
|
|
|
|
|
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("");
|
|
|
|
|
}
|
|
|
|
|
var money=parseFloat($("#enlistMoney").html()).toFixed(2);
|
|
|
|
|
money=parseFloat(parseFloat(money)+parseFloat(money)/parseFloat(num)).toFixed(2);
|
|
|
|
|
num=num+1;
|
|
|
|
|
$("#enlistN").html(num);
|
|
|
|
|
$("#enlistM").html(money);
|
|
|
|
|
$("#enlistNum").val(num);
|
|
|
|
|
$("#enlistMoney").val(money);
|
|
|
|
|
$("input[name='enlistNum']").val(num);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function plusNum(item){
|
|
|
|
|
var num=parseInt($("#enlistN").html());
|
|
|
|
|
var money=parseFloat(<%= @training.registration_fee %>).toFixed(2);
|
|
|
|
|
var percent=$("#percentPay");
|
|
|
|
|
|
|
|
|
|
num=num+1;
|
|
|
|
|
if(num > 1){
|
|
|
|
|
$(".icon-default").removeClass("sky_blue").addClass("blue");
|
|
|
|
|
}
|
|
|
|
|
money=parseFloat(parseFloat(money) *num).toFixed(2);
|
|
|
|
|
|
|
|
|
|
$("#enlistNum").html(num);
|
|
|
|
|
$("#enlistMoney").html(money);
|
|
|
|
|
$("input[name='enlistN']").val(num);
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
if($(percent).length>0 && num>2){
|
|
|
|
|
$(".lastPrice").html("¥"+ money);
|
|
|
|
|
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){
|
|
|
|
|
var index=2;
|
|
|
|
|
$("#billDemand").html("不需要").attr("status",2);
|
|
|
|
|
if(userInfo.invoiceTitle != "" && userInfo.invoiceNo != ""){
|
|
|
|
|
function InitBill(userInfo){
|
|
|
|
|
var index=1;
|
|
|
|
|
$("#billDemand").html("单位").attr("status",1);
|
|
|
|
|
if (!userInfo.newPayinfo) {
|
|
|
|
|
if(userInfo.invoiceTitle != "" && userInfo.invoiceNo == ""){
|
|
|
|
|
index=0;
|
|
|
|
|
$("#billDemand").html("单位").attr("status",0);
|
|
|
|
|
}
|
|
|
|
|
if(userInfo.invoiceTitle != "" && userInfo.invoiceNo == ""){
|
|
|
|
|
index=1;
|
|
|
|
|
$("#billDemand").html("个人").attr("status",1);
|
|
|
|
|
$("#billDemand").html("个人").attr("status",0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$(".billType li").removeClass("active");
|
|
|
|
|
$(".billType li").eq(index).addClass("active");
|
|
|
|
|
billTypeShowFun(index,userInfo);
|
|
|
|
|
}*/
|
|
|
|
|
function billTypeShowFun(index,userInfo){
|
|
|
|
|
if (parseInt(index) == 0) {
|
|
|
|
|
}
|
|
|
|
|
function billTypeShowFun(index, userInfo){
|
|
|
|
|
if (parseInt(index) == 1) {
|
|
|
|
|
$(".needWrite").removeClass("none");
|
|
|
|
|
$(".billUnit").attr("placeholder", "请填写公司单位名称").val(userInfo.school);
|
|
|
|
|
$(".taxNumber").removeClass("none");
|
|
|
|
|
} else if (parseInt(index) == 1) {
|
|
|
|
|
$(".billUnit").attr("placeholder", "请填写公司单位名称").val(userInfo.invoiceTitle || userInfo.school);
|
|
|
|
|
$(".taxNumber").removeClass("none").val(userInfo.invoiceNo);
|
|
|
|
|
} else if (parseInt(index) == 0) {
|
|
|
|
|
$(".needWrite").removeClass("none");
|
|
|
|
|
$(".billUnit").attr("placeholder", "请填写姓名").val(userInfo.name);
|
|
|
|
|
$(".taxNumber").addClass("none");
|
|
|
|
|
} else {
|
|
|
|
|
$(".needWrite").addClass("none");
|
|
|
|
|
$(".billInput").val('');
|
|
|
|
|
$(".taxNumber").val('').addClass("none");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//点击弹出发票类型弹框
|
|
|
|
|
/*function aboutBillType(userInfo){
|
|
|
|
|
function aboutBillType(userInfo){
|
|
|
|
|
var bill = $("#billLine");
|
|
|
|
|
var billNav = $(".billDownNav");
|
|
|
|
|
showNav(bill, billNav, "down");
|
|
|
|
|
}*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//点击弹出支付方式弹框
|
|
|
|
|
function aboutPayType() {
|
|
|
|
@ -308,14 +368,14 @@
|
|
|
|
|
$("#payTypeName").html($(this).html().trim());
|
|
|
|
|
console.log($(this).index());
|
|
|
|
|
if ($(this).index() == 0) { //微信支付
|
|
|
|
|
$("#payInfos,#sendPhoto").addClass("none");
|
|
|
|
|
$("#payInfos,.pay-image").addClass("none");
|
|
|
|
|
//切换显示按钮
|
|
|
|
|
$("#offlinePaySubmitBtn").addClass("none");
|
|
|
|
|
$("#paySubmitBtn").removeClass("none");
|
|
|
|
|
|
|
|
|
|
$('#pay_type').val("1");
|
|
|
|
|
} else { //线下支付
|
|
|
|
|
$("#payInfos,#sendPhoto").removeClass("none");
|
|
|
|
|
$("#payInfos,.pay-image").removeClass("none");
|
|
|
|
|
//切换显示按钮
|
|
|
|
|
$("#offlinePaySubmitBtn").removeClass("none");
|
|
|
|
|
$("#paySubmitBtn").addClass("none");
|
|
|
|
@ -328,40 +388,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//提交发票信息
|
|
|
|
|
/*function submitBillInfo() {
|
|
|
|
|
function submitBillInfo() {
|
|
|
|
|
var type = $(".billType li.active").html();
|
|
|
|
|
var unit = $(".billUnit").val();
|
|
|
|
|
var tax = $(".taxNumber").val();
|
|
|
|
|
//只有选择了单位时才需要判断三个是否都已经填写
|
|
|
|
|
if (type == "单位" || type == "个人") {
|
|
|
|
|
if (unit == "") {
|
|
|
|
|
$(".billUnit").addClass("nullVal");
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
$(".billUnit").removeClass("nullVal");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (type == "单位") {
|
|
|
|
|
if (unit == "") {
|
|
|
|
|
$(".billUnit").addClass("nullVal");
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
$(".billUnit").removeClass("nullVal");
|
|
|
|
|
}
|
|
|
|
|
if (tax == "") {
|
|
|
|
|
$(".taxNumber").addClass("nullVal");
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
$(".taxNumber").removeClass("nullVal");
|
|
|
|
|
}
|
|
|
|
|
if (tax == "") {
|
|
|
|
|
$(".taxNumber").addClass("nullVal");
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
$(".taxNumber").removeClass("nullVal");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//选择单位或者个人都要判断是否填写了发票内容
|
|
|
|
|
if (type == "单位" || type == "个人") {
|
|
|
|
|
var remark = $("input[name='invoice_content']").val();
|
|
|
|
|
if (remark == "") {
|
|
|
|
|
$("input[name='invoice_content']").addClass("nullVal");
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
$("input[name='invoice_content']").removeClass("nullVal");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// if (type == "单位" || type == "个人") {
|
|
|
|
|
// var remark = $("input[name='invoice_content']").val();
|
|
|
|
|
// if (remark == "") {
|
|
|
|
|
// $("input[name='invoice_content']").addClass("nullVal");
|
|
|
|
|
// return;
|
|
|
|
|
// } else {
|
|
|
|
|
// $("input[name='invoice_content']").removeClass("nullVal");
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
$("#billDemand").html(type);
|
|
|
|
|
//记录选中的发票类型
|
|
|
|
|
$("#billDemand").attr("status",$(".billType li.active").index());
|
|
|
|
|
hideNav($(".billDownNav"));
|
|
|
|
|
}*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function checkBillInfo() {
|
|
|
|
|
if ($("input[name='invoice_title']").val() == '') {
|
|
|
|
|
alert("请填写发票抬头");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if ($("input[name='invoice_no']").val() == '') {
|
|
|
|
|
alert("请填写税务登记号");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if ($("input[name='invoice_content']").val() == '') {
|
|
|
|
|
alert("请填写发票内容");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function InitPhoto() {
|
|
|
|
|
var tmpl = '<li class="weui-uploader__file" style="background-image:url(#url#)"></li>',
|
|
|
|
|