7d8f78f0 by 杨炀

no message

1 parent a265e32a
...@@ -141,7 +141,7 @@ function initDays() { ...@@ -141,7 +141,7 @@ function initDays() {
141 } 141 }
142 142
143 function disabledDate(date) { 143 function disabledDate(date) {
144 //判读今天大与form.value.hqStart 144 //判读今天大与form.value.foodStart
145 if (lform.value.foodStart) { 145 if (lform.value.foodStart) {
146 const today = dayjs().format('YYYY-MM-DD') 146 const today = dayjs().format('YYYY-MM-DD')
147 if (lform.value.foodStart < today) { 147 if (lform.value.foodStart < today) {
......
...@@ -117,20 +117,23 @@ ...@@ -117,20 +117,23 @@
117 }}<span>{{ language == 0 ? r.roomPrice : r.roomPriceEn }}</span></div> 117 }}<span>{{ language == 0 ? r.roomPrice : r.roomPriceEn }}</span></div>
118 </el-col> 118 </el-col>
119 <el-col :span="3"> 119 <el-col :span="3">
120 <el-button v-if="language==0" :disabled="!r.useCount && !hotTime" :class="{'forbid':(!r.useCount && !hotTime)}" 120 <el-button v-if="language==0" :disabled="!r.useCount && !hotTime" :class="{'forbid':(r.useCount<=0 && hotTime)}"
121 @click="goOrder(r)" class="bg-lineg button"> 121 @click="goOrder(r)" class="bg-lineg button">
122 122
123 <div>{{ language == 0 ? '在线付' : 'Online' }}</div> 123 <div>{{ language == 0 ? '在线付' : 'Online' }}</div>
124 </el-button> 124 </el-button>
125 <el-button v-else style="color: #fff" :disabled="!r.useCount && !hotTime" class="btn-lineG w100" 125 <el-button v-else style="color: #fff" :disabled="!r.useCount && !hotTime"
126 :class="{'forbid':(!r.useCount && !hotTime)}" round type="pri mary" @click="goOrder(r)">Select 126 :class="(r.useCount<=0 && hotTime)?'forbid btn-lineG w100':'btn-lineG w100'" round type="pri mary" @click="goOrder(r)">Select
127 </el-button> 127 </el-button>
128 <!-- <div class="text-center text-primary mt10 fontsize14 pointer" v-if="language == 0">--> 128 <div v-if="r.useCount>0">
129 <!-- 剩余 {{(r.roomCount - (r.useCount||0)).toFixed()}} 间--> 129 <div class="text-center text-primary mt10 fontsize14 pointer" v-if="language == 0">
130 <!-- </div>--> 130 剩余 {{r.useCount}}
131 <!-- <div class="text-center text-primary mt10 fontsize14" v-else>--> 131 </div>
132 <!-- {{(r.roomCount - (r.useCount||0)).toFixed()}} Remaining rooms--> 132 <div class="text-center text-primary mt10 fontsize14" v-else>
133 <!-- </div>--> 133 {{r.useCount}} Remaining rooms
134 </div>
135 </div>
136
134 </el-col> 137 </el-col>
135 </el-row> 138 </el-row>
136 </div> 139 </div>
...@@ -193,6 +196,7 @@ onMounted(() => { ...@@ -193,6 +196,7 @@ onMounted(() => {
193 function initTime() { 196 function initTime() {
194 if (!hotTime.value[0]) { 197 if (!hotTime.value[0]) {
195 hotTime.value = baseHotTime 198 hotTime.value = baseHotTime
199 getRoomList()
196 } 200 }
197 } 201 }
198 202
...@@ -219,6 +223,9 @@ function getData() { ...@@ -219,6 +223,9 @@ function getData() {
219 }).catch(err => { 223 }).catch(err => {
220 console.log(err) 224 console.log(err)
221 }) 225 })
226 getRoomList()
227 }
228 function getRoomList(){
222 query.value.hotelId = route.query.id 229 query.value.hotelId = route.query.id
223 query.value.rzStart = hotTime.value ? hotTime.value[0] : null 230 query.value.rzStart = hotTime.value ? hotTime.value[0] : null
224 query.value.rzEnd = hotTime.value ? hotTime.value[1] : null 231 query.value.rzEnd = hotTime.value ? hotTime.value[1] : null
...@@ -227,7 +234,6 @@ function getData() { ...@@ -227,7 +234,6 @@ function getData() {
227 console.log(roomList.value) 234 console.log(roomList.value)
228 }) 235 })
229 } 236 }
230
231 function initMap() { 237 function initMap() {
232 // const TMap = (window as any).TMap 238 // const TMap = (window as any).TMap
233 var center = new TMap.LatLng(form.value.latitude, form.value.longitude);//设置中心点坐标' 239 var center = new TMap.LatLng(form.value.latitude, form.value.longitude);//设置中心点坐标'
...@@ -275,7 +281,13 @@ function goOrder(room) { ...@@ -275,7 +281,13 @@ function goOrder(room) {
275 proxy.$modal.msgError(language.value == 0 ?'请先选择入住日期':'Please choose the date of check-in first') 281 proxy.$modal.msgError(language.value == 0 ?'请先选择入住日期':'Please choose the date of check-in first')
276 return 282 return
277 } 283 }
284 if(room.useCount<=0){
285 ElMessageBox.confirm(language.value == 0 ? `您当前选择的日期是${hotTime.value[0]}${hotTime.value[1]},该时间段暂无可预订房间,请选择其他日期` :
286 `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({
278 287
288 })
289 return
290 }
279 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(() => { 291 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(() => {
280 checkRoomPayByUserId(room.hotelId).then(res => { 292 checkRoomPayByUserId(room.hotelId).then(res => {
281 if (res.data == -100) { 293 if (res.data == -100) {
...@@ -330,7 +342,7 @@ function getDaysBetween() { ...@@ -330,7 +342,7 @@ function getDaysBetween() {
330 getDateTime() 342 getDateTime()
331 return proxy.$modal.msgError(language.value == 0 ? '入住时间跨度需要大于一天' : 'The duration of the stay must be more than one day.') 343 return proxy.$modal.msgError(language.value == 0 ? '入住时间跨度需要大于一天' : 'The duration of the stay must be more than one day.')
332 } else { 344 } else {
333 getData() 345 getRoomList()
334 } 346 }
335 } 347 }
336 } 348 }
...@@ -550,13 +562,7 @@ function goMap() { ...@@ -550,13 +562,7 @@ function goMap() {
550 562
551 .forbid { 563 .forbid {
552 cursor: not-allowed !important; 564 cursor: not-allowed !important;
553 color: #a8abb2 !important; 565 filter:grayscale(0.4);opacity: 0.7;
554 //filter:grayscale(1);
555 background: #fff;
556
557 div {
558 color: #a8abb2 !important;
559 }
560 } 566 }
561 567
562 .forbid:hover { 568 .forbid:hover {
......
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
243 </div> 243 </div>
244 </el-col> 244 </el-col>
245 <el-col :lg="24"> 245 <el-col :lg="24">
246 <el-link v-if="form.viewStatus=='1'||form.viewStatus=='5'" type="primary" @click="exportPdf"><el-icon><Upload /></el-icon> 246 <el-link class="mt20" v-if="form.viewStatus=='1'||form.viewStatus=='5'" type="primary" @click="exportPdf"><el-icon><Upload /></el-icon>
247 {{ language==0?'导出酒店预订单':'Export PDF' }} 247 {{ language==0?'导出酒店预订单':'Export PDF' }}
248 </el-link> 248 </el-link>
249 </el-col> 249 </el-col>
......
...@@ -82,8 +82,8 @@ export default defineConfig(({ mode, command }) => { ...@@ -82,8 +82,8 @@ export default defineConfig(({ mode, command }) => {
82 rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') 82 rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '')
83 }, 83 },
84 '/dev-api': { 84 '/dev-api': {
85 target: 'http://192.168.1.118:8081/', 85 // target: 'http://192.168.1.118:8081/',
86 // target: 'https://jijin.wtwuxicenter.com/stage-api', 86 target: 'https://jijin.wtwuxicenter.com/stage-api',
87 changeOrigin: true, 87 changeOrigin: true,
88 rewrite: (p) => p.replace(/^\/dev-api/, '') 88 rewrite: (p) => p.replace(/^\/dev-api/, '')
89 } 89 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!