时间限制
Showing
2 changed files
with
22 additions
and
18 deletions
| ... | @@ -135,16 +135,15 @@ function getData(){ | ... | @@ -135,16 +135,15 @@ function getData(){ |
| 135 | const toDay=dayjs(dayjs().format('YYYY-MM-DD')).valueOf() | 135 | const toDay=dayjs(dayjs().format('YYYY-MM-DD')).valueOf() |
| 136 | const start=dayjs(formTime.value.mealStart).valueOf() | 136 | const start=dayjs(formTime.value.mealStart).valueOf() |
| 137 | if(toDay<start){ | 137 | if(toDay<start){ |
| 138 | currentDate1.value= query.value.currentDate = dayjs(start).format('YYYY-MM-DD') | 138 | currentDate.value= currentDate1.value= query.value.currentDate = dayjs(start).format('YYYY-MM-DD') |
| 139 | |||
| 140 | }else{ | 139 | }else{ |
| 141 | currentDate1.value = query.value.currentDate = dayjs(toDay).format('YYYY-MM-DD') | 140 | currentDate.value= currentDate1.value = query.value.currentDate = dayjs(toDay).format('YYYY-MM-DD') |
| 142 | } | 141 | } |
| 143 | } | 142 | } |
| 144 | 143 | ||
| 145 | function getScheduleList() { | 144 | function getScheduleList() { |
| 146 | loading.value = true | 145 | loading.value = true |
| 147 | // query.value.currentDate = dayjs(currentDate.value).format('YYYY-MM-DD') | 146 | query.value.currentDate = dayjs(currentDate.value).format('YYYY-MM-DD') |
| 148 | if(!query.value.currentDate)return proxy.$message.error('请选择时间') | 147 | if(!query.value.currentDate)return proxy.$message.error('请选择时间') |
| 149 | booking.getActivityMealVoListByStudioId(query.value).then(res=>{ | 148 | booking.getActivityMealVoListByStudioId(query.value).then(res=>{ |
| 150 | loading.value = false | 149 | loading.value = false | ... | ... |
| ... | @@ -121,7 +121,7 @@ onMounted(() => { | ... | @@ -121,7 +121,7 @@ onMounted(() => { |
| 121 | console.log(err) | 121 | console.log(err) |
| 122 | formTime.value = null | 122 | formTime.value = null |
| 123 | }).finally(()=>{ | 123 | }).finally(()=>{ |
| 124 | // getData() | 124 | getData() |
| 125 | getScheduleList() | 125 | getScheduleList() |
| 126 | }) | 126 | }) |
| 127 | }) | 127 | }) |
| ... | @@ -140,10 +140,10 @@ function getData(){ | ... | @@ -140,10 +140,10 @@ function getData(){ |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | 142 | ||
| 143 | getScheduleList() | ||
| 144 | function getScheduleList() { | 143 | function getScheduleList() { |
| 145 | loading.value = true | 144 | loading.value = true |
| 146 | query.value.currentDate = dayjs(currentDate.value).format('YYYY-MM-DD') | 145 | query.value.currentDate = dayjs(currentDate.value).format('YYYY-MM-DD') |
| 146 | console.log(query.value) | ||
| 147 | booking.getActivityPhotoVoListByShootId(query.value).then(res=>{ | 147 | booking.getActivityPhotoVoListByShootId(query.value).then(res=>{ |
| 148 | loading.value = false | 148 | loading.value = false |
| 149 | schList.value = res.data | 149 | schList.value = res.data |
| ... | @@ -151,7 +151,6 @@ function getScheduleList() { | ... | @@ -151,7 +151,6 @@ function getScheduleList() { |
| 151 | } | 151 | } |
| 152 | function selectDate(date) { | 152 | function selectDate(date) { |
| 153 | currentDate1.value= currentDate.value=dayjs(date).toDate() | 153 | currentDate1.value= currentDate.value=dayjs(date).toDate() |
| 154 | console.log(date) | ||
| 155 | getScheduleList() | 154 | getScheduleList() |
| 156 | } | 155 | } |
| 157 | 156 | ||
| ... | @@ -159,8 +158,6 @@ function dateChange(){ | ... | @@ -159,8 +158,6 @@ function dateChange(){ |
| 159 | currentDate.value=currentDate1.value | 158 | currentDate.value=currentDate1.value |
| 160 | calendarRange.value=[dayjs(currentDate.value).toDate(),(dayjs(currentDate.value).toDate())] | 159 | calendarRange.value=[dayjs(currentDate.value).toDate(),(dayjs(currentDate.value).toDate())] |
| 161 | getScheduleList() | 160 | getScheduleList() |
| 162 | console.log(currentDate.value) | ||
| 163 | console.log(currentDate1.value) | ||
| 164 | } | 161 | } |
| 165 | 162 | ||
| 166 | function goMatch(n) { | 163 | function goMatch(n) { |
| ... | @@ -169,15 +166,23 @@ function goMatch(n) { | ... | @@ -169,15 +166,23 @@ function goMatch(n) { |
| 169 | return | 166 | return |
| 170 | } | 167 | } |
| 171 | 168 | ||
| 172 | router.push({ | 169 | ElMessageBox.confirm(language.value==0?`你当前所预约的时间为${query.value.currentDate}是否确定?`:`Your current appointment is ${query.value.currentDate}. Are you sure?`,{type:'warning'}) |
| 173 | name: 'photographyOrder', | 170 | .then(() => { |
| 174 | params: { | 171 | router.push({ |
| 175 | lasId: n.id | 172 | name: 'photographyOrder', |
| 176 | }, | 173 | params: { |
| 177 | query: { | 174 | lasId: n.id |
| 178 | date: dayjs(currentDate.value).format('YYYY-MM-DD') | 175 | }, |
| 179 | } | 176 | query: { |
| 180 | }) | 177 | date: dayjs(currentDate.value).format('YYYY-MM-DD') |
| 178 | } | ||
| 179 | }) | ||
| 180 | }) | ||
| 181 | .catch(() => { | ||
| 182 | // catch error | ||
| 183 | }) | ||
| 184 | |||
| 185 | |||
| 181 | } | 186 | } |
| 182 | 187 | ||
| 183 | function disabledDateRZ(date) { | 188 | function disabledDateRZ(date) { | ... | ... |
-
Please register or sign in to post a comment