b438e6e0 by 杨炀

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

2 parents 7d8f78f0 cfa5a586
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
35 format="YYYY-MM-DD" 35 format="YYYY-MM-DD"
36 size="small" 36 size="small"
37 @change="dateChange" 37 @change="dateChange"
38 :disabled-date="disabledDate" 38 :disabled-date="disabledDateRZ"
39 :clearable='false'
39 /> 40 />
40 </div> 41 </div>
41 </el-col> 42 </el-col>
...@@ -151,6 +152,20 @@ function getScheduleList() { ...@@ -151,6 +152,20 @@ function getScheduleList() {
151 schList.value.forEach(item=>item.active=true) 152 schList.value.forEach(item=>item.active=true)
152 }) 153 })
153 } 154 }
155
156 function disabledDateRZ(date) {
157 if (formTime.value) {
158 const toDay=dayjs(dayjs().format('YYYY-MM-DD')).valueOf()
159 const start=dayjs(formTime.value.mealStart).valueOf()
160 const end=dayjs(formTime.value.mealEnd).valueOf()
161 if (toDay<start) {
162 return date.getTime()<start||date.getTime()>end
163 } else if(toDay>start&&toDay <end) {
164 return date.getTime()<toDay||date.getTime()>end
165 }else return true
166 }
167 }
168
154 function selectDate(date) { 169 function selectDate(date) {
155 currentDate1.value= currentDate.value=dayjs(date).toDate() 170 currentDate1.value= currentDate.value=dayjs(date).toDate()
156 console.log(date) 171 console.log(date)
......
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
35 format="YYYY-MM-DD" 35 format="YYYY-MM-DD"
36 size="small" 36 size="small"
37 @change="dateChange" 37 @change="dateChange"
38 :disabled-date="disabledDateRZ"
39 :clearable="false"
38 /> 40 />
39 </div> 41 </div>
40 </el-col> 42 </el-col>
...@@ -60,7 +62,7 @@ ...@@ -60,7 +62,7 @@
60 <el-row justify="space-between"> 62 <el-row justify="space-between">
61 <el-row class="hz-p" style="flex: 1"> 63 <el-row class="hz-p" style="flex: 1">
62 <el-col :span="8"> 64 <el-col :span="8">
63 <div >{{ language==0?'套餐说明':'Package Description' }}: <span style="margin-right: 20px">{{n.introduction}}</span></div> 65 <div class="esp_3">{{ language==0?'套餐说明':'Package Description' }}: <span style="margin-right: 20px">{{n.introduction}}</span></div>
64 </el-col> 66 </el-col>
65 67
66 <el-col :span="8"> 68 <el-col :span="8">
...@@ -89,13 +91,13 @@ ...@@ -89,13 +91,13 @@
89 </template> 91 </template>
90 92
91 <script setup> 93 <script setup>
92 import {ref} from "vue"; 94 import {ref,onMounted} from "vue";
93 import {dayjs} from "element-plus"; 95 import {dayjs} from "element-plus";
94 import {useRoute,useRouter} from 'vue-router' 96 import {useRoute,useRouter} from 'vue-router'
95 import * as booking from "@/apiPc/booking" 97 import * as booking from "@/apiPc/booking"
96 import {useStorage} from "@vueuse/core/index"; 98 import {useStorage} from "@vueuse/core/index";
97 import useUserStore from "/@/store/modules/user"; 99 import useUserStore from "/@/store/modules/user";
98 import {getActivityPhotoVoListByShootId} from "@/apiPc/booking"; 100 import {getActivityPhotoVoListByShootId, getBaseInfoByActiveId} from "@/apiPc/booking";
99 101
100 const user = useUserStore().user 102 const user = useUserStore().user
101 const language = useStorage('language', 0) 103 const language = useStorage('language', 0)
...@@ -110,6 +112,33 @@ const query = ref({ ...@@ -110,6 +112,33 @@ const query = ref({
110 lasId:route.params.id, 112 lasId:route.params.id,
111 }) 113 })
112 const value2=ref('') 114 const value2=ref('')
115 const formTime=ref()
116
117 onMounted(() => {
118 getBaseInfoByActiveId(route.params.cptId).then(res=>{
119 formTime.value = res.data || null
120 }).catch(err=>{
121 console.log(err)
122 formTime.value = null
123 }).finally(()=>{
124 // getData()
125 getScheduleList()
126 })
127 })
128
129
130 function getData(){
131 if (!formTime.value.photoStart) return
132 const toDay=dayjs(dayjs().format('YYYY-MM-DD')).valueOf()
133 const start=dayjs(formTime.value.photoStart).valueOf()
134 if(toDay<start){
135 currentDate1.value= query.value.currentDate = dayjs(start).format('YYYY-MM-DD')
136
137 }else{
138 currentDate1.value = query.value.currentDate = dayjs(toDay).format('YYYY-MM-DD')
139 }
140 }
141
113 142
114 getScheduleList() 143 getScheduleList()
115 function getScheduleList() { 144 function getScheduleList() {
...@@ -151,8 +180,17 @@ function goMatch(n) { ...@@ -151,8 +180,17 @@ function goMatch(n) {
151 }) 180 })
152 } 181 }
153 182
154 function changee(){ 183 function disabledDateRZ(date) {
155 console.log(value2.value) 184 if (formTime.value) {
185 const toDay=dayjs(dayjs().format('YYYY-MM-DD')).valueOf()
186 const start=dayjs(formTime.value.photoStart).valueOf()
187 const end=dayjs(formTime.value.photoEnd).valueOf()
188 if (toDay<start) {
189 return date.getTime()<start||date.getTime()>end
190 } else if(toDay>start&&toDay <end) {
191 return date.getTime()<toDay||date.getTime()>end
192 }else return true
193 }
156 } 194 }
157 </script> 195 </script>
158 196
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!