commit
This commit is contained in:
@@ -166,6 +166,7 @@ layout("/mobile/platform.html"){
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="isCanRe(item) === 0" class="state">已过期</div>
|
||||
<div v-if="isCanRe(item) === 4" class="state">不可预约</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -305,14 +306,10 @@ layout("/mobile/platform.html"){
|
||||
let count = 0
|
||||
while (wk.length < 7) {
|
||||
const addDate = moment(startDate).add(count, 'd')
|
||||
const addDateFormat = moment(addDate).format('YYYY-MM-DD')
|
||||
let dis = false
|
||||
if(this.site.openWeekTime && !this.site.openWeekTime.includes(addDate.day())) {
|
||||
dis = true
|
||||
}
|
||||
if(this.site.notApplyTimeList && this.site.notApplyTimeList?.includes(addDateFormat)) {
|
||||
dis = true
|
||||
}
|
||||
wk.push({
|
||||
day: addDate,
|
||||
disabled: dis
|
||||
@@ -373,6 +370,25 @@ layout("/mobile/platform.html"){
|
||||
const now = new Date()
|
||||
const end = moment().format('YYYY-MM-DD') + ' ' + item.end_time + ':00'
|
||||
const itemFullTime = this.selectDate.format('YYYY-MM-DD') + " " + item.start_time + "-" + item.end_time
|
||||
|
||||
if(this.site.notApplyTimeList && this.site.notApplyTimeList.length > 0) {
|
||||
const sTime = this.selectDate.format('YYYY-MM-DD') + " " + item.start_time
|
||||
const eTime = this.selectDate.format('YYYY-MM-DD') + " " + item.end_time
|
||||
|
||||
for (let i = 0; i < this.site.notApplyTimeList.length; i++) {
|
||||
const notApplyStartTime = this.site.notApplyTimeList[i].date + " " + this.site.notApplyTimeList[i].startTime
|
||||
const notApplyEndTime = this.site.notApplyTimeList[i].date + " " + this.site.notApplyTimeList[i].endTime
|
||||
|
||||
const a = moment(sTime).isAfter(moment(notApplyStartTime)) && moment(sTime).isBefore(moment(notApplyEndTime))
|
||||
const b = moment(eTime).isAfter(moment(notApplyStartTime)) && moment(eTime).isBefore(moment(notApplyEndTime))
|
||||
const c = moment(sTime).isBefore(moment(notApplyStartTime)) && moment(eTime).isAfter(moment(notApplyEndTime))
|
||||
|
||||
if(a || b || c) {
|
||||
return 4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.alreadyReserveRecord.includes(itemFullTime)) {
|
||||
return 3
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user