酒店日期优化
Showing
1 changed file
with
4 additions
and
3 deletions
| ... | @@ -34,6 +34,7 @@ | ... | @@ -34,6 +34,7 @@ |
| 34 | v-model="rzRange" | 34 | v-model="rzRange" |
| 35 | type="daterange" | 35 | type="daterange" |
| 36 | :disabled-date="disabledDateRZ" | 36 | :disabled-date="disabledDateRZ" |
| 37 | :clearable="false" | ||
| 37 | :placeholder="language==0?'选择日期':'Select date'" | 38 | :placeholder="language==0?'选择日期':'Select date'" |
| 38 | format="YYYY-MM-DD" | 39 | format="YYYY-MM-DD" |
| 39 | value-format="YYYY-MM-DD"/> | 40 | value-format="YYYY-MM-DD"/> |
| ... | @@ -294,7 +295,7 @@ function disabledDateRZ(date) { | ... | @@ -294,7 +295,7 @@ function disabledDateRZ(date) { |
| 294 | return !((date.getTime() >= dayjs(lform.value.hqStart).valueOf())&&(date.getTime() <= dayjs(lform.value.hqEnd).valueOf())) | 295 | return !((date.getTime() >= dayjs(lform.value.hqStart).valueOf())&&(date.getTime() <= dayjs(lform.value.hqEnd).valueOf())) |
| 295 | } | 296 | } |
| 296 | } | 297 | } |
| 297 | return true | 298 | // return true |
| 298 | } | 299 | } |
| 299 | function changeRoomNum(e) { | 300 | function changeRoomNum(e) { |
| 300 | if (form.value.addNum > e) { | 301 | if (form.value.addNum > e) { |
| ... | @@ -334,9 +335,9 @@ function getDaysBetween(e) { | ... | @@ -334,9 +335,9 @@ function getDaysBetween(e) { |
| 334 | var d2 = Date.parse(rzRange.value?rzRange.value[1]:null) | 335 | var d2 = Date.parse(rzRange.value?rzRange.value[1]:null) |
| 335 | if (d1 == d2) { | 336 | if (d1 == d2) { |
| 336 | usedays = 0 | 337 | usedays = 0 |
| 337 | ElMessage.error(language == 0 ? '入住时间跨度需大于一天' :'The duration of the stay must be more than one day.') | 338 | ElMessage.error(language.value == 0 ? '入住时间跨度需大于一天' :'The duration of the stay must be more than one day.') |
| 338 | // console.trace() | 339 | // console.trace() |
| 339 | rzRange.value = [] | 340 | rzRange.value=[route.query.start,route.query.end] |
| 340 | return | 341 | return |
| 341 | } else { | 342 | } else { |
| 342 | var days = (d2 - d1) / (1 * 24 * 60 * 60 * 1000); | 343 | var days = (d2 - d1) / (1 * 24 * 60 * 60 * 1000); | ... | ... |
-
Please register or sign in to post a comment