|
|
@ -20,8 +20,8 @@ |
|
|
|
<view class="title PfScMedium">上午预约</view> |
|
|
|
<view class="inner-wrapper" v-if="timeList.am.length>0"> |
|
|
|
<view v-for="(item,key) in timeList.am" :class="'son PfScMedium'+( time2remain[item] <=0?' disable':'')" @click="confirmSubmit(item, 1)" :hover-class="time2remain[item]>0?'hover2':''"> |
|
|
|
{{item}} |
|
|
|
<text v-if="visitorList.length > time2remain[item] || time2remain[item]<=0">({{time2remain[item]>0?time2remain[item]:'满'}})</text> |
|
|
|
{{item.split('-')[0]}} |
|
|
|
<text v-if="visitorList.length > time2remain[item] || time2remain[item]<=0">{{time2remain[item]>0?("(名额余"+time2remain[item]+")"):(time2remainExpire[item]?'':'(名额已满)')}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
@ -35,8 +35,8 @@ |
|
|
|
<view class="title PfScMedium">下午预约</view> |
|
|
|
<view class="inner-wrapper" v-if="timeList.pm.length>0"> |
|
|
|
<view :class="'son PfScMedium'+(time2remain[item]<=0?' disable':'')" @click="confirmSubmit(item, 2)" :hover-class="time2remain[item]>0?'hover2':''" v-for="(item,key) in timeList.pm"> |
|
|
|
{{item}} |
|
|
|
<text v-if="visitorList.length > time2remain[item] || time2remain[item]<=0">({{time2remain[item]?time2remain[item]:'满'}})</text> |
|
|
|
{{item.split('-')[0]}} |
|
|
|
<text v-if="visitorList.length > time2remain[item] || time2remain[item]<=0">{{time2remain[item]>0?("(名额余"+time2remain[item]+")"):(time2remainExpire[item]?'':'(名额已满)')}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="empty" v-else> |
|
|
@ -80,7 +80,9 @@ export default { |
|
|
|
timeList:true, |
|
|
|
disable:true, |
|
|
|
selectDay:-1, |
|
|
|
RegistrationTimeList:[] |
|
|
|
RegistrationTimeList:[], |
|
|
|
nowtime:'', |
|
|
|
time2remainExpire:[], |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -88,7 +90,19 @@ export default { |
|
|
|
// dataInit(firstRegistrationTime,time2remain,chooseDate) {//上下午时间 |
|
|
|
let firstRegistrationTime = allDate['date2time'] |
|
|
|
this.RegistrationTimeList = allDate['date2work'] |
|
|
|
this.nowtime = allDate['nowtime'] |
|
|
|
this.time2remain = allDate['time2remain']; |
|
|
|
for (var key in this.time2remain) { |
|
|
|
if (this.time2remain.hasOwnProperty(key)) { |
|
|
|
var element = this.time2remain[key]; |
|
|
|
var times = key.split('-') |
|
|
|
var start_times = chooseDate+' '+times[0] |
|
|
|
var end_times = chooseDate+' '+times[1] |
|
|
|
this.time2remainExpire[key] = 0 |
|
|
|
if(this.nowtime >= end_times) this.time2remainExpire[key] = 1 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(chooseDate){ |
|
|
|
this.selectDay = chooseDate; |
|
|
|
}else{ |
|
|
|