Commit edc941fa authored by youjie's avatar youjie

酒店

parent 2eac0341
...@@ -51,20 +51,26 @@ ...@@ -51,20 +51,26 @@
<view class="row"> <view class="row">
<view class="column"> <view class="column">
<view class="hotelDetailRPrice"> <view class="hotelDetailRPrice">
{{subItem.Currency }} <text> {{getPrice(subItem.TotalPrice)}}</text>起/晚 {{subItem.Currency }} <text>
<!-- {{getPrice(subItem.TotalPrice)}} -->
{{subItem.TotalPrice}}
</text>起/晚
</view> </view>
<view class="hotelDetailRPriceT">{{dayObj.day}}晚总价 <view class="hotelDetailRPriceT">{{dayObj.day}}晚总价
<text>{{subItem.Currency}}{{ getPrice(subItem.TotalPrice)*dayObj.day }}</text> <text>{{subItem.Currency}}
<!-- {{ getPrice(subItem.TotalPrice)*dayObj.day }} -->
{{ subItem.TotalPrice*dayObj.day }}
</text>
</view> </view>
</view> </view>
<view class="column hotelDetailRPriceBook" <view class="column hotelDetailRPriceBook"
:class="[!index?'active':'']"> :class="[!index?'active':'']">
<text v-if="!index" class="hotelDetailMinXiRS">剩2间</text> <text v-if="!index" class="hotelDetailMinXiRS">剩2间</text>
<view class="hotelDetailMinXiRB" @click="goUrl(subItem)"> <view class="hotelDetailMinXiRB" @click="setOrder(subItem)">
</view> </view>
</view> </view>
<!-- <view class="hotelDetailRPriceBook" @click="goUrl(subItem)"> <!-- <view class="hotelDetailRPriceBook" @click="setOrder(subItem)">
</view> --> </view> -->
</view> </view>
...@@ -105,16 +111,22 @@ ...@@ -105,16 +111,22 @@
<view class="column"> <view class="column">
<view class="hotelDetailMinXiRF"> </view> <view class="hotelDetailMinXiRF"> </view>
<view class="hotelDetailMinXiRP"> <view class="hotelDetailMinXiRP">
{{subItem.Currency }} <text>{{getPrice(subItem.TotalPrice)}}</text> {{subItem.Currency }} <text>
<!--{{getPrice(subItem.TotalPrice)}}-->
{{subItem.TotalPrice}}
</text>
</view> </view>
<view class="hotelDetailMinXiRT">{{dayObj.day}}晚总价 <view class="hotelDetailMinXiRT">{{dayObj.day}}晚总价
<text>{{subItem.Currency}}{{ getPrice(subItem.TotalPrice)*dayObj.day }}</text> <text>{{subItem.Currency}}
<!--{{ getPrice(subItem.TotalPrice)*dayObj.day }}-->
{{ subItem.TotalPrice*dayObj.day }}
</text>
</view> </view>
</view> </view>
<view class="column hotelDetailMinXiRBBox" <view class="column hotelDetailMinXiRBBox"
:class="[!subindex?'active':'']"> :class="[!subindex?'active':'']">
<text v-if="!subindex" class="hotelDetailMinXiRS">剩2间</text> <text v-if="!subindex" class="hotelDetailMinXiRS">剩2间</text>
<view class="hotelDetailMinXiRB" @click="goUrl(subItem)"> <view class="hotelDetailMinXiRB" @click="setOrder(subItem)">
</view> </view>
</view> </view>
...@@ -126,13 +138,21 @@ ...@@ -126,13 +138,21 @@
</view> </view>
</view> </view>
</view> </view>
<u-popup v-model="showSalePreviwe" mode="bottom"
border-radius="50" length="60%"
:safe-area-inset-bottom="true">
<orderService :msg="msg" :list="SaleList" @goReserce="goReserce"></orderService>
</u-popup>
</view> </view>
</template> </template>
<script> <script>
import orderService from "@/components/serviceStaff/orderService";
export default { export default {
props: ['roomMsg', 'dataList', 'search', 'rooms', 'day', 'qRoomType', 'qMealType'], props: ['roomMsg', 'dataList', 'search', 'rooms', 'day', 'qRoomType', 'qMealType','createById'],
components: {}, components: {
orderService,
},
data() { data() {
return { return {
optionsTitle: ["房型", "床型", "餐食"], optionsTitle: ["房型", "床型", "餐食"],
...@@ -151,6 +171,15 @@ ...@@ -151,6 +171,15 @@
}, },
qRoomTypeList: [], qRoomTypeList: [],
qMealTypeList: [], qMealTypeList: [],
b2bUser: null,
SaleList: [],
msg:{
SaleName: '',
SaleId: 0,
},
createBy: 0,
showSalePreviwe: false,
subItem: null,
}; };
}, },
watch: { watch: {
...@@ -213,11 +242,55 @@ ...@@ -213,11 +242,55 @@
deep: true, deep: true,
immediate: false, immediate: false,
}, },
createById: {
handler(val, oldval) {
if (val) {
this.createBy = val
}
},
deep: false,
immediate: false,
},
}, },
created() { created() {
this.b2bUser = uni.getStorageSync("b2b_user");
this.getSale()
}, },
methods: { methods: {
goReserce(item){
this.msg.SaleName = item.SaleName
this.msg.SaleId = item.SaleId
this.showSalePreviwe = false;
this.goUrl()
},
getSale(){
if(!this.b2bUser.customerId) return
this.apipost(
"b2b_get_GetCustomerCreateByList",
{
CustomerId: this.b2bUser.customerId
},
(res) => {
if (res.resultCode == 1) {
if(res.data.length>0){
this.SaleList = res.data
if(res.data.length==1&&this.createBy==0){
this.msg.SaleName = res.data[0].EmName
this.msg.SaleId = res.data[0].CreateBy
}
}else{
this.msg.SaleName = ''
this.msg.SaleId = 0
}
} else {
}
},
(err) => {
}
);
},
clickShow(item) { clickShow(item) {
item.show = !item.show item.show = !item.show
this.$forceUpdate() this.$forceUpdate()
...@@ -298,7 +371,30 @@ ...@@ -298,7 +371,30 @@
} }
return mealtypeName; return mealtypeName;
}, },
goUrl(subItem) { setOrder(subItem) {
this.subItem = subItem
// #ifdef MP-AG
if (this.SaleList&&this.SaleList.length>1&&this.msg.SaleId==0&&this.createBy==0) {
// uni.showToast({
// title: "请选择服务人员",
// icon: "none",
// });
this.showSalePreviwe = true;
return;
}
// #endif
this.goUrl()
},
goUrl() {
let subItem = this.subItem
let createBy = 0
// #ifdef MP-DI
let employeeId = this.b2bUser.salesBaseInfo&&this.b2bUser.salesBaseInfo.employeeId?this.b2bUser.salesBaseInfo.employeeId:0
createBy = this.createBy>0?this.createBy:employeeId
// #endif
// #ifdef MP-AG
if(this.createBy>0||this.msg.SaleId) createBy = this.createBy>0?this.createBy:this.msg.SaleId
// #endif
let pHotel = { let pHotel = {
hotelid: this.HotelInfo.hotelid, hotelid: this.HotelInfo.hotelid,
name: this.HotelInfo.name, name: this.HotelInfo.name,
...@@ -306,6 +402,7 @@ ...@@ -306,6 +402,7 @@
images: [], images: [],
destination: this.HotelInfo.location&&this.HotelInfo.location.destination&&this.HotelInfo.location.destination.name, destination: this.HotelInfo.location&&this.HotelInfo.location.destination&&this.HotelInfo.location.destination.name,
country: this.HotelInfo.location&&this.HotelInfo.location.country&&this.HotelInfo.location.country.name, country: this.HotelInfo.location&&this.HotelInfo.location.country&&this.HotelInfo.location.country.name,
CreateBy: createBy,//服务人员
} }
if (this.HotelInfo) { if (this.HotelInfo) {
if (this.HotelInfo.images && this.HotelInfo.images.length > 0) { if (this.HotelInfo.images && this.HotelInfo.images.length > 0) {
......
...@@ -227,6 +227,11 @@ ...@@ -227,6 +227,11 @@
</view> </view>
</scroll-view> </scroll-view>
<u-popup v-model="showSalePreviwe" mode="bottom"
border-radius="50" length="60%"
:safe-area-inset-bottom="true">
<orderService :msg="msg" :list="SaleList" @goReserce="goReserce"></orderService>
</u-popup>
<u-popup v-model="showTimePopup" mode="bottom" border-radius="20" length="89%" :safe-area-inset-bottom="true"> <u-popup v-model="showTimePopup" mode="bottom" border-radius="20" length="89%" :safe-area-inset-bottom="true">
<CheckDate :msg="searchObj" @chosenDateResult="chosenDateResult"></CheckDate> <CheckDate :msg="searchObj" @chosenDateResult="chosenDateResult"></CheckDate>
</u-popup> </u-popup>
...@@ -245,6 +250,7 @@ ...@@ -245,6 +250,7 @@
import hotelPolicy from "./components/hotelPolicy.vue"; import hotelPolicy from "./components/hotelPolicy.vue";
import hotelFacilities from "./components/hotelFacilities.vue"; import hotelFacilities from "./components/hotelFacilities.vue";
import CheckDate from "./components/time/date.vue"; import CheckDate from "./components/time/date.vue";
import orderService from "@/components/serviceStaff/orderService";
export default { export default {
components: { components: {
auth, auth,
...@@ -257,6 +263,7 @@ ...@@ -257,6 +263,7 @@
hotelFacilities, hotelFacilities,
hotelRoom, hotelRoom,
CheckDate, CheckDate,
orderService,
}, },
data() { data() {
return { return {
...@@ -378,6 +385,13 @@ ...@@ -378,6 +385,13 @@
U: {}, U: {},
b2bUser: {}, b2bUser: {},
is_show_auth: 0, is_show_auth: 0,
showSalePreviwe: false,
msg:{
SaleName: '',
SaleId: '',
},
SaleList: [],
createBy: 0,
}; };
}, },
computed: { computed: {
...@@ -468,10 +482,29 @@ ...@@ -468,10 +482,29 @@
0; 0;
}, },
onLoad(options) { onLoad(options) {
if (!options.scene) {
this.id = options.id;
this.roomMsg.hotelid = options.id;
if (options.createBy) {
this.createBy = options.createBy
}
}else{
let t = decodeURIComponent(option.scene).split('&')
t.forEach(x => {
let item = x.split('=')
if (item.length === 2) {
if (item[0] === 'id') {
this.id = options.id;
this.roomMsg.hotelid = options.id;
} else if (item[0] === 'createBy') {
this.createBy = item[1]
}
}
})
}
this.U = uni.getStorageSync("mall_UserInfo"); this.U = uni.getStorageSync("mall_UserInfo");
this.b2bUser = uni.getStorageSync("b2b_user"); this.b2bUser = uni.getStorageSync("b2b_user");
this.id = options.id;
this.roomMsg.hotelid = options.id;
let that = this; let that = this;
uni.getSystemInfo({ uni.getSystemInfo({
success(res) { success(res) {
...@@ -552,8 +585,37 @@ ...@@ -552,8 +585,37 @@
}; };
this.showAuth = true; this.showAuth = true;
} }
this.getSale()
}, },
methods: { methods: {
getSale(){
if(!this.b2bUser.customerId) return
this.apipost(
"b2b_get_GetCustomerCreateByList",
{
CustomerId: this.b2bUser.customerId
},
(res) => {
if (res.resultCode == 1) {
if(res.data.length>0){
this.SaleList = res.data
if(res.data.length==1&&this.createBy==0){
this.msg.SaleName = res.data[0].EmName
this.msg.SaleId = res.data[0].CreateBy
}
}else{
this.msg.SaleName = ''
this.msg.SaleId = 0
}
} else {
}
},
(err) => {
}
);
},
reloadUserinfo() { reloadUserinfo() {
const pages = getCurrentPages() const pages = getCurrentPages()
const curPage = pages[pages.length - 1] const curPage = pages[pages.length - 1]
......
...@@ -29,7 +29,9 @@ ...@@ -29,7 +29,9 @@
<view class="roomline"></view> <view class="roomline"></view>
<view class="roomPrice"> <view class="roomPrice">
<!-- {{ searchObj.peoples }} --> <!-- {{ searchObj.peoples }} -->
{{RoomInfo.Currency}}{{getPrice(orderMsg.TotalPrice)}} {{RoomInfo.Currency}}
<!-- {{getPrice(orderMsg.TotalPrice)}} -->
{{orderMsg.TotalPrice}}
<!-- /人 --> <!-- /人 -->
</view> </view>
</view> </view>
...@@ -154,7 +156,10 @@ ...@@ -154,7 +156,10 @@
<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 <text
class="red">{{RoomInfo.Currency}}{{getPrice(orderMsg.TotalPrice)*orderMsg.RoomCount}}</text> class="red">{{RoomInfo.Currency}}
<!--{{getPrice(orderMsg.TotalPrice)*orderMsg.RoomCount}}-->
{{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 +173,9 @@ ...@@ -168,7 +173,9 @@
<text style="margin-right: 30rpx">房间</text> <text style="margin-right: 30rpx">房间</text>
</view> </view>
<view style="text-align: right"> <view style="text-align: right">
{{orderMsg.RoomCount}}间×{{RoomInfo.Currency}}{{ getPrice(orderMsg.TotalPrice) }} {{orderMsg.RoomCount}}间×{{RoomInfo.Currency}}
<!--{{ getPrice(orderMsg.TotalPrice) }}-->
{{ orderMsg.TotalPrice }}
</view> </view>
</view> </view>
<view class="flex f12 grey" style="margin-bottom: 40rpx" <view class="flex f12 grey" style="margin-bottom: 40rpx"
...@@ -182,7 +189,9 @@ ...@@ -182,7 +189,9 @@
<view class="flex f12"> <view class="flex f12">
<view style="flex: 1">小计</view> <view style="flex: 1">小计</view>
<view> <view>
{{RoomInfo.Currency}}{{ (getPrice(orderMsg.TotalPrice)*orderMsg.RoomCount)-currentCoupon.discountMoney }} {{RoomInfo.Currency}}
<!--{{ (getPrice(orderMsg.TotalPrice)*orderMsg.RoomCount)-currentCoupon.discountMoney }}-->
{{ (orderMsg.TotalPrice*orderMsg.RoomCount)-currentCoupon.discountMoney }}
</view> </view>
</view> </view>
</view> </view>
...@@ -210,7 +219,9 @@ ...@@ -210,7 +219,9 @@
<template v-if="index1!=(roomRateDetails.CancellationPolicyList.length-1)">- <template v-if="index1!=(roomRateDetails.CancellationPolicyList.length-1)">-
{{ getformatDateStr(roomRateDetails.CancellationPolicyList[index1+1].FromDate) }} {{ getformatDateStr(roomRateDetails.CancellationPolicyList[index1+1].FromDate) }}
之间</template> 之间</template>
取消,收费 {{DanWei}}{{getPrice(itemCancella.Amount)}};</template> 取消,收费 {{DanWei}}
<!--{{getPrice(itemCancella.Amount)}}-->
{{itemCancella.Amount}};</template>
</template> </template>
</template> </template>
</text> </text>
...@@ -223,7 +234,10 @@ ...@@ -223,7 +234,10 @@
<view class="box flex"> <view class="box flex">
<view class="price"> <view class="price">
<text class="f11">{{RoomInfo.Currency}}</text> <text class="f11">{{RoomInfo.Currency}}</text>
<text>{{ (getPrice(orderMsg.TotalPrice)*orderMsg.RoomCount)-currentCoupon.discountMoney }}</text> <text>
<!--{{ (getPrice(orderMsg.TotalPrice)*orderMsg.RoomCount)-currentCoupon.discountMoney }}-->
{{ (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" <u-button :ripple="true" :hair-line="false" :custom-style="submit?btnStyle2:btnStyle" @click="buyRoom"
...@@ -235,7 +249,10 @@ ...@@ -235,7 +249,10 @@
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<u-picker mode="selector" v-model="showCountry" :default-selector="[0]" :range="countrys" <u-picker mode="selector" v-model="showCountry" :default-selector="[0]" :range="countrys"
@confirm='(e)=>{changeDown(e,CountryType)}' range-key="label" @input="showCountry=false"></u-picker> @confirm='(e)=>{changeDown(e,CountryType)}' 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)" :list="couponList"
:current="useCouponIds" @close="closeCouponHandler" :order="orderMsg" :numberPeople="searchObj.peoples">
</coupon>-->
<coupon v-if="couponList.length > 0 && showCoupon" :price="orderMsg.TotalPrice" :list="couponList"
:current="useCouponIds" @close="closeCouponHandler" :order="orderMsg" :numberPeople="searchObj.peoples"> :current="useCouponIds" @close="closeCouponHandler" :order="orderMsg" :numberPeople="searchObj.peoples">
</coupon> </coupon>
</view> </view>
...@@ -299,6 +316,7 @@ ...@@ -299,6 +316,7 @@
roomType: 0, roomType: 0,
CustomerId: 0, //同行Id CustomerId: 0, //同行Id
DirectCustomerId: 0, //直客Id DirectCustomerId: 0, //直客Id
CreateBy: 0, //同业联系人
}, },
showtime: false, showtime: false,
paramsTime: { paramsTime: {
...@@ -439,7 +457,7 @@ ...@@ -439,7 +457,7 @@
GoodsPic: "", 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.orderMsg.TotalPrice,//this.getPrice(this.orderMsg.TotalPrice)
PreferentialPrice: this.currentCoupon.discountMoney, PreferentialPrice: this.currentCoupon.discountMoney,
ErpOrderId: OrderId, ErpOrderId: OrderId,
Country: 0, Country: 0,
...@@ -538,7 +556,7 @@ ...@@ -538,7 +556,7 @@
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.roomRateDetails.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
} }
...@@ -765,10 +783,12 @@ ...@@ -765,10 +783,12 @@
}) })
return return
} }
if (this.submit) return; if (this.submit) return;
this.submit = true; this.submit = true;
let that = this; let that = this;
var CreateBy = 0
// #ifdef MP-DI // #ifdef MP-DI
that.orderMsg.DirectCustomerId = this.customer.customerId; that.orderMsg.DirectCustomerId = this.customer.customerId;
if (this.customer && this.customer.erpBaseInfo && this.customer.erpBaseInfo.employeeId) { if (this.customer && this.customer.erpBaseInfo && this.customer.erpBaseInfo.employeeId) {
...@@ -778,12 +798,14 @@ ...@@ -778,12 +798,14 @@
// #endif // #endif
// #ifdef MP-AG // #ifdef MP-AG
CreateBy = this.CreateBy
that.orderMsg.CustomerId = this.customer.customerId that.orderMsg.CustomerId = this.customer.customerId
this.orderMsg.OrderSource = 5 this.orderMsg.OrderSource = 5
if (this.customer && this.customer.salesBaseInfo && this.customer.salesBaseInfo.employeeId) { if (this.customer && this.customer.salesBaseInfo && this.customer.salesBaseInfo.employeeId) {
this.orderMsg.EmployeeIdStr = this.customer.salesBaseInfo.employeeId this.orderMsg.EmployeeIdStr = this.customer.salesBaseInfo.employeeId
} }
// #endif // #endif
that.orderMsg.CreateBy = 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 => {
......
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