6592cc58 by zhangmeng

时间限制

1 parent cfa5a586
......@@ -135,16 +135,15 @@ function getData(){
const toDay=dayjs(dayjs().format('YYYY-MM-DD')).valueOf()
const start=dayjs(formTime.value.mealStart).valueOf()
if(toDay<start){
currentDate1.value= query.value.currentDate = dayjs(start).format('YYYY-MM-DD')
currentDate.value= currentDate1.value= query.value.currentDate = dayjs(start).format('YYYY-MM-DD')
}else{
currentDate1.value = query.value.currentDate = dayjs(toDay).format('YYYY-MM-DD')
currentDate.value= currentDate1.value = query.value.currentDate = dayjs(toDay).format('YYYY-MM-DD')
}
}
function getScheduleList() {
loading.value = true
// query.value.currentDate = dayjs(currentDate.value).format('YYYY-MM-DD')
query.value.currentDate = dayjs(currentDate.value).format('YYYY-MM-DD')
if(!query.value.currentDate)return proxy.$message.error('请选择时间')
booking.getActivityMealVoListByStudioId(query.value).then(res=>{
loading.value = false
......
......@@ -121,7 +121,7 @@ onMounted(() => {
console.log(err)
formTime.value = null
}).finally(()=>{
// getData()
getData()
getScheduleList()
})
})
......@@ -140,10 +140,10 @@ function getData(){
}
getScheduleList()
function getScheduleList() {
loading.value = true
query.value.currentDate = dayjs(currentDate.value).format('YYYY-MM-DD')
console.log(query.value)
booking.getActivityPhotoVoListByShootId(query.value).then(res=>{
loading.value = false
schList.value = res.data
......@@ -151,7 +151,6 @@ function getScheduleList() {
}
function selectDate(date) {
currentDate1.value= currentDate.value=dayjs(date).toDate()
console.log(date)
getScheduleList()
}
......@@ -159,8 +158,6 @@ function dateChange(){
currentDate.value=currentDate1.value
calendarRange.value=[dayjs(currentDate.value).toDate(),(dayjs(currentDate.value).toDate())]
getScheduleList()
console.log(currentDate.value)
console.log(currentDate1.value)
}
function goMatch(n) {
......@@ -169,6 +166,8 @@ function goMatch(n) {
return
}
ElMessageBox.confirm(language.value==0?`你当前所预约的时间为${query.value.currentDate}是否确定?`:`Your current appointment is ${query.value.currentDate}. Are you sure?`,{type:'warning'})
.then(() => {
router.push({
name: 'photographyOrder',
params: {
......@@ -178,6 +177,12 @@ function goMatch(n) {
date: dayjs(currentDate.value).format('YYYY-MM-DD')
}
})
})
.catch(() => {
// catch error
})
}
function disabledDateRZ(date) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!