Commit 37b33e72 authored by youjie's avatar youjie

酒店

parents 5e45e1c7 391066a7
<style lang="scss" scoped> <style lang="scss" scoped>
@import url("@/asset/css/flex.css"); @import url("@/asset/css/flex.css");
.AggOrdBox{
.AggOrdBox {
height: 100vh; height: 100vh;
background: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772246864278108.jpg')no-repeat #F3F1EF; background: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772246864278108.jpg')no-repeat #F3F1EF;
background-size: 100% 240rpx; background-size: 100% 240rpx;
.AggOrdHeader{
.AggOrdHeader {
padding-bottom: 20rpx; padding-bottom: 20rpx;
// background: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772246864278108.jpg')no-repeat; // background: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772246864278108.jpg')no-repeat;
// background-size: 100% 100%; // background-size: 100% 100%;
} }
.AggOrdStatus{
.AggOrdStatus {
padding-top: 20rpx; padding-top: 20rpx;
.AggOrdT{
.AggOrdT {
width: 25%; width: 25%;
padding: 10rpx 20rpx; padding: 10rpx 20rpx;
font-size: 28rpx; font-size: 28rpx;
color: #080A09; color: #080A09;
position: relative; position: relative;
} }
.AggOrdT.active{
.AggOrdT.active {
color: #B99846; color: #B99846;
font-weight: bold; font-weight: bold;
} }
.AggOrdT text{
.AggOrdT text {
display: block; display: block;
text-align: center; text-align: center;
} }
.AggOrdT view{
.AggOrdT view {
position: absolute; position: absolute;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
} }
.AggOrdT view view{
.AggOrdT view view {
width: 60rpx; width: 60rpx;
height: 10rpx; height: 10rpx;
margin: auto; margin: auto;
...@@ -42,36 +50,31 @@ ...@@ -42,36 +50,31 @@
} }
} }
/deep/.showModalInfo .u-drawer-bottom{
background-color: rgba(23,23,23,0) !important; /deep/.showModalInfo .u-drawer-bottom {
background-color: rgba(23, 23, 23, 0) !important;
} }
</style> </style>
<template> <template>
<view class="AggOrdBox column"> <view class="AggOrdBox column">
<view class="AggOrdHeader" :style="[titleStyle]"> <view class="AggOrdHeader" :style="[titleStyle]">
<AggOrdHeader :title="pageTitle" <AggOrdHeader :title="pageTitle" @change="getOrderType" :params="msg"></AggOrdHeader>
@change="getOrderType"
:params="msg"></AggOrdHeader>
<view class="AggOrdStatus row items-center"> <view class="AggOrdStatus row items-center">
<template> <template>
<view class="AggOrdT" <view class="AggOrdT" v-for="(item,index) in statusList" :key="index"
v-for="(item,index) in statusList" :class="[msg.OrderStatus==item.ID?'active':'']" @click="getStatus(item.ID)">
:key="index"
:class="[msg.OrderStatus==item.ID?'active':'']"
@click="getStatus(item.ID)">
<text>{{ item.Name }}</text> <text>{{ item.Name }}</text>
</view> </view>
</template> </template>
</view> </view>
</view> </view>
<view class="col" style="height: 1px;flex: 1;overflow: hidden;padding-top: 10rpx;"> <view class="col" style="height: 1px;flex: 1;overflow: hidden;padding-top: 10rpx;">
<scroll-view :scroll-y="true" <scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower"
:enable-back-to-top="true" style="height: 100%;">
:enable-flex="true"
@scrolltolower="lower" style="height: 100%;">
<orders :orders="g" @research="research"></orders> <orders :orders="g" @research="research"></orders>
<u-empty v-if="g.length==0" text="暂无数据" mode="data" padding-top="20"></u-empty> <u-empty v-if="g.length==0" text="暂无数据" mode="data" padding-top="20"></u-empty>
<u-loadmore v-else :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20" bg-color="#F3F1EF" /> <u-loadmore v-else :status="status" :load-text="loadText" :font-size="24" :margin-top="20"
:margin-bottom="20" bg-color="#F3F1EF" />
<view style="width: 100%;height: 20rpx;"></view> <view style="width: 100%;height: 20rpx;"></view>
</scroll-view> </scroll-view>
</view> </view>
...@@ -79,22 +82,25 @@ ...@@ -79,22 +82,25 @@
</template> </template>
<script> <script>
import {mappingListType,mappingListTypeTy} from "../../utils/producttypeenum"; import {
mappingListType,
mappingListTypeTy
} from "../../utils/producttypeenum";
import EnumHelper from '../../utils/enumhelper'; import EnumHelper from '../../utils/enumhelper';
import OrderStatusEnum from '../../utils/orderStautsEnum'; import OrderStatusEnum from '../../utils/orderStautsEnum';
import AggOrdHeader from "./components/header.vue"; import AggOrdHeader from "./components/header.vue";
import orders from "./components/orders.vue"; import orders from "./components/orders.vue";
export default{ export default {
components: { components: {
AggOrdHeader, AggOrdHeader,
orders, orders,
}, },
data(){ data() {
return{ return {
pageTitle: '所有订单', pageTitle: '所有订单',
msg:{ msg: {
pageSize:10, pageSize: 10,
pageIndex:1, pageIndex: 1,
OrderStatus: 0, OrderStatus: 0,
GoodsName: '', GoodsName: '',
OrderTypeStr: '' OrderTypeStr: ''
...@@ -106,19 +112,19 @@ ...@@ -106,19 +112,19 @@
}, },
status: "loadmore", status: "loadmore",
showModal: false, showModal: false,
barshow:0, barshow: 0,
statusList: [], statusList: [],
g: [], g: [],
page_count: 1, page_count: 1,
index: 0, index: 0,
payindex: 0, payindex: 0,
showAuth: false, showAuth: false,
titleStyle:{}, titleStyle: {},
} }
}, },
onLoad(options){ onLoad(options) {
if(options.OrderTypeStr)this.msg.OrderTypeStr = options.OrderTypeStr if (options.OrderTypeStr) this.msg.OrderTypeStr = options.OrderTypeStr
if(options.OrderStatus)this.msg.OrderStatus = options.OrderStatus if (options.OrderStatus) this.msg.OrderStatus = options.OrderStatus
this.research() this.research()
}, },
created() { created() {
...@@ -131,15 +137,14 @@ ...@@ -131,15 +137,14 @@
}, },
}); });
this.getOrderEnums() this.getOrderEnums()
}, },
methods:{ methods: {
getStatus(ID){ getStatus(ID) {
this.msg.OrderStatus=ID this.msg.OrderStatus = ID
this.research() this.research()
}, },
research(status){ research(status) {
if(status)this.msg.OrderStatus = status; if (status) this.msg.OrderStatus = status;
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.msg.pageSize = 10; this.msg.pageSize = 10;
this.status = "loadmore"; this.status = "loadmore";
...@@ -147,12 +152,12 @@ ...@@ -147,12 +152,12 @@
this.g = []; this.g = [];
this.init() this.init()
}, },
getOrderType(item){ getOrderType(item) {
this.msg.OrderTypeStr = item.Id this.msg.OrderTypeStr = item.Id
this.pageTitle = item.Name this.pageTitle = item.Name
this.research() this.research()
}, },
init(){ init() {
uni.showLoading({ uni.showLoading({
title: '加载中...' title: '加载中...'
}) })
...@@ -163,19 +168,20 @@ ...@@ -163,19 +168,20 @@
this.OrderPageTY(); this.OrderPageTY();
// #endif // #endif
}, },
OrderPageTY(){ OrderPageTY() {
this.apipost('b2b_get_GetB2BAllOrderPageList',this.msg, this.apipost('b2b_get_GetB2BAllOrderPageList', this.msg,
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
uni.hideLoading() uni.hideLoading()
res.data.pageData.forEach(x=>{ res.data.pageData.forEach(x => {
// #ifdef MP-DI // #ifdef MP-DI
x.goodTypeEnum = mappingListType(x.goodsType) x.goodTypeEnum = mappingListType(x.goodsType)
// #endif // #endif
// #ifdef MP-AG // #ifdef MP-AG
x.goodTypeEnum = mappingListTypeTy(x.goodsType) x.goodTypeEnum = mappingListTypeTy(x.goodsType)
// #endif // #endif
x.orderStatusInfo = EnumHelper.ParseToEnum(OrderStatusEnum,x.orderStatus,'value') x.orderStatusInfo = EnumHelper.ParseToEnum(OrderStatusEnum, x.orderStatus,
'value')
}) })
this.g = this.g.concat(res.data.pageData); this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
...@@ -189,14 +195,15 @@ ...@@ -189,14 +195,15 @@
} }
); );
}, },
OrderPageZK(){ OrderPageZK() {
this.apipost('GetMyDirectOrderPageList_post',this.msg, this.apipost('GetMyDirectOrderPageList_post', this.msg,
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
uni.hideLoading() uni.hideLoading()
res.data.pageData.forEach(x=>{ res.data.pageData.forEach(x => {
x.goodTypeEnum = mappingListType(x.goodsType) x.goodTypeEnum = mappingListType(x.goodsType)
x.orderStatusInfo = EnumHelper.ParseToEnum(OrderStatusEnum,x.orderStatus,'value') x.orderStatusInfo = EnumHelper.ParseToEnum(OrderStatusEnum, x.orderStatus,
'value')
}) })
this.g = this.g.concat(res.data.pageData); this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
...@@ -221,23 +228,25 @@ ...@@ -221,23 +228,25 @@
}, },
getOrderEnums() { getOrderEnums() {
this.apipost( this.apipost(
"GetDirectOrderStatusEnum_post", "GetDirectOrderStatusEnum_post", {},
{},
(res) => { (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
// #ifdef MP-DI // #ifdef MP-DI
this.statusList = res.data.filter(x=>x.ID!=4); this.statusList = res.data.filter(x => x.ID != 4);
// #endif // #endif
// #ifdef MP-AG // #ifdef MP-AG
this.statusList = res.data.filter(x=>x.ID!=5); this.statusList = res.data.filter(x => x.ID != 5);
// #endif // #endif
this.statusList.splice(0,0,{ID:0,Name:'全部'}) this.statusList.splice(0, 0, {
this.statusList.forEach(x=>{ ID: 0,
if(x.Name=='已付款') x.Name = '待出行' Name: '全部'
})
this.statusList.forEach(x => {
if (x.Name == '已付款') x.Name = '待出行'
}) })
} }
}, },
err=>{ err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
icon: "none", icon: "none",
...@@ -248,4 +257,3 @@ ...@@ -248,4 +257,3 @@
}, },
} }
</script> </script>
\ No newline at end of file
<style lang="scss" scoped> <style lang="scss" scoped>
@import url("@/asset/css/flex.css"); @import url("@/asset/css/flex.css");
.AggOrdBox{
.AggOrdBox {
height: 100vh; height: 100vh;
background: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772246864278108.jpg')no-repeat #F3F1EF; background: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772246864278108.jpg')no-repeat #F3F1EF;
background-size: 100% 240rpx; background-size: 100% 240rpx;
.AggOrdHeader{
} .AggOrdHeader {}
.AggOrdStatus{
.AggOrdStatus {
padding-top: 10rpx; padding-top: 10rpx;
.AggOrdT{
.AggOrdT {
width: 25%; width: 25%;
padding: 10rpx 20rpx; padding: 10rpx 20rpx;
font-size: 28rpx; font-size: 28rpx;
color: #080A09; color: #080A09;
position: relative; position: relative;
} }
.AggOrdT.active{
.AggOrdT.active {
font-weight: bold; font-weight: bold;
} }
.AggOrdT text{
.AggOrdT text {
display: block; display: block;
text-align: center; text-align: center;
} }
.AggOrdT view{
.AggOrdT view {
position: absolute; position: absolute;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
} }
.AggOrdT view view{
.AggOrdT view view {
width: 60rpx; width: 60rpx;
height: 10rpx; height: 10rpx;
margin: auto; margin: auto;
...@@ -37,22 +43,26 @@ ...@@ -37,22 +43,26 @@
border-radius: 10rpx; border-radius: 10rpx;
} }
} }
.AggregateTitle{
.AggregateTitle {
padding: 40rpx 30rpx 40rpx 30rpx; padding: 40rpx 30rpx 40rpx 30rpx;
font-size: 36rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
text-align: left; text-align: left;
} }
.AggregateTypeBox{
.AggregateTypeBox {
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 15rpx; padding: 0 15rpx;
} }
.AggregateType{
.AggregateType {
width: 33.33%; width: 33.33%;
padding: 0 15rpx; padding: 0 15rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.AggregateType view{
.AggregateType view {
display: block; display: block;
padding: 10rpx 0 15rpx 35rpx; padding: 10rpx 0 15rpx 35rpx;
background: #E3E6D2; background: #E3E6D2;
...@@ -60,7 +70,8 @@ ...@@ -60,7 +70,8 @@
border: 1rpx solid #E3E6D2; border: 1rpx solid #E3E6D2;
overflow: hidden; overflow: hidden;
} }
.AggregateType img{
.AggregateType img {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
display: inline-block; display: inline-block;
...@@ -68,10 +79,12 @@ ...@@ -68,10 +79,12 @@
top: 10rpx; top: 10rpx;
right: 20rpx; right: 20rpx;
} }
.AggregateType text{
.AggregateType text {
display: inline-block; display: inline-block;
} }
.AggregateType.active view{
.AggregateType.active view {
border: 1rpx solid #B99846; border: 1rpx solid #B99846;
} }
} }
...@@ -79,19 +92,16 @@ ...@@ -79,19 +92,16 @@
<template> <template>
<view class="AggOrdBox column"> <view class="AggOrdBox column">
<view class="AggOrdHeader" :style="[titleStyle]"> <view class="AggOrdHeader" :style="[titleStyle]">
<AggOrdSearch <AggOrdSearch @change="change" :params="msg"></AggOrdSearch>
@change="change"
:params="msg"></AggOrdSearch>
</view> </view>
<view class="col" style="height: 1px;flex: 1;overflow: hidden;padding-top: 40rpx;"> <view class="col" style="height: 1px;flex: 1;overflow: hidden;padding-top: 40rpx;">
<view v-if="!msg.keyword"> <view v-if="!msg.keyword">
<view class="AggregateTitle">订单类型</view> <view class="AggregateTitle">订单类型</view>
<view class="AggregateTypeBox row"> <view class="AggregateTypeBox row">
<view class="AggregateType" v-for="(item,index) in orderTypeList" :key="index" <view class="AggregateType" v-for="(item,index) in orderTypeList" :key="index"
:class="[msg.OrderTypeStr==item.Id?'active':'']" :class="[msg.OrderTypeStr==item.Id?'active':'']" @click="getTypeId(item)">
@click="getTypeId(item)">
<view class="row"> <view class="row">
<img :src="item.icon"/> <img :src="item.icon" />
<text> <text>
{{ item.Name }} {{ item.Name }}
</text> </text>
...@@ -100,13 +110,12 @@ ...@@ -100,13 +110,12 @@
</view> </view>
</view> </view>
</view> </view>
<scroll-view v-else :scroll-y="true" <scroll-view v-else :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower"
:enable-back-to-top="true" style="height: 100%;">
:enable-flex="true"
@scrolltolower="lower" style="height: 100%;">
<orders :orders="g"></orders> <orders :orders="g"></orders>
<u-empty v-if="g.length==0" text="暂无数据" mode="data" padding-top="20"></u-empty> <u-empty v-if="g.length==0" text="暂无数据" mode="data" padding-top="20"></u-empty>
<u-loadmore v-else :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20" bg-color="#F3F1EF" /> <u-loadmore v-else :status="status" :load-text="loadText" :font-size="24" :margin-top="20"
:margin-bottom="20" bg-color="#F3F1EF" />
<view style="width: 100%;height: 20rpx;"></view> <view style="width: 100%;height: 20rpx;"></view>
</scroll-view> </scroll-view>
</view> </view>
...@@ -118,21 +127,24 @@ ...@@ -118,21 +127,24 @@
</template> </template>
<script> <script>
import {mappingListType,mappingListTypeTy} from "../../utils/producttypeenum"; import {
mappingListType,
mappingListTypeTy
} from "../../utils/producttypeenum";
import EnumHelper from '../../utils/enumhelper'; import EnumHelper from '../../utils/enumhelper';
import OrderStatusEnum from '../../utils/orderStautsEnum'; import OrderStatusEnum from '../../utils/orderStautsEnum';
import AggOrdSearch from "./components/searchHeader.vue"; import AggOrdSearch from "./components/searchHeader.vue";
import orders from "./components/orders.vue"; import orders from "./components/orders.vue";
export default{ export default {
components: { components: {
AggOrdSearch, AggOrdSearch,
orders, orders,
}, },
data(){ data() {
return{ return {
msg:{ msg: {
pageSize:10, pageSize: 10,
pageIndex:1, pageIndex: 1,
OrderStatus: 0, OrderStatus: 0,
GoodsName: '', GoodsName: '',
OrderTypeStr: '', OrderTypeStr: '',
...@@ -145,7 +157,7 @@ ...@@ -145,7 +157,7 @@
}, },
status: "loadmore", status: "loadmore",
showModal: false, showModal: false,
barshow:0, barshow: 0,
g: [], g: [],
page_count: 1, page_count: 1,
index: 0, index: 0,
...@@ -186,7 +198,7 @@ ...@@ -186,7 +198,7 @@
Name: '景点门票' Name: '景点门票'
} }
], ],
icons:[ icons: [
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772246968492575.jpg', 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772246968492575.jpg',
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772247052998903.jpg', 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772247052998903.jpg',
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772247084971514.jpg', 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772247084971514.jpg',
...@@ -197,8 +209,8 @@ ...@@ -197,8 +209,8 @@
titleStyle: {}, titleStyle: {},
} }
}, },
onLoad(options){ onLoad(options) {
if(options.OrderTypeStr){ if (options.OrderTypeStr) {
this.msg.OrderTypeStr = options.OrderTypeStr this.msg.OrderTypeStr = options.OrderTypeStr
} }
}, },
...@@ -215,26 +227,32 @@ ...@@ -215,26 +227,32 @@
this.getEnumList() this.getEnumList()
// #endif // #endif
}, },
methods:{ methods: {
getEnumList() { getEnumList() {
this.apipost("CarSingle_post_GetOrderTypeEnumList", {}, (res) => { this.apipost("CarSingle_post_GetOrderTypeEnumList", {}, (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.orderTypeList = [] this.orderTypeList = []
res.data.forEach(x=>{ res.data.forEach(x => {
if(x.Name=='团队'){ x.Name = '线路' } if (x.Name == '团队') {
if(x.Name!='Jalan酒店'){ x.Name = '线路'
}
if (x.Name != 'Jalan酒店') {
let icon = '' let icon = ''
if(x.Id=='1') icon = this.icons[1] if (x.Id == '1') icon = this.icons[1]
if(x.Id=='2') icon = this.icons[0] if (x.Id == '2') icon = this.icons[0]
if(x.Id=='3') icon = this.icons[3] if (x.Id == '3') icon = this.icons[3]
if(x.Id=='4') icon = this.icons[5] if (x.Id == '4') icon = this.icons[5]
if(x.Id=='5') icon = this.icons[4] if (x.Id == '5') icon = this.icons[4]
if(x.Id=='6') icon = this.icons[2] if (x.Id == '6') icon = this.icons[2]
let obj = { let obj = {
Id: x.Id, Id: x.Id,
Name: x.Name +'订单', Name: x.Name + '订单',
icon: icon icon: icon
} }
//酒店切换为道旅酒店
if (obj.Id == '3') {
obj.Id = '7';
}
this.orderTypeList.push(obj) this.orderTypeList.push(obj)
} }
}) })
...@@ -246,7 +264,7 @@ ...@@ -246,7 +264,7 @@
}); });
}) })
}, },
research(){ research() {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.msg.pageSize = 10; this.msg.pageSize = 10;
this.status = "loadmore"; this.status = "loadmore";
...@@ -259,16 +277,16 @@ ...@@ -259,16 +277,16 @@
this.msg.keyword = item.Name this.msg.keyword = item.Name
this.research() this.research()
}, },
change(item){ change(item) {
this.msg.keyword = item.keyword this.msg.keyword = item.keyword
this.msg.OrderTypeStr = item.OrderTypeStr this.msg.OrderTypeStr = item.OrderTypeStr
this.research() this.research()
}, },
init(){ init() {
if(!this.msg.keyword) return if (!this.msg.keyword) return
if(!this.msg.OrderTypeStr) { if (!this.msg.OrderTypeStr) {
this.msg.GoodsName = this.msg.keyword this.msg.GoodsName = this.msg.keyword
}else { } else {
this.msg.GoodsName = '' this.msg.GoodsName = ''
} }
uni.showLoading({ uni.showLoading({
...@@ -281,18 +299,19 @@ ...@@ -281,18 +299,19 @@
this.OrderPageTY(); this.OrderPageTY();
// #endif // #endif
}, },
OrderPageTY(){ OrderPageTY() {
this.apipost('b2b_get_GetB2BAllOrderPageList',this.msg, this.apipost('b2b_get_GetB2BAllOrderPageList', this.msg,
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
res.data.pageData.forEach(x=>{ res.data.pageData.forEach(x => {
// #ifdef MP-DI // #ifdef MP-DI
x.goodTypeEnum = mappingListType(x.goodsType) x.goodTypeEnum = mappingListType(x.goodsType)
// #endif // #endif
// #ifdef MP-AG // #ifdef MP-AG
x.goodTypeEnum = mappingListTypeTy(x.goodsType) x.goodTypeEnum = mappingListTypeTy(x.goodsType)
// #endif // #endif
x.orderStatusInfo = EnumHelper.ParseToEnum(OrderStatusEnum,x.orderStatus,'value') x.orderStatusInfo = EnumHelper.ParseToEnum(OrderStatusEnum, x.orderStatus,
'value')
}) })
this.g = this.g.concat(res.data.pageData); this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
...@@ -307,13 +326,14 @@ ...@@ -307,13 +326,14 @@
} }
); );
}, },
OrderPageZK(){ OrderPageZK() {
this.apipost('GetMyDirectOrderPageList_post',this.msg, this.apipost('GetMyDirectOrderPageList_post', this.msg,
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
res.data.pageData.forEach(x=>{ res.data.pageData.forEach(x => {
x.goodTypeEnum = mappingListType(x.goodsType) x.goodTypeEnum = mappingListType(x.goodsType)
x.orderStatusInfo = EnumHelper.ParseToEnum(OrderStatusEnum,x.orderStatus,'value') x.orderStatusInfo = EnumHelper.ParseToEnum(OrderStatusEnum, x.orderStatus,
'value')
}) })
this.g = this.g.concat(res.data.pageData); this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
...@@ -348,4 +368,3 @@ ...@@ -348,4 +368,3 @@
}, },
} }
</script> </script>
\ No newline at end of file
...@@ -11,10 +11,12 @@ ...@@ -11,10 +11,12 @@
</view> </view>
<view class="carrHeader-right row"> <view class="carrHeader-right row">
<view class="carrHeader-S row items-center justify-center"> <view class="carrHeader-S row items-center justify-center">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772246934795585.jpg" @click="goSearch"/> <img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772246934795585.jpg"
@click="goSearch" />
</view> </view>
<view class="carrHeader-T row items-center justify-center"> <view class="carrHeader-T row items-center justify-center">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772247012340060.jpg" @click="showModal=true"/> <img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772247012340060.jpg"
@click="showModal=true" />
</view> </view>
</view> </view>
</view> </view>
...@@ -22,10 +24,8 @@ ...@@ -22,10 +24,8 @@
<view style="padding: 0 20rpx;"> <view style="padding: 0 20rpx;">
<view class="AggregateTitle">订单类型</view> <view class="AggregateTitle">订单类型</view>
<view class="AggregateTypeBox row"> <view class="AggregateTypeBox row">
<view class="AggregateType" v-for="(item,index) in orderTypeList" <view class="AggregateType" v-for="(item,index) in orderTypeList" :key="index"
:key="index" :class="[params.OrderTypeStr==item.Id?'active':'']" @click="getTypeId(item)">
:class="[params.OrderTypeStr==item.Id?'active':'']"
@click="getTypeId(item)">
<text>{{ item.Name }}</text> <text>{{ item.Name }}</text>
</view> </view>
</view> </view>
...@@ -34,13 +34,12 @@ ...@@ -34,13 +34,12 @@
</view> </view>
</template> </template>
<script> <script>
export default { export default {
props:['title','params'], props: ['title', 'params'],
data() { data() {
return { return {
titleStyle:{}, titleStyle: {},
orderTypeList: [ orderTypeList: [{
{
Id: '', Id: '',
Name: '所有订单' Name: '所有订单'
}, },
...@@ -70,7 +69,7 @@ export default { ...@@ -70,7 +69,7 @@ export default {
} }
], ],
showModal: false, showModal: false,
icons:[ icons: [
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772246968492575.jpg', 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772246968492575.jpg',
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772247052998903.jpg', 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772247052998903.jpg',
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772247084971514.jpg', 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772247084971514.jpg',
...@@ -80,12 +79,12 @@ export default { ...@@ -80,12 +79,12 @@ export default {
] ]
} }
}, },
watch:{ watch: {
params:{ params: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
}, },
deep:true deep: true
} }
}, },
mounted() { mounted() {
...@@ -93,30 +92,35 @@ export default { ...@@ -93,30 +92,35 @@ export default {
this.getEnumList() this.getEnumList()
// #endif // #endif
}, },
methods:{ methods: {
getEnumList() { getEnumList() {
this.apipost("CarSingle_post_GetOrderTypeEnumList", {}, (res) => { this.apipost("CarSingle_post_GetOrderTypeEnumList", {}, (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.orderTypeList = [] this.orderTypeList = []
res.data.forEach(x=>{ res.data.forEach(x => {
if(x.Name=='团队'){ x.Name = '线路' } if (x.Name == '团队') {
if(x.Name!='Jalan酒店'){ x.Name = '线路'
}
if (x.Name != 'Jalan酒店') {
let icon = '' let icon = ''
if(x.Id=='1') icon = this.icons[1] if (x.Id == '1') icon = this.icons[1]
if(x.Id=='2') icon = this.icons[0] if (x.Id == '2') icon = this.icons[0]
if(x.Id=='3') icon = this.icons[3] if (x.Id == '3') icon = this.icons[3]
if(x.Id=='4') icon = this.icons[5] if (x.Id == '4') icon = this.icons[5]
if(x.Id=='5') icon = this.icons[4] if (x.Id == '5') icon = this.icons[4]
if(x.Id=='6') icon = this.icons[2] if (x.Id == '6') icon = this.icons[2]
let obj = { let obj = {
Id: x.Id, Id: x.Id,
Name: x.Name +'订单', Name: x.Name + '订单',
icon: icon icon: icon
} }
//酒店切换为道旅酒店
if (obj.Id == '3') {
obj.Id = '7';
}
this.orderTypeList.push(obj) this.orderTypeList.push(obj)
} }
}) })
// this.orderTypeList = res.data
this.orderTypeList.unshift({ this.orderTypeList.unshift({
Id: '', Id: '',
Name: '所有订单' Name: '所有订单'
...@@ -133,61 +137,70 @@ export default { ...@@ -133,61 +137,70 @@ export default {
this.$emit('change', item) this.$emit('change', item)
this.showModal = false; this.showModal = false;
}, },
goSearch(){ goSearch() {
// ?OrderTypeStr=${this.params.OrderTypeStr}
uni.navigateTo({ uni.navigateTo({
url: `/pages/AggregateOrders/AggregateOrdersSearch` url: `/pages/AggregateOrders/AggregateOrdersSearch`
}) })
}, },
goBack(){ goBack() {
uni.navigateBack({delta:-1}) uni.navigateBack({
delta: -1
})
}
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import url("@/asset/css/flex.css"); @import url("@/asset/css/flex.css");
.AggregateTitle{
.AggregateTitle {
padding: 40rpx 30rpx 40rpx 30rpx; padding: 40rpx 30rpx 40rpx 30rpx;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
text-align: left; text-align: left;
} }
.AggregateTypeBox{
.AggregateTypeBox {
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 15rpx; padding: 0 15rpx;
} }
.AggregateType{
.AggregateType {
width: 33.33%; width: 33.33%;
padding: 0 15rpx; padding: 0 15rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.AggregateType text{
.AggregateType text {
display: block; display: block;
line-height: 60rpx; line-height: 60rpx;
background: #f5f5f5; background: #f5f5f5;
border: 1rpx solid #E3E6D2; border: 1rpx solid #E3E6D2;
border-radius: 60rpx; border-radius: 60rpx;
text-align: center; text-align: center;
} }
.AggregateType.active text{
.AggregateType.active text {
border: 1rpx solid #B99846; border: 1rpx solid #B99846;
color: #B99846; color: #B99846;
} }
.carrHeader-title{
.carrHeader-title {
position: relative; position: relative;
left: 60rpx; left: 60rpx;
right: 0; right: 0;
text-align: left; text-align: left;
font-size: 32rpx; font-size: 32rpx;
} }
.carrHeader-left{
.carrHeader-left {
position: absolute; position: absolute;
left: 32rpx; left: 32rpx;
bottom: 23rpx; bottom: 23rpx;
z-index: 3; z-index: 3;
} }
.carrHeaderBox{
.carrHeaderBox {
width: 100%; width: 100%;
height: 88rpx; height: 88rpx;
padding: 0 32rpx; padding: 0 32rpx;
...@@ -195,28 +208,33 @@ export default { ...@@ -195,28 +208,33 @@ export default {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
position: relative; position: relative;
} }
.carrHeader{
.carrHeader {
// padding-top: 85rpx; // padding-top: 85rpx;
} }
.carrHeader-right{
.carrHeader-right {
padding-right: 200rpx; padding-right: 200rpx;
display: flex; display: flex;
} }
.carrHeader-right img{
.carrHeader-right img {
width: 35rpx; width: 35rpx;
height: 35rpx; height: 35rpx;
} }
.carrHeader-S{
.carrHeader-S {
width: 63rpx; width: 63rpx;
height: 63rpx; height: 63rpx;
margin-right: 20rpx; margin-right: 20rpx;
} }
.carrHeader-T{
.carrHeader-T {
width: 63rpx; width: 63rpx;
height: 63rpx; height: 63rpx;
border-radius: 50%; border-radius: 50%;
border: 1px solid #CFC089; border: 1px solid #CFC089;
margin-right: 20rpx; margin-right: 20rpx;
} }
</style> </style>
\ No newline at end of file
<template> <template>
<view> <view>
<view class="AggOrdListBox"> <view class="AggOrdListBox">
<view class="visaList row" <view class="visaList row" v-for="(item,index) in g" :key="index" @click="goDetails(item)"
v-for="(item,index) in g" :key="index"
@click="goDetails(item)"
:class="[item.orderStatus==4?'active':'']"> :class="[item.orderStatus==4?'active':'']">
<view class="visaListL"> <view class="visaListL">
<image mode="aspectFill" :src="item.goodsPic"/> <image v-if="item.goodsPic&&item.goodsPic!=''" mode="aspectFill" :src="item.goodsPic" />
<image v-else mode="aspectFill"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/defaultHotelImg.png" />
<text class="visaListLText"> <text class="visaListLText">
{{ item.goodTypeEnum.desc }} {{ item.goodTypeEnum.desc }}
</text> </text>
...@@ -40,8 +40,7 @@ ...@@ -40,8 +40,7 @@
<view class="row"> <view class="row">
<view class="col"></view> <view class="col"></view>
<!-- #ifdef MP-DI --> <!-- #ifdef MP-DI -->
<view class="jz_Zailai" @click.stop="" <view class="jz_Zailai" @click.stop="" style="width: 110rpx;">
style="width: 110rpx;">
客服 客服
<button class="AggOrdListH-RBut" open-type="contact" show-message-card="true"></button> <button class="AggOrdListH-RBut" open-type="contact" show-message-card="true"></button>
</view> </view>
...@@ -51,58 +50,57 @@ ...@@ -51,58 +50,57 @@
<view v-if="item.orderStatus==1||item.orderStatus==2" class="jz_Zailai" <view v-if="item.orderStatus==1||item.orderStatus==2" class="jz_Zailai"
style="width: 110rpx;margin-left: 10rpx;" @click.stop="goCancelZK(item)">取消</view> style="width: 110rpx;margin-left: 10rpx;" @click.stop="goCancelZK(item)">取消</view>
<view v-if="item.orderStatus==1" class="jz_Zailai jz_ZailaiZF" <view v-if="item.orderStatus==1" class="jz_Zailai jz_ZailaiZF"
style="width: 150rpx;margin-left: 10rpx;" @click.stop="submitGetCodeByOrderNo(item)">立即支付</view> style="width: 150rpx;margin-left: 10rpx;" @click.stop="submitGetCodeByOrderNo(item)">
<view v-if="item.orderStatus!=1" style="margin-left: 10rpx;" class="jz_Zailai" @click.stop="AnotherOrder(item)">再来一单</view> 立即支付</view>
<view v-if="item.orderStatus!=1" style="margin-left: 10rpx;" class="jz_Zailai"
@click.stop="AnotherOrder(item)">再来一单</view>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-AG --> <!-- #ifdef MP-AG -->
<view v-if="item.income == 0&&item.orderStatus==1" class="jz_Zailai" <view v-if="item.income == 0&&item.orderStatus==1" class="jz_Zailai"
style="width: 110rpx;margin-left: 10rpx;" @click.stop="goCancel(item)">取消</view> style="width: 110rpx;margin-left: 10rpx;" @click.stop="goCancel(item)">取消</view>
<view v-else class="jz_Zailai" style="margin-left: 10rpx;" @click.stop="AnotherOrder(item)">再来一单</view> <view v-else class="jz_Zailai" style="margin-left: 10rpx;" @click.stop="AnotherOrder(item)">
再来一单</view>
<!-- #endif --> <!-- #endif -->
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<cancelPrompt v-if="showModal" <cancelPrompt v-if="showModal" :showModal="showModal" @cancel="cancelModal" @success="cancelSuccess" type="1"
:showModal="showModal"
@cancel="cancelModal"
@success="cancelSuccess"
type="1"
:orderNo="currentData.orderNo"></cancelPrompt> :orderNo="currentData.orderNo"></cancelPrompt>
</view> </view>
</template> </template>
<script> <script>
import cancelPrompt from "@/components/cancelPrompt/cancelPrompt.vue"; import cancelPrompt from "@/components/cancelPrompt/cancelPrompt.vue";
export default { export default {
props:['orders'], props: ['orders'],
components: { components: {
cancelPrompt cancelPrompt
}, },
data() { data() {
return { return {
g: [], g: [],
submitCancel:false, submitCancel: false,
submit: false, submit: false,
orderInfo:null, orderInfo: null,
showModal: false, showModal: false,
currentData: null, currentData: null,
} }
}, },
watch:{ watch: {
orders:{ orders: {
handler(newVal,oldVal){ handler(newVal, oldVal) {
this.g = newVal this.g = newVal
}, },
deep:true, deep: true,
} }
}, },
mounted() { mounted() {
}, },
methods:{ methods: {
cancelSuccess(){ cancelSuccess() {
this.$emit('research',5) this.$emit('research', 5)
}, },
submitGetCodeByOrderNo(item) { submitGetCodeByOrderNo(item) {
uni.showLoading({ uni.showLoading({
...@@ -115,17 +113,17 @@ export default { ...@@ -115,17 +113,17 @@ export default {
MallBaseId: uni.getStorageSync("mall_UserInfo").MallBaseId MallBaseId: uni.getStorageSync("mall_UserInfo").MallBaseId
}, (res) => { }, (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.orderInfo =JSON.parse(res.data.sPayInfo) this.orderInfo = JSON.parse(res.data.sPayInfo)
this.goPayHandler(item); this.goPayHandler(item);
} }
},e=>{ }, e => {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
title:'无法发起支付,请稍后', title: '无法发起支付,请稍后',
icon:'none', icon: 'none',
duration:3000 duration: 3000
}) })
this.submit=false this.submit = false
}); });
}, },
goPayHandler(item) { goPayHandler(item) {
...@@ -156,82 +154,81 @@ export default { ...@@ -156,82 +154,81 @@ export default {
}, },
}); });
}, },
goPaySuccess(item){ goPaySuccess(item) {
let isFrom = null let isFrom = null
if(item.goodsType>0&&item.goodsType<4){//线路 if (item.goodsType > 0 && item.goodsType < 4) { //线路
isFrom = 1 isFrom = 1
}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) { //酒店住宿
}else if(item.goodsType>11&&item.goodsType<15){//目的地用车 } else if (item.goodsType > 11 && item.goodsType < 15) { //目的地用车
}else if(item.goodsType==15){//签证 } else if (item.goodsType == 15) { //签证
isFrom = 3 isFrom = 3
}else if(item.goodsType==16){//机票 } else if (item.goodsType == 16) { //机票
isFrom = 4 isFrom = 4
} }
if(isFrom){ if (isFrom) {
setTimeout(() => { setTimeout(() => {
uni.redirectTo({ uni.redirectTo({
url: "/pages/jiuzhai/paysuccess?PreferPrice=" + url: "/pages/jiuzhai/paysuccess?PreferPrice=" +
(item.totalPrice-item.preferentialPrice).toFixed(2) + (item.totalPrice - item.preferentialPrice).toFixed(2) +
"&isFrom="+isFrom, "&isFrom=" + isFrom,
}); });
}, 100); }, 100);
} }
}, },
// 再来一单 // 再来一单
AnotherOrder(item){ AnotherOrder(item) {
let url = '' let url = ''
if(item.goodsType>0&&item.goodsType<4){//线路 if (item.goodsType > 0 && item.goodsType < 4) { //线路
const pts = ['',2,0,1] const pts = ['', 2, 0, 1]
const productType = pts[item.goodsType] const productType = pts[item.goodsType]
url = `jiuzhai/jz_Line?teamType=${productType}` url = `jiuzhai/jz_Line?teamType=${productType}`
}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) { //酒店住宿
}else if(item.goodsType>11&&item.goodsType<15){//目的地用车 } else if (item.goodsType > 11 && item.goodsType < 15) { //目的地用车
}else if(item.goodsType==15){//签证 } else if (item.goodsType == 15) { //签证
url = "visa/visaList" url = "visa/visaList"
}else if(item.goodsType==16){//机票 } else if (item.goodsType == 16) { //机票
url = "airTicket/airIndex" url = "airTicket/airIndex"
} }
if(url){ if (url) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/${url}`, url: `/pages/${url}`,
}); });
} }
}, },
// 详情 // 详情
goDetails(item){ goDetails(item) {
let url = null let url = null
let msg = null let msg = null
// #ifdef MP-DI // #ifdef MP-DI
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) { //酒店住宿
}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?` //机票
// #endif // #endif
// #ifdef MP-AG // #ifdef MP-AG
msg = `orderId=${item.erpOrderId}` msg = `orderId=${item.erpOrderId}`
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==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) { //机票
url = `airTicket/airTicketOrderDetail?` url = `airTicket/airTicketOrderDetail?`
msg = `id=${item.erpOrderId}` msg = `id=${item.erpOrderId}`
} }
// #endif // #endif
if(url) { if (url) {
let path = `/pages/${url}${msg}` let path = `/pages/${url}${msg}`
uni.navigateTo({ uni.navigateTo({
url: path, url: path,
...@@ -242,7 +239,7 @@ export default { ...@@ -242,7 +239,7 @@ export default {
//取消订单 //取消订单
goCancel(item) { goCancel(item) {
let that = this let that = this
if(this.submit||this.submitCancel) return if (this.submit || this.submitCancel) return
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: '确定取消订单?', content: '确定取消订单?',
...@@ -276,16 +273,16 @@ export default { ...@@ -276,16 +273,16 @@ export default {
} }
}) })
}, },
cancelModal(){ cancelModal() {
this.showModal = false this.showModal = false
}, },
goCancelZK(item) { goCancelZK(item) {
if(item.orderStatus==2){ if (item.orderStatus == 2) {
this.currentData = item this.currentData = item
return this.showModal = true return this.showModal = true
} }
let that = this let that = this
if(this.submit||this.submitCancel) return if (this.submit || this.submitCancel) return
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: '确定取消订单?', content: '确定取消订单?',
...@@ -319,40 +316,47 @@ export default { ...@@ -319,40 +316,47 @@ export default {
}) })
}, },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import url("@/asset/css/flex.css"); @import url("@/asset/css/flex.css");
.AggOrdListBox{
.AggOrdListBox {
padding: 0 36rpx; padding: 0 36rpx;
} }
.AggOrdList{
.AggOrdList {
border-radius: 18rpx; border-radius: 18rpx;
background: #fff; background: #fff;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.AggOrdListH{
.AggOrdListH {
font-size: 22rpx; font-size: 22rpx;
color: #080A09; color: #080A09;
} }
.AggOrdListH-left text{
.AggOrdListH-left text {
color: #e91e63; color: #e91e63;
background: rgba(234,32,100,.2); background: rgba(234, 32, 100, .2);
border-radius: 10rpx; border-radius: 10rpx;
display: block; display: block;
padding: 2rpx 10rpx; padding: 2rpx 10rpx;
} }
.AggOrdListH-RBBox{
.AggOrdListH-RBBox {
display: block; display: block;
color: #1d1d1d; color: #1d1d1d;
position: relative; position: relative;
} }
.AggOrdListH-RS{
.AggOrdListH-RS {
color: #9e9e9e; color: #9e9e9e;
margin-left: 40rpx; margin-left: 40rpx;
} }
.AggOrdListH-RBut{
.AggOrdListH-RBut {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
...@@ -360,8 +364,9 @@ export default { ...@@ -360,8 +364,9 @@ export default {
bottom: 0; bottom: 0;
z-index: 1; z-index: 1;
opacity: 0; opacity: 0;
} }
.AggOrdListH-RBut{
.AggOrdListH-RBut {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
...@@ -369,8 +374,9 @@ export default { ...@@ -369,8 +374,9 @@ export default {
bottom: 0; bottom: 0;
z-index: 1; z-index: 1;
opacity: 0; opacity: 0;
} }
.jz_Zailai {
.jz_Zailai {
border-radius: 16px; border-radius: 16px;
width: 150rpx; width: 150rpx;
height: 60rpx; height: 60rpx;
...@@ -381,37 +387,42 @@ export default { ...@@ -381,37 +387,42 @@ export default {
position: relative; position: relative;
border: 1rpx solid rgba(164, 164, 164, .3); border: 1rpx solid rgba(164, 164, 164, .3);
} }
.jz_Zailai.jz_ZailaiZF{
.jz_Zailai.jz_ZailaiZF {
color: #B99846; color: #B99846;
border: 1rpx solid #B99846; border: 1rpx solid #B99846;
} }
.jz_ZailaiZX img{
.jz_ZailaiZX img {
position: relative; position: relative;
top: 10rpx; top: 10rpx;
} }
.visaList{ .visaList {
padding: 30rpx; padding: 30rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
background: #fff; background: #fff;
overflow: hidden; overflow: hidden;
border-radius: 14rpx; border-radius: 14rpx;
} }
.visaListL{
.visaListL {
width: 161rpx; width: 161rpx;
height: 190rpx; height: 190rpx;
overflow: hidden; overflow: hidden;
margin-right: 19rpx; margin-right: 19rpx;
position: relative; position: relative;
border-radius: 14rpx; border-radius: 14rpx;
} }
.visaListL image{
.visaListL image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 14rpx; border-radius: 14rpx;
} }
.visaListTitle{
.visaListTitle {
font-weight: bold; font-weight: bold;
font-size: 28rpx; font-size: 28rpx;
color: #111111; color: #111111;
...@@ -422,8 +433,9 @@ export default { ...@@ -422,8 +433,9 @@ export default {
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
overflow: hidden; overflow: hidden;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.visaListText text{
.visaListText text {
background-color: rgba(226, 194, 122, .3); background-color: rgba(226, 194, 122, .3);
color: #B99846; color: #B99846;
margin-right: 16rpx; margin-right: 16rpx;
...@@ -431,54 +443,66 @@ export default { ...@@ -431,54 +443,66 @@ export default {
border-radius: 6rpx; border-radius: 6rpx;
padding: 5rpx 9rpx; padding: 5rpx 9rpx;
font-size: 20rpx; font-size: 20rpx;
} }
.visaListNum{
.visaListNum {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.visaListNumL text{
.visaListNumL text {
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
font-size: 20rpx; font-size: 20rpx;
color: #080A09; color: #080A09;
margin-left: 10rpx; margin-left: 10rpx;
} }
.visaListNum{
.visaListNum {
margin-bottom: 15rpx; margin-bottom: 15rpx;
} }
.visaListNumR{
.visaListNumR {
color: rgba(255, 49, 102, 1); color: rgba(255, 49, 102, 1);
} }
.price-Num{
.price-Num {
font-size: 34rpx; font-size: 34rpx;
margin-left: 5rpx; margin-left: 5rpx;
font-weight: bold; font-weight: bold;
} }
.uDropdownText text{
.uDropdownText text {
color: #444; color: #444;
} }
.uDropdownText.active text{
.uDropdownText.active text {
color: #B99846; color: #B99846;
font-weight: bold; font-weight: bold;
} }
.visaListLText{
.visaListLText {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
border-radius: 14rpx 0rpx 14rpx 0rpx; border-radius: 14rpx 0rpx 14rpx 0rpx;
background: #B99846; background: #B99846;
padding: 4rpx 9rpx; padding: 4rpx 9rpx;
font-size: 20rpx;color: #fff; font-size: 20rpx;
} color: #fff;
.visaList.active .visaListTitle, }
.visaList.active .visaListNumR,
.visaList.active .visaListNumL{ .visaList.active .visaListTitle,
.visaList.active .visaListNumR,
.visaList.active .visaListNumL {
color: #CBCBCB; color: #CBCBCB;
} }
.visaList.active .visaListLText{
.visaList.active .visaListLText {
background: #CBCBCB; background: #CBCBCB;
} }
.visaList.active .visaListL image{
.visaList.active .visaListL image {
// filter: grayscale(100%); // filter: grayscale(100%);
} }
</style> </style>
\ No newline at end of file
...@@ -3,24 +3,29 @@ ...@@ -3,24 +3,29 @@
<view style="padding: 0 31rpx;"> <view style="padding: 0 31rpx;">
<view class="hotelDetailBox activeTag" v-for="(item,index) in RoomList" :key="index"> <view class="hotelDetailBox activeTag" v-for="(item,index) in RoomList" :key="index">
<view class="hotelDetailTag"> <view class="hotelDetailTag">
热门房型 {{item.RoomName_CN}}
</view> </view>
<template v-for="(subItem,subindex) in item.RatePlanList"> <template v-for="(subItem,subindex) in item.RatePlanList">
<view class="hotelDetail row" v-if="!subindex"> <view class="hotelDetail row" v-if="!subindex">
<template v-if="item.images&&item.images.length>0">
<view class="hotelDetailL" @click="openPicture(item.images)"> <view class="hotelDetailL" @click="openPicture(item.images)">
<image mode="heightFix" :src="item.Path" /> <image mode="heightFix" :src="item.images[0].Url" />
<view class="hotelDetailLImgs" v-if="item.images&&item.images.length>1"> <view class="hotelDetailLImgs" v-if="item.images&&item.images.length>1">
{{ item.images.length }} {{ item.images.length }}
</view> </view>
</view> </view>
</template>
<template v-else>
<view class="hotelDetailL">
<image mode="heightFix"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/defaultHotelImg.png" />
</view>
</template>
<view class="hotelDetailR column"> <view class="hotelDetailR column">
<view class="hotelDetailRTitle row items-center"> <view class="hotelDetailRTitle row items-center">
<view> <view>
<!--
{{ getRoomType(subItem.BedType) }}-->
</view> </view>
<!--
<img :src="openImg[0]" />-->
</view> </view>
<view class="hotelDetailRRoom"> <view class="hotelDetailRRoom">
{{ subItem.RoomName_CN }} {{ subItem.RoomName_CN }}
...@@ -287,17 +292,23 @@ ...@@ -287,17 +292,23 @@
return mealtypeName; return mealtypeName;
}, },
goUrl(subItem) { goUrl(subItem) {
let HotelInfo = { let pHotel = {
hotelid: this.HotelInfo.hotelid, hotelid: this.HotelInfo.hotelid,
name: this.HotelInfo.name, name: this.HotelInfo.name,
location: this.HotelInfo.location, address: "",
address: this.HotelInfo.address, images: [],
destination: this.HotelInfo.destination, }
country: this.HotelInfo.country, if (this.HotelInfo) {
images: this.HotelInfo.images, if (this.HotelInfo.images && this.HotelInfo.images.length > 0) {
pHotel.images.push(this.HotelInfo.images[0].url);
}
if (this.HotelInfo.location&&this.HotelInfo.location.address) {
pHotel.address = this.HotelInfo.location.address;
}
} }
console.log("hotelRoom", pHotel);
uni.navigateTo({ uni.navigateTo({
url: `/pages/hotel/order?searchObj=${JSON.stringify(this.searchObj)}&dayObj=${JSON.stringify(this.dayObj)}&HotelInfo=${JSON.stringify(HotelInfo)}&RoomInfo=${JSON.stringify(subItem)}`, url: `/pages/hotel/order?searchObj=${JSON.stringify(this.searchObj)}&dayObj=${JSON.stringify(this.dayObj)}&HotelInfo=${JSON.stringify(pHotel)}&RoomInfo=${JSON.stringify(subItem)}`,
}); });
}, },
openPicture(item) { openPicture(item) {
......
...@@ -16,19 +16,12 @@ ...@@ -16,19 +16,12 @@
style="width: 37rpx; height: 44rpx" mode=""></image> style="width: 37rpx; height: 44rpx" mode=""></image>
</view> </view>
</view> </view>
<!-- <view class="type-box" v-if="videoUrl!=''">
<u-tabs bg-color="rgba(0,0,0,0)" :is-scroll="false" name="Name" :list="typeList"
:active-color="mainColor" :current="active" @change="changeHandler" :show-bar="true"
:bold="false" height="50" duration="0" font-size="24" :activeFontSize="24" :typeStyle="2">
</u-tabs>
</view> -->
<view class="media-info" v-if="dataList.images"> <view class="media-info" v-if="dataList.images">
<view class="flex"> <view class="flex">
<view class="mi-left"> <view class="mi-left">
<view v-if="dataList.images.length > 0" class="type-img-box"> <view v-if="dataList.images.length > 0" class="type-img-box">
<image :src="dataList.images[0].url" mode="aspectFill"></image> <image :src="dataList.images[0].url" mode="aspectFill"></image>
<view class="content"> <view class="content">
<!-- <u-icon name="photo" size="26" color="#FFF"></u-icon> -->
<text>{{ dataList.images.length }}</text> <text>{{ dataList.images.length }}</text>
</view> </view>
</view> </view>
...@@ -205,8 +198,6 @@ ...@@ -205,8 +198,6 @@
<hotelPolicy ref="hotelPolicy" id="hotelPolicy" :dataList="dataList"></hotelPolicy> <hotelPolicy ref="hotelPolicy" id="hotelPolicy" :dataList="dataList"></hotelPolicy>
<hotelFacilities ref="hotelFacilities" id="hotelFacilities" :dataList="dataList"> <hotelFacilities ref="hotelFacilities" id="hotelFacilities" :dataList="dataList">
</hotelFacilities> </hotelFacilities>
</view> </view>
</view> </view>
</view> </view>
...@@ -351,7 +342,10 @@ ...@@ -351,7 +342,10 @@
loading: false, loading: false,
DidaHotelRoomDetails: {}, DidaHotelRoomDetails: {},
qRoomTypeList: [], qRoomTypeList: [],
qMealTypeList: [], qMealTypeList: [{
ID: '',
MTypeName: "全部"
}],
HotelMealTypes: [], HotelMealTypes: [],
qMsg: { qMsg: {
RoomTypeName: "", //房型筛选 RoomTypeName: "", //房型筛选
...@@ -483,7 +477,6 @@ ...@@ -483,7 +477,6 @@
if (options.searchObj) { if (options.searchObj) {
this.searchObj = JSON.parse(options.searchObj); this.searchObj = JSON.parse(options.searchObj);
} }
// this.getRecomHotel();
this.getHotelPrices() this.getHotelPrices()
this.getdidaMealType() this.getdidaMealType()
}, },
...@@ -561,32 +554,21 @@ ...@@ -561,32 +554,21 @@
console.log("dmc_post_GetDiDaPriceSearchList", tempData); console.log("dmc_post_GetDiDaPriceSearchList", tempData);
this.DidaHotelRoomDetails = tempData; this.DidaHotelRoomDetails = tempData;
this.qRoomTypeList = tempData.qRoomTypeList; this.qRoomTypeList = tempData.qRoomTypeList;
console.log("qRoomTypeList", this.qRoomTypeList); if (this.qRoomTypeList && this.qRoomTypeList.length > 0) {
if(this.qRoomTypeList&&this.qRoomTypeList.length>0) this.qRoomTypeList.unshift({ this.qRoomTypeList.unshift({
RoomTypeID: -1, RoomTypeID: -1,
RoomName_CN: '全部' RoomName_CN: '房型(全部)'
}) })
var tempMealArray = tempData.qMealTypeList;
if (tempMealArray && tempMealArray.length > 0) {
tempMealArray.forEach(mItem => {
var MTypeName = that.getMealtype(mItem
.MealType);
if (mItem.MealAmount > 0) {
MTypeName += mItem.MealAmount +
"份";
}
mItem.MTypeName = MTypeName
});
} }
this.qMealTypeList = tempData.qMealTypeList;
this.qMealTypeList = tempMealArray; if (this.qMealTypeList && this.qMealTypeList.length > 0) {
console.log("qMealTypeList", this.qMealTypeList); this.qMealTypeList.unshift({
if(this.qMealTypeList&&this.qMealTypeList.length>0) this.qMealTypeList.unshift({ MTypeName: "餐型(全部)",
MTypeName: "全部",
MealAmount: 0, MealAmount: 0,
MealType: 0, MealType: 0,
}) })
} }
}
}) })
}, },
//获取道旅餐食类型 //获取道旅餐食类型
...@@ -628,7 +610,6 @@ ...@@ -628,7 +610,6 @@
}, },
(res) => { (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
// console.log(res, '推荐酒店');
this.HotelArr = []; this.HotelArr = [];
let tempHotel = res.data.pageData; let tempHotel = res.data.pageData;
tempHotel.forEach((x) => { tempHotel.forEach((x) => {
...@@ -785,9 +766,7 @@ ...@@ -785,9 +766,7 @@
longPressActions: { longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"], itemList: ["发送给朋友", "保存图片", "收藏"],
success: function(data) {}, success: function(data) {},
fail: function(err) { fail: function(err) {},
// console.log(err.errMsg);
},
}, },
}); });
}, },
...@@ -843,20 +822,8 @@ ...@@ -843,20 +822,8 @@
for (let i = 0; i < res.data.images.length; i++) { for (let i = 0; i < res.data.images.length; i++) {
res.data.images[i].Path = res.data.images[i].url res.data.images[i].Path = res.data.images[i].url
} }
// for(let i=0;i<res.data.rooms.length;i++){
// let list = res.data.rooms[i].images.filter(x=>{
// return x.isDefault
// })
// res.data.rooms[i].images.forEach(x=>{
// x.Path = x.url
// })
// if(list.length>0) res.data.rooms[i].Path = list[0].url
// else res.data.rooms[i].Path = res.data.rooms[i].images.length>0&&res.data.rooms[i].images[0].url?res.data.rooms[i].images[0].url:''
// this.RoomList.push(res.data.rooms[i])
// }
this.hotelData.hotelid = this.dataList.hotelid; this.hotelData.hotelid = this.dataList.hotelid;
this.hotelData.name = this.dataList.name; this.hotelData.name = this.dataList.name;
// this.hotelData.Booking = this.dataList.Booking;
setTimeout(() => { setTimeout(() => {
this.hotelFacilities.forEach((x) => { this.hotelFacilities.forEach((x) => {
const query = uni.createSelectorQuery().select(`#${x.val}`); const query = uni.createSelectorQuery().select(`#${x.val}`);
...@@ -867,35 +834,6 @@ ...@@ -867,35 +834,6 @@
}, 1000); }, 1000);
} }
}) })
// let msg = {
// hotelid: id,
// StartDate: this.dayObj.start,
// EndDate: this.dayObj.end,
// };
// this.request2(
// {
// url: "/api/Hotel/GetHotelInfo",
// data: msg,
// },
// (res) => {
// if (res.resultCode == 1) {
// // console.log(res, '详情数据');
// this.dataList = res.data;
// this.RoomList = this.dataList.RoomList;
// this.hotelData.hotelid = this.dataList.hotelid;
// this.hotelData.name = this.dataList.name;
// this.hotelData.Booking = this.dataList.Booking;
// setTimeout(() => {
// this.hotelFacilities.forEach((x)=>{
// const query = uni.createSelectorQuery().select(`#${x.val}`);
// query.boundingClientRect((rect) => {
// x.top = rect.top+250;
// }).exec();
// })
// }, 1000);
// }
// }
// );
}, },
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
//分享朋友圈 //分享朋友圈
......
...@@ -46,15 +46,6 @@ ...@@ -46,15 +46,6 @@
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
KeyWords: "", //关键字 KeyWords: "", //关键字
// StartPrice: 0,
// EndPrice: 1000,
// QStartDate: "",//开始日期
// QEndDate: "",//结束日期
// OrderByType: "1", //排序类型
// QStars: "", //星级
// TagList: [], //查询标签
// City: 262, //市
// District: 0, //区
}, },
HotelList: [], //酒店数据 HotelList: [], //酒店数据
tempRateAndPrice: { tempRateAndPrice: {
...@@ -251,13 +242,10 @@ ...@@ -251,13 +242,10 @@
} }
.hotel-list .hotel-city { .hotel-list .hotel-city {
// width: 105rpx;
height: 40rpx; height: 40rpx;
padding: 0rpx 0 8rpx 0rpx; padding: 0rpx 0 8rpx 0rpx;
margin-right: 27rpx; margin-right: 27rpx;
text-align: center; text-align: center;
/* color: #DFBE6E; */
// border-right: 1px solid #e2e2e2;
font-size: 28rpx; font-size: 28rpx;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
...@@ -277,7 +265,6 @@ ...@@ -277,7 +265,6 @@
} }
.hotel-list .search-box .date { .hotel-list .search-box .date {
// width: 82rpx;
height: 50rpx; height: 50rpx;
font-size: 20rpx; font-size: 20rpx;
font-weight: 500; font-weight: 500;
......
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
<view class="o-timer"> <view class="o-timer">
<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):''}} <text>今天</text></view> <view class="time-item">{{getDate(dayObj.start)?getDate(dayObj.start):''}}
<text>今天</text>
</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>
<view class="timeline"></view> <view class="timeline"></view>
...@@ -22,9 +24,7 @@ ...@@ -22,9 +24,7 @@
<view class="roomline"></view> <view class="roomline"></view>
<view class="room-remark"> <view class="room-remark">
{{searchObj.rooms}} {{searchObj.rooms}}
<!-- | {{RoomInfo.BedTypeStr}} |
{{RoomInfo.RoomSize}}㎡ |
{{RoomInfo.HasWindowStr}} -->
</view> </view>
<view class="roomline"></view> <view class="roomline"></view>
<view class="roomPrice"> <view class="roomPrice">
...@@ -97,8 +97,7 @@ ...@@ -97,8 +97,7 @@
</view> --> </view> -->
<view class="form-items"> <view class="form-items">
<view class="label">联系电话</view> <view class="label">联系电话</view>
<view class="form-itemsL row" <view class="form-itemsL row" @click="showCountry=true">
@click="showCountry=true">
<text>+86</text> <text>+86</text>
<!--'arrow-up':'arrow-down'--> <!--'arrow-up':'arrow-down'-->
<u-icon name="arrow-down" color="#080A09" size="20" /> <u-icon name="arrow-down" color="#080A09" size="20" />
...@@ -130,9 +129,11 @@ ...@@ -130,9 +129,11 @@
<view style="font-size: 12px;width:1px;flex:1">请选择优惠券</view> <view style="font-size: 12px;width:1px;flex:1">请选择优惠券</view>
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<text style="color:#F20707;font-size: 12px;" @click="showCouponHandler"> <text style="color:#F20707;font-size: 12px;" @click="showCouponHandler">
<text style="flex: 1;" v-if="useCouponIds == 0 &&couponList.length>0">{{couponList.length}}张可用优惠券</text> <text style="flex: 1;"
v-if="useCouponIds == 0 &&couponList.length>0">{{couponList.length}}张可用优惠券</text>
<text class="content" style="color:grey" v-else-if="couponList.length==0">暂无优惠券</text> <text class="content" style="color:grey" v-else-if="couponList.length==0">暂无优惠券</text>
<text class="content" v-else :style="{ color: mainColor }">已优惠 {{currentCoupon.discountMoney}} </text> <text class="content" v-else :style="{ color: mainColor }">已优惠
{{currentCoupon.discountMoney}} </text>
<!-- <u-icon name="ellipsis" size="36" v-if="couponList.length > 0"></u-icon> --> <!-- <u-icon name="ellipsis" size="36" v-if="couponList.length > 0"></u-icon> -->
</text> </text>
<u-icon name="arrow" :size="32" color="#111" v-if="couponList.length>0"></u-icon> <u-icon name="arrow" :size="32" color="#111" v-if="couponList.length>0"></u-icon>
...@@ -151,7 +152,8 @@ ...@@ -151,7 +152,8 @@
<view class="val f14 regular" style="text-align: right;"> <view class="val f14 regular" style="text-align: right;">
<text style="margin-right: 30rpx;">{{searchObj.peoples}}</text> <text style="margin-right: 30rpx;">{{searchObj.peoples}}</text>
<text style="margin-right: 30rpx;">{{orderMsg.RoomCount}}间房</text> <text style="margin-right: 30rpx;">{{orderMsg.RoomCount}}间房</text>
<text class="red">{{RoomInfo.Currency}}{{getPrice(orderMsg.TotalPrice)*orderMsg.RoomCount}}</text> <text
class="red">{{RoomInfo.Currency}}{{getPrice(orderMsg.TotalPrice)*orderMsg.RoomCount}}</text>
</view> </view>
</view> </view>
<view class="form-items PriceMinXi" style="border-bottom: none;"> <view class="form-items PriceMinXi" style="border-bottom: none;">
...@@ -168,7 +170,8 @@ ...@@ -168,7 +170,8 @@
{{orderMsg.RoomCount}}间×{{RoomInfo.Currency}}{{ getPrice(orderMsg.TotalPrice) }} {{orderMsg.RoomCount}}间×{{RoomInfo.Currency}}{{ getPrice(orderMsg.TotalPrice) }}
</view> </view>
</view> </view>
<view class="flex f12 grey" style="margin-bottom: 40rpx" :style="{'color':mainColor+' !important'}" v-if="useCouponIds.length>0"> <view class="flex f12 grey" style="margin-bottom: 40rpx"
:style="{'color':mainColor+' !important'}" v-if="useCouponIds.length>0">
<view style="flex: 1"> <view style="flex: 1">
<text style="margin-right: 30rpx">优惠券</text> <text style="margin-right: 30rpx">优惠券</text>
</view> </view>
...@@ -196,14 +199,16 @@ ...@@ -196,14 +199,16 @@
roomRateDetails.CancellationPolicyList && roomRateDetails.CancellationPolicyList &&
roomRateDetails.CancellationPolicyList.length > 0"> roomRateDetails.CancellationPolicyList.length > 0">
<template v-for="(itemCancella, index1) in roomRateDetails.CancellationPolicyList"> <template v-for="(itemCancella, index1) in roomRateDetails.CancellationPolicyList">
<template v-if="index1==0">{{ getformatDateStr(itemCancella.FromDate) }}之前免费取消</template> <template
v-if="index1==0">{{ getformatDateStr(itemCancella.FromDate) }}之前免费取消</template>
<template v-if="itemCancella.Amount==roomRateDetails.TotalPrice"> <template v-if="itemCancella.Amount==roomRateDetails.TotalPrice">
<template>{{ getformatDateStr(itemCancella.FromDate) }}起不可取消,取消将收取订单全额费用;</template> <template>{{ getformatDateStr(itemCancella.FromDate) }}起不可取消,取消将收取订单全额费用;</template>
</template> </template>
<template v-else> <template v-else>
<template>{{ getformatDateStr(itemCancella.FromDate) }} <template>{{ getformatDateStr(itemCancella.FromDate) }}
<template v-if="index1!=(roomRateDetails.CancellationPolicyList.length-1)">- <template v-if="index1!=(roomRateDetails.CancellationPolicyList.length-1)">-
{{ getformatDateStr(roomRateDetails.CancellationPolicyList[index1+1].FromDate) }} 之间</template> {{ getformatDateStr(roomRateDetails.CancellationPolicyList[index1+1].FromDate) }}
之间</template>
取消,收费 {{DanWei}}{{getPrice(itemCancella.Amount)}};</template> 取消,收费 {{DanWei}}{{getPrice(itemCancella.Amount)}};</template>
</template> </template>
</template> </template>
...@@ -211,18 +216,6 @@ ...@@ -211,18 +216,6 @@
</view> </view>
</view> </view>
<view style="height: 27rpx"></view> <view style="height: 27rpx"></view>
<!--
<view style="padding:50rpx 40rpx">
<view class="big-title">
<text>重要提醒</text>
</view>
<view class="sheshi" v-for="(item,index) in HotelInfo.Booking">
<view class="she-title">{{item.Name}}</view>
<view class="she-content">
<view>{{item.Content}}</view>
</view>
</view>
</view>-->
</view> </view>
</scroll-view> </scroll-view>
<view class="opera-box"> <view class="opera-box">
...@@ -232,88 +225,81 @@ ...@@ -232,88 +225,81 @@
<text>{{ (getPrice(orderMsg.TotalPrice)*orderMsg.RoomCount)-currentCoupon.discountMoney }}</text> <text>{{ (getPrice(orderMsg.TotalPrice)*orderMsg.RoomCount)-currentCoupon.discountMoney }}</text>
</view> </view>
<view class="sum-detail">共计 {{orderMsg.RoomCount}}间房</view> <view class="sum-detail">共计 {{orderMsg.RoomCount}}间房</view>
<u-button :ripple="true" :hair-line="false" :custom-style="submit?btnStyle2:btnStyle" @click="buyRoom" :loading="submit">立即购买</u-button> <u-button :ripple="true" :hair-line="false" :custom-style="submit?btnStyle2:btnStyle" @click="buyRoom"
:loading="submit">立即购买</u-button>
</view> </view>
</view> </view>
<u-picker v-model="showtime" mode="time" @confirm='confirm' :params="paramsTime" :default-time='orderMsg.ArrivalTime'></u-picker> <u-picker v-model="showtime" mode="time" @confirm='confirm' :params="paramsTime"
:default-time='orderMsg.ArrivalTime'></u-picker>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<u-picker mode="selector" v-model="showCountry" :default-selector="[0]" <u-picker mode="selector" v-model="showCountry" :default-selector="[0]" :range="countrys"
:range="countrys" @confirm='(e)=>{changeDown(e,CountryType)}' @confirm='(e)=>{changeDown(e,CountryType)}' range-key="label" @input="showCountry=false"></u-picker>
range-key="label" @input="showCountry=false"></u-picker> <coupon v-if="couponList.length > 0 && showCoupon" :price="getPrice(orderMsg.TotalPrice)" :list="couponList"
<coupon v-if="couponList.length > 0 && showCoupon" :price="getPrice(orderMsg.TotalPrice)" :current="useCouponIds" @close="closeCouponHandler" :order="orderMsg" :numberPeople="searchObj.peoples">
:list="couponList" :current="useCouponIds" @close="closeCouponHandler" </coupon>
:order="orderMsg"
:numberPeople="searchObj.peoples"></coupon>
</view> </view>
</template> </template>
<script> <script>
import coupon from '@/components/coupon/index'; import coupon from '@/components/coupon/index';
export default{ export default {
components: { components: {
coupon coupon
}, },
data() { data() {
return { return {
btnStyle:{ btnStyle: {
height:"80rpx", height: "80rpx",
lineHeight:"80rpx", lineHeight: "80rpx",
borderRadius:"16rpx", borderRadius: "16rpx",
background:"#111", background: "#111",
color:"#FFF", color: "#FFF",
fontSize:"28rpx", fontSize: "28rpx",
fontWeight:"600", fontWeight: "600",
width:'193rpx', width: '193rpx',
}, },
btnStyle2:{ btnStyle2: {
height:"80rpx", height: "80rpx",
lineHeight:"80rpx", lineHeight: "80rpx",
borderRadius:"16rpx", borderRadius: "16rpx",
background:"#eee", background: "#eee",
color:"#000", color: "#000",
fontSize:"28rpx", fontSize: "28rpx",
fontWeight:"600", fontWeight: "600",
width:'193rpx', width: '193rpx',
}, },
RoomInfo:{}, RoomInfo: {},
dayObj:{}, dayObj: {},
HotelInfo:{}, HotelInfo: {},
orderMsg:{ orderMsg: {
// ProductId:0, //房间id ArrivalTime: '14:00', //预计到达时间
// StartDate:'', EmployeeIdStr: "", //销售id
// EndDate:'', CheckInDate: "", //到店时间
// RoomNumber:1,
// Unit_Price:'',
// Final_Price:'',
// Consignee:'', //联系人
// ConsigneeMobile:'', //;联系电话
ArrivalTime:'14:00', //预计到达时间
EmployeeIdStr: "",//销售id
CheckInDate: "",//到店时间
RatePlanID: "", RatePlanID: "",
CheckOutDate: "",//离店时间 CheckOutDate: "", //离店时间
RoomCount: "",//房间数量 RoomCount: "", //房间数量
guestLastName: "",//英文姓 guestLastName: "", //英文姓
guestFirstName: "",//英文名 guestFirstName: "", //英文名
guestAddress: "", guestAddress: "",
guestPhoneNumber: "", guestPhoneNumber: "",
guestEmail: "",//Email guestEmail: "", //Email
BookingID: "", BookingID: "",
HotelName: "",//酒店名称 HotelName: "", //酒店名称
HotelPic: "",//酒店封面 HotelPic: "", //酒店封面
GuestList: [], GuestList: [],
TotalPrice: 0,//总价 TotalPrice: 0, //总价
CustomerPayMoney: 0, CustomerPayMoney: 0,
DiscountMoney: 0,//优惠 DiscountMoney: 0, //优惠
OrderSource: 2, OrderSource: 2,
OrderForm: 4,//订单来源 OrderForm: 4, //订单来源
//备注 //备注
guestRequest: "", guestRequest: "",
hotelId: '',//酒店Id hotelId: '', //酒店Id
roomType: 0, roomType: 0,
CustomerId: 0, //同行Id
DirectCustomerId: 0, //直客Id
}, },
showtime:false, showtime: false,
paramsTime: { paramsTime: {
year: false, year: false,
month: false, month: false,
...@@ -322,18 +308,18 @@ import coupon from '@/components/coupon/index'; ...@@ -322,18 +308,18 @@ import coupon from '@/components/coupon/index';
minute: true, minute: true,
second: false second: false
}, },
tipsText:'', tipsText: '',
showCountry: false, showCountry: false,
countrys:[], countrys: [],
couponList: [], couponList: [],
showCoupon: false, showCoupon: false,
useCouponIds: [], useCouponIds: [],
currentCoupon: { currentCoupon: {
discountMoney: 0 discountMoney: 0
}, },
showPz:false, showPz: false,
pzCoupon:null, pzCoupon: null,
searchObj:null, searchObj: null,
mainColor: '', mainColor: '',
activeStyle: '', activeStyle: '',
params: { params: {
...@@ -364,36 +350,30 @@ import coupon from '@/components/coupon/index'; ...@@ -364,36 +350,30 @@ import coupon from '@/components/coupon/index';
}, },
onLoad(options) { onLoad(options) {
this.customer = uni.getStorageSync("b2b_user") this.customer = uni.getStorageSync("b2b_user")
console.log(this.customer,'------this.customer') if (options.searchObj) {
if(options.searchObj){
this.searchObj = JSON.parse(options.searchObj) this.searchObj = JSON.parse(options.searchObj)
} }
if(options.HotelInfo){ if (options.HotelInfo) {
this.HotelInfo = JSON.parse(options.HotelInfo) this.HotelInfo = JSON.parse(options.HotelInfo)
console.log(this.HotelInfo,'-----------HotelInfo')
this.orderMsg.hotelId = this.HotelInfo.hotelid; this.orderMsg.hotelId = this.HotelInfo.hotelid;
this.orderMsg.HotelName = this.HotelInfo.name this.orderMsg.HotelName = this.HotelInfo.name;
if (this.HotelInfo.images && this.HotelInfo.images.length > 0) {
this.orderMsg.HotelPic = this.HotelInfo.images[0];
}
} }
if(options.RoomInfo){ if (options.RoomInfo) {
this.RoomInfo = JSON.parse(options.RoomInfo) this.RoomInfo = JSON.parse(options.RoomInfo)
} }
if(options.dayObj){ if (options.dayObj) {
this.dayObj = JSON.parse(options.dayObj) this.dayObj = JSON.parse(options.dayObj)
} }
if (options.CreateBy) { if (options.CreateBy) {
this.CreateBy = options.CreateBy this.CreateBy = options.CreateBy
} }
this.orderMsg.ProductId = this.RoomInfo.RoomTypeID; this.orderMsg.ProductId = this.RoomInfo.RoomTypeID;
console.log(this.searchObj,'-----------searchObj')
console.log(this.RoomInfo,'-----------RoomInfo')
this.orderMsg.RatePlanID = this.RoomInfo.RatePlanID this.orderMsg.RatePlanID = this.RoomInfo.RatePlanID
// this.orderMsg.TotalPrice = this.getPrice(this.RoomInfo.TotalPrice);
this.orderMsg.CheckInDate = this.dayObj.start; this.orderMsg.CheckInDate = this.dayObj.start;
this.orderMsg.CheckOutDate = this.dayObj.end; this.orderMsg.CheckOutDate = this.dayObj.end;
this.orderMsg.RoomCount = this.searchObj.rooms this.orderMsg.RoomCount = this.searchObj.rooms
this.orderMsg.GuestList = []; this.orderMsg.GuestList = [];
this.searchObj.searchroomGroup.forEach((item, index) => { this.searchObj.searchroomGroup.forEach((item, index) => {
...@@ -411,7 +391,7 @@ import coupon from '@/components/coupon/index'; ...@@ -411,7 +391,7 @@ import coupon from '@/components/coupon/index';
RoomNum: index + 1, RoomNum: index + 1,
numberOfAdults: item.numberOfAdults, numberOfAdults: item.numberOfAdults,
numberOfChildren: item.numberOfChildren, numberOfChildren: item.numberOfChildren,
ChildAgeDetails: item.ChildAgeDetails!=''?item.ChildAgeDetails:1, ChildAgeDetails: item.ChildAgeDetails != '' ? item.ChildAgeDetails : 1,
GuestInfo: guestInfoList GuestInfo: guestInfoList
}; };
this.orderMsg.GuestList.push(obj); this.orderMsg.GuestList.push(obj);
...@@ -435,7 +415,7 @@ import coupon from '@/components/coupon/index'; ...@@ -435,7 +415,7 @@ import coupon from '@/components/coupon/index';
this.GetCountryInfo() this.GetCountryInfo()
this.initHotel() this.initHotel()
}, },
methods:{ methods: {
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}; `;
...@@ -447,9 +427,10 @@ import coupon from '@/components/coupon/index'; ...@@ -447,9 +427,10 @@ import coupon from '@/components/coupon/index';
Name: this.customer.name, Name: this.customer.name,
ContactNumber: this.orderMsg.guestPhoneNumber, ContactNumber: this.orderMsg.guestPhoneNumber,
Mailbox: this.orderMsg.guestEmail, Mailbox: this.orderMsg.guestEmail,
GoodsId: this.orderMsg.RatePlanID, //GoodsId: this.orderMsg.RatePlanID,
GoodsId: this.HotelInfo.hotelId,
GoodsName: this.HotelInfo.name, GoodsName: this.HotelInfo.name,
GoodsPic: this.HotelInfo.images[0].Path, GoodsPic: "",
GoodsType: 9, GoodsType: 9,
OrderMake: `${this.orderMsg.CheckInDate}入住;${this.orderMsg.CheckOutDate}离店 ${guestInfo}`, OrderMake: `${this.orderMsg.CheckInDate}入住;${this.orderMsg.CheckOutDate}离店 ${guestInfo}`,
TotalPrice: this.getPrice(this.orderMsg.TotalPrice), TotalPrice: this.getPrice(this.orderMsg.TotalPrice),
...@@ -460,17 +441,20 @@ import coupon from '@/components/coupon/index'; ...@@ -460,17 +441,20 @@ import coupon from '@/components/coupon/index';
Income: 0, Income: 0,
Refund: 0, Refund: 0,
MallBaseId: userInfo.MallBaseId, MallBaseId: userInfo.MallBaseId,
CreateBy:0 CreateBy: 0
}; };
if (this.HotelInfo.images && this.HotelInfo.images.length > 0) {
msg.GoodsPic = this.HotelInfo.images[0];
}
// #ifdef MP-DI // #ifdef MP-DI
if(this.customer.salesBaseInfo&&this.customer.salesBaseInfo.employeeId){ if (this.customer.salesBaseInfo && this.customer.salesBaseInfo.employeeId) {
msg.CreateBy = this.customer.salesBaseInfo.employeeId msg.CreateBy = this.customer.salesBaseInfo.employeeId
} }
// #endif // #endif
this.apipost("AddOrderInfo_post", msg, (res) => { this.apipost("AddOrderInfo_post", msg, (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.orderInfo =JSON.parse(res.data.sPayInfo) this.orderInfo = JSON.parse(res.data.sPayInfo)
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '订单创建成功' title: '订单创建成功'
...@@ -478,9 +462,9 @@ import coupon from '@/components/coupon/index'; ...@@ -478,9 +462,9 @@ import coupon from '@/components/coupon/index';
this.goPayHandler(res.data.OrderNo); this.goPayHandler(res.data.OrderNo);
} else { } else {
uni.showToast({ uni.showToast({
title:res.message, title: res.message,
icon:'none', icon: 'none',
duration:3000 duration: 3000
}) })
this.submit = false; this.submit = false;
} }
...@@ -496,7 +480,6 @@ import coupon from '@/components/coupon/index'; ...@@ -496,7 +480,6 @@ import coupon from '@/components/coupon/index';
signType: this.orderInfo.signType, signType: this.orderInfo.signType,
paySign: this.orderInfo.sign, paySign: this.orderInfo.sign,
success: function(res) { success: function(res) {
console.log("success", res);
that.submit = false; that.submit = false;
uni.showToast({ uni.showToast({
title: "支付成功", title: "支付成功",
...@@ -504,13 +487,13 @@ import coupon from '@/components/coupon/index'; ...@@ -504,13 +487,13 @@ import coupon from '@/components/coupon/index';
setTimeout(() => { setTimeout(() => {
uni.redirectTo({ uni.redirectTo({
url: "/pages/jiuzhai/paysuccess?PreferPrice=" + url: "/pages/jiuzhai/paysuccess?PreferPrice=" +
(that.getPrice(that.orderMsg.TotalPrice)-that.currentCoupon.discountMoney).toFixed(2) + (that.getPrice(that.orderMsg.TotalPrice) - that
.currentCoupon.discountMoney).toFixed(2) +
"&isFrom=5", "&isFrom=5",
}); });
}, 100); }, 100);
}, },
fail: function(err) { fail: function(err) {
console.log("fail:", err);
that.submit = true; that.submit = true;
uni.showToast({ uni.showToast({
title: "支付失败", title: "支付失败",
...@@ -538,7 +521,7 @@ import coupon from '@/components/coupon/index'; ...@@ -538,7 +521,7 @@ import coupon from '@/components/coupon/index';
mask: true mask: true
}); });
this.apipost( this.apipost(
"dmc_post_GetDiDaPriceConfirm",this.params, "dmc_post_GetDiDaPriceConfirm", this.params,
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
uni.hideLoading(); uni.hideLoading();
...@@ -549,24 +532,12 @@ import coupon from '@/components/coupon/index'; ...@@ -549,24 +532,12 @@ import coupon from '@/components/coupon/index';
this.roomRateDetails = res.data.PriceDetails.HotelList[0]; this.roomRateDetails = res.data.PriceDetails.HotelList[0];
this.orderMsg.BookingID = res.data.PriceDetails.ReferenceNo; this.orderMsg.BookingID = res.data.PriceDetails.ReferenceNo;
this.orderMsg.checkInTime = res.data.PriceDetails.CheckInDate; this.orderMsg.checkInTime = res.data.PriceDetails.CheckInDate;
this.orderMsg.TotalPrice = this.getPrice(this.roomRateDetails.TotalPrice); this.orderMsg.TotalPrice = this.getPrice(this.roomRateDetails.TotalPrice);
if (this.roomRateDetails.RatePlanList && this.roomRateDetails.RatePlanList.length > 0) {
if(this.roomRateDetails.RatePlanList&&this.roomRateDetails.RatePlanList.length>0){
this.orderMsg.roomType = this.roomRateDetails.RatePlanList[0].BedType this.orderMsg.roomType = this.roomRateDetails.RatePlanList[0].BedType
} }
// this.orderMsg.HotelPic = this.HotelInfo.HotelPic
if (
Object.prototype.toString.call(this.dataList.HotelList) ==
"[object Object]"
) {
let arr = [];
arr.push(this.dataList.HotelList);
this.dataList.HotelList = arr;
}
} }
},err=>{ }, err => {
uni.hideLoading(); uni.hideLoading();
this.submit = false; this.submit = false;
}); });
...@@ -574,7 +545,7 @@ import coupon from '@/components/coupon/index'; ...@@ -574,7 +545,7 @@ import coupon from '@/components/coupon/index';
getPrice(price) { getPrice(price) {
return Math.ceil(price); return Math.ceil(price);
}, },
goUrl(){ goUrl() {
uni.navigateTo({ uni.navigateTo({
url: `/pages/hotel/orderInfor?msg=${encodeURIComponent(JSON.stringify(this.params))}&dayObj=${JSON.stringify(this.dayObj)}&searchObj=${JSON.stringify(this.searchObj)}&HotelInfo=${JSON.stringify(this.HotelInfo)}` url: `/pages/hotel/orderInfor?msg=${encodeURIComponent(JSON.stringify(this.params))}&dayObj=${JSON.stringify(this.dayObj)}&searchObj=${JSON.stringify(this.searchObj)}&HotelInfo=${JSON.stringify(this.HotelInfo)}`
}) })
...@@ -587,46 +558,48 @@ import coupon from '@/components/coupon/index'; ...@@ -587,46 +558,48 @@ import coupon from '@/components/coupon/index';
this.useCouponIds = e; this.useCouponIds = e;
//叠加使用优惠券 //叠加使用优惠券
let TotalDiscountAmount = 0 let TotalDiscountAmount = 0
this.couponList.forEach(x=>{ this.couponList.forEach(x => {
let findIndex = this.useCouponIds.findIndex(y=>x.id==y) let findIndex = this.useCouponIds.findIndex(y => x.id == y)
if(findIndex!=-1){ if (findIndex != -1) {
let discountMoney = 0 let discountMoney = 0
if(x.couponsType==1){ if (x.couponsType == 1) {
discountMoney = x.denomination discountMoney = x.denomination
}else{ } else {
discountMoney = (parseFloat(this.price) * (1 - parseFloat(x.denomination / 10))) discountMoney = (parseFloat(this.price) * (1 - parseFloat(x.denomination / 10)))
.toFixed(2) .toFixed(2)
} }
TotalDiscountAmount += discountMoney TotalDiscountAmount += discountMoney
} }
}) })
if(TotalDiscountAmount)this.currentCoupon.discountMoney = TotalDiscountAmount if (TotalDiscountAmount) this.currentCoupon.discountMoney = TotalDiscountAmount
else this.currentCoupon.discountMoney = 0 else this.currentCoupon.discountMoney = 0
}else{ } else {
this.currentCoupon.discountMoney = 0 this.currentCoupon.discountMoney = 0
this.useCouponIds = [] this.useCouponIds = []
} }
this.showCoupon = false; this.showCoupon = false;
}, },
calcMaxCouponHandle(){ calcMaxCouponHandle() {
if(this.couponList && this.couponList.length>0){ if (this.couponList && this.couponList.length > 0) {
let maxCouponId = 0 let maxCouponId = 0
let discount = 0 let discount = 0
const money = this.price const money = this.price
this.couponList.forEach(x=>{ this.couponList.forEach(x => {
if(x.couponsType==1 && x.denomination>discount&&(this.orderMsg.AdultPeopleNum>=x.orderGuestNum||!x.orderGuestNum)) { if (x.couponsType == 1 && x.denomination > discount && (this.orderMsg.AdultPeopleNum >= x
discount=x.denomination .orderGuestNum || !x.orderGuestNum)) {
discount = x.denomination
maxCouponId = x.id maxCouponId = x.id
} }
if(x.couponsType==2){ if (x.couponsType == 2) {
let disMoney = money*(1-x.denomination) let disMoney = money * (1 - x.denomination)
if(discount<disMoney&&(this.orderMsg.AdultPeopleNum>=x.orderGuestNum||!x.orderGuestNum)){ if (discount < disMoney && (this.orderMsg.AdultPeopleNum >= x.orderGuestNum || !x
discount=disMoney .orderGuestNum)) {
discount = disMoney
maxCouponId = x.id maxCouponId = x.id
} }
} }
}) })
if(maxCouponId>0) this.closeCouponHandler([maxCouponId]) if (maxCouponId > 0) this.closeCouponHandler([maxCouponId])
else this.closeCouponHandler(-1) else this.closeCouponHandler(-1)
} }
}, },
...@@ -649,9 +622,7 @@ import coupon from '@/components/coupon/index'; ...@@ -649,9 +622,7 @@ import coupon from '@/components/coupon/index';
"coupon_post_GetUserCanUseCouponList", couponParams, "coupon_post_GetUserCanUseCouponList", couponParams,
(res) => { (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
console.log("coupon_post_GetUserCanUseCouponList_res", res);
this.couponList = res.data this.couponList = res.data
// this.calcPzCouponHandler()
this.calcMaxCouponHandle() this.calcMaxCouponHandle()
} }
}, },
...@@ -660,26 +631,26 @@ import coupon from '@/components/coupon/index'; ...@@ -660,26 +631,26 @@ import coupon from '@/components/coupon/index';
} }
); );
}, },
usePzCouponHandler(){ usePzCouponHandler() {
this.showPz = false this.showPz = false
this.closeCouponHandler([this.pzCoupon.id]) this.closeCouponHandler([this.pzCoupon.id])
this.pzCoupon = null this.pzCoupon = null
}, },
calcPzCouponHandler(){ calcPzCouponHandler() {
this.couponList.forEach((x)=>{ this.couponList.forEach((x) => {
if(x.expansionModel.denomination>0){ if (x.expansionModel.denomination > 0) {
if(this.pzCoupon && this.pzCoupon.expansionModel.denomination<x.expansionModel.denomination) if (this.pzCoupon && this.pzCoupon.expansionModel.denomination < x.expansionModel
this.pzCoupon=x .denomination)
this.pzCoupon = x
else else
this.pzCoupon=x this.pzCoupon = x
x.realDenomination = x.denomination x.realDenomination = x.denomination
x.denomination =x.expansionModel.denomination x.denomination = x.expansionModel.denomination
} }
}) })
this.showPz = this.pzCoupon?true:false this.showPz = this.pzCoupon ? true : false
}, },
GetCountryInfo(){ GetCountryInfo() {
this.apipost("GetCountryInfo_post", {}, (r) => { this.apipost("GetCountryInfo_post", {}, (r) => {
for (let i = 0; i < r.data.phoneCountList.length; i++) { for (let i = 0; i < r.data.phoneCountList.length; i++) {
let Count = r.data.phoneCountList[i] let Count = r.data.phoneCountList[i]
...@@ -692,115 +663,108 @@ import coupon from '@/components/coupon/index'; ...@@ -692,115 +663,108 @@ import coupon from '@/components/coupon/index';
} }
}) })
}, },
changeDown(e){ changeDown(e) {
let i = [e] let i = [e]
// this.customer.count = this.countrys[i].ID
// this.optionsTitle[0] = this.countrys[i].Name
// this.customer.PhoneCountryStr = '+'+this.countrys[i].PhoneCode
}, },
editNum(type) { editNum(type) {
if (type == 1) { if (type == 1) {
if(this.orderMsg.RoomCount>1){ if (this.orderMsg.RoomCount > 1) {
this.orderMsg.RoomCount--; this.orderMsg.RoomCount--;
this.orderMsg.GuestList.splice(this.orderMsg.GuestList.length-1,1) this.orderMsg.GuestList.splice(this.orderMsg.GuestList.length - 1, 1)
} }
}else { } else {
this.orderMsg.RoomCount++; this.orderMsg.RoomCount++;
this.orderMsg.GuestList.push({ this.orderMsg.GuestList.push({
RoomNum: this.orderMsg.GuestList.length+1, RoomNum: this.orderMsg.GuestList.length + 1,
numberOfAdults: 1, numberOfAdults: 1,
numberOfChildren: 0, numberOfChildren: 0,
ChildAgeDetails: '', ChildAgeDetails: '',
GuestInfo: [ GuestInfo: [{
{
LastName: "", LastName: "",
FirstName: "", FirstName: "",
Age: "" Age: ""
} }]
]
}) })
} }
this.searchObj.rooms = this.orderMsg.GuestList.length this.searchObj.rooms = this.orderMsg.GuestList.length
this.CalTotalPrice(); this.CalTotalPrice();
}, },
getDate(date){ getDate(date) {
if(date){ if (date) {
let arr = date.split('-'); let arr = date.split('-');
return arr[1]+'月'+arr[2]+'日' return arr[1] + '月' + arr[2] + '日'
} }
}, },
getWeek(date) {
var weekArray = new Array("日", "一", "二", "三", "四", "五", "六");
var week = weekArray[new Date(date).getDay()];//注意此处必须是先new一个Date
return '周'+week;
},
//选择时间 //选择时间
confirm(val){ confirm(val) {
this.orderMsg.ArrivalTime=val.hour+':'+val.minute; this.orderMsg.ArrivalTime = val.hour + ':' + val.minute;
}, },
//计算总价 //计算总价
CalTotalPrice(){ CalTotalPrice() {
}, },
validate(){ validate() {
let email = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/ let email = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/
let msg = '' let msg = ''
for(let i=0;i<this.orderMsg.GuestList.length;i++){ for (let i = 0; i < this.orderMsg.GuestList.length; i++) {
for(let j=0;j<this.orderMsg.GuestList[i].GuestInfo.length;j++){ for (let j = 0; j < this.orderMsg.GuestList[i].GuestInfo.length; j++) {
if(this.orderMsg.GuestList[i].GuestInfo[j].LastName==''){ if (this.orderMsg.GuestList[i].GuestInfo[j].LastName == '') {
return msg = '请输入住客姓' return msg = '请输入住客姓'
} }
if(this.orderMsg.GuestList[i].GuestInfo[j].FirstName==''){ if (this.orderMsg.GuestList[i].GuestInfo[j].FirstName == '') {
return msg = '请输入住客名' return msg = '请输入住客名'
} }
} }
} }
if(this.orderMsg.guestLastName==''){ if (this.orderMsg.guestLastName == '') {
msg = '请输入姓名' 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) {
msg = '请输入正确的电话号码' msg = '请输入正确的电话号码'
}else if(this.orderMsg.guestEmail==''||!this.orderMsg.guestEmail){ } else if (this.orderMsg.guestEmail == '' || !this.orderMsg.guestEmail) {
msg = '请输入邮箱地址' msg = '请输入邮箱地址'
}else if (!email.test(this.orderMsg.guestEmail)) { } else if (!email.test(this.orderMsg.guestEmail)) {
msg = '请输入正确的邮箱地址' msg = '请输入正确的邮箱地址'
}else if (this.orderMsg.CheckInDate=='') { } else if (this.orderMsg.CheckInDate == '') {
msg = '入住时间不能为空' msg = '入住时间不能为空'
}else if (this.orderMsg.CheckOutDate=='') { } else if (this.orderMsg.CheckOutDate == '') {
msg = '离店时间不能为空' msg = '离店时间不能为空'
} }
return msg return msg
}, },
//立即购买 //立即购买
buyRoom(){ buyRoom() {
const error = this.validate() const error = this.validate()
if(error!=''){ if (error != '') {
uni.showToast({ uni.showToast({
icon:'none', icon: 'none',
title:error title: error
}) })
return return
} }
if(this.submit) return; if (this.submit) return;
this.submit = true; this.submit = true;
let that = this; let that = this;
var CustomerId = 0
var CreateBy = 0//同行id
var DirectCustomerId = 0 //直客id
// #ifdef MP-DI // #ifdef MP-DI
DirectCustomerId = this.customer.customerId that.orderMsg.DirectCustomerId = this.customer.customerId;
CreateBy = this.customer.customerId if (this.customer && this.customer.erpBaseInfo && this.customer.erpBaseInfo.employeeId) {
that.orderMsg.EmployeeIdStr = this.customer.erpBaseInfo.employeeId;
}
this.orderMsg.OrderSource = 7 this.orderMsg.OrderSource = 7
// #endif // #endif
// #ifdef MP-AG // #ifdef MP-AG
CreateBy = this.CreateBy that.orderMsg.CustomerId = this.customer.customerId
CustomerId = this.customer.customerId
this.orderMsg.OrderSource = 5 this.orderMsg.OrderSource = 5
if (this.customer && this.customer.salesBaseInfo && this.customer.salesBaseInfo.employeeId) {
this.orderMsg.EmployeeIdStr = this.customer.salesBaseInfo.employeeId
}
// #endif // #endif
this.orderMsg.EmployeeIdStr = CreateBy; console.log("酒店下单", that.orderMsg);
console.log(that.orderMsg,'-----酒店下单'); that.apipost('dmc_post_GetDiDaBookingConfirm', that.orderMsg,
that.apipost('dmc_post_GetDiDaBookingConfirm',that.orderMsg,
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
const tempData = res.data const tempData = res.data
...@@ -814,25 +778,25 @@ import coupon from '@/components/coupon/index'; ...@@ -814,25 +778,25 @@ import coupon from '@/components/coupon/index';
icon: 'none' icon: 'none'
}) })
uni.redirectTo({ uni.redirectTo({
url: `/pages/AggregateOrders/AggregateOrdersList?OrderTypeStr=3`, url: `/pages/AggregateOrders/AggregateOrdersList?OrderTypeStr=7`,
}); });
// #endif // #endif
console.log(res,'-------酒店erp下单成功')
} }
} }
); );
}, },
} }
} }
</script> </script>
<style> <style>
@import url("@/asset/css/flex.css"); @import url("@/asset/css/flex.css");
.hotel-order{
.hotel-order {
color: #111111; color: #111111;
} }
.opera-box{
.opera-box {
background-color: #FFF; background-color: #FFF;
padding: 20rpx 45rpx 40rpx 45rpx; padding: 20rpx 45rpx 40rpx 45rpx;
/* position: fixed; /* position: fixed;
...@@ -841,7 +805,8 @@ import coupon from '@/components/coupon/index'; ...@@ -841,7 +805,8 @@ import coupon from '@/components/coupon/index';
right: 0; */ right: 0; */
z-index: 5; z-index: 5;
} }
.opera-box .box{
.opera-box .box {
height: 100rpx; height: 100rpx;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0px 10rpx 30rpx 0px rgba(36, 36, 36, 0.2); box-shadow: 0px 10rpx 30rpx 0px rgba(36, 36, 36, 0.2);
...@@ -850,32 +815,38 @@ import coupon from '@/components/coupon/index'; ...@@ -850,32 +815,38 @@ import coupon from '@/components/coupon/index';
align-items: center; align-items: center;
padding: 0 10rpx 0 36rpx; padding: 0 10rpx 0 36rpx;
} }
.opera-box .box .price{
.opera-box .box .price {
font-size: 40rpx; font-size: 40rpx;
font-weight: 500; font-weight: 500;
color: #D91818; color: #D91818;
margin-right: 20rpx; margin-right: 20rpx;
} }
.opera-box .box .sum-detail{
.opera-box .box .sum-detail {
font-size: 24rpx; font-size: 24rpx;
flex: 1; flex: 1;
font-weight: 500; font-weight: 500;
color: #6E6E6E; color: #6E6E6E;
} }
.hotel-order .red{
color:#D91818 !important .hotel-order .red {
color: #D91818 !important
} }
.hotel-order .grey{
color:#6E6E6E !important .hotel-order .grey {
color: #6E6E6E !important
} }
.hotel-order .form{
.hotel-order .form {
margin-top: 60rpx; margin-top: 60rpx;
padding:0 19rpx 44rpx 19rpx; padding: 0 19rpx 44rpx 19rpx;
background: #fff; background: #fff;
border-radius: 18rpx; border-radius: 18rpx;
margin: 28rpx 31rpx; margin: 28rpx 31rpx;
} }
.hotel-order .form .form-items{
.hotel-order .form .form-items {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 22rpx 15rpx; padding: 22rpx 15rpx;
...@@ -883,30 +854,37 @@ import coupon from '@/components/coupon/index'; ...@@ -883,30 +854,37 @@ import coupon from '@/components/coupon/index';
font-weight: 500; font-weight: 500;
color: #303133; color: #303133;
} }
.hotel-order .form .form-items:first-child{
.hotel-order .form .form-items:first-child {
padding: 10rpx 15rpx 20rpx 15rpx; padding: 10rpx 15rpx 20rpx 15rpx;
} }
.hotel-order .form .form-items .label{
.hotel-order .form .form-items .label {
width: 130rpx; width: 130rpx;
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
margin-right: 57rpx; margin-right: 57rpx;
flex-shrink: 0; flex-shrink: 0;
} }
.hotel-order .form .form-items .val{
flex:1; .hotel-order .form .form-items .val {
flex: 1;
} }
.hotel-order .sheshi{
.hotel-order .sheshi {
margin-top: 50rpx; margin-top: 50rpx;
} }
.hotel-order .sheshi .she-title{
.hotel-order .sheshi .she-title {
font-size: 28rpx; font-size: 28rpx;
font-weight: 800; font-weight: 800;
} }
.hotel-order .sheshi .she-content{
.hotel-order .sheshi .she-content {
margin-top: 24rpx; margin-top: 24rpx;
} }
.hotel-order .sheshi .she-content text{
.hotel-order .sheshi .she-content text {
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
...@@ -914,8 +892,9 @@ import coupon from '@/components/coupon/index'; ...@@ -914,8 +892,9 @@ import coupon from '@/components/coupon/index';
line-height: 40rpx; line-height: 40rpx;
margin-right: 24rpx; margin-right: 24rpx;
} }
.hotel-order .form .form-items .val input{
border:none; .hotel-order .form .form-items .val input {
border: none;
padding: 0; padding: 0;
margin: 0; margin: 0;
outline: none; outline: none;
...@@ -929,54 +908,67 @@ import coupon from '@/components/coupon/index'; ...@@ -929,54 +908,67 @@ import coupon from '@/components/coupon/index';
.hotel-order .king { .hotel-order .king {
color: #DFBE6E !important; color: #DFBE6E !important;
} }
.hotel-order .f12 { .hotel-order .f12 {
font-size:24rpx !important; font-size: 24rpx !important;
} }
.f11 { .f11 {
font-size:22rpx !important; font-size: 22rpx !important;
} }
.hotel-order .f14 { .hotel-order .f14 {
font-size:28rpx !important; font-size: 28rpx !important;
} }
.hotel-order .regular { .hotel-order .regular {
font-weight: 500 !important; font-weight: 500 !important;
} }
.hotel-order .flex{
.hotel-order .flex {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.hotel-order .empty-block{
.hotel-order .empty-block {
height: 20rpx; height: 20rpx;
background: #ECF1F4; background: #ECF1F4;
} }
.hotel-order .flex-wrap{
.hotel-order .flex-wrap {
flex-wrap: wrap; flex-wrap: wrap;
} }
.hotel-order .o-head{
.hotel-order .o-head {
padding: 20rpx 31rpx 46rpx 31rpx; padding: 20rpx 31rpx 46rpx 31rpx;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0px 2rpx 15rpx 0px rgba(76, 76, 76, 0.13); box-shadow: 0px 2rpx 15rpx 0px rgba(76, 76, 76, 0.13);
border-radius: 0px 0px 40rpx 40rpx; border-radius: 0px 0px 40rpx 40rpx;
} }
.hotel-order .o-head .o-timer{
.hotel-order .o-head .o-timer {
background: #ECF1F4; background: #ECF1F4;
border-radius: 18rpx; border-radius: 18rpx;
padding: 30rpx 30rpx; padding: 30rpx 30rpx;
} }
.hotel-order .o-head .o-timer .time-item{
.hotel-order .o-head .o-timer .time-item {
font-weight: 800; font-weight: 800;
font-size: 32rpx; font-size: 32rpx;
color: #080A09; color: #080A09;
} }
.hotel-order .o-head .o-timer .time-item text{
.hotel-order .o-head .o-timer .time-item text {
margin-left: 15rpx; margin-left: 15rpx;
} }
.hotel-order .o-head .o-timer .time-itemZhi{
.hotel-order .o-head .o-timer .time-itemZhi {
font-size: 32rpx; font-size: 32rpx;
color: #080A09; color: #080A09;
padding: 0 10rpx; padding: 0 10rpx;
} }
.hotel-order .o-head .o-timer .timeline{
.hotel-order .o-head .o-timer .timeline {
width: 1rpx; width: 1rpx;
height: 24rpx; height: 24rpx;
background: #BCBCBC; background: #BCBCBC;
...@@ -984,29 +976,34 @@ import coupon from '@/components/coupon/index'; ...@@ -984,29 +976,34 @@ import coupon from '@/components/coupon/index';
margin-left: 18rpx; margin-left: 18rpx;
margin-right: 18rpx; margin-right: 18rpx;
} }
.hotel-order .o-head .o-timer .time-split{
.hotel-order .o-head .o-timer .time-split {
font-weight: 800; font-weight: 800;
font-size: 32rpx; font-size: 32rpx;
text-align: center; text-align: center;
} }
.hotel-order .o-head .room-name{
.hotel-order .o-head .room-name {
font-weight: 500; font-weight: 500;
font-size: 28rpx; font-size: 28rpx;
color: #1D1D20; color: #1D1D20;
} }
.hotel-order .o-head .room-remark{
.hotel-order .o-head .room-remark {
font-weight: 500; font-weight: 500;
font-size: 28rpx; font-size: 28rpx;
color: #1D1D20; color: #1D1D20;
flex-shrink: 0; flex-shrink: 0;
} }
.hotel-order .o-head .rule{
.hotel-order .o-head .rule {
font-size: 22rpx; font-size: 22rpx;
font-weight: 500; font-weight: 500;
color: #6E6E6E; color: #6E6E6E;
margin-top: 18rpx; margin-top: 18rpx;
} }
.hotel-order .big-title { .hotel-order .big-title {
position: relative; position: relative;
} }
...@@ -1024,6 +1021,7 @@ import coupon from '@/components/coupon/index'; ...@@ -1024,6 +1021,7 @@ import coupon from '@/components/coupon/index';
// bottom: 6rpx; // bottom: 6rpx;
// z-index: 1; // z-index: 1;
} }
.hotel-order .big-title text { .hotel-order .big-title text {
font-size: 34rpx; font-size: 34rpx;
font-weight: bold; font-weight: bold;
...@@ -1031,130 +1029,158 @@ import coupon from '@/components/coupon/index'; ...@@ -1031,130 +1029,158 @@ import coupon from '@/components/coupon/index';
position: relative; position: relative;
z-index: 2; z-index: 2;
} }
.o-head-title{
.o-head-title {
font-weight: bold; font-weight: bold;
font-size: 32rpx; font-size: 32rpx;
color: #080A09; color: #080A09;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.o-detail{
.o-detail {
font-weight: 800; font-weight: 800;
font-size: 32rpx; font-size: 32rpx;
color: #B99846; color: #B99846;
} }
.room-dateil{
.room-dateil {
margin-top: 3rpx; margin-top: 3rpx;
} }
.roomline{
.roomline {
width: 1rpx; width: 1rpx;
height: 24rpx; height: 24rpx;
background: #BCBCBC; background: #BCBCBC;
margin-left: 14rpx; margin-left: 14rpx;
margin-right: 14rpx; margin-right: 14rpx;
} }
.roomPrice{
.roomPrice {
font-weight: 500; font-weight: 500;
font-size: 28rpx; font-size: 28rpx;
color: #1D1D20; color: #1D1D20;
flex-shrink: 0; flex-shrink: 0;
} }
.visaProductTextBox{
.visaProductTextBox {
padding: 29rpx 0 21rpx 0; padding: 29rpx 0 21rpx 0;
font-family: PingFang SC; font-family: PingFang SC;
} }
.visaProductTitle{
.visaProductTitle {
font-weight: 800; font-weight: 800;
font-size: 32rpx; font-size: 32rpx;
} }
.visaProductTextL{
.visaProductTextL {
font-size: 35rpx; font-size: 35rpx;
font-weight: bold; font-weight: bold;
} }
.visaProductTextR{
.visaProductTextR {
font-size: 20rpx; font-size: 20rpx;
margin-left: 24rpx; margin-left: 24rpx;
} }
.visaProduct_rColor{
.visaProduct_rColor {
color: #FF3166; color: #FF3166;
} }
.addPnum{
.addPnum {
padding: 9rpx 10rpx; padding: 9rpx 10rpx;
} }
.addPnumL{
.addPnumL {
margin-right: 17rpx; margin-right: 17rpx;
} }
.addPnumR{
.addPnumR {
margin-left: 17rpx; margin-left: 17rpx;
} }
.visaProductTetx{
.visaProductTetx {
font-weight: bold; font-weight: bold;
font-size: 28rpx; font-size: 28rpx;
color: #080A09; color: #080A09;
} }
.form-itemsTime{
.form-itemsTime {
font-weight: bold; font-weight: bold;
font-size: 28rpx; font-size: 28rpx;
color: #080A09; color: #080A09;
} }
.form-itemsL text{
.form-itemsL text {
font-weight: bold; font-weight: bold;
font-size: 28rpx; font-size: 28rpx;
color: #B99846; color: #B99846;
margin-right: 26rpx; margin-right: 26rpx;
} }
.CouponBox{
.CouponBox {
margin: 0 31rpx 32rpx 31rpx; margin: 0 31rpx 32rpx 31rpx;
padding: 18rpx 34rpx 35rpx 34rpx; padding: 18rpx 34rpx 35rpx 34rpx;
background: #fff; background: #fff;
border-radius: 18rpx; border-radius: 18rpx;
} }
.PriceBox{
.PriceBox {
margin: 0 31rpx 32rpx 31rpx; margin: 0 31rpx 32rpx 31rpx;
padding: 18rpx 34rpx 35rpx 34rpx; padding: 18rpx 34rpx 35rpx 34rpx;
background: #fff; background: #fff;
border-radius: 18rpx; border-radius: 18rpx;
} }
.PriceZaiXian{
border-bottom: 1rpx solid #F0F0F0 ; .PriceZaiXian {
border-bottom: 1rpx solid #F0F0F0;
} }
.PriceZaiXian .label{
.PriceZaiXian .label {
font-weight: bold; font-weight: bold;
} }
.hotel-order .form .form-items.PriceZaiXian{
.hotel-order .form .form-items.PriceZaiXian {
padding: 0; padding: 0;
padding-top: 15rpx; padding-top: 15rpx;
padding-bottom: 20rpx; padding-bottom: 20rpx;
} }
.hotel-order .form .form-items.PriceMinXi{
.hotel-order .form .form-items.PriceMinXi {
padding: 0; padding: 0;
padding-top: 20rpx; padding-top: 20rpx;
padding-bottom: 30rpx; padding-bottom: 30rpx;
} }
.PriceTole{
.PriceTole {
color: #BFB9B9; color: #BFB9B9;
} }
.buyTispBox{
.buyTispBox {
border-radius: 18rpx; border-radius: 18rpx;
background: #fff; background: #fff;
margin: 0 31rpx 27rpx 31rpx; margin: 0 31rpx 27rpx 31rpx;
padding: 37rpx 18rpx 47rpx 18rpx; padding: 37rpx 18rpx 47rpx 18rpx;
} }
.buyTispBox .big-title{
.buyTispBox .big-title {
font-weight: 800; font-weight: 800;
font-size: 32rpx; font-size: 32rpx;
color: #080A09; color: #080A09;
margin-bottom: 37rpx; margin-bottom: 37rpx;
} }
.buyTispBox .rule{
.buyTispBox .rule {
font-weight: 500; font-weight: 500;
font-size: 24rpx; font-size: 24rpx;
color: #1D1D20; color: #1D1D20;
line-height: 42rpx; line-height: 42rpx;
} }
.LastNameBox view{
.LastNameBox view {
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.LastNameBox view:last-child{
.LastNameBox view:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
</style> </style>
\ No newline at end of file
import EnumHelper from "./enumhelper.js" import EnumHelper from "./enumhelper.js"
import ListProductTypeEnum from "./listProductType.js" import ListProductTypeEnum from "./listProductType.js"
const ProductTypeEnum = [ const ProductTypeEnum = [{
{
value: 1, value: 1,
desc: '机票产品' desc: '机票产品'
}, },
...@@ -41,7 +40,10 @@ const ProductTypeEnum = [ ...@@ -41,7 +40,10 @@ const ProductTypeEnum = [
value: 6, value: 6,
desc: '签证产品' desc: '签证产品'
}, },
{
value: 7,
desc: '酒店产品'
},
] ]
const mappingRules = [ const mappingRules = [
...@@ -68,7 +70,7 @@ const mappingListType = (value) => { ...@@ -68,7 +70,7 @@ const mappingListType = (value) => {
const mappingListTypeTy = (type) => { const mappingListTypeTy = (type) => {
let val = ProductTypeEnum.findIndex(x => { let val = ProductTypeEnum.findIndex(x => {
return x.value==Number(type) return x.value == Number(type)
}) })
return ProductTypeEnum[val] return ProductTypeEnum[val]
} }
...@@ -79,4 +81,8 @@ const transProductEnum = (value) => { ...@@ -79,4 +81,8 @@ const transProductEnum = (value) => {
export default ProductTypeEnum export default ProductTypeEnum
export { mappingListType, transProductEnum, mappingListTypeTy } export {
\ No newline at end of file mappingListType,
transProductEnum,
mappingListTypeTy
}
\ No newline at end of file
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