848a4831 by zhangmeng

酒店

1 parent 3ac7df04
......@@ -101,14 +101,13 @@
<div class="price">{{ language==0?'¥':'€' }}<span>{{language==0?r.roomPrice:r.roomPriceEn}}</span></div>
</el-col>
<el-col :span="3">
<el-link v-if="language==0" @click="goOrder(r)" :disabled="!r.useCount">
<div class="bg-lineg " :class="{'forbid':!r.useCount}" >
<div>{{ language==0?'在线付':'Online' }}</div>
</div>
</el-link>
<el-button v-else class="btn-lineG w100" round type="pri mary" @click="goOrder(r)">Select</el-button>
<el-button v-if="language==0" :disabled="!r.useCount" :class="{'forbid':!r.useCount}" @click="goOrder(r)" class="bg-lineg button">
<div>{{ language==0?'在线付':'Online' }}</div>
</el-button>
<el-button v-else :disabled="!r.useCount" class="btn-lineG w100" :class="{'forbid':!r.useCount}" round type="pri mary" @click="goOrder(r)">Select</el-button>
<!-- <div class="text-center text-primary mt10 fontsize14 pointer" v-if="language == 0">-->
<!-- 剩余 {{(r.roomCount - (r.useCount||0)).toFixed()}} 间-->
<!-- </div>-->
......@@ -128,12 +127,12 @@
<script setup >
import {useRouter} from "vue-router";
import {ref, reactive, onMounted} from "vue";
import {ref, reactive, onMounted,getCurrentInstance} from "vue";
import {useRoute} from "vue-router";
import {dayjs} from 'element-plus'
import {getHotelById, getHotelRooms,checkRoomPayByUserId} from "@/apiPc/booking"
import {getBaseInfoByActiveId} from "@/apiPc/booking";
const { proxy } = getCurrentInstance()
import {useStorage} from "@vueuse/core/index";
import useUserStore from "@/store/modules/user";
......@@ -281,26 +280,32 @@ function goNext(room) {
function getDaysBetween(e){
console.log(hotTime.value)
getData()
console.log(e)
}
function disabledDateRZ(date) {
//判读今天大与form.value.hqStart
console.log(formTime.value.hqStart)
// const start=dayjs(formTime.value.hqStart).format('YYYY-MM-DD')
// const end=dayjs(formTime.value.hqStart).format('YYYY-MM-DD')
if (formTime.value.hqStart) {
const today = dayjs().format('YYYY-MM-DD')
if (formTime.value.hqStart < today) {
return !((date.getTime() >= dayjs(today).valueOf())&&(date.getTime() <= dayjs(formTime.value.hqEnd).valueOf()))
} else {
return !((date.getTime() >= dayjs(formTime.value.hqStart).valueOf())&&(date.getTime() <= dayjs(formTime.value.hqEnd).valueOf()))
if (hotTime.value && hotTime.value.length==2){
const d1=dayjs(hotTime.value[0]).format('YYYY-MM-DD')
const d2=dayjs(hotTime.value[1]).format('YYYY-MM-DD')
if (d1==d2){
hotTime.value=[]
return proxy.$modal.msgError(language.value==0?'入住时间跨度需要大于一天':'The duration of the stay must be more than one day.')
}else{
getData()
}
}
return true
}
// function disabledDateRZ(date) {
// //判读今天大与form.value.hqStart
// console.log(date)
// if (formTime.value.hqStart) {
// const today = dayjs().format('YYYY-MM-DD')
// if (formTime.value.hqStart < today) {
// return !((date.getTime() >= dayjs(today).valueOf())&&(date.getTime() <= dayjs(formTime.value.hqEnd).valueOf()))
// } else {
// return !((date.getTime() >= dayjs(formTime.value.hqStart).valueOf())&&(date.getTime() <= dayjs(formTime.value.hqEnd).valueOf()))
// }
// }
// // return true
// }
function goMap() {
return
// var tencentMapUrl = "https://map.qq.com/";
......@@ -364,6 +369,19 @@ function goMap() {
}
}
}
:deep(.button) {
display: block;
height: 55px;
width: auto;
color: #fff;
span{
display: block !important;
div{
margin-top: 3px;
}
}
}
.starBox {
img {
......@@ -433,6 +451,7 @@ function goMap() {
.oddmb:nth-child(2){margin-bottom: 20px;}
.forbid{
cursor:not-allowed !important;
color: #a8abb2;
filter:grayscale(1);
}
</style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!