Commit 61bf754b authored by 华国豪's avatar 华国豪 🙄

新增1日游

parent 7d0592a8
......@@ -85,7 +85,7 @@ color:rgba(51,51,51,1);
<el-submenu index="1">
<template slot="title">旅游</template>
<el-menu-item index="2-1">跟团游</el-menu-item>
<el-menu-item index="2-2">小包团</el-menu-item>
<el-menu-item index="2-2">一日游</el-menu-item>
<!-- <el-menu-item index="2-3">单团</el-menu-item>
<el-menu-item index="2-4">私人订制</el-menu-item> -->
</el-submenu>
......@@ -101,7 +101,7 @@ color:rgba(51,51,51,1);
</el-menu>
</el-col>
<el-col :span="3">
<div class="position">
<div class="position" v-if="!ifOneDay">
<el-select v-model="city" placeholder="请选择" size="mini" @change="changeSite">
<el-option v-for="item in sites" :key="item.companyId" :label="item.siteName" :value="item.companyId"></el-option>
......@@ -164,7 +164,8 @@ export default {
isLogin:false,
// homePage:localStorage.homePage?localStorage.homePage:false,
// homePage:this.$store.state.homePage,
groupInfo:{}
groupInfo:{},
ifOneDay: false,
}
},
created(){
......@@ -214,6 +215,13 @@ export default {
this.defaultKey=key;
sessionStorage.setItem("defaultKey",this.defaultKey);
this.$emit('forword', key)
if(key === '2-1') {
this.$router.push({ path: '/heel'})
this.ifOneDay = false
} else if(key === '2-2') {
this.$router.push({ path: '/OneDayTour'})
this.ifOneDay = true
}
},
loadSites(){
let msg={}
......
<style>
.LuckDraw{
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
background-color: rgba(0, 0, 0, 0.55);
z-index: 9999;
}
</style>
<template>
<div class="LuckDraw">
<div>
抽奖活动@!~~~
</div>
</div>
</template>
<script>
export default {
components: {},
data() {
return {};
},
computed: {},
created() {},
mounted() {},
methods: {}
};
</script>
\ No newline at end of file
<style>
@import url('../../assets/mall/detail.css');
._labelClass{
width:120px;
background-color: white;
text-align: center;
}
._travelLngLatInfo_box{
background-color: #f3f3f3;
padding: 20px;
margin-top: 15px;
}
._travelLngLatInfo_label{
display: inline-block;
width: 20px;
height: 20px;
border-radius: 50%;
background-color: #ea4335;
color: white;
text-align: center;
line-height: 20px;
}
.zanding_flight{
position: relative;
}
.zanding_flight span{
position: absolute;
right: -36px;
top: 10px;
width: 15px;
height: 15px;
background-color: #ef4455;
color: white;
cursor: pointer;
border-radius: 50%;
}
.template_box_two>div>div{
zoom:0.89;
}
.TripDownLoadCommon{ height:350px; text-align: center}
.TripDownLoadCommon> label{cursor: pointer;vertical-align: middle;}
.TripDownLoadCommon> label input{vertical-align: middle;}
.TripDownLoadCommon .TripBtn{ color: #fff; width: 90px; height:30px; background:#E95252; border: 1px solid #E95252; cursor: pointer; border-radius: 15px;}
.TripDownLoadCommon input[type="checkbox"] + label::before {
content: "\A0";
display: inline-block;
width: 15px;
height: 15px;
margin-right: 5px;
border-radius: 4px;
background-color: white;
text-indent: .15em;
line-height: 15px;
color: white;
border: 1px solid #e95252;
}
.TripDownLoadCommon input[type="checkbox"]:checked + label::before {
content: "\2713";
background-color: #e95252;
}
.TripDownLoadCommon input[type="checkbox"]{
position: absolute;
clip: rect(0, 0, 0, 0);
}
.TripDownLoadCommon input[type="checkbox"]:focus + label::before {
box-shadow: none;
}
.TripDownLoadCommon input[type="checkbox"]:disabled + label::before {
background-color: gray;
box-shadow: none;
color: #555;
}
.w450{width: 450px;}
</style>
<template>
<div class="detail-box" v-loading='loadingDataList' id="pdfDom">
<el-row v-if="loadNone==false">
<el-col :span="20" :offset="2" class="topic">
<el-col :span='12'>
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/heel',query:{} }">跟团游</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/search',query:{'keywords':'','lineId':dataList.lineName} }">{{dataList.lineName}}</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/search',query:{'keywords':'','lineId':dataList.lineName,'lineteamId':dataList.ltName} }">{{dataList.ltName}}</el-breadcrumb-item>
<el-breadcrumb-item>{{dataList.title}}</el-breadcrumb-item>
</el-breadcrumb>
</el-col>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="20" :offset="2">
<el-col :span='14' class="left-team-box" :gutter="35">
<div class="team-top-info">
<span class="xilie">{{dataList.ltName}}</span>
<span class="code">团队编号:{{dataList.id}}</span>
</div>
<div class="team-title">
{{dataList.title}}
</div>
<div class="price-box">
<div class="huodong" v-if="toDayObj && toDayObj.discountPrice>0">
<span>早鸟优惠</span>
<span>立减{{toDayObj.discountPrice}}</span>
</div>
<div>
<span class="red"></span>
<span class="red big">{{toDayObj?(isLogin!==1?toDayObj.b2CPrice:toDayObj.b2BPrice):0}}</span>
<span>/人起</span>
<span class="tips pointer">
起价说明
</span>
<!-- <span class="blue split medium pointer">4.9</span>
<span class="blue pointer">0条点评</span> -->
<span style='margin-left:5px'>{{dataList.offerNumber+99}}人出游</span>
</div>
<div class="activy" v-if="maxdiscountAmount>0">
<span>优惠活动</span>
<span class="split tag">可享</span>
<span class="split">【同行返佣】最高可返{{maxdiscountAmount}},赶快报名吧</span>
</div>
</div>
<div class="img-box" v-if="dataList">
<el-row :gutter="7">
<template v-if="VideoStr">
<el-col :span='12'>
<video :src="VideoStr" width="100%" height="259" class="avatar" controls="controls">您的浏览器不支持视频播放</video>
</el-col>
<el-col :span='12'>
<el-col :span='12'>
<img @click="showImg(imgCover),initialIndex =1" v-if="imgCover&&imgCover[0]" :src="editSrc(imgCover[0].Url)" style="height: 126px;width:100%" />
<img @click="showImg(imgCover)" v-else src="../../assets/img/bg_c2@3x.png" style="height: 126px;width:100%" />
<img @click="showImg(imgCover),initialIndex = 2" v-if="imgCover&&imgCover[1]" :src="editSrc(imgCover[1].Url)" style="height: 126px;width:100%" />
<img @click="showImg(imgCover)" v-else src="../../assets/img/bg_c2@3x.png" style="height: 126px;width:100%;margin-top:3px;" />
</el-col>
<el-col :span='12'>
<img @click="showImg(imgCover),initialIndex = 3" v-if="imgCover&&imgCover[2]" :src="imgCover[2].Url==''?'../../assets/img/bg_c2@3x.png':editSrc(imgCover[2].Url)" style="height: 126px;width:100%" />
<img @click="showImg(imgCover)" v-else src="../../assets/img/bg_c2@3x.png" style="height: 126px;width:100%" />
<div class="last">
<img v-if="imgCover&&imgCover[3]" :src="imgCover[3].Url==''?'../../assets/img/bg_c2@3x.png':editSrc(imgCover[3].Url)" style="height: 126px;width:100%" />
<img v-else src="../../assets/img/bg_c2@3x.png" style="height: 126px;width:100%;margin-top:3px;" />
<div class="tip" @click="showImg(imgCover)">
查看全部图片
</div>
</div>
</el-col>
</el-col>
</template>
<template v-else>
<el-col :span='12'>
<img @click="showImg(imgCover),initialIndex = 0" v-if="imgCover&&imgCover[0]" :src="editSrc(imgCover[0].Url)" style="height: 259px;width:100%" />
<img @click="showImg(imgCover)" v-else src="../../assets/img/bg_c2@3x.png" style="height: 259px;width:100%" />
</el-col>
<el-col :span='12'>
<el-col :span='12'>
<img @click="showImg(imgCover),initialIndex =1" v-if="imgCover&&imgCover[1]" :src="editSrc(imgCover[1].Url)" style="height: 126px;width:100%" />
<img @click="showImg(imgCover)" v-else src="../../assets/img/bg_c2@3x.png" style="height: 126px;width:100%" />
<img @click="showImg(imgCover),initialIndex = 2" v-if="imgCover&&imgCover[2]" :src="editSrc(imgCover[2].Url)" style="height: 126px;width:100%" />
<img @click="showImg(imgCover)" v-else src="../../assets/img/bg_c2@3x.png" style="height: 126px;width:100%;margin-top:3px;" />
</el-col>
<el-col :span='12'>
<img @click="showImg(imgCover),initialIndex = 3" v-if="imgCover&&imgCover[3]" :src="imgCover[3].Url==''?'../../assets/img/bg_c2@3x.png':editSrc(imgCover[3].Url)" style="height: 126px;width:100%" />
<img @click="showImg(imgCover)" v-else src="../../assets/img/bg_c2@3x.png" style="height: 126px;width:100%" />
<div class="last">
<img v-if="imgCover&&imgCover[4]" :src="imgCover[4].Url==''?'../../assets/img/bg_c2@3x.png':editSrc(imgCover[4].Url)" style="height: 126px;width:100%" />
<img v-else src="../../assets/img/bg_c2@3x.png" style="height: 126px;width:100%;margin-top:3px;" />
<div class="tip" @click="showImg(imgCover)">
查看全部图片
</div>
</div>
</el-col>
</el-col>
</template>
</el-row>
</div>
<div class="recome">
<span class="big left">
<i class='el-icon-star-on'></i>产品推荐
</span>
<span class="big right">
{{dataList.productRecommend}}
</span>
</div>
</el-col>
<el-col :span='10' class="right-team-box-col">
<div class="right-team-box">
<div class="title">
<span class="item" v-for="(i,index) in calendarTit" @click="selectMounth(index)" :class="index===indexActive?'avtice':''">
<span>{{i.dateStrS}}</span><br/>
<span class="price">¥{{isLogin!==1?i.price:i.b2BPrice}}起</span>
</span>
</div>
<calendar v-for="(item,index) in classArray" :key="index" :dateData= "item" :day = "item[0].dateStr" @ChildrenSelect="ListenChildren" v-if="index == selectMonth"/>
</div>
</el-col>
</el-col>
</el-row>
<trade :priceList='dataList.priceList' :trip='dataList' :numPeople="null" v-if="dataList.priceList && dataList.priceList.length>0"></trade>
<div ref="nav">
<el-row>
<el-col :span="20" :offset="2">
<el-col :span="18">
<ul class="top-nav" >
<li :class="crtnav=='tese'?'active':''" @click="goScroll('tese')">
<i class="iconfont icon-Pointer"></i>
<span>行程特色</span>
</li>
<li :class="crtnav=='teamacitvy'?'active':''" @click="goScroll('teamacitvy')">
<i class="iconfont icon-List"></i>
{{dayTrip}}日行程
</li>
<li :class="crtnav=='feiyong'?'active':''" @click="goScroll('feiyong')">
<i class="iconfont icon-zifeishuoming"></i>
费用
</li>
<li :class="crtnav=='gouwu'?'active':''" @click="goScroll('gouwu')">
<i class="iconfont icon-jindiananpai"></i>
购物说明
</li>
<li :class="crtnav=='yuding'?'active':''" @click="goScroll('yuding')">
<i class="iconfont icon-zhongyaotishi"></i>
预订须知
</li>
<li :class="crtnav=='qianz'?'active':''" @click="goScroll('qianz')">
<i class="iconfont icon-qianzhengshuoming"></i>
签证
</li>
<li :class="crtnav=='tonghang'?'active':''" @click="goScroll('tonghang')">
<i class="iconfont icon-hangchenganpai"></i>
同行备注
</li>
<li :class="crtnav=='PDFDownL'?'active':''" @click="crtnav=='PDFDownL',PDFDownLoad('tonghang')">
<i class="iconfont icon-hangchenganpai"></i>
PDF下载
</li>
</ul>
</el-col>
<el-col :span="6">
<div class="customer">
<div class="phone">
<i class="iconfont icon-kefuicon"></i>
028-61993600
</div>
<div class="tip">
行程有疑问?懒得填信息?专业客服为您提供咨询服务
</div>
</div>
</el-col>
</el-col>
</el-row>
</div>
<el-row>
<el-col :span="20" :offset="2">
<div class="item-title" id='tese'>
<span class="t">行程特色</span>
<span>
<small class="s"></small>
</span>
<span>Trip characteristics</span>
</div>
<div class="nin-box" v-if="showType==2">
<table>
<tbody>
<tr>
<td @click="showImg(feature.featureImgList),initialIndex=index" v-for="(i,index) in feature.featureImgList" :key="index" v-if="index<3" :style="{background:'url(' + i.url + ') no-repeat bottom left/100% auto'}">
&nbsp;
</td>
</tr>
<tr>
<td @click="showImg(feature.featureImgList),initialIndex=index" v-for="(i,index) in feature.featureImgList" :key="index" v-if="index>2&&index<6" :style="{background:'url(' + i.url + ') no-repeat bottom left/100% auto'}">
&nbsp;
</td>
</tr>
<tr>
<td @click="showImg(feature.featureImgList),initialIndex=index" v-for="(i,index) in feature.featureImgList" :key="index" v-if="index>5&&index<=8" :style="{background:'url(' + i.url + ') no-repeat bottom left/100% auto'}">
&nbsp;
</td>
</tr>
</tbody>
</table>
</div>
<div class="slider" v-if="showType==1&&loadNone==false">
<!-- <el-carousel :interval="2000" height='400px' trigger="click" :style="{'background':'#ddd'}">
<el-carousel-item v-for="(i,index) in feature.featureImgList" :key="index">
<img :src="i.url" />
</el-carousel-item>
</el-carousel> -->
<swiper :imgs='feature.featureImgList'></swiper>
</div>
<div class="zidingyi" v-if="(showType==3 || showType<4)&&loadNone==false">
<center v-html="feature.featureContent"></center>
</div>
<div class="template-box" v-if="showType==4&&loadNone==false">
<div v-html="feature.featureHtml" style="width:1000px;margin:0 auto;"></div>
</div>
<div class="template-box template_box_two" v-if="showType>4&&loadNone==false">
<div v-html="feature.featureHtml" style="width:1000px;margin:0 auto;"></div>
</div>
<div id="teamacitvy"> </div>
<div class="item-title" v-if="dataList.isDirect&&travelLngLat.length>1">
<span class="t">行程地图</span>
<span>
<small class="s"></small>
</span>
<span>Trip Maps</span>
</div>
<!-- -->
<div class="map-box" v-if="dataList.isDirect&&travelLngLat.length>1">
<!-- <bmap :data="travelLngLat"/> -->
<GGMap :dataList="travelLngLat"></GGMap>
<div class="_travelLngLatInfo_box">
<p v-for="item in travelLngLatInfo"><span class="_travelLngLatInfo_label">{{item.lable}}</span>: {{item.text}}</p>
</div>
</div>
<!-- <div id="map_canvas" style="width:1000px; height:600px;"></div> -->
<div class="item-title">
<span class="t">{{dayTrip}}日行程</span>
<span>
<small class="s"></small>
</span>
<span>Scheduling</span>
</div>
<div v-if='dayList&&dayList.length>0'>
<!-- <trip :tripList="dayList"></trip> -->
<block :tripList="dayList" :isDirect="isDirect" :clickDate="clickDate"></block>
</div>
<div class="item-title" id='feiyong'>
<span class="t">费用</span>
<span>
<small class="s"></small>
</span>
<span>Expense</span>
</div>
<div class="expense">
<div class="left">费用包含</div>
<div class="right">
<div v-html="feature.feeInclude"></div>
</div>
</div>
<div class="expense">
<div class="left">自理费用</div>
<div class="right">
<div v-html="feature.feeNonInclude"></div>
<table class="expense-table" cellspacing=0 cellpadding=0 v-if='dataList.selfpayingList && dataList.selfpayingList.length>0'>
<thead>
<th>城市</th>
<th>活动</th>
<th>参考价格</th>
<th>说明</th>
</thead>
<tbody>
<tr v-for="(item,i) in dataList.selfpayingList" :key="i">
<td>{{item.cityName}}</td>
<td>{{item.itemName}}</td>
<td>约{{item.estimatedCost}}</td>
<td>{{item.explain}}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="item-title" id='gouwu'>
<span class="t">购物说明</span>
<span>
<small class="s"></small>
</span>
<span>Expense</span>
</div>
<div class="expense">
<div class="left">
<!-- 购物协议 -->
</div>
<div class="right">
<div v-html="feature.shopRemark"></div>
</div>
</div>
<div class="expense" v-if="dataList.shopList && dataList.shopList.length>0">
<div class="left">购物安排</div>
<div class="right">
<table class="expense-table autowidth" cellspacing=0 cellpadding=0>
<thead>
<th>城市</th>
<th>购物店名称</th>
<th>预计停留时间</th>
</thead>
<tbody>
<tr v-for="(item,i) in dataList.shopList" :key="i">
<td>{{item.cityName}}</td>
<td>{{item.shopName}}</td>
<td>{{item.visitTime}}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="item-title" id='yuding'>
<span class="t">预订须知</span>
<span>
<small class="s"></small>
</span>
<span>Tips</span>
</div>
<div class="expense" v-if="feature.importantTip!=''">
<div class="left">重要提示</div>
<div class="right">
<div v-html="feature.importantTip"></div>
</div>
</div>
<div class="expense">
<div class="left">温馨提示</div>
<div class="right">
<div v-html="feature.warmTip"></div>
</div>
</div>
<div class="item-title" id='qianz'>
<span class="t">签证</span>
<span>
<small class="s"></small>
</span>
<span>Visa</span>
</div>
<div class="expense">
<div class="left">签证须知</div>
<div class="right">
<div v-html="feature.visaRemark"></div>
</div>
</div>
<div class="item-title" id='tonghang'>
<span class="t">同行备注</span>
<span>
<small class="s"></small>
</span>
<span>Remark</span>
</div>
<div class="expense">
<div class="left"></div>
<div class="right">
<div v-html="feature.b2BRemark"></div>
</div>
</div>
</el-col>
</el-row>
<el-row class="fuben-nav" v-if="changeNav&&loadNone==false" >
<el-col :span="20" :offset="2">
<el-col :span="18">
<ul class="top-nav" >
<li :class="crtnav=='tese'?'active':''" @click="goScroll('tese')">
<i class="iconfont icon-Pointer"></i>
<span>行程特色</span>
</li>
<li :class="crtnav=='teamacitvy'?'active':''" @click="goScroll('teamacitvy')">
<i class="iconfont icon-List"></i>
{{dayTrip}}日行程
</li>
<li :class="crtnav=='feiyong'?'active':''" @click="goScroll('feiyong')">
<i class="iconfont icon-zifeishuoming"></i>
费用
</li>
<li :class="crtnav=='gouwu'?'active':''" @click="goScroll('gouwu')">
<i class="iconfont icon-jindiananpai"></i>
购物说明
</li>
<li :class="crtnav=='yuding'?'active':''" @click="goScroll('yuding')">
<i class="iconfont icon-zhongyaotishi"></i>
预订须知
</li>
<li :class="crtnav=='qianz'?'active':''" @click="goScroll('qianz')">
<i class="iconfont icon-qianzhengshuoming"></i>
签证
</li>
<li :class="crtnav=='tonghang'?'active':''" @click="goScroll('tonghang')">
<i class="iconfont icon-hangchenganpai"></i>
同行备注
</li>
<li :class="crtnav=='PDFDownL'?'active':''" @click="crtnav=='PDFDownL',PDFDownLoad('tonghang')">
<i class="iconfont icon-hangchenganpai"></i>
PDF下载
</li>
<!-- <li :class="crtnav==7?'active':''">
<i class="iconfont icon-feiyongshuoming"></i>
点评(99+)
</li> -->
</ul>
</el-col>
<el-col :span="6">
<div class="customer">
<div class="phone">
<i class="iconfont icon-kefuicon"></i>
028-61993600
</div>
<div class="tip">
行程有疑问?懒得填信息?专业客服为您提供咨询服务
</div>
</div>
</el-col>
</el-col>
</el-row>
<div v-if='picIsShow' class="_show_img_box" @click="picIsShow=false,picObj=[]">
<div style="position: absolute; width: 800px; height: 600px; left: 50%; top: 50%; margin-left: -400px; margin-top: -300px;">
<el-carousel :initial-index=initialIndex height="600px" :interval="5000" trigger="click">
<el-carousel-item v-for="(item,index) in picObj" :key="index">
<img :src="item.Url?item.Url:item.url" style="width: 100%; height: 100%;"/>
</el-carousel-item>
</el-carousel>
</div>
</div>
<div style="height:100px;"></div>
<!-- <el-button class="pdfDom_btn" type="primary" size="small" @click="donwLoad()" v-if="loadNone==false">点击下载</el-button> -->
<template v-if="sonData">
<confirmationOrderDownLoad ref="confirmationOrderDownLoad" :sonData="sonData" :TripLayer="TripLayer"/>
</template>
<el-dialog custom-class='w450' title="行程下载" :visible.sync="travelControlTripLayerShow" center>
<div class="TripDownLoadCommon" >
<table style="width:380px" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="2">
请选择需要的类容
</th>
</tr>
<tbody>
<tr height="36">
<td width="50%"><input id="vshowA" v-model="TripLayer.vshowA" type="checkbox" /><label for="vshowA">基础信息</label></td>
<td width="50%"><input id="vshowB" v-model="TripLayer.vshowB" type="checkbox" /><label for="vshowB">航班信息</label></td>
</tr>
<tr height="36">
<td><input id="vshowC" v-model="TripLayer.vshowC" type="checkbox" /><label for="vshowC">行程特色</label></td>
<td><input id="vshowD" v-model="TripLayer.vshowD" type="checkbox" /><label for="vshowD">行程安排</label></td>
</tr>
<tr height="36">
<td><input id="vshowE" v-model="TripLayer.vshowE" type="checkbox" /><label for="vshowE">费用说明</label></td>
<td><input id="vshowF" v-model="TripLayer.vshowF" type="checkbox" /><label for="vshowF">购物说明</label></td>
</tr>
<tr height="36">
<td><input id="vshowG" v-model="TripLayer.vshowG" type="checkbox" /><label for="vshowG">订单须知</label></td>
<td><input id="vshowH" v-model="TripLayer.vshowH" type="checkbox" /><label for="vshowH">签证信息</label></td>
</tr>
<tr height="36">
<td><input id="vshowI" v-model="TripLayer.vshowI" type="checkbox" /><label for="vshowI">同行备注</label></td>
<td><input id="vshowJ" v-model="TripLayer.vshowJ" type="checkbox" /><label for="vshowJ">印象标识</label></td>
</tr>
<tr height="36">
<td><input id="vshowK" v-model="TripLayer.vshowK" type="checkbox" /><label for="vshowK">景点图片</label></td>
</tr>
</tbody>
<!-- <tbody>
<tr height="36">
<td width="50%"><input id="vshowA" v-model="TripLayer.vshowA" type="checkbox" /><label for="vshowA">基础信息</label></td>
<td width="50%"><input id="vshowL" v-model="TripLayer.vshowL" type="checkbox" /><label for="vshowL">集合地点</label></td>
</tr>
<tr height="36">
<td><input id="vshowK" v-model="TripLayer.vshowK" type="checkbox" /><label for="vshowK">景点图片</label></td>
<td><input id="vshowB" v-model="TripLayer.vshowB" type="checkbox" /><label for="vshowB">航班信息</label></td>
</tr>
<tr height="36">
<td><input id="vshowC" v-model="TripLayer.vshowC" type="checkbox" /><label for="vshowC">行程特色</label></td>
<td><input id="vshowD" v-model="TripLayer.vshowD" type="checkbox" /><label for="vshowD">行程安排</label></td>
</tr>
<tr height="36">
<td><input id="vshowE" v-model="TripLayer.vshowE" type="checkbox" /><label for="vshowE">费用说明</label></td>
<td><input id="vshowF" v-model="TripLayer.vshowF" type="checkbox" /><label for="vshowF">购物说明</label></td>
</tr>
<tr height="36">
<td><input id="vshowG" v-model="TripLayer.vshowG" type="checkbox" /><label for="vshowG">订单须知</label></td>
<td><input id="vshowH" v-model="TripLayer.vshowH" type="checkbox" /><label for="vshowH">签证信息</label></td>
</tr>
<tr height="36">
<td><input id="vshowI" v-model="TripLayer.vshowI" type="checkbox" /><label for="vshowI">同行备注</label></td>
<td><input id="vshowJ" v-model="TripLayer.vshowJ" type="checkbox" /><label for="vshowJ">印象标识</label></td>
</tr>
<tr height="36">
<td><input id="vshowLLR" v-model="TripLayer.vshowLLR" type="checkbox" /><label for="vshowLLR">紧急联络人</label></td>
</tr>
</tbody> -->
<tr height="66">
<td colspan="2" align="center">
<input type="button" class="TripBtn" @click="PDFDownLoad();" value="确定" />
</td>
</tr>
</table>
</div>
</el-dialog>
</div>
</template>
<script>
import moment from 'moment'
// import bmap from './map.vue'
import calendar from './calendar.vue'
import trip from '../trip/waterfall/index'
import block from '../trip/block/index'
import trade from '../trade/order/OneDayIndex'
import swiper from '../trip/swiper/index'
import GGMap from '../global/GGMap'
import confirmationOrderDownLoad from '../global/confirmationOrderDownLoad'
import bus from '../../plugins/event-bus'
export default {
components: {
// bmap,
GGMap,
calendar,
trip,
block,
trade,
swiper,
confirmationOrderDownLoad
},
props:['changeCity'],
data () {
return {
ID:'',
tcid: '',
pre:0,
chosenTime:'',
crn:2,
etn:0,
changeNav:false,
scrollobj:null,
picIsShow:false,
initialIndex:0,
showType:-1,
crtnav:'tese',
dayList:[],
feature:{},
priceList:[],
dataList:{},
toDayObj:{},
calendarTit:[],
classArray:[],
imgCover:[],
picObj:[],
travelLngLat:[],
selectMonth:0,
value:'1',
dayTrip:'',
input10:'',
isLogin:1,
oderInfoShow:false,
indexActive:0,
clickDate:'',
travelControlTripLayerShow: false,
TripLayer: {
vshowA :true,
vshowB :true,
vshowC :true,
vshowD :true,
vshowE :true,
vshowF :true,
vshowG :true,
vshowH :true,
vshowI :true,
vshowJ :true,
vshowK :true,
vshowL :true,
vshowM :true,
vshowLLR :true,
},
navs:[
'tese',
'teamacitvy',
'feiyong',
'gouwu',
'yuding',
'qianz',
'tonghang'
],
pickerOptions:{
disabledDate(time) {
// return moment(time).format('YYYY-MM-DD')!='2018-10-18' && moment(time).format('YYYY-MM-DD')!='2018-10-28'
}
},
maxdiscountAmount:0,
loadingDataList:false,
htmlTitle: '印象之旅',
loadNone:false,
site:localStorage.site,
priceListIndex:0,
isDirect:1,//是否是直采 0:否,1:是
abcList: ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','AA','AB','AC','AD','AE','AF','AG'],
travelLngLatInfo:[],
VideoStr:'',
sonData: null,
showFlight: false,
FlightList: [],
city: -1,
}
},watch: { // 监听参数变化
changeCity: {
handler: function(val, oldVal) {
// console.log(val)
if(val){
this.getList()
}
},
deep: true
},
},created(){
this.ID = decodeURIComponent(this.$route.params.id)
this.tcid = decodeURIComponent(this.$route.params.tcid)
if(this.$route.params.pre && this.$route.params.pre=='preview'){
this.pre=1
}
this.getList()
this.isLogin=this.$store.state.isLogin;
bus.$on('order-chosen', this.orderChosen)
},
mounted () {
this.scrollobj=document.getElementsByClassName('el-scrollbar__wrap')[0];
this.scrollobj.addEventListener('scroll', this.handleScroll);
// this.initMap();
},
methods: {
orderChosen: function (date) {
let day = date.split('-')[0] + '-' + date.split('-')[1]
this.calendarTit.forEach((x, index)=>{
if (x.dateStrS === day) {
this.selectMonth = index;
this.indexActive = index;
setTimeout(function(){
bus.$emit('order-chosen_calendar', date)
},500)
}
})
},
editSrc: function (src) {
return src.split('?')[0]
},
PDFDownLoad: function (type) {
if (type) {
this.travelControlTripLayerShow = true
} else {
let orderMsg = this.sonData.orderMsg
this.travelControlTripLayerShow = false
this.$refs.confirmationOrderDownLoad.toPDF(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游');
}
},
ToWord: function () {
this.loadingDataList = true
let title = this.dataList.currentPriceInfo.startDate + this.dataList.ltName + this.dataList.dayNum + '日游'
let msg = {
configId: this.dayList.id,
cityId: this.city,
tcid: this.tcid,
orderId: 0,
FileName: title,
//是否显示基础信息
isShowBase: 1 ,
//是否显示航班
isShowFlight: 1,
//是否显示行程特色
isShowFeature: 1,
//自费、费用包含、费用不含
isShowFee: 1,
//购物说明,购物安排
isShowShop: 1,
//重要提示、温馨提示 [订单须知]
isShowTip: 1,
//是否显示同行备注
isShowB2B: 1,
//是否显示行程
isShowTrip: 1,
//是否显示标题
isShowTitle: 1,
//是否显示旅客名单
isShowGuest: 0,
//是否显示紧急联系人
isShowMan: 0,
//是否显示团号
isShowTCNUM: 0,
//是否显示行程图片
isShowTripImage: 1,
//是否显示签证信息
isShowVisa: 1,
//isPc是否PC下载
isPc: 1,
//模板参数
templateId: this.showType,
};
this.GetLocalFile("DownLoadTripWord", msg, title + ".doc", res => {
this.loadingDataList = false
});
},
donwLoad(){
this.loadNone = true;
this.loadingDataList = true;
let imgs=document.getElementsByTagName('img');
for(let i=0;i<imgs.length;i++){
document.getElementsByTagName('img')[i].setAttribute('crossOrigin','Anonymous')
}
window.setTimeout(this.getPdf('#pdfDom'),3000);
},
DateDiff(sDate1, sDate2){ //sDate1和sDate2是2002-12-18格式
var aDate, oDate1, oDate2, iDays
aDate = sDate1.split("-")
oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]) //转换为12-18-2002格式
aDate = sDate2.split("-")
oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0])
iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 /24) //把相差的毫秒数转换为天数
return iDays
},
ListenChildren(word){
this.clickDate = word
let data = this.dataList.priceList;
for ( let i = 0; i < data.length; i++) {
if (word===data[i].startDate){
this.priceListIndex = i;
let msg = {configId:data[i].configIDDes, cityId:this.city, preview:this.pre, tcid:data[i].tcid}
bus.$emit('chosen-tripdate', word)
this.getData(msg)
}
}
},
oderInfoShowF(){
this.oderInfoShow = !this.oderInfoShow
},
showImg(obj){
obj.forEach(x=>{
x.Url = x.Url.split('?')[0]
})
this.picObj= obj
this.picIsShow= true;
},
getList(){
this.apipost('b2b_get_site',{},res=> {
let data = res.data.data
let city = 0
for(let i = 0 ; i < data.length; i++ ) {
if(data[i].companyId == localStorage.site) {
city = data[i].cityId
this.city = city
break
}
}
let msg = {configId:this.ID,cityId:city,preview:this.pre,tcid:this.tcid}
this.getData(msg)
})
},
getData: function (msg) {
this.loadingDataList=true
// console.log('api',msg)
this.apipost('b2b_get_GetB2BTravelInfoV1',msg,r=>{
if(r.data.resultCode==1){
let data = (r.data.data);
this.sonData = data;
this.dayList = data.dayList;
this.feature = data.feature;
this.isDirect = data.isDirect;
if (data.videoStr) {
let path = data.videoStr.indexOf('http') > -1 ? data.videoStr : domainManager().ViittoFileUrl + data.videoStr;
this.VideoStr = path;
}
// console.log(data.priceList[0].priceFlight)
// if(data.priceList && data.priceList.length>0){
// data.priceList[0].priceFlight.forEach((x,i)=>{
// if(i==0){
// x.dayNum = 1;
// if(x.departureTime<x.arrivalTime){
// x.daodaDay = 1;
// }else{
// x.daodaDay = 2;
// }
// } else {
// console.log(this.DateDiff(data.priceList[0].priceFlight[0].startDate,x.startDate))
// x.dayNum = this.DateDiff(data.priceList[0].priceFlight[0].startDate,x.startDate);
// x.dayNum +=1
// if(x.departureTime<x.arrivalTime){
// x.daodaDay = x.dayNum;
// }else{
// x.daodaDay = x.dayNum+1;
// }
// }
// })
// }
this.priceList = data.priceList;
this.clickDate = data.currentPriceInfo && data.currentPriceInfo.startDate ? data.currentPriceInfo.startDate : '';
this.FlightList = data.currentPriceInfo && data.currentPriceInfo.priceFlight ? data.currentPriceInfo.priceFlight : '';
this.dataList = data;
this.toDayObj = this.priceList && this.priceList.length>0?this.priceList[0]:null;
this.imgCover = JSON.parse(this.dataList.imgCover);
this.showType = this.feature.featureType;
this.dayTrip = this.dataList.dayNum;
if(this.dataList.isDirect==1&&this.dataList.travelLngLat.length){
this.travelLngLat = [];//this.dataList.travelLngLat;
this.dataList.travelLngLat.forEach(x=>{
if(x.type!=2){
this.travelLngLat.push(x)
}
})
let travelLngLatInfo = [];
this.travelLngLat.forEach((x,index)=>{
travelLngLatInfo.push(
{
lable: this.abcList[index],
text: x.name
}
)
})
this.travelLngLatInfo = travelLngLatInfo;
}
this.creatCalendar(this.priceList);
if(data.lineTeamDiscountList && data.lineTeamDiscountList.length>0){
data.lineTeamDiscountList.forEach(x=>{
this.maxdiscountAmount=x.discountAmount>this.maxdiscountAmount?x.discountAmount:this.maxdiscountAmount
})
}
this.htmlTitle = this.dataList.ltName;
this.showFlight = true
this.$forceUpdate()
}else{
this.$message.error(r.data.message)
}
this.loadingDataList=false
},null)
},
creatCalendar(list){ // 创建日历
let dateList = [];
if(list && list.length>0){
list.forEach((x,index)=>{
if(x.tcState==3){
let msg = {
dateStr:x.startDate,
cDate:x.startDate.replace('-','年').replace('-','月'),
price:x.b2CPrice,
b2BMemberPrice:x.b2BMemberPrice,
b2BPrice:x.b2BPrice,
b2CMemberPrice:x.b2CMemberPrice,
id:index,
dateStrS:x.startDate.substring(0,x.startDate.length-3),
tcid: x.tcid,
configIDDes: x.configIDDes
}
dateList.push(msg);
}
});
}
let monthArray = [];
for (var i in dateList) {
var data = dateList[i];
var dateDict = {'mounth':data.dateStr.substring(0,data.dateStr.length-3)};
monthArray.push(dateDict);
}
//数组去重,获取有几个月
var hash={};
monthArray = monthArray.reduce(
function (item,next) {
hash[next.mounth]?'' :hash[next.mounth] = true && item.push(next);
return item;
},[]
)
//数据分组
let classArray = [];
for (var j in monthArray) {
var newArray = new Array();
for (var i in dateList) {
var data = dateList[i];
if (data.dateStr.substring(0,data.dateStr.length-3) == monthArray[j].mounth) {
newArray.push(data)
}
}
classArray.push(newArray);
}
this.classArray = classArray;
var hash={};
dateList = dateList.reduce(
function (item,next) {
hash[next.dateStrS]?'' :hash[next.dateStrS] = true && item.push(next);
return item;
},[]
)
this.calendarTit = dateList;
},
goScroll(id){
this.scrollobj.scrollTop=document.getElementById(id).offsetTop+screen.availHeight-350;
},
handleScroll(){
try {
if(this.scrollobj.scrollTop>this.$refs.nav.offsetTop){
this.changeNav=true
}else{
this.changeNav=false
}
let current=''
this.navs.forEach(x=>{
let t=document.getElementById(x).offsetTop
if(t<=this.scrollobj.scrollTop-200){
current=x
}
})
this.crtnav=current
} catch (error) {
}
},
selectMounth(index){
this.selectMonth = index;
this.indexActive = index;
},
initMap: function () {
//所有坐标
var locations = new Array(
"31.953313,121.841581","31.15347,121.291706",
"31.207516,121.412556","31.122909,121.458561",
"31.118207,121.38715","31.041168,121.426289",
"30.985262,121.301319","31.057934,121.305834");
//地图
var map;
var marker;
var poly;
/* 加载地图 */
var latlng = new google.maps.LatLng(31.253313, 121.241581);
var myOptions = {
zoom: 10, //缩放级别
center: latlng, //坐标
mapTypeId: google.maps.MapTypeId.ROADMAP //类型:默认的普通二维图块
};
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
// console.log(google)
// 线条设置
// var polyOptions = {
// strokeColor: '#4a90e2', // 颜色
// strokeOpacity: 1.0, // 透明度
// strokeWeight: 2 // 宽度
// }
// poly = new google.maps.Polyline(polyOptions);
// poly.setMap(map); // 装载
/* 循环标出所有坐标 */
// for(var i=0; i<locations.length; i++){
// var loc = locations[i].split(',');
// var path = poly.getPath(); //获取线条的坐标
// path.push(new google.maps.LatLng(loc[0], loc[1])); //为线条添加标记坐标
// //生成标记图标
// marker = new google.maps.MarkerWithLabel({
// position: new google.maps.LatLng(loc[0], loc[1]),
// labelContent: `<div>
// <img src="http://image-demo.oss-cn-hangzhou.aliyuncs.com/example.jpg?x-oss-process=image/resize,m_fixed,h_50,w_50"></img>
// <p>新疆-北京</p>
// </div>`, //需要显示的标题的内容
// labelAnchor: 0, //当前标题基于marker左上角的偏移
// labelStyle:{ //标题的style样式
// color: "red",
// fontSize: "12px"
// },
// map: map,
// labelClass:"_labelClass", //支持直接绑定class名,将样式写在css里面
// // icon: "http://image-demo.oss-cn-hangzhou.aliyuncs.com/example.jpg?x-oss-process=image/resize,m_fixed,h_50,w_50"
// })
// }
}
}
}
</script>
<style>
@import '../../assets/mall/search.css';
</style>
<template>
<div class="search-page-box">
<el-row >
<el-col :span="20" :offset="2" class="topic">
<el-col :span='12'>
<div class="chosend-box">
*你的选择:
<el-tag closable hit size='medium' v-for='(item,index) in searchItem' :key="index" v-if='item!==""&&item!=="0"' @close='handleClose(index)'>{{item}}</el-tag>
</div>
</el-col>
<el-col :span='12'>
<div class="second-s-box">
<el-col :span="4">
<el-select v-model="type" placeholder="请选择" size="mini" >
<el-option label="跟团游" value="1"></el-option>
</el-select>
</el-col>
<el-col :span="16">
<input type="text" class="search-input" v-model="keywords" max-length="50" @keyup.enter="loadTeamDataInit" />
</el-col>
<el-col :span="4">
<el-button type="danger" size="medium" @click="loadTeamDataInit">
<i class="el-icon-search"></i>
</el-button>
</el-col>
</div>
</el-col>
</el-col>
</el-row>
<el-row>
<el-col :span="20" :offset="2">
<div class="searchitem">
<!-- <div class="itme" v-if="searchItem[0]==='' || searchItem[0]==='0'">
<el-col :span="3" class="item-title">
线路
</el-col>
<el-col :span="21" class="items">
<el-tabs v-model="searchItem[0]" @tab-click="changeXilie">
<el-tab-pane v-for='item in lines' :key="item.id" :label="item.name" :name="item.name"></el-tab-pane>
</el-tabs>
</el-col>
</div> -->
<!-- <div class="itme" v-if="(searchItem[1]==='' || searchItem[1]==='0')&&xilies.length>0">
<el-col :span="3" class="item-title">
系列
</el-col>
<el-col :span="21" class="items">
<el-tabs v-model="searchItem[1]" @tab-click='loadTeamDataInit'>
<el-tab-pane v-for='item in xilies' :key="item.id" :label="item.name" :name="item.name"></el-tab-pane>
</el-tabs>
</el-col>
</div> -->
<div class="itme" v-if="(searchItem[2]==='' || searchItem[2]==='0') && (searchItem[5]==='' || searchItem[5]==='0')">
<el-col :span="3" class="item-title">
出发日期
</el-col>
<el-col :span="6" class="items">
<el-tabs v-model="searchItem[2]" @tab-click='loadTeamDataInit'>
<el-tab-pane v-for='(item,index) in dates' :key="index" :label="item" :name="item"></el-tab-pane>
</el-tabs>
</el-col>
<el-col :span="15">
<el-date-picker size="mini" value-format='yy-MM-dd' v-model="multData" type="daterange" range-separator="至" start-placeholder="最早出发" end-placeholder="最晚出发" @change='multDataChange'>
</el-date-picker>
</el-col>
</div>
<div class="itme" v-if="searchItem[3]==='' || searchItem[3]==='0'">
<el-col :span="3" class="item-title">
出发城市
</el-col>
<el-col :span="21" class="items">
<el-tabs v-model="searchItem[3]" @tab-click='loadTeamDataInit'>
<el-tab-pane v-for='item in startCitys' :key="item.id" :label="item.startCityName" :name="item.startCityName"></el-tab-pane>
</el-tabs>
</el-col>
</div>
<!-- <div class="itme" v-if="searchItem[4]==='' || searchItem[4]==='0'">
<el-col :span="3" class="item-title">
行程天数
</el-col>
<el-col :span="21" class="items">
<el-tabs v-model="searchItem[4]" @tab-click='loadTeamDataInit'>
<el-tab-pane v-for='(item,index) in dayCount' :key="index" :label="item.format" :name="item.format"></el-tab-pane>
</el-tabs>
</el-col>
</div> -->
</div>
<div class="orderbyitem">
<el-button-group class="orderby-group">
<el-button size='mini' :type="orderindex==0?'danger':''" @click="changeOrderType(0)">综合</el-button>
<el-button size='mini' :type="orderindex==1?'danger':''" @click="changeOrderType(1)">团期 <i :class="ordertype==0||orderindex!=1?'el-icon-arrow-down':'el-icon-arrow-up'"></i></el-button>
<el-button size='mini' :type="orderindex==2?'danger':''" @click="changeOrderType(2)">价格 <i :class="ordertype==0||orderindex!=2?'el-icon-arrow-down':'el-icon-arrow-up'"></i></el-button>
<el-button size='mini' :type="orderindex==3?'danger':''" @click="changeOrderType(3)">销量 <i :class="ordertype==0||orderindex!=3?'el-icon-arrow-down':'el-icon-arrow-up'"></i></el-button>
<el-button size='mini' :type="orderindex==4?'danger':''" @click="changeOrderType(4)">评论数 <i :class="ordertype==0||orderindex!=4?'el-icon-arrow-down':'el-icon-arrow-up'"></i></el-button>
</el-button-group>
<div class="pirce">
<span>价格区间</span>
<el-input size="mini" v-model="minPrice" @keyup.native="proving" @keyup.enter='loadTeamDataInit' maxlength='6'></el-input>
<strong>~</strong>
<el-input size="mini" v-model="maxPrice" @keyup.native="proving" @keyup.enter='loadTeamDataInit' maxlength='6'></el-input>
<el-button size='mini' @click="loadTeamDataInit">确认</el-button>
</div>
</div>
<div class="teams" v-loading='isLoading'>
<div class="teams-item" v-for="(item,index) in teamDatas" @mouseover='hoverIndex=index' @mouseout="hoverIndex=-1">
<div class="picbox">
<div class="daynum">{{item.dayNum}}</div>
<el-carousel :interval="3000" :autoplay='hoverIndex==index' arrow="never" height="148" :style="{'background':'#ddd'}" v-if='item.imgCover!=""'>
<el-carousel-item v-for="(img,imgIndex) in JSON.parse(item.imgCover)" :key="imgIndex" v-if='img.Url!=""'>
<img v-lazy='`${img.Url}?x-oss-process=image/resize,m_fill,h_148,w_200`' @click="goUrl('detail',item.id,item.tcid)">
</el-carousel-item>
</el-carousel>
<img v-else style="height:100%;width:100%" src='../../assets/img/banner@3x.png' />
</div>
<div class="contentbox">
<div class="title" @click="goUrl('detail',item.id,item.tcid)">{{item.title}}</div>
<div class="item-info">
<span>
<i class="iconfont icon-bb-chufadi"></i>出发地:{{item.startCityName?item.startCityName:'成都'}}
</span>
<span>
<i class="iconfont icon-bb-tuanqi"></i>最近团期:{{item.startDate}}
</span>
<span>
<i class="iconfont icon-bb-yuwei"></i>余位:{{item.surplus>10?"充足":`仅于${item.surplus}席`}}
</span>
<!-- <span class="down">
<i class="iconfont icon-bb-xiazai"></i>下载行
</span> -->
</div>
<div class="item-tag">
<el-tag type="danger">{{item.ltName}}</el-tag>
<!-- <el-tag type="success">早鸟立减</el-tag> -->
</div>
<div class="item-info">
<span>
<i class="iconfont icon-bb-rili"></i>
<div style="display:inline" v-for="(t,i) in item.dateArr" :key="i">{{t}} </div>
</span>
</div>
</div>
<div class="operabox">
<div class="huodong" :style="{'visibility':`${item.discountPrice>0?'visible':'hidden'}`}">
<span>早鸟优惠</span>
<span>立减{{item.discountPrice}}</span>
</div>
<div class="price">
{{isLogin!==1?item.b2CPrice:item.b2BPrice}}<span></span>
</div>
<el-button size='mini' @click="goUrl('detail',item.id,item.tcid)">立即预订</el-button>
</div>
</div>
<div class="item-pager" v-if='teamDatas.length>0'>
<el-pagination
background
layout="prev, pager, next, jumper"
:total="totalCount"
:page-size='pageSize'
@current-change='handleCurrentChange'>
</el-pagination>
</div>
<div class="empty-data" v-else>
<i class="iconfont icon-kong"></i>
很抱歉,你想要的信息我们真的找不到了
</div>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import moment from 'moment'
export default {
data () {
return {
type:'1',
lineChosen:'',
searchItem:[],
keywords:'',
companyId:-1,
lines:[],
xilies:[],
dates:[],
multData:[],
dayCount:[],
startCitys:[],
minPrice:'',
maxPrice:'',
orderindex:1,
ordertype:0,
hoverIndex:-1,
pageSize:20,
pageIndex:1,
teamDatas:[],
totalCount:0,
isLoading:false,
isLogin:1,
}
},
mounted () {
this.isLogin=this.$store.state.isLogin;
this.companyId=parseInt(localStorage.site)
this.searchItem.push('')
this.searchItem.push('')
this.searchItem.push('')
this.searchItem.push('')
this.searchItem.push('')
this.searchItem.push('')
this.keywords=decodeURIComponent(this.$route.query.keywords)
this.loadRecoItems()
this.loadDates()
this.loadDayCount()
},
methods: {
goUrl(path,id,tcid){
path = 'OneDayDetailTwo'
path=`${path}/${encodeURIComponent(id)}/`+tcid
this.$router.push({ path })
},
proving(){
this.minPrice=this.minPrice.replace(/[^\.\d]/g,'')
this.minPrice=this.minPrice.replace('.','')
this.maxPrice=this.maxPrice.replace(/[^\.\d]/g,'')
this.maxPrice=this.maxPrice.replace('.','')
},
loadTeamDataInit(){
this.isLoading=true
this.pageIndex=1
this.loadTeamData()
},
handleCurrentChange(val) {
this.isLoading=true
this.pageIndex=parseInt(val)
this.loadTeamData()
},
loadTeamData(){
// if(this.keywords=='') {
// this.Info('请输入搜索关键字')
// return
// }
let lineId=0,lineTeamId=0,minTripDay=-1,maxTripDay=-1,minPrice=-1,maxPrice=-1,startDate='',endDate='',startCityId=0
if(this.searchItem[0]!='' && this.searchItem[0]!='0') {
this.lines.forEach(x=>{
if(x.name==this.searchItem[0]){
lineId=x.id
}
})
}
if(this.searchItem[1]!='' && this.searchItem[1]!='0') {
this.xilies.forEach(x=>{
if(x.name==this.searchItem[1]){
lineTeamId=x.id
}
})
}
if(this.searchItem[4]!='' && this.searchItem[4]!='0'){
this.dayCount.forEach(x=>{
if(x.format==this.searchItem[4]){
minTripDay=x.min
maxTripDay=x.max
}
})
}
if(this.searchItem[2]!='' && this.searchItem[2]!='0') {
let i=this.dates.indexOf(this.searchItem[2])
let m=new Date().getMonth()+1
let y=new Date().getFullYear()
m+=i
if(m>12){
m=m-12
y+=1
}
startDate=`${y}-${m>9?m:'0'+m}-01`
endDate=`${y}-${m>9?m:'0'+m}-${new Date(y,m,0).getDate()}`
} else if(this.searchItem[5]!='' && this.searchItem[5]!='0') {
startDate=`20${multData[0]}`
endDate=`20${multData[1]}`
}
if(this.minPrice!=''){
minPrice=parseFloat(this.minPrice)
}
if(this.maxPrice!=''){
maxPrice=parseFloat(this.maxPrice)
if(minPrice>maxPrice){
this.Error('价格区间的最低价格不能低于最大价格')
this.isLoading=false
return false
}
}
if(this.searchItem[3]!='' && this.searchItem[3]!='0') {
this.startCitys.forEach(x=>{
if(x.startCityName==this.searchItem[3]){
startCityId=x.id
}
})
}
//startCitys
// {
// "id":1,
// "name":"同业会员价"
// },
// {
// "id":2,
// "name":"同业价格"
// },
// {
// "id":3,
// "name":"直客会员价"
// },
// {
// "id":4,
// "name":"直客价格"
// }
let msg={
pageIndex:this.pageIndex,
pageSize:this.pageSize,
searchKey:this.keywords,
cityId:0,
lineId,
lineTeamId,
minTripDay,
maxTripDay,
minPrice,
maxPrice,
startDate,
endDate,
orderByDate:this.orderindex==1?(this.ordertype==0?2:1):0,
orderByPrice:this.orderindex==2?(this.ordertype==0?2:1):0,
priceOrderByField:4,
companyId:this.companyId,
orderBySales:this.orderindex==3?(this.ordertype==0?2:1):0,
teamType: 2,
startCityId
}
let cmd='b2b_get_GetB2BTravelPageList'
this.apipost(cmd,msg,r=>{
this.teamDatas=r.data.data.pageData
this.totalCount=r.data.data.pageCount
this.isLoading=false
this.teamDatas.forEach(x=>{
x.dateArr=[]
x.startDates.split(',').forEach(y=>{
x.dateArr.push(moment(y).format('MM-DD'))
})
})
},null)
},
changeOrderType(i){
if(this.orderindex==i){
this.ordertype=this.ordertype==0?1:0
}else{
this.orderindex=i
this.ordertype=0
}
this.loadTeamDataInit()
},
loadDayCount(){
this.dayCount.push({min:1,max:1,format:'1天'})
this.dayCount.push({min:2,max:2,format:'2天'})
this.dayCount.push({min:3,max:3,format:'3天'})
this.dayCount.push({min:4,max:4,format:'4天'})
this.dayCount.push({min:5,max:5,format:'5天'})
this.dayCount.push({min:6,max:6,format:'6天'})
this.dayCount.push({min:7,max:8,format:'7-8天'})
this.dayCount.push({min:9,max:10,format:'9-10天'})
this.dayCount.push({min:10,max:null,format:'10天以上'})
},
multDataChange(){
let t=''
if(this.multData.length==2){
this.multData.forEach((x,index)=>{
t+=x
t+=index>0?'':'至'
})
this.$set(this.searchItem,5,t)
this.loadTeamDataInit()
}else{
this.$set(this.searchItem,5,t)
}
},
loadDates(){
let d=new Date().getMonth()
for(let i=0;i<3;i++){
d++
d=d>12?d-12:d
this.dates.push(`${d}月`)
}
},
changeXilie(tab, event){
if(this.searchItem[0]===''||this.searchItem[0]==='0'){
this.xilies=[]
this.$set(this.searchItem,1,'')
}else{
this.loadTeamDataInit()
this.lines.forEach(x=>{
if(this.searchItem[0]===x.name){
this.xilies=x.lineTeam
}
})
}
},
loadRecoItems(){
if(this.companyId!=-1){
this.apipost('b2b_get_GetGroupSearchItem',{'companyId':this.companyId},r=>{
this.lines=r.data.data.line
if(this.$route.query.lineId&&this.$route.query.lineteamId){
this.searchItem[0]=this.$route.query.lineId
this.searchItem[1]=this.$route.query.lineteamId
this.loadTeamDataInit()
this.changeXilie()
}else if(this.$route.query.lineId){
this.searchItem[0]=this.$route.query.lineId
this.changeXilie()
}else{
this.loadTeamDataInit()
}
this.startCitys=r.data.data.startCity
},null)
}
},
handleClose(i) {
this.$set(this.searchItem,i,'')
if(i==0){
this.xilies=[]
this.$set(this.searchItem,1,'')
}else if(i==5){
this.multData=[]
}
this.loadTeamDataInit()
}
}
}
</script>
<style>
@import url('../../assets/mall/swiper.css');
</style>
<template>
<div class="mall-swiper">
<el-carousel :interval="20000" arrow="never" :height="swiperHeight" trigger="click" :style="{'background':'#ddd'}" v-loading='isLoading'>
<el-carousel-item>
<img src='../../assets/img/01.jpg'>
</el-carousel-item>
<el-carousel-item>
<img src='../../assets/img/02.jpg'>
</el-carousel-item>
<el-carousel-item>
<img src='../../assets/img/03.jpg'>
</el-carousel-item>
<el-carousel-item>
<img src='../../assets/img/04.jpg'>
</el-carousel-item>
<el-carousel-item>
<img src='../../assets/img/05.jpg'>
</el-carousel-item>
<el-carousel-item>
<img src='../../assets/img/06.jpg'>
</el-carousel-item>
<el-carousel-item>
<img src='../../assets/img/07.jpg'>
</el-carousel-item>
<el-carousel-item>
<img src='../../assets/img/08.jpg'>
</el-carousel-item>
<el-carousel-item>
<img src='../../assets/img/09.jpg'>
</el-carousel-item>
<el-carousel-item>
<img src='../../assets/img/10.jpg'>
</el-carousel-item>
</el-carousel>
<div class="search-box" :style="{'width':searchBoxWidth,'left':searchBoxLeft}">
<div class="chosen-item">*旅游</div>
<div class="search-content">
<el-row>
<el-col :span="2" style="text-align:center">
<i class="iconfont icon-search"></i>
</el-col>
<el-col :span="15">
<input type="text" v-model='searchText' class="s-input" placeholder="快速搜索如出游国家,目的地名称等" @keyup.enter='goSearch'/>
</el-col>
<el-col :span="6" :offset="1" style="text-align:right;line-height:29px;">
<el-button type="danger" size="mini" @click="goSearch">立即搜索</el-button>
</el-col>
</el-row>
</div>
</div>
</div>
</template>
<script>
export default {
data () {
return {
swiperHeight:'500px',
searchBoxWidth:'580px',
searchBoxLeft:'270px',
swipers:[],
isLoading:true,
companyId:-1,
searchText:''
}
},
mounted () {
this.companyId=this.$store.state.site
this.changeScreen()
this.loadSwiper()
},
methods: {
goSearch(){
if(this.searchText!=''){
let query={keywords:encodeURIComponent(this.searchText)}
this.$router.push({
path:'OneDaySearch',
query
});
}else{
this.Error('请输入搜索关键词')
}
},
loadSwiper(){
if(this.companyId!=-1){
this.apipost('b2b_get_HomeSlide',{'companyId':this.companyId},r=>{
this.swipers=r.data.data
this.isLoading=false
},null)
}
},
changeScreen(){
let h=window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth
this.swiperHeight=h/3.84+'px'
this.searchBoxWidth=h/3.01+'px'
this.searchBoxLeft=(h-(h/3.01))/2+'px'
}
}
}
</script>
<style>
@import '../../assets/mall/heeltour.css';
</style>
<template>
<div class="heel-box">
<swiper />
<!-- <el-row>
<el-col :span="20" :offset="2">
<div class="hot_topics">
<table>
<tbody>
<tr>
<th>*热门主题</th>
<td><a href="javascript:" target="_blank" class="topics_color1"><strong>·</strong>海岛</a></td>
<td><a href="javascript:" target="_blank" class="topics_color2"><strong>·</strong>古镇</a></td>
<td><a href="javascript:" target="_blank" class="topics_color3"><strong>·</strong>迪士尼</a></td>
<td><a href="javascript:" target="_blank" class="topics_color4"><strong>·</strong>爸妈游</a></td>
<td><a href="javascript:" target="_blank" class="topics_color5"><strong>·</strong>亲子游</a></td>
<td><a href="javascript:" target="_blank" class="topics_color6"><strong>·</strong>草原</a></td>
<td><a href="javascript:" target="_blank" class="topics_color7"><strong>·</strong>沙滩</a></td>
<td><a href="javascript:" target="_blank" class="topics_color8"><strong>·</strong>乐园</a></td>
</tr>
</tbody>
</table>
</div>
</el-col>
</el-row> -->
<!-- <el-row>
<el-col :span="20" :offset="2">
<div class="title">
<div class="t1">
<img src="../../assets/img/img-title-red.png" />
<span class="t2">精品推荐</span>
<img src="../../assets/img/img-title-red.png" />
</div>
<el-tabs v-model="activeName">
<el-tab-pane :label="item.name" :name="`${item.id}`" v-for="(item,i) in recoItems.recommend" :key="i"></el-tab-pane>
</el-tabs>
</div>
</el-col>
</el-row> -->
<!-- <el-row v-if="activeName=='1'">
<el-col :span="20" :offset="2">
<div class="item-box">
<el-row :gutter="17">
<el-col :span="4" v-for='(item,index) in tehuis' :key="index" v-if='index<6'>
<div class="team-item" :style="{'height':`${itemHeight}`}" @click="goUrl('detail',item.id,item)">
<img class="notamin" v-if='item.imgCover!=null&&item.imgCover.length' :src='compressImg(JSON.parse(item.imgCover)[0].Url, "filt", 245, "")' />
<img class="notamin" src="../../assets/img/bg_c2@3x.png" v-else />
<div class="info-box">
<div class="item-title">{{item.ltName}}</div>
<div>
<span class="day">{{item.dataStr}} 出发</span>
<span class="price">{{isLogin!==1 ? item.b2CPrice : item.b2BPrice}}</span>
</div>
</div>
</div>
</el-col>
</el-row>
<el-row :gutter="17">
<el-col :span="4" v-for='(item,index) in tehuis' :key="index" v-if='index>5'>
<div class="team-item" :style="{'height':`${itemHeight}`}" @click="goUrl('detail',item.id,item)">
<img v-if="item.imgCover!=null&&item.imgCover.length" :src='compressImg(JSON.parse(item.imgCover)[0].Url, "filt", 245, "")' />
<div class="info-box">
<div class="item-title">{{item.ltName}}</div>
<div>
<span class="day">{{item.dataStr}} 出发</span>
<span class="price">{{isLogin!==1?item.b2CPrice:item.b2BPrice}}</span>
</div>
</div>
</div>
</el-col>
</el-row>
</div>
</el-col>
</el-row> -->
<el-row v-if="activeName=='2'">
<el-col :span="20" :offset="2">
<div class="item-box">
<el-row :gutter="17">
<el-col :span="4" v-for="(item,index) in tiaoshui" :key="index">
<div class="team-item noradius" :style="{'height':`${itemHeight}`}" @click="goUrl('detail',item.id, item)">
<img class="notamin" v-if='item.imgCover!=null&&item.imgCover.length' :src='compressImg(JSON.parse(item.imgCover)[0].Url, "filt", 245, "")' />
<img class="notamin" src="../../assets/img/bg_c2@3x.png" v-else />
<div class="company">
{{item.startCityName}}出发
</div>
<div class="limit">
跳水
</div>
</div>
<div class="info">
<div class="item-title"><a href="javascript:">{{item.title}}</a></div>
<div class="seat"><span class="day">{{item.dataStr}} </span>仅余{{item.surplus}}</div>
<div class="price">{{isLogin!==1?item.b2CPrice:item.b2BPrice}}<span class="ful"></span></div>
</div>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="20" :offset="2">
<div class="title">
<div class="t1">
<img src="../../assets/img/img-title-blue.png" />
<span class="t2">出境跟团游</span>
<img src="../../assets/img/img-title-blue.png" />
</div>
</div>
</el-col>
</el-row>
<el-row v-loading='loadingIndex==index' v-for="(item,index) in recoItems.line" :key="index" v-if="item.id==115" :style="{'margin-top':`${index>0?'50px':'10px'}`}">
<el-col :span="20" :offset="2">
<div class="title">
<div class="t1">
<span class="t2" style='font-size:20px'>{{item.name}}</span>
</div>
<el-tabs v-model="item.chosenLineTeam" style="max-width:70%" @tab-click="loadModuleDataNoLoop">
<el-tab-pane label="精选" :name="`0_${index}`"></el-tab-pane>
<el-tab-pane :label="lineItem.name" :name="`${lineItem.id}_${index}`" v-for="(lineItem,it) in item.lineTeam" :key="it"></el-tab-pane>
</el-tabs>
</div>
<div class="item-content-box none-margin">
<el-row style="background:#f1f1f1">
<el-col :span="4" >
<img src="../../assets/img/img-01.png" style="width:100%" v-if='item.name.indexOf("日本")!=-1'/>
<img src="../../assets/img/img-02.png" style="width:100%" v-else-if='item.name.indexOf("韩国")!=-1'/>
<img src="../../assets/img/img-03.png" style="width:100%" v-else />
<!-- <div class="tags">
<div v-for="tItem in item.ticketList" :key="tItem.id" @click="goSearch(tItem.name)"><span class="tag">{{tItem.name}}</span></div>
</div> -->
</el-col>
<el-col :span="20" style="padding-left:10px;position:relative;" :style="{'min-height':`${groupHeight}px`}" v-loading='item.pageDate==="undefined"'>
<div class="item-box">
<el-row :gutter="10">
<el-col :span="6" v-for='(data,index) in item.pageData' :key="index" >
<div class="group-item" :style="{'height':`${groupHeight}px`}" @click="goUrl('detail',data.id,data)">
<div class="team-item noradius" :style="{'height':`${groupItemHeight}`}">
<img class="notamin" v-if='data.imgCover!=null&&data.imgCover.length' :src='compressImg(JSON.parse(data.imgCover)[0].Url, "filt", 245, "")'/>
<img class="notamin" src="../../assets/img/bg_c2@3x.png" v-else />
<!-- <div class="seat" :style="{'left':`${(w-100)/2}px`,'top':`${(h-100)/2}px`}">
仅于<span class="cnt">3</span>
</div> -->
<div class="company">
{{data.startCityName}}出发
</div>
<div class="group-new" v-if='index<2'>
新团上市
</div>
</div>
<div class="info none-border">
<div class="item-title"><a href="javascript:" :style="{'font-size':`${groupHeight>400?'16px':'14px'}`}">{{data.title}}</a></div>
<div class="seatinfo" :style="{'margin-top':`${groupHeight>400?'0px':'-10px'}`}">
<div class="seat" style='font-size:12px;'>最近团期:<span style='font-size:14px; color:#795548;'>{{data.startDate}}</span></div>
<div class="day">{{data.dayNum}}</div>
</div>
<div v-if='groupHeight>400 && data.discountPrice>0'>
<el-tag type="danger">早鸟立减{{data.discountPrice}}</el-tag>
</div>
<div class="price">{{isLogin!==1?data.b2CPrice:data.b2BPrice}}<span class="ful"></span></div>
<div class="yuding" v-if='groupHeight>300'>
<el-button type="danger" size="small">预订</el-button>
</div>
</div>
</div>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import swiper from '@/components/mall/OneDaySwiper.vue'
import moment from 'moment'
export default {
components: {
swiper
},
data () {
return {
activeName:'1',
japActiveName:'1',
itemHeight:'0px',
groupItemHeight:'0px',
w:0,
h:0,
groupHeight:0,
site:0,
companyId:-1,
recoItems:[],
tehuis:[],
tiaoshui:[],
imgs:[],
isLogin:1,
loadingIndex:-1
}
},
created(){
this.loadSize();
this.companyId=localStorage.site
this.loadRecoItems();
this.isLogin=this.$store.state.isLogin
},
mounted () {
// this.apiJavaPost('/api/dmc/airticket/getB2BAirticketForMonthMinPrice',{"id":0,"flithtMonthDate":"2019-02","flight_number":"","airLineID":0,"ticketType":0,"lineId":0,"isPayOrder":0,"departure_city":0,"arrival_city":0,"freightSpace":0},res=>{
// console.log(res)
// },null)
},
methods: {
goSearch(txt){
let query={keywords:encodeURIComponent(txt)}
this.$router.push({
path:'OneDaySearch',
query
});
},
goUrl(path,id,obj){
path = 'OneDayDetailTwo'
path=`${path}/${encodeURIComponent(id)}/${obj.tcid}`;
this.$router.push({ path })
},
loadModuleDataNoLoop(tab, event){
let sno=tab.name.split('_')[1],ltId=tab.name.split('_')[0]
this.loadingIndex=sno
let msg={
pageIndex:1,
pageSize:4,
companyId:this.companyId,
lineId:115,
lineTeamId:ltId
}
this.apipost('b2b_get_GetB2BHomeLineTravelPageList',msg,r=>{
this.recoItems.line[sno].pageData=r.data.data.pageData
//this.$set(this.recoItems.line[sno],this.recoItems.line[sno])
this.loadingIndex=-1
},null)
},
loadRecoItems(){
if(this.companyId!=-1){
this.apipost('b2b_get_GetHomeSearchItem',{'companyId':this.companyId},r=>{
r.data.data.line.forEach(x=>{
x.chosenLineTeam='0'
})
this.recoItems=r.data.data
this.activeName=r.data.data.recommend[0].id.toString()
this.recoItems.line.forEach((x, index)=>{
if (x.id === 115) {
this.loadingIndex=index
let msg={
pageIndex:1,
pageSize:4,
companyId:this.companyId,
lineId:115,
lineTeamId:0
}
this.apipost('b2b_get_GetB2BHomeLineTravelPageList',msg,res=>{
this.recoItems.line[index].pageData=res.data.data.pageData
//this.$set(this.recoItems.line[sno],this.recoItems.line[sno])
this.loadingIndex=-1
},null)
}
})
},null)
}
},
loadSize(){
let w=screen.availWidth
w=w/24*20
w=w-(17*5)
w=w/6
this.itemHeight=w/1.5+'px'
this.w=Math.floor(w)
this.h=Math.floor((w/1.5))
// console.log(this.$refs.groupHeightId)
this.groupHeight=Math.floor(screen.availWidth*0.8333*0.1666/0.63)-6
w=screen.availWidth
w=w/24*20
w=w-(10*3)
w=w/4
this.groupItemHeight=w/1.8+'px'
}
}
}
</script>
<style>
@import url('../../../assets/trip/trade/index.css');
</style>
<template>
<div class="trade">
<div class="yuding">
<el-row>
<el-col class="_trip_xiangqing">
<template v-if='chosenObj.startDate!="" && chosenObj.startDate!=null && customer &&customer.customerId'>
<p>团期</p>
<div class="place-box">
<el-row :gutter="40">
<el-col :span="6"><i class="iconfont icon-icon06"></i>价格: {{trip.currentPriceInfo.b2BMemberPrice.toFixed(2)}}</el-col>
<el-col :span="6"><i class="iconfont icon-zuowei"></i>剩余席位: <span class="red">{{trip.currentPriceInfo.surplusCSeat+trip.currentPriceInfo.surplusFSeat+trip.currentPriceInfo.surplusYSeat}}</span></el-col>
<el-col :span="6"><i class="iconfont icon-lvkehoubu"></i>候补: <span class="red">暂不支持</span></el-col>
</el-row>
</div>
</template>
<el-col :span='4'>
<label>出发: </label>
<el-date-picker size="small" value-format='yyyy-MM-dd' v-model='chosenObj.startDate' type="date" placeholder="选择出发日期" :picker-options="pickerOptions" @change="changeStartDate(1)">
</el-date-picker>
</el-col>
<el-col :span='4'>
<label>成人</label>
<el-input-number :min="0" :max='sumSeat-chosenObj.etCount-chosenObj.lrCount' v-model="chosenObj.crCount" size="small"></el-input-number>
</el-col>
<el-col :span='12' style="color: #fff">
.
</el-col>
<!-- <el-col :span='4' v-show="false">
<label class="underline">儿童: </label>
<el-input-number :min="0" :max='sumSeat-chosenObj.crCount-chosenObj.lrCount-chosenObj.etbzcCount' v-model="chosenObj.etCount" size="small"></el-input-number>
</el-col>
<el-col :span='4'>
<label class="underline">儿童不占床: </label>
<el-input-number :min="0" :max='sumSeat-chosenObj.crCount-chosenObj.lrCount-chosenObj.etzc' v-model="chosenObj.etbzcCount" size="small"></el-input-number>
</el-col>
<el-col :span='4'>
<label class="underline">儿童占床: </label>
<el-input-number :min="0" :max='sumSeat-chosenObj.crCount-chosenObj.lrCount-chosenObj.etbzcCount' v-model="chosenObj.etzc" size="small"></el-input-number>
</el-col>
<el-col :span='4'>
<label>婴儿</label>:
<el-input-number :min="0" v-model="chosenObj.yeCount" size="small"></el-input-number>
</el-col> -->
<el-col :span='4' class="right-btn">
<span class="sumPrice" v-if='chosenObj.startDate && chosenObj.startDate!=""'><small></small>{{price}}</span>
<span class="sumPrice" v-if='!chosenObj.startDate || chosenObj.startDate==""'>--</span>
<el-button type="danger" size="small" @click="saveOrder" :loading="isCommit">
开始预订
</el-button>
</el-col>
</el-col>
<el-col class="_trip_xiangqing" v-if='chosenObj.startDate!="" && chosenObj.startDate!=null && customer && customer.customerId'>
<div class="place-box">
<el-row :gutter="40">
<el-col :span="6"><i class="iconfont icon-chengshi"></i>集合出发城市: {{trip.startCityName}}</el-col>
<el-col :span="6"><i class="iconfont icon-p-setplace"></i>集合详细地址: {{priceFlight.gatherAddress}}</el-col>
<el-col :span="6"><i class="iconfont icon-hanglixiang"></i>集合时间: {{priceFlight.startDate}} {{priceFlight.gatherTime}}</el-col>
<el-col :span="6"><i class="iconfont icon-chengshi"></i>返回抵达城市: {{trip.returnArriveCityName}}</el-col>
</el-row>
</div>
<div class="tips" v-if='chosenObj.isUnico'>注:价格出现提示为“提交订单后获取报价”,则表示该城市没有默认的联运报价,需要你提交订单以后进行实时报价</div>
<p v-if="zaoniao>0">早鸟优惠</p>
<div v-if="zaoniao>0">恭喜你成功领取到早鸟优惠,优惠金额为:¥<span class="red" style='font-size:18px'>{{zaoniao}}</span></div>
<p>备注</p>
<div>
<el-input v-model="chosenObj.remark" placeholder="你可以在此处输入需要备注的信息" rows="3" type='textarea' :autosize='{minRows:3,maxRows:30}'></el-input>
</div>
</el-col>
</el-row>
<div class="no-login" v-if="!this.customer">
需要你登录以后才能预定哦!登录后还能享受更加优惠的价格,<span class="link" @click="goLogin">立即登录吧</span>
</div>
</div>
</div>
</template>
<script>
import moment from 'moment'
import bus from '../../../plugins/event-bus'
export default {
props:['priceList','trip','numPeople'],
data () {
let that=this
return {
pickerOptions:{
disabledDate(time) {
let isHave=true
that.priceList.forEach(x=>{
if(x.startDate==moment(time).format('YYYY-MM-DD') && x.tcState==3) {
isHave=false
return false
}
})
return isHave
}
},
pickerOptionTwo:{
disabledDate(time) {
return time > new Date(that.chosenObj.startDate)
}
},
pickerOptionThr:{
disabledDate(time) {
return time < moment(that.chosenObj.startDate).add(that.trip.dayNum, 'days').valueOf()
}
},
provinces: [],
props: {
value: 'ID',
label:'Name',
children: 'cities'
},
chosenObj:{
startDate:'',
crCount:2,
etCount:0,
yeCount:0,
lrCount:0,
etbzcCount:0,
etzc:0,
df:0,
dcf:0,
srf:0,
isUnico:false,
unicoDep:{
city:null,
date:null,
price:0,
isSup:-2
},
unicoArr:{
city:null,
date:null,
price:0,
isSup:-2
},
remark:''
},
price:0,
priceFlight:{},
unicos:[],
customer:{},
zaoniao:0,
sumSeat:0,
isCommit:false
}
},
watch: {
chosenObj:{
handler(n,o){
this.calcMoney()
},
deep:true
},
"trip.currentPriceInfo":{
handler(n,o){
this.changeStartDate()
},
deep:true
},
},
mounted () {
this.getProvince()
this.getB2BSellByCustomerId()
},
created() {
bus.$on('chosen-tripdate',this.outGetTripDate)
},
methods: {
goLogin(){
this.$router.push({ path:'/login?type=1',query:{path:this.$route.name,id:encodeURIComponent(this.$route.params.id)} })
},
outGetTripDate(tripDate){
console.log(tripDate)
this.chosenObj.startDate=tripDate
this.changeStartDate()
},
changeStartDate(t){
if(this.chosenObj.startDate&&this.chosenObj.startDate!=''){
this.priceList.forEach(x=>{
if(x.startDate==this.chosenObj.startDate){
this.priceFlight=x
this.getUnicos()
}
})
this.chosenObj.crCount = 0
this.chosenObj.etbzcCount = 0
this.chosenObj.etzc = 0
this.chosenObj.etbzcCount = 0
this.sumSeat = this.trip.currentPriceInfo.surplusCSeat+this.trip.currentPriceInfo.surplusFSeat+this.trip.currentPriceInfo.surplusYSeat
}
if(t) {
bus.$emit('order-chosen', this.chosenObj.startDate)
}
},
calcMoney(){
this.chosenObj.etCount = this.chosenObj.etbzcCount + this.chosenObj.etzc
// console.log(this.chosenObj.etbzcCount + '----------'+ this.chosenObj.etzc)
// console.log(this.priceFlight.childNoNeedPrice)
if(!this.trip.currentPriceInfo.b2BMemberPrice){
this.priceList.forEach(x=>{
if(x.startDate==this.chosenObj.startDate){
this.priceFlight=x
}
})
}
let money=this.trip.currentPriceInfo.b2BMemberPrice*this.chosenObj.crCount
money+=this.trip.currentPriceInfo.b2BMemberPrice*this.chosenObj.etCount
money+=this.trip.currentPriceInfo.babyChargePrice*this.chosenObj.etCount
money+=this.trip.currentPriceInfo.childNeedPrice*this.chosenObj.etzc
if(this.chosenObj.etbzcCount>0)
money-=this.trip.currentPriceInfo.childNoNeedPrice*this.chosenObj.etbzcCount
money+=this.trip.currentPriceInfo.b2BMemberPrice*this.chosenObj.lrCount
money+=this.trip.currentPriceInfo.oldManChargePrice*this.chosenObj.lrCount
money+=this.trip.currentPriceInfo.babyPrice*this.chosenObj.yeCount
money+=this.trip.currentPriceInfo.singleRoomPrice*this.chosenObj.df
let sumCount=this.chosenObj.crCount+this.chosenObj.etCount+this.chosenObj.lrCount
money+=this.trip.currentPriceInfo.visaPrice*sumCount
money+=this.trip.currentPriceInfo.otherPrice*sumCount
if(this.trip.currentPriceInfo.discountPric && this.trip.currentPriceInfo.discountPric>0){
this.zaoniao=this.trip.currentPriceInfo.discountPrice*sumCount
}
money-=this.zaoniao
this.price=money
//unicoArr
//unicoDep
if(this.chosenObj.unicoDep.city && this.chosenObj.unicoDep.date){
this.apipost('sellorder_get_GetUnionTravelPrice',{
TCID:this.trip.currentPriceInfo.tcid,
StartCityId:this.chosenObj.unicoDep.city[this.chosenObj.unicoDep.city.length-1],
Type:1,
CityTime:this.chosenObj.unicoDep.date,
OrderId:0
},r=>{
this.chosenObj.unicoDep.isSup=r.data.data.IsUnion
this.chosenObj.unicoDep.price=r.data.data.Price
money+=r.data.data.Price*sumCount
this.price=money
})
}else{
this.chosenObj.unicoDep.isSup=-2
}
if(this.chosenObj.unicoArr.city && this.chosenObj.unicoArr.date){
this.apipost('sellorder_get_GetUnionTravelPrice',{
TCID:this.trip.currentPriceInfo.tcid,
StartCityId:this.chosenObj.unicoArr.city[this.chosenObj.unicoArr.city.length-1],
Type:1,
CityTime:this.chosenObj.unicoArr.date,
OrderId:0
},r=>{
this.chosenObj.unicoArr.isSup=r.data.data.IsUnion
this.chosenObj.unicoArr.price=r.data.data.Price
money+=r.data.data.Price*sumCount
this.price=money
})
}else{
this.chosenObj.unicoArr.isSup=-2
}
this.$forceUpdate()
},
saveOrder(){
if(!this.customer){
return this.$message.error('请登录!')
}
if(this.chosenObj.startDate==''){
this.Error("请选择团期")
return false
}
this.isCommit=true
let sumSeat=this.chosenObj.crCount+this.chosenObj.etCount+this.chosenObj.lrCount
if(sumSeat==0){
this.Error("请填写报名人数")
this.isCommit=false
return false
}
let nowPath = this.$route.path
if (nowPath.indexOf('OneDayDetailTwo')!==-1){
let ID = decodeURIComponent(this.$route.params.id)
let tcid = decodeURIComponent(this.$route.params.tcid)
let numPeople = {
crCount: this.chosenObj.crCount,
etCount: this.chosenObj.etCount,
lrCount: this.chosenObj.lrCount,
etbzcCount: this.chosenObj.etbzcCount,
etzc: this.chosenObj.etzc,
startDate: this.chosenObj.startDate,
remark: this.chosenObj.remark,
oneDay: 1,
}
this.$router.push({
path: '/OrderInvoiceTwo',
query: {id: encodeURIComponent(ID), tcid: tcid, numPeople: JSON.stringify(numPeople)}
})
return
}
let youhuiMoney=0
this.trip.lineTeamDiscountList.forEach(x=>{
if(x.startNum<=sumSeat&&sumSeat<=x.endNum){
youhuiMoney=x.discountAmount
return false
}
})
let y=0,f=0,c=0,fcnt=0
if(sumSeat>this.trip.currentPriceInfo.surplusYSeat){
y=this.trip.currentPriceInfo.surplusYSeat
sumSeat=this.prictrip.currentPriceInfoeFlight.surplusYSeat-sumSeat
}else{
y=sumSeat
sumSeat=0
}
if(sumSeat>0){
if(sumSeat>this.trip.currentPriceInfo.surplusFSeat){
f=this.trip.currentPriceInfo.surplusFSeat
sumSeat=this.trip.currentPriceInfo.surplusFSeat-sumSeat
}else{
f=sumSeat
sumSeat=0
}
}
if(sumSeat>0){
if(sumSeat>this.trip.currentPriceInfo.surplusYSeat){
c=this.trip.currentPriceInfo.surplusYSeat
sumSeat=this.trip.currentPriceInfo.surplusYSeat-sumSeat
}else{
c=sumSeat
sumSeat=0
}
}
let sumFang=this.chosenObj.crCount+this.chosenObj.etzc+this.chosenObj.lrCount
sumFang=sumFang-this.chosenObj.df-(this.chosenObj.dcf*2)-(this.chosenObj.srf*3)
if(sumFang>0){
fcnt=parseFloat(sumFang)/2.0+this.chosenObj.dcf+this.chosenObj.df+this.chosenObj.srf
}
fcnt+=this.chosenObj.dcf+this.chosenObj.df+this.chosenObj.srf
let msg={
OrderId:0,
TCID:this.trip.currentPriceInfo.tcid,
CustomerType:this.customer.gradeLevel,
GroupType:1,
ContactName:this.customer.customerName,
ContactMobile:this.customer.contactNumber,
CustomerId:this.customer.customerId,
DepartureCityId:this.chosenObj.unicoDep.city&&this.chosenObj.unicoDep.city.length>0?this.chosenObj.unicoDep.city[this.chosenObj.unicoDep.city.length-1]:this.trip.startCityId,
IsIntermodal:(this.chosenObj.unicoDep.city&&this.chosenObj.unicoDep.city.length>0&&this.chosenObj.unicoDep.date)?1:2,
Unit_Price:this.trip.currentPriceInfo.b2BMemberPrice,
TC_Price:this.trip.currentPriceInfo.b2BMemberPrice,
ManNum:this.chosenObj.crCount,
ChirdNum:this.chosenObj.etCount,
ChirdNeedBedNum:this.chosenObj.etzc,
BabyNum:this.chosenObj.yeCount,
OldPeopleNum:this.chosenObj.lrCount,
SingleRoomNum:this.chosenObj.df,
PreferPrice:this.price,
YSeatNum:y,
ESeatNum:f,
FSeatNum:c,
Commission:((parseFloat(youhuiMoney)/2.0)+(parseFloat(this.price)*0.01)).toFixed(2),//todo 提成
ClientSource:2,
BrandId:0,
TradeWay:0,
PlatformOrder:'',
GuestNum:this.chosenObj.crCount+this.chosenObj.etCount+this.chosenObj.lrCount,
IsChildrenTour:this.trip.currentPriceInfo.isSupportChildren,
IsBirdDiscount:this.zaoniao>0?1:2,
PredictRoomNum:fcnt,
BigRoomNum:this.chosenObj.dcf,
TripleRoomNum:this.chosenObj.srf,
TradeDate:moment().format('YYYY-MM-DD'),
CostType:0,
MinOrderPrice:0,
Remarks:this.chosenObj.remark,
VisaNum:this.chosenObj.crCount+this.chosenObj.etCount+this.chosenObj.lrCount,
SafeNum:this.chosenObj.crCount+this.chosenObj.etCount+this.chosenObj.lrCount,
AirticketNum:0,
ReturnArriveCityId:this.chosenObj.unicoArr.city&&this.chosenObj.unicoArr.city.length>0?this.chosenObj.unicoArr.city[this.chosenObj.unicoArr.city.length-1]:this.trip.returnArriveCityId,
IsReturnIntermodal:(this.chosenObj.unicoArr.city&&this.chosenObj.unicoArr.city.length>0&&this.chosenObj.unicoArr.date)?1:2,
GoCityTime:this.chosenObj.unicoDep.city&&this.chosenObj.unicoDep.city.length>0&&this.chosenObj.unicoDep.date?this.chosenObj.unicoDep.date:'',
BackCityTime:this.chosenObj.unicoArr.city&&this.chosenObj.unicoArr.city.length>0&&this.chosenObj.unicoArr.date?this.chosenObj.unicoArr.date:'',
ScenicRefundArr:[],
CommissionSharePeople:0,
CommissionShareMoney:0,
OrderSource:2
}
this.apipost("sellorder_post_SetOrderInfoForB2B",msg,
res => {
if(res.data.message=='操作成功!'){
this.$router.push({ path:'/PsOrder' })
}else{
this.Error(res.data.message)
}
},
err => {});
},
handleItemChange(val) {
let index=0
this.provinces.forEach((x,i)=>{
if(x.ID==val[0]){
index=i
return false
}
})
let msg = {
Id: val[0]
};
this.apipost(
"b2b_get_GetDestinationGetChildList",
msg,
res => {
res.data.data.forEach(x=>{
this.provinces[index].cities.push({
ID:x.ID,
Name:x.Name
})
})
},
err => {}
);
},
getProvince(val) {
let msg = {
Id: 2
};
this.apipost(
"b2b_get_GetDestinationGetChildList",
msg,
res => {
res.data.data.forEach(x=>{
this.provinces.push({
ID:x.ID,
Name:x.Name,
cities:[]
})
})
},
err => {}
);
},
getUnicos() {
let msg = {tcid:this.trip.currentPriceInfo.tcid}
this.apipost(
"b2b_get_GetTeamUnionInfo",
msg,
res => {
this.unicos = res.data.data
},
err => {}
);
},
getB2BSellByCustomerId(){
this.apipost('b2b_get_GetCustomerSummary',{},r=>{
if(r.data.resultCode==1){
this.customer = r.data.data
let msg = {customerId:r.data.data.customerId,lineId:this.trip.lineId}
this.apipost(
"app_customer_GetB2BSellByCustomerId",
msg,
res => {
},
err => {}
);
}else{
this.customer = null
}
},null)
// this.apipost(
// "app_customer_GetB2BSellByCustomerId",
// msg,
// res => {
// this.unicos = res.data.data
// },
// err => {}
// );
}
}
}
</script>
......@@ -189,8 +189,8 @@
<el-row>
<el-col class="_trip_xiangqing">
<template v-if='chosenObj.startDate!="" && chosenObj.startDate!=null && customer &&customer.customerId'>
<p >航班</p>
<div class="_info_trip" v-if='chosenObj.startDate!="" && chosenObj.startDate!=null && customer.customerId'>
<p v-if="numPeople.oneDay!==1">航班</p>
<div class="_info_trip" v-if='chosenObj.startDate!="" && chosenObj.startDate!=null && customer.customerId && numPeople.oneDay!==1'>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<th>航空公司</th>
......@@ -224,23 +224,25 @@
<label>成人</label>
<el-input-number :min="0" :max='sumSeat-chosenObj.etCount-chosenObj.lrCount' v-model="chosenObj.crCount" size="small"></el-input-number>
</el-col>
<el-col :span='4' v-show="false">
<el-col v-if="numPeople.oneDay!==1" :span='4' v-show="false">
<label class="underline">儿童: </label>
<el-input-number :min="0" :max='sumSeat-chosenObj.crCount-chosenObj.lrCount-chosenObj.etbzcCount' v-model="chosenObj.etCount" size="small"></el-input-number>
</el-col>
<el-col :span='4'>
<el-col v-if="numPeople.oneDay!==1" :span='4'>
<label class="underline">儿童不占床: </label>
<el-input-number :min="0" :max='sumSeat-chosenObj.crCount-chosenObj.lrCount-chosenObj.etzc' v-model="chosenObj.etbzcCount" size="small"></el-input-number>
</el-col>
<el-col :span='4'>
<el-col v-if="numPeople.oneDay!==1" :span='4'>
<label class="underline">儿童占床: </label>
<el-input-number :min="0" :max='sumSeat-chosenObj.crCount-chosenObj.lrCount-chosenObj.etbzcCount' v-model="chosenObj.etzc" size="small"></el-input-number>
</el-col>
<el-col :span='4'>
<el-col v-if="numPeople.oneDay!==1" :span='4'>
<label>婴儿</label>
<el-input-number :min="0" v-model="chosenObj.yeCount" size="small"></el-input-number>
</el-col>
<el-col v-if="numPeople.oneDay===1" style="color:#fff">
.
</el-col>
<!-- <el-col :span='4'>
<label>老人</label>:
<el-input-number :min="0" @change="peopleMax(3)" :max='sumSeat-chosenObj.etCount-chosenObj.crCount' v-model="chosenObj.lrCount" size="small"></el-input-number>
......
......@@ -57,6 +57,23 @@ export default new Router({
title: '团队详情-印象之旅~感动与世界同步'
}
},
{
path: "/OneDayDetailTwo/:id/:tcid",
name: "OneDayDetailTwo",
component: resolve =>
require(["@/components/mall/OneDayDetailTwo"], resolve),
meta: {
title: "团队详情-印象之旅~感动与世界同步"
}
},
{
path: '/OneDayDetailTwo/:id/:tcid/:pre',
name: 'OneDayDetailTwo',
component: resolve => require(['@/components/mall/OneDayDetailTwo'], resolve),
meta: {
title: '团队详情-印象之旅~感动与世界同步'
}
},
{
path: "/heel",
name: "heel",
......@@ -66,6 +83,15 @@ export default new Router({
title: "跟团游-印象之旅~感动与世界同步"
}
},
{
path: "/OneDayTour",
name: "OneDayTour",
component: resolve =>
require(["@/components/mall/OneDayTour"], resolve),
meta: {
title: "一日游-印象之旅~感动与世界同步"
}
},
{
path: "/coding",
name: "coding",
......@@ -82,6 +108,14 @@ export default new Router({
title: "搜索行程-印象之旅~感动与世界同步"
}
},
{
path: "/OneDaySearch",
name: "OneDaySearch",
component: resolve => require(["@/components/mall/OneDaySearch"], resolve),
meta: {
title: "搜索行程-印象之旅~感动与世界同步"
}
},
{
path: "/PersonalHome",
name: "PersonalHome",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment