Commit 03b6feab authored by 黄奎's avatar 黄奎

酒店查询修改

parent ad2a02ef
......@@ -5,12 +5,12 @@
<li>
<span>
<em>{{$t('system.quety_area')}}</em>
<el-select v-model="msg.Province" filterable @change="getProvinceList(msg.Province,2)"
:placeholder="$t('hotel.hotel_province')">
<el-select v-model="msg.Province" filterable @change="getCityList(msg.Province)"
:placeholder="$t('hotel.hotel_province')" clearable @clear="msg.Province=0,msg.City=0">
<el-option :key="0" :value="0" label="请选择"></el-option>
<el-option v-for="item in provinceList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
<el-select v-model="msg.City" filterable :placeholder="$t('hotel.hotel_city')">
<el-select v-model="msg.City" filterable :placeholder="$t('hotel.hotel_city')" clearable @clear="msg.City=0">
<el-option :key="0" :value="0" label="请选择"></el-option>
<el-option v-for="item in cityList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
......@@ -46,10 +46,10 @@
<span>
<em>酒店</em>
<el-input type="" v-model="msg.HotelName" placeholder="酒店名称"></el-input>
</span>
</li>
<li>
<input v-if="HOTEL_memorandum&&!pagesTitle" type="button" class="normalBtn" value="备忘录"
@click="goUrl('memorandumList')" />
......@@ -159,7 +159,7 @@
StartDate: this.getBeforeDate(0, new Date().Format("yyyy-MM-dd")),
EndDate: this.getBeforeDate(-30, this.getBeforeDate(0, new Date().Format("yyyy-MM-dd"))),
//只查询日本
Country: "651",
Country: "0",
Province: 0,
City: 0,
OutBranchId: -1,
......@@ -249,7 +249,8 @@
}
},
HOTEL_memorandum: false,
crmOrderObj: null
crmOrderObj: null,
userinfo: {}
};
},
watch: {
......@@ -318,6 +319,7 @@
},
getList() {
this.loading = true;
this.dataList=[];
if (this.msg.StartDate == null) {
this.msg.StartDate = this.getBeforeDate(-20, new Date().Format("yyyy-MM-dd"));
}
......@@ -340,11 +342,15 @@
},
//获取酒店列表
GetHotelList() {
var postMsg = {
QCountry: "0",
IsMoreThanZero: 1
}
if (this.userinfo && this.userinfo.RB_Group_id == 2) {
postMsg.QCountry = "651";
}
this.apipost(
"hotel_post_GetHasStockHotelList", {
QCountry: "651",
IsMoreThanZero: 1
},
"hotel_post_GetHasStockHotelList", postMsg,
res => {
if (res.data.resultCode == 1) {
this.HotelList = res.data.data;
......@@ -357,31 +363,36 @@
this.msg.pageIndex = val;
this.getList();
},
getProvinceList(ID, type) {
getCityList(ID) {
//根据省份获取城市
let msg = {
Id: ID
};
if (type == 1) {
this.msg.Province = 0;
this.msg.City = 0;
this.provinceList = [];
this.cityList = [];
} else if (type == 2) {
this.msg.City = 0;
this.cityList = [];
}
this.cityList = [];
this.apipost(
"dict_post_Destination_GetChildList",
msg,
res => {
if (type == 1) {
this.provinceList = res.data.data;
} else if (type == 2) {
this.cityList = res.data.data;
}
this.cityList = res.data.data;
},
);
},
getProvinceList(countryId) {
//根据省份获取城市
this.provinceList = [];
let msg = {
CodeLevel: 2,
ParentID: 0
};
if (countryId && countryId > 0) {
msg.ParentID = countryId;
}
this.apipost(
"dict_get_Destination_GetCityExtList",
msg,
res => {
this.provinceList = res.data.data;
},
err => {}
);
},
//Excel下载
......@@ -398,6 +409,9 @@
});
},
},
created() {
this.userinfo = this.getLocalStorage();
},
mounted() {
// crm自动登陆传过来的参数
if (this.$route.query.crmOrderObj) {
......@@ -405,12 +419,19 @@
}
this.HotelLength = localStorage.getItem("HotelLength") ? localStorage.getItem("HotelLength") : 0
let userinfo = this.getLocalStorage();
let ActionMenuCode = userinfo.ActionMenuCode;
let ActionMenuCode = this.userinfo.ActionMenuCode;
if (ActionMenuCode.indexOf("HOTEL_memorandum") != -1) {
this.HOTEL_memorandum = true;
}
this.getProvinceList("651", 1);
if (this.userinfo && this.userinfo.RB_Group_id == 2) {
this.getProvinceList(651, 1);
this.msg.Country = "651";
} else {
this.getProvinceList(0, 1);
this.msg.Country = "0";
}
this.getList();
this.com_onresize();
window.onresize = () => {
......
......@@ -202,17 +202,23 @@
let temp = r.data.data
temp.isDinner = temp.UseDinnerType && temp.UseDinnerType != ''
if (temp.isDinner) {
temp.Dinners = this.dinners.filter((x) => {
return temp.UseDinnerType.split(',').indexOf(x.Id.toString()) != -1
})
if (this.dinners && this.dinners.length > 0) {
temp.Dinners = this.dinners.filter((x) => {
return temp.UseDinnerType.split(',').indexOf(x.Id.toString()) != -1
})
}
}
temp.HotelTypeInfo = this.hotelTyps.find((x) => x.Id == temp.HotelType)
let tempService = JSON.parse(temp.FacilityServices)[0] ? JSON.parse(temp.FacilityServices)[0] : {}
temp.CheckHotelService = tempService.list.filter((x) => tempService.checked.indexOf(x.ID) != -1)
this.h = temp
this.h.List.forEach((x) => {
this.images.push(`http://imgfile.oytour.com${x.Path}`)
})
if (tempService && tempService.list && tempService.list.length > 0) {
temp.CheckHotelService = tempService.list.filter((x) => tempService.checked.indexOf(x.ID) != -1)
}
this.h = temp;
if (this.h && this.h.List && this.h.List.length > 0) {
this.h.List.forEach((x) => {
this.images.push(`http://imgfile.oytour.com${x.Path}`)
})
}
this.initMap(this.h.Lng, this.h.Lat, this.h.Name)
} else {
this.Error(r.data.message);
......
<template>
<div>
<el-table :data="dataList"
style="width:100%" border
ref="mytable" key="HotelId" :height="tableHeight">
<el-table :data="dataList" style="width:100%" border ref="mytable" key="HotelId" :height="tableHeight">
<el-table-column fixed label="酒店名称" min-width="180">
<template slot-scope="scope">
<div style="text-decoration: underline;cursor:pointer" @click="showHotelDetailHandler(scope.row.HotelId)">
......@@ -18,52 +16,51 @@
<div class="Hotel_kong">超定</div>
</template>
</el-table-column>
<el-table-column v-for='(item,index) in dataList[0].subList' :label="getDateList(item.DateStr)" :key='index'
min-width="120">
<template slot-scope="scope">
<div @click="showOrderSubmitHandler(scope.row,index,0)">
<div class="Hotel_kong Com_hoteldiv">
<template v-if="scope.row.subList[index].PriceList.length>0">
<template v-for="childItem in scope.row.subList[index].PriceList">
<div :class="getClass(1,childItem.InventoryType)"
:style="{width:(100/scope.row.subList[index].PriceList.length)+'%'}" class="CostPriceHover">
<el-popover
placement="bottom"
width="300"
trigger="hover">
<SamplePriceList
v-if="
<template v-if="dataList&&dataList.length>0">
<el-table-column v-for='(item,index) in dataList[0].subList' :label="getDateList(item.DateStr)" :key='index'
min-width="120">
<template slot-scope="scope">
<div @click="showOrderSubmitHandler(scope.row,index,0)">
<div class="Hotel_kong Com_hoteldiv">
<template v-if="scope.row.subList[index].PriceList.length>0">
<template v-for="childItem in scope.row.subList[index].PriceList">
<div :class="getClass(1,childItem.InventoryType)"
:style="{width:(100/scope.row.subList[index].PriceList.length)+'%'}" class="CostPriceHover">
<el-popover placement="bottom" width="300" trigger="hover">
<SamplePriceList v-if="
scope.row.subList[index].PriceList[0].BidroomPrice>0||
scope.row.subList[index].PriceList[0].SingleroomPrice>0||
scope.row.subList[index].PriceList[0].AddBedPrice>0||
scope.row.subList[index].PriceList[0].GuideRoomPrice>0" :price="scope.row.subList[index]"></SamplePriceList>
<div v-else style="text-align: center;width: 100%;">没有其他房型报价</div>
<span slot="reference" class="CostPriceHover">{{childItem.CostPrice}}</span>
</el-popover>
scope.row.subList[index].PriceList[0].GuideRoomPrice>0" :price="scope.row.subList[index]">
</SamplePriceList>
<div v-else style="text-align: center;width: 100%;">没有其他房型报价</div>
<span slot="reference" class="CostPriceHover">{{childItem.CostPrice}}</span>
</el-popover>
</div>
</template>
</template>
<template v-else>
<div :class="getClass(0,0)" style="width:100%;height:100%">&nbsp;</div>
</template>
</div>
</template>
</template>
<template v-else>
<div :class="getClass(0,0)" style="width:100%;height:100%">&nbsp;</div>
</template>
</div>
<div class="Hotel_kong Com_hoteldiv Hq_duoge">
{{scope.row.subList[index].Inventory}}/{{scope.row.subList[index].UseInventory}}/{{scope.row.subList[index].RemainingInventory}}
</div>
<div class="Hotel_kong Com_hoteldiv">
{{scope.row.subList[index].ConfirmNum}}/{{scope.row.subList[index].ReserveNum}}
</div>
<div class="Hotel_kong Com_hoteldiv">
<span v-if="scope.row.subList[index].UseInventory-scope.row.subList[index].Inventory>0"
style="color:red;">
{{scope.row.subList[index].UseInventory-scope.row.subList[index].Inventory}}
</span>
</div>
</div>
</template>
</el-table-column>
<div class="Hotel_kong Com_hoteldiv Hq_duoge">
{{scope.row.subList[index].Inventory}}/{{scope.row.subList[index].UseInventory}}/{{scope.row.subList[index].RemainingInventory}}
</div>
<div class="Hotel_kong Com_hoteldiv">
{{scope.row.subList[index].ConfirmNum}}/{{scope.row.subList[index].ReserveNum}}
</div>
<div class="Hotel_kong Com_hoteldiv">
<span v-if="scope.row.subList[index].UseInventory-scope.row.subList[index].Inventory>0"
style="color:red;">
{{scope.row.subList[index].UseInventory-scope.row.subList[index].Inventory}}
</span>
</div>
</div>
</template>
</el-table-column>
</template>
</el-table>
<!-- 酒店详情信息 -->
<el-dialog custom-class="w800" title="酒店详情" :visible.sync="showHotelDetails" center @close="close">
<hotelDetails :hotelId="HotelDetailId"></hotelDetails>
......@@ -74,8 +71,11 @@
import SamplePriceList from './SamplePriceList'
import hotelDetails from './hotelDetails'
export default {
components: { SamplePriceList,hotelDetails },
props:['list','tableHeight'],
components: {
SamplePriceList,
hotelDetails
},
props: ['list', 'tableHeight'],
data() {
return {
showHotelDetails: false,
......@@ -84,15 +84,15 @@
};
},
watch: {
list:{
handler(val, oldVal){
list: {
handler(val, oldVal) {
this.dataList = val
let _this = this
setTimeout(()=>{
setTimeout(() => {
this.$nextTick(() => {
_this.$refs.mytable.doLayout();
})
},200)
}, 200)
},
deep: true,
immediate: true,
......@@ -100,17 +100,17 @@
},
methods: {
// 酒店信息详情
showHotelDetailHandler(hotelId){
showHotelDetailHandler(hotelId) {
this.HotelDetailId = hotelId
this.showHotelDetails = true
},
// 取消
close(){
close() {
this.showHotelDetails = false
},
// 加入购物车
showOrderSubmitHandler(row,index,type){
this.$emit('showOrderSubmitHandler',row,index,type)
showOrderSubmitHandler(row, index, type) {
this.$emit('showOrderSubmitHandler', row, index, type)
},
//格式化返回显示日期
getDateList(dateStr) {
......@@ -156,7 +156,7 @@
},
},
mounted() {
}
};
......@@ -192,9 +192,11 @@
.classTe {
background-color: rgb(2, 247, 142);
}
.hotelQueryListclass6 {
background-color:#808000;
background-color: #808000;
}
.HouseTypeList {
background: #ccc;
width: 100%;
......@@ -290,12 +292,12 @@
.HotelQueryList .el-table td {
padding: 0;
}
.CostPriceHover{
height:100%;
float:left;
width:100%;
.CostPriceHover {
height: 100%;
float: left;
width: 100%;
cursor: pointer;
}
</style>
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