Commit a8743396 authored by zhengke's avatar zhengke

修改

parent c1186b6f
...@@ -533,6 +533,7 @@ ...@@ -533,6 +533,7 @@
<el-date-picker class="HD_date_input" v-model="SimilarMsg.arrivalDate" style="width:190px;" clear-icon="" <el-date-picker class="HD_date_input" v-model="SimilarMsg.arrivalDate" style="width:190px;" clear-icon=""
size="small" size="small"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
@change="getDepartureDate"
:picker-options="pickerOptions0" :picker-options="pickerOptions0"
type="date" type="date"
placeholder=""> placeholder="">
...@@ -542,6 +543,7 @@ ...@@ -542,6 +543,7 @@
size="small" size="small"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:picker-options="pickerOptions0" :picker-options="pickerOptions0"
@change="getDepartureDate"
type="date" type="date"
placeholder=""> placeholder="">
</el-date-picker> </el-date-picker>
...@@ -882,10 +884,16 @@ export default { ...@@ -882,10 +884,16 @@ export default {
this.$viewer = viewer; this.$viewer = viewer;
}, },
bigImgShow(index) { bigImgShow(index) {
//if (num == 1) {
this.$viewer.view(index) this.$viewer.view(index)
this.$viewer.show(); this.$viewer.show();
//} },
//获取结束日期不能等于开始
getDepartureDate(){
var arrivalDate = new Date(this.SimilarMsg.arrivalDate);
var departureDate = new Date(this.SimilarMsg.departureDate);
if(arrivalDate.getTime() >= departureDate.getTime()){
this.SimilarMsg.departureDate = moment(this.SimilarMsg.arrivalDate).add(1,'days').format('YYYY-MM-DD')
}
}, },
//获取房型 //获取房型
getGradeType(type) { getGradeType(type) {
...@@ -922,9 +930,6 @@ export default { ...@@ -922,9 +930,6 @@ export default {
}, },
changeImg(){ changeImg(){
this.images=[] this.images=[]
this.bigImgShow() this.bigImgShow()
}, },
getList() { getList() {
...@@ -1245,6 +1250,7 @@ export default { ...@@ -1245,6 +1250,7 @@ export default {
this.SimilarMsg, this.SimilarMsg,
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.SimilarList=[];
if ( if (
Object.prototype.toString.call(res.data.data.roomRateDetails) == Object.prototype.toString.call(res.data.data.roomRateDetails) ==
"[object Object]" "[object Object]"
...@@ -1319,7 +1325,19 @@ export default { ...@@ -1319,7 +1325,19 @@ export default {
}, },
//获取价格 //获取价格
getPrice(price) { getPrice(price) {
return Math.ceil(price / this.JapanIncrease); //(chargeableRateInfoPerPersonForANightBySetCurrency/0.9975)*入住天数*入住人数
//天数
return Math.ceil(price / this.JapanIncrease)*(this.auditNum+this.childNum)*this.DateDiff(this.SimilarMsg.arrivalDate,this.SimilarMsg.departureDate);
},
//获取相差天数
DateDiff(sDate1, sDate2) { //sDate1和sDate2是2017-09-25格式
var aDate, oDate1, oDate2, iDays;
aDate = sDate1.split("-");
oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]); //转换为09-25-2017格式
aDate = sDate2.split("-");
oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]);
iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24); //把相差的毫秒数转换为天数
return iDays;
}, },
//点击预订传递参数 //点击预订传递参数
bookHotel(roomOptionCd){ bookHotel(roomOptionCd){
......
...@@ -611,7 +611,7 @@ ...@@ -611,7 +611,7 @@
地址:{{item.address}} 地址:{{item.address}}
</div> </div>
<div class="HL_ListPrice"> <div class="HL_ListPrice">
<span><label>¥</label>{{getPrice(item.lowrateBySetCurrency)}}</span> <span><label>¥</label>{{getPrice(item.lowrateTotalBySetCurrency)}}</span>
</div> </div>
<input type="button" class="HL_ListBtn" @click="goHotelDetail(item,'HotelDetail')" value="查看详情"/> <input type="button" class="HL_ListBtn" @click="goHotelDetail(item,'HotelDetail')" value="查看详情"/>
</div> </div>
......
...@@ -325,6 +325,15 @@ ...@@ -325,6 +325,15 @@
text-align: right; text-align: right;
width:80px; width:80px;
} }
.HotelSure .HS_div2One .el-input__inner{
border-radius: 0;
}
.HotelSure .HS_div3 .el-input__inner{
border-radius: 0;
}
.HotelSure .HS_div3 .el-textarea__inner{
border-radius: 0;
}
</style> </style>
...@@ -1011,7 +1020,17 @@ export default { ...@@ -1011,7 +1020,17 @@ export default {
this.sureMsg.HotelName = this.dataList.hotelName; this.sureMsg.HotelName = this.dataList.hotelName;
this.sureMsg.HotelPic = this.HotelImgUrl; this.sureMsg.HotelPic = this.HotelImgUrl;
//判断选择的人数与入住人数
let Count1=0
this.sureMsg.roomGroup.forEach(x=>{
Count1+=x.roomMaleCount+x.roomFemaleCount+x.roomChildCount
})
let Count2=0;
Count2=this.auditNum+this.childNum;
if(Count1!=Count2){
this.Error('入住人数与总入住数不匹配');
return;
}
this.dataList.roomGroup.forEach(x=>{ this.dataList.roomGroup.forEach(x=>{
this.sureMsg.roomGroup.forEach(j=>{ this.sureMsg.roomGroup.forEach(j=>{
if(Object.prototype.toString.call(x.rateGroup) == '[object Object]'){ if(Object.prototype.toString.call(x.rateGroup) == '[object Object]'){
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
.HS_RightList{ .HS_RightList{
width:388px; width:388px;
display: inline-block; display: inline-block;
margin-left:20px; margin:20px 20px 0 0;
height:auto; height:auto;
} }
.HS_div1{ .HS_div1{
...@@ -53,14 +53,14 @@ ...@@ -53,14 +53,14 @@
overflow: hidden; overflow: hidden;
padding-bottom:20px; padding-bottom:20px;
} }
.HS_bookTitle{ .OP_bookTitle{
padding-left:20px; padding-left:20px;
width:100%; width:100%;
background-color: #EDF4FF; background-color: #EDF4FF;
color:#111111; color:#111111;
font-size:12px; font-size:12px;
font-weight: bold; font-weight: bold;
height:29px; height:50px;
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom:1px solid #E0E0E0; border-bottom:1px solid #E0E0E0;
...@@ -144,13 +144,13 @@ ...@@ -144,13 +144,13 @@
position: relative; position: relative;
border:1px solid #E0E0E0; border:1px solid #E0E0E0;
} }
.HS_bookTitle span{ .OP_bookTitle span{
color:#FFA835; color:#FFA835;
font-size:12px; font-size:12px;
position: absolute; position: absolute;
right:20px; right:20px;
} }
.HS_bookTitle span i{ .OP_bookTitle span i{
position: relative; position: relative;
top:1px; top:1px;
margin-right:3px; margin-right:3px;
...@@ -189,8 +189,8 @@ ...@@ -189,8 +189,8 @@
width:100%; width:100%;
height:100%; height:100%;
} }
.HS_HotelRight{ .Op_HotelRight{
height:148px; height:238px;
padding:17px 20px 20px 20px; padding:17px 20px 20px 20px;
border:1px solid #E0E0E0; border:1px solid #E0E0E0;
border-top:0; border-top:0;
...@@ -221,10 +221,6 @@ ...@@ -221,10 +221,6 @@
.f12{ .f12{
font-size:12px; font-size:12px;
} }
.C9{
color:#999999;
margin-right:20px;
}
.HS_RoomInfo li{ .HS_RoomInfo li{
display: block; display: block;
width:100%; width:100%;
...@@ -326,14 +322,81 @@ ...@@ -326,14 +322,81 @@
.disBtn:hover{ .disBtn:hover{
opacity: 1; opacity: 1;
} }
.OP_Stitle{
color:#888888;
text-align: right;
display: inline-block;
width:50px;
margin-right:20px;
}
</style> </style>
<template> <template>
<div class="HotelSure" v-loading="loading"> <div class="HotelSure" v-loading="loading">
<div class="HS_RightList">
<!-- <div class="HS_RightBtm">
<div class="HS_RitTop">
<span class="HS_RitTop_Left">订单总额</span>
<span class="HS_RitPrice">
<i>¥</i>{{details.model.TotalPrice}}
</span>
</div>
</div> -->
<div class="HS_RightTopImg">
<template v-if="details">
<img :src="details.model.HotelPic" alt=""/>
</template>
</div>
<div class="Op_HotelRight">
<div class="HS_HtName">{{details.model.HotelName}}</div>
<div class="HS_HAddress" v-if="details.parmResult">
<img src="../../../../assets/img/hotel/redAddress.png" alt=""/>
{{details.parmResult.address}}
</div>
<ul class="HS_RoomInfo">
<li>
<span style="margin-right:20px;">房型</span>
<span v-if="details.parmResult">
<template v-if="details.parmResult.roomType==1">{{getGradeType(details.parmResult.gradeType)}}单人间</template>
<template v-if="details.parmResult.roomType==2">{{getGradeType(details.parmResult.gradeType)}}双人间</template>
<template v-if="details.parmResult.roomType==3">{{getGradeType(details.parmResult.gradeType)}}大床房</template>
<template v-if="details.parmResult.roomType==4">{{getGradeType(details.parmResult.gradeType)}}三人间</template>
<template v-if="details.parmResult.roomType==5">{{getGradeType(details.parmResult.gradeType)}}四人间</template>
<template v-if="details.parmResult.roomType==6">{{getGradeType(details.parmResult.gradeType)}}日式房</template>
<template v-if="details.parmResult.roomType==7">{{getGradeType(details.parmResult.gradeType)}}日式+西式混合</template>
<template v-if="details.parmResult.roomType==8">{{getGradeType(details.parmResult.gradeType)}}大床房(小型)</template>
<template v-if="(details.parmResult.roomType==9||details.parmResult.roomType=='')&&details.parmResult.gradeType==''">未知房型</template>
</span>
</li>
<li>
<span style="margin-right:20px;">吸烟</span>
<template v-if="details.parmResult">
<span v-if="details.parmResult.smoking==0">禁烟</span>
<span v-if="details.parmResult.smoking==1">可吸烟</span>
</template>
</li>
<li>
<span style="margin-right:20px;">厕所</span>
<template v-if="details.parmResult">
<span v-if="details.parmResult.withBath==0"></span>
<span v-if="details.parmResult.withBath==1"></span>
</template>
</li>
<li>
<span style="margin-right:20px;">露天客房</span>
<template v-if="details.parmResult">
<span v-if="details.parmResult.withOpenAirBath==0"></span>
<span v-if="details.parmResult.withOpenAirBath==1"></span>
</template>
</li>
</ul>
</div>
</div>
<div class="HS_LeftInfo"> <div class="HS_LeftInfo">
<div class="HS_div2"> <div class="HS_div2">
<div class="HS_bookTitle">预订信息</div> <div class="OP_bookTitle">预订信息</div>
<div class="HS_div3One"> <div class="HS_div3One">
<ul> <ul>
<li class="HS2_title">订单号</li> <li class="HS2_title">订单号</li>
...@@ -344,7 +407,7 @@ ...@@ -344,7 +407,7 @@
<ul> <ul>
<li class="HS2_title">房型信息</li> <li class="HS2_title">房型信息</li>
<li> <li>
<div> <div v-if="details.parmResult">
<template v-if="details.parmResult.roomType==1">{{getGradeType(details.parmResult.gradeType)}}单人间</template> <template v-if="details.parmResult.roomType==1">{{getGradeType(details.parmResult.gradeType)}}单人间</template>
<template v-if="details.parmResult.roomType==2">{{getGradeType(details.parmResult.gradeType)}}双人间</template> <template v-if="details.parmResult.roomType==2">{{getGradeType(details.parmResult.gradeType)}}双人间</template>
<template v-if="details.parmResult.roomType==3">{{getGradeType(details.parmResult.gradeType)}}大床房</template> <template v-if="details.parmResult.roomType==3">{{getGradeType(details.parmResult.gradeType)}}大床房</template>
...@@ -353,6 +416,7 @@ ...@@ -353,6 +416,7 @@
<template v-if="details.parmResult.roomType==6">{{getGradeType(details.parmResult.gradeType)}}日式房</template> <template v-if="details.parmResult.roomType==6">{{getGradeType(details.parmResult.gradeType)}}日式房</template>
<template v-if="details.parmResult.roomType==7">{{getGradeType(details.parmResult.gradeType)}}日式+西式混合房</template> <template v-if="details.parmResult.roomType==7">{{getGradeType(details.parmResult.gradeType)}}日式+西式混合房</template>
<template v-if="details.parmResult.roomType==8">{{getGradeType(details.parmResult.gradeType)}}大床房(小型)</template> <template v-if="details.parmResult.roomType==8">{{getGradeType(details.parmResult.gradeType)}}大床房(小型)</template>
<template v-if="(details.parmResult.roomType==9||details.parmResult.roomType=='')&&details.parmResult.gradeType==''">未知房型</template>
</div> </div>
</li> </li>
</ul> </ul>
...@@ -361,9 +425,9 @@ ...@@ -361,9 +425,9 @@
<ul> <ul>
<li class="HS2_title">入住日期</li> <li class="HS2_title">入住日期</li>
<li> <li>
<span>{{details.model.CheckIn.split('T')[0]}}</span> <span v-if="details.model.CheckIn">{{details.model.CheckIn.split('T')[0]}}</span>
<div class="HS_Line"></div> <div class="HS_Line"></div>
<span>{{details.model.CheckOut.split('T')[0]}}</span> <span v-if="details.model.CheckOut">{{details.model.CheckOut.split('T')[0]}}</span>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -377,55 +441,32 @@ ...@@ -377,55 +441,32 @@
</div> </div>
</div> </div>
<div class="HS_div3"> <div class="HS_div3">
<div class="HS_bookTitle" > <div class="OP_bookTitle" >
入住信息<span></span> 入住信息<span></span>
</div> </div>
<div v-if="details.parmResult" style="font-size:12px;">
<div> <div>
<div> <label class="OP_Stitle">预订人</label>
<label class="HS2_title">预订人:</label>
<div>{{details.parmResult.guestLastName + details.parmResult.guestFirstName}}</div> <div>{{details.parmResult.guestLastName + details.parmResult.guestFirstName}}</div>
</div> </div>
<div> <div>
<label class="HS2_title">当前地址:</label> <label class="OP_Stitle">当前地址</label>
<div>{{details.parmResultRoomInfo.guestAddress}}</div> <div>{{details.parmResultRoomInfo.guestAddress}}</div>
</div> </div>
<div> <div>
<label class="HS2_title">Email:</label> <label class="OP_Stitle">Email</label>
<div>{{details.parmResultRoomInfo.guestEmail}}</div> <div>{{details.parmResultRoomInfo.guestEmail}}</div>
</div> </div>
<div> <div>
<label class="HS2_title">电话:</label> <label class="OP_Stitle">电话</label>
<div>{{details.parmResultRoomInfo.guestPhoneNumber}}</div> <div>{{details.parmResultRoomInfo.guestPhoneNumber}}</div>
</div> </div>
<div> <div>
<label class="HS2_title">客户备注:</label> <label class="OP_Stitle">客户备注</label>
<div>{{details.model.Remark}}</div> <div style="width:90%">{{details.model.Remark}}</div>
</div>
</div>
</div>
</div> </div>
<div class="HS_RightList">
<div class="HS_RightBtm">
<div class="HS_RitTop">
<span class="HS_RitTop_Left">订单总额</span>
<span class="HS_RitPrice">
<i>¥</i>{{details.model.TotalPrice}}
</span>
</div> </div>
</div> </div>
<div class="HS_RightTopImg">
<template v-if="details">
<img :src="details.model.HotelPic" alt=""/>
</template>
</div>
<div class="HS_HotelRight">
<div class="HS_HtName">{{details.model.HotelName}}</div>
<div class="HS_HAddress">
<img src="../../../../assets/img/hotel/redAddress.png" alt=""/>
{{details.parmResult.address}}
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -453,7 +494,8 @@ export default { ...@@ -453,7 +494,8 @@ export default {
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data = res.data.data let data = res.data.data
this.details = data this.details = data;
console.log(this.details,'detailsssss');
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
......
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