Commit 04285479 authored by 黄媛媛's avatar 黄媛媛
parents 1d83b885 cef2fe61
...@@ -851,6 +851,7 @@ export default { ...@@ -851,6 +851,7 @@ export default {
this.SimilarMsg.departureDate = msgList.departureDate; this.SimilarMsg.departureDate = msgList.departureDate;
this.SimilarMsg.searchroomGroup = msgList.searchroomGroup; this.SimilarMsg.searchroomGroup = msgList.searchroomGroup;
this.room = msgList.room; this.room = msgList.room;
this.auditNum = msgList.auditNum;
this.getList(); this.getList();
this.getSimilar(); this.getSimilar();
} }
...@@ -1219,7 +1220,7 @@ export default { ...@@ -1219,7 +1220,7 @@ export default {
}, },
//点击预订传递参数 //点击预订传递参数
bookHotel(roomOptionCd){ bookHotel(roomOptionCd){
if(!localStorage.OpenB2BCode && !localStorage.userInfo){ if(sessionStorage.getItem('OpenB2BCode')==null && !localStorage.userInfo){
return this.Error('请登录!') return this.Error('请登录!')
} }
......
...@@ -339,7 +339,7 @@ export default { ...@@ -339,7 +339,7 @@ export default {
if (url.indexOf("?") != -1) { if (url.indexOf("?") != -1) {
let str = url.split("?")[1]; let str = url.split("?")[1];
let uid = str.split("uid=")[1]; let uid = str.split("uid=")[1];
localStorage.setItem("OpenB2BCode", decodeURIComponent(uid)); sessionStorage.setItem("OpenB2BCode", decodeURIComponent(uid));
} }
}, },
methods: { methods: {
......
...@@ -1078,7 +1078,7 @@ export default { ...@@ -1078,7 +1078,7 @@ export default {
this.PassMsg.lowrateBySetCurrency = item.lowrateBySetCurrency; this.PassMsg.lowrateBySetCurrency = item.lowrateBySetCurrency;
this.PassMsg.room = this.room this.PassMsg.room = this.room
this.PassMsg.auditNum = this.auditNum;
sessionStorage.setItem("HotelDetail", JSON.stringify(this.PassMsg)); sessionStorage.setItem("HotelDetail", JSON.stringify(this.PassMsg));
this.$router.push({ this.$router.push({
path:"/HotelDetail" path:"/HotelDetail"
......
...@@ -177,7 +177,7 @@ export default { ...@@ -177,7 +177,7 @@ export default {
this.TotalPrice=this.msgList.bookMoney; this.TotalPrice=this.msgList.bookMoney;
this.bookingNumber=this.msgList.orderId; this.bookingNumber=this.msgList.orderId;
} }
if(localStorage.OpenB2BCode){ if(sessionStorage.getItem('OpenB2BCode')){
this.isShowBtn=false; this.isShowBtn=false;
} }
}, },
......
...@@ -308,6 +308,16 @@ ...@@ -308,6 +308,16 @@
.HS_FFEI:last-child{ .HS_FFEI:last-child{
visibility: hidden; visibility: hidden;
} }
.cantBaoChild{
color:red;
}
.disBtn{
background-color: gray;
cursor: default;
}
.disBtn:hover{
opacity: 1;
}
</style> </style>
...@@ -353,6 +363,7 @@ ...@@ -353,6 +363,7 @@
<li class="HS2_title">入住人数</li> <li class="HS2_title">入住人数</li>
<li>成人 {{auditNum}}人</li> <li>成人 {{auditNum}}人</li>
<li>儿童 {{childNum}}人</li> <li>儿童 {{childNum}}人</li>
<li v-if="isBaoChild"><span class="cantBaoChild">不能报入儿童</span></li>
</ul> </ul>
</div> </div>
<div class="HS_div2One"> <div class="HS_div2One">
...@@ -494,7 +505,7 @@ ...@@ -494,7 +505,7 @@
</ul> </ul>
</div> </div>
</div> </div>
<input type="button" class="HD_payBtn" @click="submitForm('sureMsg')" value="下单" /> <input type="button" class="HD_payBtn" :class="{'disBtn':isBaoChild}" @click="submitForm('sureMsg')" value="下单" />
</div> </div>
<div class="HS_RightList"> <div class="HS_RightList">
<div class="HS_RightTopImg"> <div class="HS_RightTopImg">
...@@ -718,6 +729,11 @@ export default { ...@@ -718,6 +729,11 @@ export default {
//传递的图片 //传递的图片
HotelImgUrl:'', HotelImgUrl:'',
dataList:[], dataList:[],
//孩子能否报入
TotalChildCount:0,
//选了的儿童数
chekedChildCount:0,
isBaoChild:false
}; };
}, },
mounted() { mounted() {
...@@ -763,6 +779,9 @@ export default { ...@@ -763,6 +779,9 @@ export default {
} }
this.sureMsg.totalChargeableRateInfo=0; this.sureMsg.totalChargeableRateInfo=0;
this.sureMsg.totalPriceJapanese=0; this.sureMsg.totalPriceJapanese=0;
console.log(this.dataList,'datalistss');
this.TotalChildCount = 0;
let rateGrouoLen = 0;
this.dataList.roomGroup.forEach(x=>{ this.dataList.roomGroup.forEach(x=>{
if(Object.prototype.toString.call(x.rateGroup) == '[object Object]'){ if(Object.prototype.toString.call(x.rateGroup) == '[object Object]'){
let arr = []; let arr = [];
...@@ -781,26 +800,42 @@ export default { ...@@ -781,26 +800,42 @@ export default {
let AdultJapanCount = 0; let AdultJapanCount = 0;
let childJapanCount = 0; let childJapanCount = 0;
this.TotalChildCount+=x.roomChildCount*x.rateGroup.length;
rateGrouoLen+= x.rateGroup.length;
this.chekedChildCount = this.childNum*rateGrouoLen;
if(this.TotalChildCount<this.chekedChildCount){
this.isBaoChild=true;
}
x.rateGroup.forEach(z=>{ x.rateGroup.forEach(z=>{
if(z.perAdultRateBySetCurrency){ if(z.perAdultRateBySetCurrency){
if(x.roomAdultCount>0){
AdultTotalPrice+=parseFloat(z.perAdultRateBySetCurrency); AdultTotalPrice+=parseFloat(z.perAdultRateBySetCurrency);
}
if(x.roomChildCount>0){
childToTalPrice+=parseFloat(z.perChildRateBySetCurrency); childToTalPrice+=parseFloat(z.perChildRateBySetCurrency);
} }
}
if(z.perAdultRate){ if(z.perAdultRate){
AdultJapanPrice+=parseFloat(z.perAdultRate); AdultJapanPrice+=parseFloat(z.perAdultRate);
ChildJapanPrice+=parseFloat(z.perChildRate); ChildJapanPrice+=parseFloat(z.perChildRate);
} }
}) })
AdultCount+=AdultTotalPrice*x.roomAdultCount; // AdultCount+=AdultTotalPrice*x.roomAdultCount;
childCount+=childToTalPrice*x.roomChildCount; // childCount+=childToTalPrice*x.roomChildCount;
AdultCount+=AdultTotalPrice;
childCount+=childToTalPrice;
this.sureMsg.totalChargeableRateInfo += parseFloat(AdultCount+childCount); this.sureMsg.totalChargeableRateInfo += parseFloat(AdultCount+childCount);
AdultJapanCount+=AdultJapanPrice*x.roomAdultCount; // AdultJapanCount+=AdultJapanPrice*x.roomAdultCount;
childJapanCount+=ChildJapanPrice*x.roomChildCount; // childJapanCount+=ChildJapanPrice*x.roomChildCount;
AdultJapanCount+=AdultJapanPrice;
childJapanCount+=ChildJapanPrice;
this.sureMsg.totalPriceJapanese += parseFloat(AdultJapanCount+childJapanCount); this.sureMsg.totalPriceJapanese += parseFloat(AdultJapanCount+childJapanCount);
}) })
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -867,6 +902,7 @@ export default { ...@@ -867,6 +902,7 @@ export default {
//提交 //提交
submitForm(addMsg) { submitForm(addMsg) {
//提交创建、修改表单 //提交创建、修改表单
if(!this.isBaoChild){
this.$refs[addMsg].validate(valid => { this.$refs[addMsg].validate(valid => {
if (valid) { if (valid) {
this.BuyHoTel(); this.BuyHoTel();
...@@ -874,22 +910,23 @@ export default { ...@@ -874,22 +910,23 @@ export default {
return false; return false;
} }
}); });
}
}, },
//点击下单 //点击下单
BuyHoTel(){ BuyHoTel(){
if(!localStorage.OpenB2BCode && !localStorage.userInfo){ if(sessionStorage.getItem('OpenB2BCode')==null && !localStorage.userInfo){
return this.Error('请登录!') return this.Error('请登录!')
} }
//判断是否为登录状态 //判断是否为登录状态
if(localStorage.userInfo){ if(localStorage.userInfo){
localStorage.removeItem("OpenB2BCode"); sessionStorage.removeItem("OpenB2BCode");
this.sureMsg.EmployeeIdStr=''; this.sureMsg.EmployeeIdStr='';
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
this.sureMsg.CustomerId = userInfo.customerId; this.sureMsg.CustomerId = userInfo.customerId;
} }
//判断是否跳过来的 //判断是否跳过来的
if(localStorage.OpenB2BCode){ if(sessionStorage.getItem('OpenB2BCode')){
this.sureMsg.EmployeeIdStr= localStorage.getItem('OpenB2BCode'); this.sureMsg.EmployeeIdStr= sessionStorage.getItem('OpenB2BCode');
} }
this.sureMsg.hotelId = this.msg.hotelId; this.sureMsg.hotelId = this.msg.hotelId;
......
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