Commit 29563a15 authored by youjie's avatar youjie

酒店订单

parent 7801c501
...@@ -207,11 +207,14 @@ ...@@ -207,11 +207,14 @@
goDetails(item) { goDetails(item) {
let url = null let url = null
let msg = null let msg = null
// #ifdef MP-DI // #ifdef MP-DI
console.log(item.goodsType,'===========')
msg = `OrderNo=${item.orderNo}` msg = `OrderNo=${item.orderNo}`
if (item.goodsType > 0 && item.goodsType < 4) url = `jiuzhai/jz_SureOrder?` //线路 if (item.goodsType > 0 && item.goodsType < 4) url = `jiuzhai/jz_SureOrder?` //线路
else if (item.goodsType > 3 && item.goodsType < 8) { //景点门票 else if (item.goodsType > 3 && item.goodsType < 8) { //景点门票
} else if (item.goodsType > 7 && item.goodsType < 12) { //酒店住宿 } else if (item.goodsType > 7 && item.goodsType < 12) { //酒店住宿
url = `hotel/orderdetails?`
} else if (item.goodsType > 11 && item.goodsType < 15) { //目的地用车 } else if (item.goodsType > 11 && item.goodsType < 15) { //目的地用车
} else if (item.goodsType == 15) url = `visa/visa_SureOrder?` //签证 } else if (item.goodsType == 15) url = `visa/visa_SureOrder?` //签证
else if (item.goodsType == 16) url = `airTicket/airTicketOrderDetail?` //机票 else if (item.goodsType == 16) url = `airTicket/airTicketOrderDetail?` //机票
...@@ -221,6 +224,10 @@ ...@@ -221,6 +224,10 @@
if (item.goodsType == 2) url = `jiuzhai/jz_SureOrder?` //线路 if (item.goodsType == 2) url = `jiuzhai/jz_SureOrder?` //线路
else if (item.goodsType == 4) { //景点门票 else if (item.goodsType == 4) { //景点门票
} else if (item.goodsType == 3) { //酒店住宿 } else if (item.goodsType == 3) { //酒店住宿
} else if (item.goodsType == 7) { //酒店住宿
url = `hotel/orderdetails?`
} else if (item.goodsType == 5) { //目的地用车 } else if (item.goodsType == 5) { //目的地用车
} else if (item.goodsType == 6) url = `visa/visa_SureOrder?` //签证 } else if (item.goodsType == 6) url = `visa/visa_SureOrder?` //签证
else if (item.goodsType == 1) { //机票 else if (item.goodsType == 1) { //机票
......
...@@ -293,9 +293,7 @@ ...@@ -293,9 +293,7 @@
this.optionsTitle[2] = `价格/星级 ${num}`; this.optionsTitle[2] = `价格/星级 ${num}`;
this.tempRateAndPrice.rate = val.QStarRating this.tempRateAndPrice.rate = val.QStarRating
} }
if(this.MapType){
this.research()
}
} }
}, },
deep: true, deep: true,
...@@ -309,6 +307,13 @@ ...@@ -309,6 +307,13 @@
}, },
deep: true, deep: true,
immediate: true, immediate: true,
},
MapType: {
handler(val, oldval) {
if (val) {
this.research(2)
}
},
} }
}, },
onLoad(options) { onLoad(options) {
...@@ -343,12 +348,12 @@ ...@@ -343,12 +348,12 @@
this.parameters.CityCode2 = this.PopularCities[0].CityList[0].CityCode this.parameters.CityCode2 = this.PopularCities[0].CityList[0].CityCode
this.parameters.CityCode = this.PopularCities[0].CityList[0].CityCode this.parameters.CityCode = this.PopularCities[0].CityList[0].CityCode
this.parameters.KeyWords2= '' this.parameters.KeyWords2= ''
this.research() this.research(1)
}, },
searchClose() { searchClose() {
this.showSearchCity = false this.showSearchCity = false
this.showCityList = false this.showCityList = false
this.research() this.research(2)
}, },
searchKey(type, key, City) { searchKey(type, key, City) {
if (type == 1) { if (type == 1) {
...@@ -404,18 +409,18 @@ ...@@ -404,18 +409,18 @@
this.parameters.CityCode = this.parameters.CityCode2 = msg.CityCode2 this.parameters.CityCode = this.parameters.CityCode2 = msg.CityCode2
this.getRegion() this.getRegion()
this.city = this.parameters.CityName = msg.CityName this.city = this.parameters.CityName = msg.CityName
this.research() this.research(3)
} }
}, },
// 筛选排序 // 筛选排序
sureFilter() { sureFilter() {
this.$forceUpdate(); this.$forceUpdate();
this.closeDropdown(); this.closeDropdown();
this.research(); this.research(4);
}, },
resetFilter() { resetFilter() {
this.closeDropdown() this.closeDropdown()
this.research(); this.research(5);
}, },
// 位置排序 // 位置排序
sureRegion() { sureRegion() {
...@@ -425,7 +430,7 @@ ...@@ -425,7 +430,7 @@
this.city = this.parameters.CityName this.city = this.parameters.CityName
this.parameters.CityCode = this.parameters.regionCode ? this.parameters.regionCode : this.parameters this.parameters.CityCode = this.parameters.regionCode ? this.parameters.regionCode : this.parameters
.CityCode2 .CityCode2
this.research(); this.research(6);
}, },
resetRegion() { resetRegion() {
this.cityList = this.cityListAll this.cityList = this.cityListAll
...@@ -435,7 +440,7 @@ ...@@ -435,7 +440,7 @@
this.regionKeyWords = '' this.regionKeyWords = ''
if (this.parameters.CityCode != this.parameters.CityCode2) { if (this.parameters.CityCode != this.parameters.CityCode2) {
this.parameters.CityCode = this.parameters.CityCode2 this.parameters.CityCode = this.parameters.CityCode2
this.research(); this.research(7);
} }
}, },
showCity() { showCity() {
...@@ -453,7 +458,7 @@ ...@@ -453,7 +458,7 @@
if (this.tempRateAndPrice.priceId > 0) num++ if (this.tempRateAndPrice.priceId > 0) num++
if (num) this.optionsTitle[2] = `价格/星级 ${num}`; if (num) this.optionsTitle[2] = `价格/星级 ${num}`;
this.closeDropdown(); this.closeDropdown();
this.research(); this.research(8);
}, },
resetPrice() { resetPrice() {
this.optionsTitle[2] = "价格/星级"; this.optionsTitle[2] = "价格/星级";
...@@ -476,7 +481,7 @@ ...@@ -476,7 +481,7 @@
this.parameters.EndPrice = this.MaximumDatas.maxPrice; this.parameters.EndPrice = this.MaximumDatas.maxPrice;
this.parameters.QStarRating = [] this.parameters.QStarRating = []
this.closeDropdown(); this.closeDropdown();
this.research(); this.research(9);
}, },
rangechange(e) { rangechange(e) {
this.parameters.StartPrice = e.minValue this.parameters.StartPrice = e.minValue
...@@ -498,7 +503,7 @@ ...@@ -498,7 +503,7 @@
setTimeout(() => { setTimeout(() => {
this.closeDropdown() this.closeDropdown()
}, 300); }, 300);
this.research(); this.research(10);
}, },
// 星际级 // 星际级
setHotelRate(rateId) { setHotelRate(rateId) {
...@@ -525,7 +530,9 @@ ...@@ -525,7 +530,9 @@
closeDropdown() { closeDropdown() {
this.$refs.uDropdown.close(); this.$refs.uDropdown.close();
}, },
research() { research(type) {
this.parameters.pageIndex = 1;
// console.log(type,'-==--')
this.$emit('change', this.parameters); this.$emit('change', this.parameters);
}, },
//获取查询条件 //获取查询条件
...@@ -595,7 +602,7 @@ ...@@ -595,7 +602,7 @@
} }
this.getRegion() this.getRegion()
} }
if(!this.MapType)this.research() if(!this.MapType)this.research(1)
} }
}, },
(err) => {} (err) => {}
......
...@@ -190,7 +190,6 @@ ...@@ -190,7 +190,6 @@
this.day = this.dayObj.day; this.day = this.dayObj.day;
} }
this.MapType = options.MapType?options.MapType:0; this.MapType = options.MapType?options.MapType:0;
console.log(this.dayObj,'--------')
}, },
created() { created() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
...@@ -200,10 +199,7 @@ ...@@ -200,10 +199,7 @@
}, },
methods: { methods: {
getItem(parameters,obj) { getItem(parameters,obj) {
this.searchObj = { this.searchObj = parameters
...this.searchObj,
...parameters
}
this.dayObj = { this.dayObj = {
...obj, ...obj,
startTime: `${obj.year}-${obj.startDay}`, startTime: `${obj.year}-${obj.startDay}`,
...@@ -212,7 +208,11 @@ ...@@ -212,7 +208,11 @@
}, },
handleCalloutClick(marker) { handleCalloutClick(marker) {
console.log('点击了标记:', marker.detail); console.log('点击了标记:', marker.detail);
this.current = marker.detail.markerId-1 for (let i = 0; i < this.markers.length; i++) {
if(this.markers[i].id==marker.detail.markerId){
this.current = i
}
}
console.log(this.current,'----') console.log(this.current,'----')
this.setNewMarkers() this.setNewMarkers()
}, },
...@@ -262,20 +262,23 @@ ...@@ -262,20 +262,23 @@
}); });
}, },
changeCurrent(e) { changeCurrent(e) {
// console.log(e.detail.current,'--------',this.HotelList.length-1)
this.prevCurrent = this.current this.prevCurrent = this.current
this.current = e.detail.current; this.current = e.detail.current;
this.setNewMarkers() this.setNewMarkers()
if(this.HotelList.length-1==this.current&&this.searchObj.pageIndex < this.page_count){
let length = this.HotelList.length this.lower()
if((length-1)==this.current){ }else{
this.nextCurrent = 0 let length = this.HotelList.length
}else this.nextCurrent = this.current+1 if((length-1)==this.current){
this.nextCurrent = 0
}else this.nextCurrent = this.current+1
}
}, },
research() { research() {
this.searchObj.pageIndex = 1;
this.getList(1); this.getList(1);
}, },
lower(e) { lower() {
// TODO: 滚动到了底部,实现翻页加载 // TODO: 滚动到了底部,实现翻页加载
if (this.searchObj.pageIndex < this.page_count) { if (this.searchObj.pageIndex < this.page_count) {
this.status = "loading"; this.status = "loading";
...@@ -286,12 +289,11 @@ ...@@ -286,12 +289,11 @@
} }
}, },
change(item) { change(item) {
this.searchObj ={ this.searchObj = {
...this.searchObj,
...item, ...item,
} }
if(item.CityName) this.pageTitle = item.CityName if(item.CityName) this.pageTitle = item.CityName
this.research(); this.getList();
}, },
//获取列表数据 //获取列表数据
getList(type) { getList(type) {
...@@ -301,27 +303,32 @@ ...@@ -301,27 +303,32 @@
this.searchObj.QStars = this.tempRateAndPrice.rate.toString(); this.searchObj.QStars = this.tempRateAndPrice.rate.toString();
if (type == 1) { if (type == 1) {
this.HotelList = []; this.HotelList = [];
this.markers = []
this.includePoints.points = []
this.points = []
} }
this.markers = []
this.includePoints.points = []
this.points = []
this.apipost( "dmc_post_B2BAndB2CGetDidaHotelPage", this.searchObj, this.apipost( "dmc_post_B2BAndB2CGetDidaHotelPage", this.searchObj,
(res) => { (res) => {
uni.hideLoading()
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.showLoading = false this.showLoading = false
uni.hideLoading()
let length = 0
if (this.searchObj.pageIndex === 1) { if (this.searchObj.pageIndex === 1) {
this.HotelList = res.data.pageData; this.HotelList = res.data.pageData;
length = this.HotelList.length
} else { } else {
this.HotelList = this.HotelList.concat(res.data.pageData); this.HotelList = this.HotelList.concat(res.data.pageData);
length = this.HotelList.length
} }
this.setMarkers() this.setMarkers(res.data.pageData)
let length = this.HotelList.length
this.page_count = res.data.pageCount;
this.prevCurrent = length-1 this.prevCurrent = length-1
if((length-1)==this.current){ if((length-1)==this.current){
this.nextCurrent = 0 this.nextCurrent = 0
}else this.nextCurrent = this.current+1 }else this.nextCurrent = this.current+1
this.page_count = res.data.pageCount;
} }
}, },
(err) => { (err) => {
...@@ -330,8 +337,7 @@ ...@@ -330,8 +337,7 @@
} }
); );
}, },
setMarkers(){ setMarkers(pageData){
let pageData = this.HotelList
if(pageData.length==0)return if(pageData.length==0)return
for (let i = 0; i < pageData.length; i++) { for (let i = 0; i < pageData.length; i++) {
this.includePoints.points.push({ this.includePoints.points.push({
...@@ -345,7 +351,7 @@ ...@@ -345,7 +351,7 @@
let obj = JSON.parse(JSON.stringify(this.markersObj)) let obj = JSON.parse(JSON.stringify(this.markersObj))
obj = { obj = {
...obj, ...obj,
id: i+1, id: pageData[i].hotelid,
latitude: pageData[i].latitude, latitude: pageData[i].latitude,
longitude: pageData[i].longitude, longitude: pageData[i].longitude,
callout:{ callout:{
...@@ -354,7 +360,7 @@ ...@@ -354,7 +360,7 @@
...this.editCallout2 ...this.editCallout2
} }
} }
if(i==0){ if(i==0&&this.searchObj.pageIndex===1){
obj.callout = { obj.callout = {
...obj.callout, ...obj.callout,
...this.editCallout1 ...this.editCallout1
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<view class="row-sb-n"> <view class="row-sb-n">
<view class="row items-center"> <view class="row items-center">
<view class="time-item">{{getDate(dayObj.start)?getDate(dayObj.start):''}} <view class="time-item">{{getDate(dayObj.start)?getDate(dayObj.start):''}}
<text>今天</text> <text>{{ getWeek(dayObj.start) }}</text>
</view> </view>
<view class="time-itemZhi"><text>-</text></view> <view class="time-itemZhi"><text>-</text></view>
<view class="time-item">{{getDate(dayObj.end)}}</view> <view class="time-item">{{getDate(dayObj.end)}}</view>
...@@ -91,19 +91,11 @@ ...@@ -91,19 +91,11 @@
<view class="label"> <view class="label">
联系姓名 联系姓名
</view> </view>
<view class="val"> <view class="val row">
<input type="text" v-model="orderMsg.guestLastName" placeholder="请输入联系人姓名" /> <input type="text" v-model="orderMsg.SurName" placeholder="请输入姓" />
<input type="text" v-model="orderMsg.Name" placeholder="请输入名" />
</view> </view>
</view> </view>
<!--
<view class="form-items">
<view class="label">
联系人名
</view>
<view class="val">
<input type="text" v-model="orderMsg.guestFirstName" placeholder="请输入联系人名" />
</view>
</view> -->
<view class="form-items"> <view class="form-items">
<view class="label">联系电话</view> <view class="label">联系电话</view>
<view class="form-itemsL row" @click="showCountry=true"> <view class="form-itemsL row" @click="showCountry=true">
...@@ -425,6 +417,11 @@ ...@@ -425,6 +417,11 @@
this.initHotel() this.initHotel()
}, },
methods: { methods: {
getWeek(date) {
var weekArray = new Array("日", "一", "二", "三", "四", "五", "六");
var week = weekArray[new Date(date).getDay()]; //注意此处必须是先new一个Date
return "周" + week;
},
submitB2COrderHandler(OrderId) { submitB2COrderHandler(OrderId) {
let userInfo = uni.getStorageSync("mall_UserInfo"); let userInfo = uni.getStorageSync("mall_UserInfo");
let guestInfo = `成人x${this.searchObj.adultsNumber}; `; let guestInfo = `成人x${this.searchObj.adultsNumber}; `;
...@@ -736,8 +733,10 @@ ...@@ -736,8 +733,10 @@
} }
} }
} }
if (this.orderMsg.guestLastName == '') { if (this.orderMsg.SurName == '') {
msg = '请输入姓名' msg = '请输入姓'
} else if (this.orderMsg.Name == '') {
msg = '请输入名'
} else if (this.orderMsg.guestPhoneNumber == '') { } else if (this.orderMsg.guestPhoneNumber == '') {
msg = '请输入联系电话' msg = '请输入联系电话'
} else if (this.orderMsg.guestPhoneNumber && this.orderMsg.guestPhoneNumber.length != 11) { } else if (this.orderMsg.guestPhoneNumber && this.orderMsg.guestPhoneNumber.length != 11) {
......
This diff is collapsed.
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