a024cd59 by zhangmeng

Merge branch 'dev' of https://code.itechtop.cn/yangyang/dance-pc into dev

2 parents 6592cc58 b438e6e0
......@@ -141,7 +141,7 @@ function initDays() {
}
function disabledDate(date) {
//判读今天大与form.value.hqStart
//判读今天大与form.value.foodStart
if (lform.value.foodStart) {
const today = dayjs().format('YYYY-MM-DD')
if (lform.value.foodStart < today) {
......
......@@ -117,20 +117,23 @@
}}<span>{{ language == 0 ? r.roomPrice : r.roomPriceEn }}</span></div>
</el-col>
<el-col :span="3">
<el-button v-if="language==0" :disabled="!r.useCount && !hotTime" :class="{'forbid':(!r.useCount && !hotTime)}"
<el-button v-if="language==0" :disabled="!r.useCount && !hotTime" :class="{'forbid':(r.useCount<=0 && hotTime)}"
@click="goOrder(r)" class="bg-lineg button">
<div>{{ language == 0 ? '在线付' : 'Online' }}</div>
</el-button>
<el-button v-else style="color: #fff" :disabled="!r.useCount && !hotTime" class="btn-lineG w100"
:class="{'forbid':(!r.useCount && !hotTime)}" round type="pri mary" @click="goOrder(r)">Select
<el-button v-else style="color: #fff" :disabled="!r.useCount && !hotTime"
:class="(r.useCount<=0 && hotTime)?'forbid btn-lineG w100':'btn-lineG w100'" 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>-->
<!-- <div class="text-center text-primary mt10 fontsize14" v-else>-->
<!-- {{(r.roomCount - (r.useCount||0)).toFixed()}} Remaining rooms-->
<!-- </div>-->
<div v-if="r.useCount>0">
<div class="text-center text-primary mt10 fontsize14 pointer" v-if="language == 0">
剩余 {{r.useCount}}
</div>
<div class="text-center text-primary mt10 fontsize14" v-else>
{{r.useCount}} Remaining rooms
</div>
</div>
</el-col>
</el-row>
</div>
......@@ -193,6 +196,7 @@ onMounted(() => {
function initTime() {
if (!hotTime.value[0]) {
hotTime.value = baseHotTime
getRoomList()
}
}
......@@ -219,6 +223,9 @@ function getData() {
}).catch(err => {
console.log(err)
})
getRoomList()
}
function getRoomList(){
query.value.hotelId = route.query.id
query.value.rzStart = hotTime.value ? hotTime.value[0] : null
query.value.rzEnd = hotTime.value ? hotTime.value[1] : null
......@@ -227,7 +234,6 @@ function getData() {
console.log(roomList.value)
})
}
function initMap() {
// const TMap = (window as any).TMap
var center = new TMap.LatLng(form.value.latitude, form.value.longitude);//设置中心点坐标'
......@@ -275,7 +281,13 @@ function goOrder(room) {
proxy.$modal.msgError(language.value == 0 ?'请先选择入住日期':'Please choose the date of check-in first')
return
}
if(room.useCount<=0){
ElMessageBox.confirm(language.value == 0 ? `您当前选择的日期是${hotTime.value[0]}${hotTime.value[1]},该时间段暂无可预订房间,请选择其他日期` :
`You currently select the check-in date of ${hotTime.value[0]} to ${hotTime.value[1]}, there is no room available for booking at this time period, please choose another date`, {type: 'warning'}).then({
})
return
}
ElMessageBox.confirm(language.value == 0 ? '你当前选择的入住时间为' + hotTime.value[0] + '至' + hotTime.value[1] + ',是否确定?' : 'Your current check-in time is' + hotTime.value[0] + '~' + hotTime.value[1] + 'Are you sure?', {type: 'warning'}).then({}).then(() => {
checkRoomPayByUserId(room.hotelId).then(res => {
if (res.data == -100) {
......@@ -330,7 +342,7 @@ function getDaysBetween() {
getDateTime()
return proxy.$modal.msgError(language.value == 0 ? '入住时间跨度需要大于一天' : 'The duration of the stay must be more than one day.')
} else {
getData()
getRoomList()
}
}
}
......@@ -550,13 +562,7 @@ function goMap() {
.forbid {
cursor: not-allowed !important;
color: #a8abb2 !important;
//filter:grayscale(1);
background: #fff;
div {
color: #a8abb2 !important;
}
filter:grayscale(0.4);opacity: 0.7;
}
.forbid:hover {
......
......@@ -243,7 +243,7 @@
</div>
</el-col>
<el-col :lg="24">
<el-link v-if="form.viewStatus=='1'||form.viewStatus=='5'" type="primary" @click="exportPdf"><el-icon><Upload /></el-icon>
<el-link class="mt20" v-if="form.viewStatus=='1'||form.viewStatus=='5'" type="primary" @click="exportPdf"><el-icon><Upload /></el-icon>
{{ language==0?'导出酒店预订单':'Export PDF' }}
</el-link>
</el-col>
......
......@@ -82,8 +82,8 @@ export default defineConfig(({ mode, command }) => {
rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '')
},
'/dev-api': {
target: 'http://192.168.1.118:8081/',
// target: 'https://jijin.wtwuxicenter.com/stage-api',
// target: 'http://192.168.1.118:8081/',
target: 'https://jijin.wtwuxicenter.com/stage-api',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!