Commit f2fe7465 authored by zhengke's avatar zhengke

增加验证防止重复提交

parent dd531c1c
...@@ -340,6 +340,19 @@ ...@@ -340,6 +340,19 @@
margin-top: 20px; margin-top: 20px;
border: 1px solid #E0E0E0; border: 1px solid #E0E0E0;
} }
.HotelSure .disClick {
background-color: #d1d1d1!important;
color: #fff!important;
background-image: none;
border: 1px solid #d1d1d1!important;
}
.HotelSure .disClick:hover {
background-color: #d1d1d1 !important;
cursor: default !important;
box-shadow: none !important;
}
</style> </style>
...@@ -597,7 +610,7 @@ ...@@ -597,7 +610,7 @@
</ul> </ul>
</div> </div>
</div> </div>
<input type="button" class="HD_payBtn" :class="{'disBtn':isBaoChild}" @click="submitForm('sureMsg')" value="下单" /> <input type="button" class="HD_payBtn" :class="{'disBtn':isBaoChild,'disClick':!isSubmit}" @click="submitForm('sureMsg')" value="下单" />
</div> </div>
<div class="HS_RightList"> <div class="HS_RightList">
<div class="HS_RightTopImg"> <div class="HS_RightTopImg">
...@@ -704,6 +717,8 @@ export default { ...@@ -704,6 +717,8 @@ export default {
roomOptionCd:'', roomOptionCd:'',
searchroomGroup:[] searchroomGroup:[]
}, },
//防止重复提交
isSubmit: true,
auditNum:0, auditNum:0,
childNum:0, childNum:0,
//入住 周几 //入住 周几
...@@ -1317,40 +1332,44 @@ export default { ...@@ -1317,40 +1332,44 @@ export default {
if(this.sureMsg.CustomerId==null||this.sureMsg.CustomerId==""){ if(this.sureMsg.CustomerId==null||this.sureMsg.CustomerId==""){
this.sureMsg.CustomerId=0 this.sureMsg.CustomerId=0
} }
this.apipost("dmc_post_Get_GetJAPAN_HotelBooking",this.sureMsg,res => { if (this.isSubmit) {
if (res.data.resultCode == 1) { this.isSubmit = false;
this.Success('预订成功'); this.apipost("dmc_post_Get_GetJAPAN_HotelBooking",this.sureMsg,res => {
let num =0; this.isSubmit = true;
this.sureMsg.roomGroup.forEach(x=>{ if (res.data.resultCode == 1) {
num+=parseInt(x.roomFemaleCount)+parseInt(x.roomMaleCount)+parseInt(x.roomChildCount) this.Success('预订成功');
}) let num =0;
let msg = { this.sureMsg.roomGroup.forEach(x=>{
RB_Branch_id:res.data.data.RB_Branch_id, num+=parseInt(x.roomFemaleCount)+parseInt(x.roomMaleCount)+parseInt(x.roomChildCount)
costType:res.data.data.costType, })
orderId:res.data.data.orderId, let msg = {
bookingNumber:res.data.data.parmResult.bookingNumber, RB_Branch_id:res.data.data.RB_Branch_id,
bookMoney:this.SettlementPrice, costType:res.data.data.costType,
CancelTime:res.data.data.CancelTime, orderId:res.data.data.orderId,
hotelName:res.data.data.parmResult.hotelName, bookingNumber:res.data.data.parmResult.bookingNumber,
totalPnumber:num bookMoney:this.SettlementPrice,
} CancelTime:res.data.data.CancelTime,
sessionStorage.setItem("HotelPayMsg", JSON.stringify(msg)); hotelName:res.data.data.parmResult.hotelName,
this.$router.push({ totalPnumber:num
path:"/HotelPayBefore", }
}) sessionStorage.setItem("HotelPayMsg", JSON.stringify(msg));
} else { this.$router.push({
var that = this path:"/HotelPayBefore",
if(res.data.message=='Room rate(s) for 1 day(s) changed'){ })
that.Confirm("当前酒店价格已发生变化,需要重新加载?", function() { } else {
that.getBookInfo(); var that = this
}); if(res.data.message=='Room rate(s) for 1 day(s) changed'){
}else{ that.Confirm("当前酒店价格已发生变化,需要重新加载?", function() {
that.Error(res.data.message); that.getBookInfo();
});
}else{
that.Error(res.data.message);
}
} }
} },
}, err => {}
err => {} );
); }
}, },
} }
}; };
......
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