...
|
...
|
@@ -94,6 +94,14 @@ |
|
|
right: 0;
|
|
|
top:0;
|
|
|
}
|
|
|
.dai {
|
|
|
position: absolute;
|
|
|
top: 0.15rem;
|
|
|
left: 0.52rem;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
}
|
|
|
</style>
|
|
|
</head>
|
|
|
|
...
|
...
|
@@ -182,7 +190,7 @@ |
|
|
</div>
|
|
|
</div>
|
|
|
<div class="t chengke1">
|
|
|
<i class="iconfont icon-weixuanzhong1"></i>
|
|
|
<i class="iconfont icon-xuanzhong3"></i>
|
|
|
<span class="comx">我已同意购买<a href="agreement.html" class="aaa">协议和合同协议</a></span>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -299,7 +307,7 @@ |
|
|
<div class="money" data-id="{$vo.schedule_id}">
|
|
|
<div class="year_change">
|
|
|
<if condition="$vo['schedule_id'] eq $data['choose']['schedule_id']">
|
|
|
<img src="__TMPL__/static/images/circle1.png"/>
|
|
|
<img class="imgNow" src="__TMPL__/static/images/circle1.png"/>
|
|
|
<else/>
|
|
|
<img src="__TMPL__/static/images/circle.png"/>
|
|
|
</if>
|
...
|
...
|
@@ -335,7 +343,7 @@ |
|
|
<div class="gli">
|
|
|
<!--<div>-->
|
|
|
<div class="circle circle_chu">
|
|
|
<i class="iconfont icon-duigou"></i>
|
|
|
<i class="iconfont icon-duigou "></i>
|
|
|
</div>
|
|
|
<!--</div>-->
|
|
|
<!--<i class="iconfont icon-yuancircle46"></i>-->
|
...
|
...
|
@@ -415,12 +423,13 @@ |
|
|
</div>
|
|
|
<div class="quanxuan chooseall">
|
|
|
<div class="check">
|
|
|
<div class="circle circle_chu" id="selectAll">
|
|
|
<i class="iconfont icon-duigou"></i>
|
|
|
<div class="circle circle_chu " id="selectAll">
|
|
|
|
|
|
<i class="iconfont icon-duigou icon1"></i>
|
|
|
</div>
|
|
|
<span>全选</span>
|
|
|
</div>
|
|
|
<button class="agree" onclick="agreeFun()">
|
|
|
<button class="agree">
|
|
|
确定
|
|
|
</button>
|
|
|
</div>
|
...
|
...
|
@@ -430,48 +439,55 @@ |
|
|
</div>
|
|
|
<!--选择优惠券=============================================-->
|
|
|
<div class="choose_waitquan">
|
|
|
<!--<div class="out">-->
|
|
|
<!--<div class="use">-->
|
|
|
<!--<span id="nouse" class="active" style="color: rgb(254, 10, 1);">待使用</span>-->
|
|
|
<!--<span id="outdata" style="color: rgb(37, 39, 41);">已过期</span>-->
|
|
|
<!--<span id="used" style="color: rgb(37, 39, 41);">已使用</span>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--待使用优惠券-->
|
|
|
<div class="wai1" id="wai1">
|
|
|
<div class="wai" data-id="1">
|
|
|
<div class="youhui">
|
|
|
<div class="circle1">
|
|
|
<i class="iconfont icon-duigou"></i>
|
|
|
</div>
|
|
|
|
|
|
<div class="quan">
|
|
|
<img src="__TMPL__/static/images/f2.png" alt="" />
|
|
|
<div class="dai">
|
|
|
<div class="money">¥<span class="money_five">20</span></div>
|
|
|
<div class="date">
|
|
|
<span>代金券</span>
|
|
|
<span class="you">有效期:2018.08.06-2018.08.08</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="wai">
|
|
|
<div>
|
|
|
<div class="youhui">
|
|
|
<div class="circle1">
|
|
|
<i class="iconfont icon-duigou "></i>
|
|
|
</div>
|
|
|
<div class="quan">
|
|
|
<img src="__TMPL__/static/images/f2.png" alt="" />
|
|
|
<div class="dai">
|
|
|
<div class="money">¥<span class="money_five">6</span></div>
|
|
|
<div class="date">
|
|
|
<span>代金券</span>
|
|
|
<span class="you">有效期:2018.08.06-2018.08.08</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--<div class="wai" data-id="1">-->
|
|
|
<!--<div class="youhui">-->
|
|
|
<!--<div class="circle1">-->
|
|
|
<!--<i class="iconfont icon-duigou"></i>-->
|
|
|
<!--</div>-->
|
|
|
|
|
|
<!--<div class="quan">-->
|
|
|
<!--<img src="__TMPL__/static/images/f2.png" alt="" />-->
|
|
|
<!--<div class="dai">-->
|
|
|
<!--<div class="money">¥<span class="money_five">20</span></div>-->
|
|
|
<!--<div class="date">-->
|
|
|
<!--<span>代金券</span>-->
|
|
|
<!--<span class="you">有效期:2018.08.06-2018.08.08</span>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--<div class="wai">-->
|
|
|
<!--<div>-->
|
|
|
<!--<div class="youhui">-->
|
|
|
<!--<div class="circle1">-->
|
|
|
<!--<i class="iconfont icon-duigou "></i>-->
|
|
|
<!--</div>-->
|
|
|
<!--<div class="quan">-->
|
|
|
<!--<img src="__TMPL__/static/images/f2.png" alt="" />-->
|
|
|
<!--<div class="dai">-->
|
|
|
<!--<div class="money">¥<span class="money_five">6</span></div>-->
|
|
|
<!--<div class="date">-->
|
|
|
<!--<span>代金券</span>-->
|
|
|
<!--<span class="you">有效期:2018.08.06-2018.08.08</span>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
|
|
|
<!--<div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
</div>
|
|
|
<!--已过期代金券-->
|
|
|
<div id="wai2">
|
...
|
...
|
@@ -542,39 +558,39 @@ |
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="agree3 ok" onclick="agreeFun3()">确定使用</div>
|
|
|
<div class="agree3 ok" id="agreeFun3">确定使用</div>
|
|
|
</div>
|
|
|
<!--添加出行人-->
|
|
|
<div class="jia_travel" style='display: none;'>
|
|
|
<ul class="list">
|
|
|
<li>
|
|
|
<span class="real ">真实姓名</span>
|
|
|
<input class="add name_1 chu" placeholder="请填写真实姓名"/>
|
|
|
<input class="add name_1 chu" id="name" placeholder="请填写真实姓名"/>
|
|
|
</li>
|
|
|
<li>
|
|
|
<span class="real">性别</span>
|
|
|
<div class="xuanze_sex">
|
|
|
<div class="sex se">
|
|
|
<img src="__TMPL__/static/images/circle.png" class="yuan yu"><span>男</span>
|
|
|
<img src="__TMPL__/static/images/circle.png" class="yuan yu sexId"><span>男</span>
|
|
|
</div>
|
|
|
|
|
|
<div class="sex">
|
|
|
<img src="__TMPL__/static/images/circle1.png" class="yuan yu1"><span>女</span>
|
|
|
<img src="__TMPL__/static/images/circle1.png" class="yuan yu1 sexId"><span>女</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
</li>
|
|
|
<li>
|
|
|
<span class="real">手机号</span>
|
|
|
<input class="add phone chu" placeholder="请填写手机号码" />
|
|
|
<input class="add phone chu" id="phone" placeholder="请填写手机号码" />
|
|
|
</li>
|
|
|
<li>
|
|
|
<span class="real">微信号码</span>
|
|
|
<input class="add chu wei " placeholder="请填写微信号码"/>
|
|
|
<input class="add chu wei " id="wxNum" placeholder="请填写微信号码"/>
|
|
|
</li>
|
|
|
<li>
|
|
|
<span class="real ">身份证号</span>
|
|
|
<input class="add confirm chu zfzid" placeholder="请填写身份证号"/>
|
|
|
<input class="add confirm chu zfzid" id="sfzNum" placeholder="请填写身份证号"/>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<!--====底部=====-->
|
...
|
...
|
@@ -597,17 +613,21 @@ |
|
|
<script type="text/javascript" src="__TMPL__/static/index.js"></script>
|
|
|
<script type="text/javascript" src="__TMPL__/static/assets/js/common.js"></script>
|
|
|
<script type='text/javascript' src='__TMPL__/static/assets/js/Augly_Verification.js'></script>
|
|
|
<script type="text/javascript" src="__TMPL__/static/assets/js/sami_until.js"></script>
|
|
|
<script>
|
|
|
var total; // 活动总价;
|
|
|
var down_price; // 活动定金;
|
|
|
|
|
|
$('.xuandan').click(function(){
|
|
|
$('.move').css('display','block');
|
|
|
})
|
|
|
var schedule_id='{$data.choose.schedule_id}';
|
|
|
var activity_id='{$data.activity.activity_id}';
|
|
|
var max = '{$data.choose.allowMaximum}';
|
|
|
var schedule_id = '{$data.choose.schedule_id}';// 上一页选中的批次id
|
|
|
var activity_id = '{$data.activity.activity_id}';//上一页选中的活动id
|
|
|
var max = '{$data.choose.allowMaximum}';//购买数量
|
|
|
var is_first='{$data.is_first}';
|
|
|
|
|
|
$(function() {
|
|
|
//获取选择出行人页面的数据
|
|
|
|
|
|
var name = decodeURI(getQueryString('name')).replace(/,/g, ' ');
|
|
|
if(!name) {
|
|
|
$('.xuanze').html('请选择出行人');
|
...
|
...
|
@@ -626,7 +646,9 @@ |
|
|
|
|
|
$('.money').click(function(event) {
|
|
|
$(this).find('img').attr("src", "/themes/simpleboot3/static/images/circle1.png");
|
|
|
$(this).find('img').addClass("imgNow");
|
|
|
$(this).siblings().find('img').attr("src", "/themes/simpleboot3/static/images/circle.png");
|
|
|
$(this).siblings().find('img').removeClass("imgNow");
|
|
|
schedule_id = $(this).attr('data-id');
|
|
|
});
|
|
|
//获取选择选择代金券的数据
|
...
|
...
|
@@ -660,8 +682,6 @@ |
|
|
$('.move3').click(function() {
|
|
|
$(this).hide();
|
|
|
})
|
|
|
|
|
|
|
|
|
//点击增加
|
|
|
$("#add").click(function() {
|
|
|
var num = parseInt($("#quantity").html());
|
...
|
...
|
@@ -681,8 +701,11 @@ |
|
|
dataType:"JSON",
|
|
|
|
|
|
success: function (data) {
|
|
|
console.log(data);
|
|
|
$("#down_price").html(data.data.down_price);
|
|
|
$("#total").html(data.data.total);
|
|
|
total = data.data.total;
|
|
|
down_price = data.data.down_price;
|
|
|
}
|
|
|
})
|
|
|
}
|
...
|
...
|
@@ -708,21 +731,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
/*商品数量+1*/
|
|
|
function numAdd() {
|
|
|
|
|
|
var num_add = parseInt($("#quantity").html()) + 1;
|
|
|
$("#quantity").html(num_add);
|
|
|
}
|
|
|
/*商品数量-1*/
|
|
|
function numDec() {
|
|
|
if($("#quantity").html() <= 1) {
|
|
|
return false;
|
|
|
}
|
|
|
var num_dec = parseInt($("#quantity").html()) - 1;
|
|
|
$("#quantity").html(num_dec);
|
|
|
|
|
|
}
|
|
|
|
|
|
//我已同意购买协议和合同协议
|
|
|
$(".danxuan").click(function() {
|
...
|
...
|
@@ -740,7 +749,6 @@ |
|
|
}
|
|
|
})
|
|
|
|
|
|
|
|
|
$(".agreepay").click(function () {
|
|
|
$.ajax({
|
|
|
url:"{:url('order/Order/done')}",
|
...
|
...
|
@@ -748,9 +756,9 @@ |
|
|
activity_id:activity_id,
|
|
|
schedule_id:schedule_id,
|
|
|
num:$("#quantity").html(),
|
|
|
escort:'9,10',
|
|
|
escort:escort_id,
|
|
|
payment:1,
|
|
|
discount_coupon_id:'',
|
|
|
discount_coupon_id:money_id,
|
|
|
desc:$('.dian_text').val(),
|
|
|
room:$('.xuandan').html()
|
|
|
},
|
...
|
...
|
@@ -820,18 +828,158 @@ |
|
|
|
|
|
})
|
|
|
|
|
|
// 获取优惠券
|
|
|
|
|
|
getCards(1,schedule_id);
|
|
|
/*商品数量+1*/
|
|
|
function numAdd() {
|
|
|
money_id = "";
|
|
|
var num_add = parseInt($("#quantity").html()) + 1;
|
|
|
$("#quantity").html(num_add);
|
|
|
getCards(num_add,schedule_id);
|
|
|
}
|
|
|
/*商品数量-1*/
|
|
|
function numDec() {
|
|
|
money_id = "";
|
|
|
if($("#quantity").html() <= 1) {
|
|
|
return false;
|
|
|
}
|
|
|
var num_dec = parseInt($("#quantity").html()) - 1;
|
|
|
$("#quantity").html(num_dec);
|
|
|
|
|
|
getCards(num_dec,schedule_id);
|
|
|
$(".xuanze1").html('请选择代金券');
|
|
|
}
|
|
|
getpeople(num);
|
|
|
})
|
|
|
|
|
|
$('.pelpe').click(function() {
|
|
|
$('.mold_out').css('display', 'block');
|
|
|
$('.bottom_button').click(function(){
|
|
|
var imgId = $(".imgNow");
|
|
|
schedule_id = imgId.parents(".money").data("id");
|
|
|
console.log(schedule_id);
|
|
|
console.log(num);
|
|
|
getCards(1,schedule_id);
|
|
|
})
|
|
|
function getCards(num,id){
|
|
|
$.ajax({
|
|
|
url: "/order/Order/confirm",
|
|
|
type: "post",
|
|
|
dataType: "json",
|
|
|
data: {
|
|
|
activity_id: activity_id,
|
|
|
schedule_id: id,
|
|
|
num:num
|
|
|
},
|
|
|
success: function (data) {
|
|
|
|
|
|
console.log(data);
|
|
|
total = data.data.total;
|
|
|
down_price = data.data.down_price;
|
|
|
var html='';
|
|
|
if(data.data.coupons !=null){
|
|
|
for(var i=0;i< data.data.coupons.length;i++){
|
|
|
html +='<div class="wai" data-id="'+data.data.coupons[i].discount_coupon_id+'" data-type="'+data.data.activity.type+'">' +
|
|
|
' <div class="youhui">' +
|
|
|
' <div class="circle1" onclick="circles(this)" >' + '<i class="iconfont icon-duigou "></i>' +
|
|
|
' </div>'+
|
|
|
' <div class="quan">'+
|
|
|
' <img src="/themes/simpleboot3/static/images/f2.png" alt="">' +
|
|
|
' <div class="dai">' +
|
|
|
' <div class="money">¥<span class="money_five">'+data.data.coupons[i].reduce+'</span></div>' +
|
|
|
' <div class="date">' +
|
|
|
' <span>代金券</span>' +
|
|
|
' <span class="you">'+data.data.coupons[i].discount_coupon_name+'</span>' +
|
|
|
' </div>' +
|
|
|
' </div>' +
|
|
|
' </div>' +
|
|
|
' </div>' +
|
|
|
' </div>'
|
|
|
}
|
|
|
}else{
|
|
|
html +='<div>暂无数据</div>'
|
|
|
}
|
|
|
|
|
|
var index = 0;
|
|
|
var num = 0;
|
|
|
|
|
|
$('.wai1').html('');
|
|
|
$('.wai1').append(html);
|
|
|
|
|
|
|
|
|
},
|
|
|
complete: function (data) {
|
|
|
// console.log(data)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
//=========================================================================
|
|
|
|
|
|
|
|
|
//选择出行人
|
|
|
function getpeople(num){
|
|
|
$.ajax({
|
|
|
url: "/escort/Escort/_list",
|
|
|
|
|
|
type: "post",
|
|
|
dataType: "json",
|
|
|
// data: {
|
|
|
// activity_id:activity_id,
|
|
|
// schedule_id:schedule_id,
|
|
|
// num:num
|
|
|
// },
|
|
|
success: function (data) {
|
|
|
var html='';
|
|
|
if(data.code==20000){
|
|
|
for(var i=0;i<data.data.length;i++) {
|
|
|
html +='<li class="userInfo" data-id="'+data.data[i].id+'">' +
|
|
|
' <div class="guo">' +
|
|
|
' <div class="gli">' +
|
|
|
' <!--<div>-->' +
|
|
|
' <div class="circle circle_chu" onclick="circlepeople(this)">' +
|
|
|
' <i class="iconfont icon-duigou icon1"></i>' +
|
|
|
' </div>' +
|
|
|
' <!--</div>-->' +
|
|
|
' <!--<i class="iconfont icon-yuancircle46"></i>-->' +
|
|
|
' <div class="xin">' +
|
|
|
'<span class="guoxin">' +
|
|
|
'<span class="name">'+data.data[i].name+'</span> '+ data.data[i].tel+'</span>' +
|
|
|
' <span>身份证:'+data.data[i].identity+'</span>' +
|
|
|
' </div>' +
|
|
|
' </div>' +
|
|
|
' <div class="bian">' +
|
|
|
'' +
|
|
|
' <div class="bianji" onclick="bianji(this)">' +
|
|
|
' <i class="iconfont icon-bianji"></i>编辑' +
|
|
|
' </div>'+
|
|
|
' <div class="delete" onclick="deletes(this)">' +
|
|
|
' <i class="iconfont icon-shanchu"></i> 删除' +
|
|
|
' </div>' +
|
|
|
' </div>' +
|
|
|
' </div>' +
|
|
|
' </li>'
|
|
|
}
|
|
|
}else if(data.code==40000){
|
|
|
html +='<div class="nodata">暂无数据</div>'
|
|
|
$('.nodata').className='nodata';
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
$('.people').html('');
|
|
|
$('.people').append(html);
|
|
|
|
|
|
},
|
|
|
complete: function (data) {
|
|
|
// console.log(data)
|
|
|
}
|
|
|
})
|
|
|
|
|
|
}
|
|
|
$('.pelpe').click(function() {
|
|
|
$('.mold_out').css('display', 'block');
|
|
|
})
|
|
|
var index = 0;
|
|
|
var num = 0;
|
|
|
$('.bottom_button').click(function() {
|
|
|
money_id = "";
|
|
|
var inputLength = $('.mold_center').find('img').length;
|
|
|
for(var i = 0; i < inputLength; i++) {
|
|
|
if($('.mold_center').find('img').eq(i).attr("src") =="__TMPL__/static/images/circle1.png") {
|
...
|
...
|
@@ -854,6 +1002,8 @@ |
|
|
|
|
|
success: function (data) {
|
|
|
$(".showcang").html(data.data.choose.time_text);
|
|
|
// $(".price").html()-$('xuanze1').
|
|
|
|
|
|
$("#down_price").html(data.data.down_price);
|
|
|
$("#total").html(data.data.total);
|
|
|
max = data.data.choose.allowMaximum;
|
...
|
...
|
@@ -863,6 +1013,7 @@ |
|
|
$('.showcang').html($('.mold_center').find('span').eq(index).html());
|
|
|
$('.mold_out').css('display', 'none');
|
|
|
}
|
|
|
|
|
|
})
|
|
|
$('.shan1').click(function() {
|
|
|
$(this).find('i').attr('class', 'iconfont icon-xuanzhong2');
|
...
|
...
|
@@ -889,53 +1040,73 @@ |
|
|
|
|
|
|
|
|
// 选择出行人
|
|
|
$('.delete').click(function(){
|
|
|
$(this).parents('.userInfo').remove();
|
|
|
})
|
|
|
|
|
|
// function deletes(obj){
|
|
|
// $(obj).parents('.userInfo').remove();
|
|
|
// }
|
|
|
var num= $('.people li').length;
|
|
|
|
|
|
var count = 0;
|
|
|
var circle=$('.circle');
|
|
|
var circle=$('.people');
|
|
|
var nameArr = [];
|
|
|
circle.click(function(){
|
|
|
if($(this).find('.icon-duigou').hasClass("now")){
|
|
|
|
|
|
$(this).find('.icon-duigou').removeClass("now");
|
|
|
$(this).find('.icon-duigou').css('color','rgba(255, 255, 255)');
|
|
|
$(this).css('border','0.02rem solid #999');
|
|
|
|
|
|
|
|
|
}else {
|
|
|
var numcircle=0;
|
|
|
|
|
|
$(this).find('.icon-duigou').addClass("now");
|
|
|
$(this).find('.icon-duigou').css('color','rgb(254, 10, 1)');
|
|
|
$(this).css('border','0.02rem solid rgb(254, 10, 1)');
|
|
|
var numd=0;
|
|
|
|
|
|
function circlepeople(obj){
|
|
|
var num_xuan=$('.val').html();
|
|
|
if($(obj).find('.icon-duigou').hasClass("now")){
|
|
|
--numcircle;
|
|
|
$(obj).find('.icon-duigou').removeClass("now");
|
|
|
$(obj).find('.icon-duigou').css('color','rgba(255, 255, 255)');
|
|
|
$(obj).css('border','0.02rem solid #999');
|
|
|
}else{
|
|
|
if(numcircle<num_xuan){
|
|
|
// toast(1)
|
|
|
++numcircle;
|
|
|
$(obj).find('.icon-duigou').addClass("now");
|
|
|
$(obj).find('.icon-duigou').css('color','rgb(254, 10, 1)');
|
|
|
$(obj).css('border','0.02rem solid rgb(254, 10, 1)');
|
|
|
// console.log(numcircle);
|
|
|
}else if(numcircle>=num_xuan){
|
|
|
toast('选择:'+num_xuan +' 人');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
var len=$(".people").find('.icon-duigou.now').length;
|
|
|
console.log(len);
|
|
|
// console.log(len);
|
|
|
// console.log(num);
|
|
|
if(num == len) {
|
|
|
|
|
|
$("#selectAll").css('border','0.02rem solid rgb(254, 10, 1)');
|
|
|
$("#selectAll").find('.icon-duigou').css('color','rgba(254, 10, 1)');
|
|
|
|
|
|
}else{
|
|
|
$("#selectAll").css('border','0.02rem solid rgb(153, 153, 153)');
|
|
|
$("#selectAll").find('.icon-duigou').css('color','rgb(255, 255, 255)');
|
|
|
}
|
|
|
|
|
|
})
|
|
|
}
|
|
|
//全选反选
|
|
|
|
|
|
|
|
|
$("#selectAll").click(function(){
|
|
|
if(circle.find('.icon-duigou').css('color')=='rgb(255, 255, 255)'){
|
|
|
circle.find('.icon-duigou').css('color','rgb(254, 10, 1)');
|
|
|
circle.css('border','0.02rem solid rgb(254, 10, 1)');
|
|
|
if( $(this).find('.icon-duigou').css('color')=='rgb(255, 255, 255)'){
|
|
|
var num_jia=$('.val').html();
|
|
|
console.log(num_jia);
|
|
|
if(num_jia<$('.people li').length){
|
|
|
console.log($('.people li').length);
|
|
|
toast('选择:'+num_jia +' 人');
|
|
|
}else{
|
|
|
$(this).css('border','0.02rem solid rgb(254, 10, 1)');
|
|
|
$(this).find('.icon-duigou').css('color','rgb(254, 10, 1)');
|
|
|
circle.find(".circle").css('border','0.02rem solid rgb(254, 10, 1)');
|
|
|
circle.find(".icon-duigou").css('color','rgb(254, 10, 1)');
|
|
|
}
|
|
|
}else{
|
|
|
circle.find('.icon-duigou').css('color','rgb(255, 255, 255)');
|
|
|
circle.css('border','0.02rem solid #999');
|
|
|
$(this).find('.icon-duigou').css('color','rgb(255, 255, 255)');
|
|
|
$(this).css("border","0.02rem solid #999");
|
|
|
circle.find(".icon-duigou").css('color','rgb(255, 255, 255)');
|
|
|
circle.find(".circle").css("border","0.02rem solid #999");
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
var arr=[];
|
...
|
...
|
@@ -945,40 +1116,31 @@ |
|
|
$('.xuan').click(function(){
|
|
|
$('.outtravel').css('display','block');
|
|
|
})
|
|
|
|
|
|
|
|
|
var escort = new Array();
|
|
|
var names='';
|
|
|
var escort_id = '';
|
|
|
// 点击确定时,出行人名字添加到数组,回显到订单提交页面;
|
|
|
function agreeFun() {
|
|
|
var nameArr = [];
|
|
|
$(".agree").click(function () {
|
|
|
names='';
|
|
|
escort_id='';
|
|
|
escort=new Array();
|
|
|
for (var i = 0; i < $(".userInfo").length; i++ ) {
|
|
|
|
|
|
if($(".userInfo").eq(i).find(".icon-duigou").hasClass("now")) {
|
|
|
var name = $(".userInfo").find(".name").html();
|
|
|
if(nameArr.length >= 2) {
|
|
|
break;
|
|
|
|
|
|
}else {
|
|
|
nameArr.push(name);
|
|
|
}
|
|
|
names+= $(".userInfo").eq(i).find(".name").html()+' ';
|
|
|
escort.push($(".userInfo").eq(i).data('id'));
|
|
|
escort_id+=$(".userInfo").eq(i).data('id')+',';
|
|
|
}
|
|
|
}
|
|
|
console.log(nameArr)
|
|
|
console.log(nameArr[0])
|
|
|
if(nameArr[0]!=undefined&&nameArr[1]==undefined){
|
|
|
$('.xuanze').html(nameArr[0]);
|
|
|
}else if(nameArr[0]!=undefined&&nameArr[1]!=undefined){
|
|
|
$('.xuanze').html(nameArr[0]+' '+nameArr[1]);
|
|
|
console.log(escort_id);
|
|
|
console.log(escort);
|
|
|
console.log(names);
|
|
|
if(names!=''){
|
|
|
$('.xuanze').html(names);
|
|
|
}else {
|
|
|
$('.xuanze').html('请选择出行人');
|
|
|
}
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// var name=encodeURI(encodeURI(nameArr));
|
|
|
// var url="orders_submitted.html?name="+name;
|
|
|
// window.location.href = url;
|
|
|
}
|
|
|
// 添加出行人
|
|
|
function getQueryString(name) {
|
|
|
var reg = new RegExp("(^|&)" +
|
...
|
...
|
@@ -1025,19 +1187,36 @@ |
|
|
used.css('color', '#FE0A01');
|
|
|
})
|
|
|
var circle1 = $('.wai1 .youhui .circle1');
|
|
|
circle1.click(function() {
|
|
|
if($(this).find('.icon-duigou').css('color') == 'rgb(255, 255, 255)') {
|
|
|
// alert(1)
|
|
|
$(this).find('.icon-duigou').css('color', 'rgb(254, 10, 1)');
|
|
|
$(this).css('border', '0.02rem solid rgb(254, 10, 1)');
|
|
|
$(this).parents('.wai').siblings().find('.icon-duigou').css('color', 'rgb(255, 255, 255)');
|
|
|
$(this).parents('.wai').siblings().find('.circle1').css('border', '0.02rem solid #999');
|
|
|
|
|
|
// circle1.click(function(){
|
|
|
// if($(this).find('.icon-duigou').css('color') == 'rgb(255, 255, 255)') {
|
|
|
// // alert(1)
|
|
|
// $(this).find('.icon-duigou').css('color', 'rgb(254, 10, 1)');
|
|
|
// $(this).css('border', '0.02rem solid rgb(254, 10, 1)');
|
|
|
// $(this).parents('.wai').siblings().find('.icon-duigou').css('color', 'rgb(255, 255, 255)');
|
|
|
// $(this).parents('.wai').siblings().find('.circle1').css('border', '0.02rem solid #999');
|
|
|
// } else {
|
|
|
// // alert(2)
|
|
|
// $(this).find('.icon-duigou').css('color', 'rgb(255, 255, 255)');
|
|
|
// $(this).css('border', '0.02rem solid #999');
|
|
|
// }
|
|
|
// })
|
|
|
//优惠券选择
|
|
|
function circles(obj){
|
|
|
if($(obj).find('.icon-duigou').css('color') == 'rgb(255, 255, 255)'){
|
|
|
// 选中
|
|
|
$(obj).find('.icon-duigou').css('color', 'rgb(254, 10, 1)');
|
|
|
$(obj).css('border', '0.02rem solid rgb(254, 10, 1)');
|
|
|
$(obj).parents('.wai').siblings().find('.icon-duigou').css('color', 'rgb(255, 255, 255)');
|
|
|
$(obj).parents('.wai').siblings().find('.circle1').css('border', '0.02rem solid #999');
|
|
|
|
|
|
} else {
|
|
|
// alert(2)
|
|
|
$(this).find('.icon-duigou').css('color', 'rgb(255, 255, 255)');
|
|
|
$(this).css('border', '0.02rem solid #999');
|
|
|
$(obj).find('.icon-duigou').css('color', 'rgb(255, 255, 255)');
|
|
|
$(obj).css('border', '0.02rem solid #999');
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
$('.xuan3').click(function(){
|
|
|
$.ajax({
|
|
|
url:"{:url('order/Order/confirm')}",
|
...
|
...
|
@@ -1050,46 +1229,42 @@ |
|
|
dataType:"JSON",
|
|
|
|
|
|
success: function (data) {
|
|
|
console.log(data.data.coupons);
|
|
|
$('.choose_waitquan').css('display','block');
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
// // 点击确定时,出行人名字添加到数组,回显到订单提交页面;
|
|
|
function agreeFun3() {
|
|
|
var arr = []
|
|
|
var money_id;
|
|
|
var activity_type;
|
|
|
$("#agreeFun3").click(function () {
|
|
|
var arr = [];
|
|
|
var money;
|
|
|
for(var i = 0; i < $(".wai1 .wai").length; i++) {
|
|
|
if($(".wai1 .wai").eq(i).find('.icon-duigou').css('color') == 'rgb(254, 10, 1)') {
|
|
|
var price = $(".wai1 .wai").eq(i).find('.money_five').html();
|
|
|
money_id = $(".wai1 .wai").eq(i).data("id");
|
|
|
arr.push(price);
|
|
|
activity_type = $(".wai1 .wai").eq(i).data("type");
|
|
|
money = $(".wai1 .wai").eq(i).find('.money_five').html();
|
|
|
}
|
|
|
}
|
|
|
$('.choose_waitquan').css('display','none');
|
|
|
$('.xuanze1').html('¥'+arr[0]+'代金券');
|
|
|
if(arr[0]==undefined){
|
|
|
$('.xuanze1').html('请选择代金券');
|
|
|
}else{
|
|
|
$('.xuanze1').html('¥'+arr[0]+'代金券');
|
|
|
}
|
|
|
if(activity_type == 0) {
|
|
|
console.log(money)
|
|
|
var totalYh = total - money;
|
|
|
$("#total").html(totalYh);
|
|
|
// console.log(totalYh)
|
|
|
}else if(activity_type == 1) {
|
|
|
var downYh = down_price - money;
|
|
|
$("#down_price").html(downYh);
|
|
|
}
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
$('.ok_chu').click(function() {
|
|
|
if($('.name_1').val() == '') {
|
|
|
toast('请填入您的姓名');
|
|
|
} else if($('.phone').val() == '') {
|
|
|
toast('请输入电话号码');
|
|
|
} else if(!AuglyTest_phone.test($('.phone').val())) {
|
|
|
toast('电话号码格式不正确');
|
|
|
} else if($('.wei').val() == '') {
|
|
|
toast('请输入微信号码');
|
|
|
} else if($('.zfzid').val() == '') {
|
|
|
toast('请输入身份证号');
|
|
|
} else if(!AuglyTest_ID.test($('.zfzid').val())) {
|
|
|
toast('身份证号输入不正确');
|
|
|
} else {
|
|
|
toast('验证通过');
|
|
|
$('.jia_travel').css('display','none');
|
|
|
}}
|
|
|
)
|
|
|
|
|
|
$('.ok_xing').click(function(){
|
|
|
$('.jia_travel').css('display','block')
|
...
|
...
|
@@ -1142,13 +1317,139 @@ |
|
|
|
|
|
|
|
|
})
|
|
|
var id_bianji='';
|
|
|
|
|
|
function bianji(obj){
|
|
|
id_bianji = $(obj).parents(".userInfo").data("id");
|
|
|
// console.log(id_bianji);
|
|
|
$.ajax({
|
|
|
url:"/escort/Escort/edit",
|
|
|
type: "get",
|
|
|
dataType: "json",
|
|
|
data: {
|
|
|
id: id_bianji,
|
|
|
},
|
|
|
success: function (data) {
|
|
|
console.log(data);
|
|
|
if(data.data.sex == 0) {
|
|
|
$(".sex .yu1").attr("src","/themes/simpleboot3/static/images/circle.png");
|
|
|
$(".sex .yu").attr("src","/themes/simpleboot3/static/images/circle1.png");
|
|
|
}else if (data.data.sex == 1) {
|
|
|
$(".sex .yu1").attr("src","/themes/simpleboot3/static/images/circle1.png");
|
|
|
$(".sex .yu").attr("src","/themes/simpleboot3/static/images/circle.png");
|
|
|
};
|
|
|
$("#name").val(data.data.name);
|
|
|
$("#phone").val(data.data.tel);
|
|
|
$("#wxNum").val(data.data.wechat);
|
|
|
$("#sfzNum").val(data.data.identity);
|
|
|
|
|
|
$('.bianji').click(function(){
|
|
|
}
|
|
|
})
|
|
|
$('.jia_travel').css('display','block');
|
|
|
}
|
|
|
|
|
|
$('.ok_chu').click(function() {
|
|
|
|
|
|
|
|
|
var sexId;
|
|
|
if ($(".sex .yu1").attr('src') == '__TMPL__/static/images/circle1.png') {
|
|
|
sexId = 1;
|
|
|
} else if ($(".sex .yu").attr('src') == '__TMPL__/static/images/circle1.png'){
|
|
|
sexId = 0;
|
|
|
}
|
|
|
console.log(id_bianji)
|
|
|
var data = {};
|
|
|
data.id = id_bianji;
|
|
|
data.name = $("#name").val();
|
|
|
data.sex = sexId;
|
|
|
data.tel = $("#phone").val();
|
|
|
data.identity = $("#sfzNum").val();
|
|
|
data.wechat=$("#wxNum").val();
|
|
|
var adddata={};
|
|
|
adddata.name = $("#name").val();
|
|
|
adddata.sex = sexId;
|
|
|
adddata.tel = $("#phone").val();
|
|
|
adddata.identity = $("#sfzNum").val();
|
|
|
adddata.wechat=$("#wxNum").val();
|
|
|
|
|
|
if(data.name == '') {
|
|
|
toast('请填入您的姓名');
|
|
|
}else if(data.tel == '') {
|
|
|
toast('请输入电话号码');
|
|
|
}else if(!AuglyTest_phone.test(data.tel)) {
|
|
|
toast('电话号码格式不正确');
|
|
|
}else if( data.wechat == '') {
|
|
|
toast('请输入微信号码');
|
|
|
}else if(data.identity == '') {
|
|
|
toast('请输入身份证号');
|
|
|
}else if(!AuglyTest_ID.test( data.identity)) {
|
|
|
toast('身份证号输入不正确');
|
|
|
}else{
|
|
|
if(id_bianji !=''){
|
|
|
console.log('bianji');
|
|
|
$.ajax({
|
|
|
url:"/escort/Escort/edit",
|
|
|
type:"post",
|
|
|
data:data,
|
|
|
dataType:"JSON",
|
|
|
success:function(data){
|
|
|
console.log(data);
|
|
|
toast("保存成功");
|
|
|
getpeople(num);
|
|
|
id_bianji='';
|
|
|
$('.jia_travel').css('display','none');
|
|
|
$("#name").val('');
|
|
|
$("#phone").val('');
|
|
|
$("#wxNum").val('');
|
|
|
$("#sfzNum").val('');
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
console.log('add');
|
|
|
$.ajax({
|
|
|
url:"/escort/Escort/add",
|
|
|
type:"post",
|
|
|
data:adddata,
|
|
|
dataType:"JSON",
|
|
|
success:function(data){
|
|
|
console.log(data);
|
|
|
toast("保存成功");
|
|
|
getpeople(num);
|
|
|
id_bianji='';
|
|
|
$('.jia_travel').css('display','none');
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
function deletes(obj){
|
|
|
console.log(1);
|
|
|
id_bianji = $(obj).parents(".userInfo").data("id");
|
|
|
$.ajax({
|
|
|
url:"/escort/Escort/del",
|
|
|
type:"post",
|
|
|
data:{
|
|
|
id: id_bianji,
|
|
|
},
|
|
|
dataType:"JSON",
|
|
|
success:function(data){
|
|
|
// console.log(data);
|
|
|
if(data.code == 20000){
|
|
|
$(obj).parents('.userInfo').remove();
|
|
|
}
|
|
|
getpeople(num);
|
|
|
toast('删除成功');
|
|
|
$('.jia_travel').css('display','none');
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
//================================================================
|
|
|
|
|
|
$('.agreed').click(function () {
|
|
|
|
|
|
$.ajax({
|
|
|
url:"{:url('portal/Index/bindMobile')}",
|
|
|
data:{
|
...
|
...
|
@@ -1156,14 +1457,15 @@ |
|
|
},
|
|
|
type:"POST",
|
|
|
dataType:"JSON",
|
|
|
|
|
|
success: function () {
|
|
|
is_first=0;
|
|
|
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
</script>
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html> |
|
|
\ No newline at end of file |
...
|
...
|
|