Commit a8743396 authored by zhengke's avatar zhengke

修改

parent c1186b6f
......@@ -533,6 +533,7 @@
<el-date-picker class="HD_date_input" v-model="SimilarMsg.arrivalDate" style="width:190px;" clear-icon=""
size="small"
value-format="yyyy-MM-dd"
@change="getDepartureDate"
:picker-options="pickerOptions0"
type="date"
placeholder="">
......@@ -542,6 +543,7 @@
size="small"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions0"
@change="getDepartureDate"
type="date"
placeholder="">
</el-date-picker>
......@@ -882,10 +884,16 @@ export default {
this.$viewer = viewer;
},
bigImgShow(index) {
//if (num == 1) {
this.$viewer.view(index)
this.$viewer.view(index)
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) {
......@@ -922,9 +930,6 @@ export default {
},
changeImg(){
this.images=[]
this.bigImgShow()
},
getList() {
......@@ -1245,6 +1250,7 @@ export default {
this.SimilarMsg,
res => {
if (res.data.resultCode == 1) {
this.SimilarList=[];
if (
Object.prototype.toString.call(res.data.data.roomRateDetails) ==
"[object Object]"
......@@ -1319,7 +1325,19 @@ export default {
},
//获取价格
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){
......
......@@ -611,7 +611,7 @@
地址:{{item.address}}
</div>
<div class="HL_ListPrice">
<span><label>¥</label>{{getPrice(item.lowrateBySetCurrency)}}</span>
<span><label>¥</label>{{getPrice(item.lowrateTotalBySetCurrency)}}</span>
</div>
<input type="button" class="HL_ListBtn" @click="goHotelDetail(item,'HotelDetail')" value="查看详情"/>
</div>
......
......@@ -325,6 +325,15 @@
text-align: right;
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>
......@@ -1010,8 +1019,18 @@ export default {
this.sureMsg.roomOptionCd = this.msg.roomOptionCd;
this.sureMsg.HotelName = this.dataList.hotelName;
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.sureMsg.roomGroup.forEach(j=>{
if(Object.prototype.toString.call(x.rateGroup) == '[object Object]'){
......
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