Commit 97f27a83 authored by 黄奎's avatar 黄奎

11

parent 4598d7be
......@@ -6,6 +6,15 @@
<div class="flexOne">
<div class="query-box">
<ul>
<li>
<span>
<em>线路:</em>
<el-select class="w180 multiple_input" v-model="msg.LineId" clearable filterable @change="getHotelList">
<el-option v-for="item in LineList" :key="item.LineId" :label="item.LineName" :value="item.LineId">
</el-option>
</el-select>
</span>
</li>
<li>
<span>
<em>酒店名称:</em>
......@@ -43,9 +52,14 @@
<template slot-scope="scope">
<el-tooltip content="点击查看详情">
<span v-if="scope.row.priceType === '直客价'"
:style="{color: scope.row.SubList[index].Price <scope.row.SubList[index].TeamPrice ? 'red' : ''}"
:style="{color: scope.row.SubList[index].Price>0&&scope.row.SubList[index].Price <scope.row.SubList[index].TeamPrice ? 'red' : ''}"
@click="gotoPage(1,scope.row.SubList[index])" style="cursor:pointer;">
{{ scope.row.SubList[index].Price }}
<template v-if="scope.row.SubList[index].Price==0">
-
</template>
<template v-else>
{{ scope.row.SubList[index].Price }}
</template>
</span>
<span v-else @click="gotoPage(2,scope.row.SubList[index])" style="cursor:pointer;">
{{ scope.row.SubList[index].TeamPrice}}
......@@ -95,7 +109,15 @@
total: 0, //总条数
QStartDate: "",
QEndDate: "",
LineId: "",
},
LineList: [{
LineId: 14,
LineName: "日本线"
}, {
LineId: 1,
LineName: "东南亚线"
}],
userInfo: {}, //当前登录用户
dataList: [], //数据列表
hotelList: [], //酒店列表
......@@ -136,11 +158,14 @@
},
methods: {
gotoPage(type, item) {
//直客,天巡
//直客,天巡 变更为 Etrip
if (type == 1) {
var txUrl = "https://www.tianxun.com/hotels/search?entity_id=" + item.HotelId + "&checkin=" + item
.CheckInDate + "&checkout=" + item.CheckOutDate + "&adults=2&rooms=1&sort=-relevance";
window.open(txUrl);
var etripUrl = "https://search.etrip.net/Hotel/Search?hotelId=" + item.HotelId + "&checkIn=" + item
.CheckInDate + "&checkOut=" + item.CheckOutDate + "&rooms=2&userSearch=1"
window.open(etripUrl);
}
//道旅
else if (type == 2) {
......@@ -204,8 +229,15 @@
);
},
getHotelList() {
var hMsg = {
LineId: 0
};
if (this.msg.LineId && this.msg.LineId != 0) {
hMsg.LineId = this.msg.LineId;
}
this.hotelList = [];
this.apipost(
"AirTicket_post_GetSpiderHotelList", {},
"AirTicket_post_GetSpiderHotelList", hMsg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
......@@ -218,11 +250,6 @@
}
},
created() {
if (this.$route.query) {
// if (this.$route.query.AirticketId) {
// this.msg.AirticketId = this.$route.query.AirticketId;
// }
}
let myDate = new Date();
myDate.setDate(myDate.getDate() + 14);
let nowDate =
......@@ -232,7 +259,7 @@
"-" +
myDate.getDate();
this.msg.QStartDate = nowDate;
myDate.setMonth(myDate.getMonth() + 1); // 将当前时间的月份加1
this.msg.QEndDate = myDate.getFullYear() + "-" + parseInt(myDate.getMonth() + 1) + "-" + myDate
.getDate();
......
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