b438e6e0 by 杨炀

Merge branch 'dev' of https://code.itechtop.cn/yangyang/dance-pc into dev

2 parents 7d8f78f0 cfa5a586
......@@ -35,7 +35,8 @@
format="YYYY-MM-DD"
size="small"
@change="dateChange"
:disabled-date="disabledDate"
:disabled-date="disabledDateRZ"
:clearable='false'
/>
</div>
</el-col>
......@@ -151,6 +152,20 @@ function getScheduleList() {
schList.value.forEach(item=>item.active=true)
})
}
function disabledDateRZ(date) {
if (formTime.value) {
const toDay=dayjs(dayjs().format('YYYY-MM-DD')).valueOf()
const start=dayjs(formTime.value.mealStart).valueOf()
const end=dayjs(formTime.value.mealEnd).valueOf()
if (toDay<start) {
return date.getTime()<start||date.getTime()>end
} else if(toDay>start&&toDay <end) {
return date.getTime()<toDay||date.getTime()>end
}else return true
}
}
function selectDate(date) {
currentDate1.value= currentDate.value=dayjs(date).toDate()
console.log(date)
......
......@@ -35,6 +35,8 @@
format="YYYY-MM-DD"
size="small"
@change="dateChange"
:disabled-date="disabledDateRZ"
:clearable="false"
/>
</div>
</el-col>
......@@ -60,7 +62,7 @@
<el-row justify="space-between">
<el-row class="hz-p" style="flex: 1">
<el-col :span="8">
<div >{{ language==0?'套餐说明':'Package Description' }}: <span style="margin-right: 20px">{{n.introduction}}</span></div>
<div class="esp_3">{{ language==0?'套餐说明':'Package Description' }}: <span style="margin-right: 20px">{{n.introduction}}</span></div>
</el-col>
<el-col :span="8">
......@@ -89,13 +91,13 @@
</template>
<script setup>
import {ref} from "vue";
import {ref,onMounted} from "vue";
import {dayjs} from "element-plus";
import {useRoute,useRouter} from 'vue-router'
import * as booking from "@/apiPc/booking"
import {useStorage} from "@vueuse/core/index";
import useUserStore from "/@/store/modules/user";
import {getActivityPhotoVoListByShootId} from "@/apiPc/booking";
import {getActivityPhotoVoListByShootId, getBaseInfoByActiveId} from "@/apiPc/booking";
const user = useUserStore().user
const language = useStorage('language', 0)
......@@ -110,6 +112,33 @@ const query = ref({
lasId:route.params.id,
})
const value2=ref('')
const formTime=ref()
onMounted(() => {
getBaseInfoByActiveId(route.params.cptId).then(res=>{
formTime.value = res.data || null
}).catch(err=>{
console.log(err)
formTime.value = null
}).finally(()=>{
// getData()
getScheduleList()
})
})
function getData(){
if (!formTime.value.photoStart) return
const toDay=dayjs(dayjs().format('YYYY-MM-DD')).valueOf()
const start=dayjs(formTime.value.photoStart).valueOf()
if(toDay<start){
currentDate1.value= query.value.currentDate = dayjs(start).format('YYYY-MM-DD')
}else{
currentDate1.value = query.value.currentDate = dayjs(toDay).format('YYYY-MM-DD')
}
}
getScheduleList()
function getScheduleList() {
......@@ -151,8 +180,17 @@ function goMatch(n) {
})
}
function changee(){
console.log(value2.value)
function disabledDateRZ(date) {
if (formTime.value) {
const toDay=dayjs(dayjs().format('YYYY-MM-DD')).valueOf()
const start=dayjs(formTime.value.photoStart).valueOf()
const end=dayjs(formTime.value.photoEnd).valueOf()
if (toDay<start) {
return date.getTime()<start||date.getTime()>end
} else if(toDay>start&&toDay <end) {
return date.getTime()<toDay||date.getTime()>end
}else return true
}
}
</script>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!