ec06da2a by zhangmeng

国旗

1 parent 67c08943
...@@ -74,10 +74,12 @@ ...@@ -74,10 +74,12 @@
74 :key="index" 74 :key="index"
75 :class="[ 75 :class="[
76 it.id == selectForm.latId ? 'tagActive' : 'tag', 76 it.id == selectForm.latId ? 'tagActive' : 'tag',
77 it.disabled ? 'forbid' : '',
78 it.ticketPackage==1&& tickArr?.length<=0?'forbid':''
77 ]" 79 ]"
78 @click="select(it)" 80 @click="select(it)"
79 > 81 >
80 {{ it.ticketTypeName }}<span v-if="it.ticketPackage==1" class="tao">{{ 82 {{ it.ticketTypeName }}{{ it.disabled }}<span v-if="it.ticketPackage==1" class="tao">{{
81 language == 0 ? '套票' : 'Package ticket' 83 language == 0 ? '套票' : 'Package ticket'
82 }}</span> 84 }}</span>
83 </div> 85 </div>
...@@ -219,7 +221,8 @@ ...@@ -219,7 +221,8 @@
219 </div> 221 </div>
220 222
221 <div 223 <div
222 v-if="endTime<=0" class="btn" style="margin-left: 40px;opacity: 0.5;cursor: not-allowed;margin-top: 10px" 224 v-if="endTime<=0||tickArr?.length<=0" class="btn"
225 style="margin-left: 40px;opacity: 0.5;cursor: not-allowed;margin-top: 10px"
223 @click="toSelectClosed" 226 @click="toSelectClosed"
224 > 227 >
225 {{ 228 {{
...@@ -263,7 +266,7 @@ ...@@ -263,7 +266,7 @@
263 266
264 267
265 <script setup> 268 <script setup>
266 import { ref, computed, watch } from 'vue' 269 import { ref, computed, watch, getCurrentInstance } from 'vue'
267 import { 270 import {
268 getTicketInfoByActivityId, 271 getTicketInfoByActivityId,
269 getTicketListApi, 272 getTicketListApi,
...@@ -273,6 +276,7 @@ import { ...@@ -273,6 +276,7 @@ import {
273 getBaseInfoByActiveId 276 getBaseInfoByActiveId
274 } from '@/apiPc/booking' 277 } from '@/apiPc/booking'
275 278
279
276 import { dayjs } from 'element-plus' 280 import { dayjs } from 'element-plus'
277 import { ElMessageBox } from 'element-plus' 281 import { ElMessageBox } from 'element-plus'
278 import { getDayName } from '@/viewsPc/seat/utils/language' 282 import { getDayName } from '@/viewsPc/seat/utils/language'
...@@ -282,6 +286,7 @@ import { triggerLanguage } from '@/utils/ruoyi' ...@@ -282,6 +286,7 @@ import { triggerLanguage } from '@/utils/ruoyi'
282 import { useStorage } from '@vueuse/core/index' 286 import { useStorage } from '@vueuse/core/index'
283 import { useRoute, useRouter } from 'vue-router' 287 import { useRoute, useRouter } from 'vue-router'
284 288
289 const { proxy } = getCurrentInstance()
285 const language = useStorage('language', 0) 290 const language = useStorage('language', 0)
286 const useStore = useUserStore() 291 const useStore = useUserStore()
287 const user = computed(() => useUserStore().user) 292 const user = computed(() => useUserStore().user)
...@@ -291,9 +296,6 @@ const show = ref(false) ...@@ -291,9 +296,6 @@ const show = ref(false)
291 const showUrl = ref('') 296 const showUrl = ref('')
292 const activeId = ref(route.params.activeId) 297 const activeId = ref(route.params.activeId)
293 const active = ref(1) 298 const active = ref(1)
294 const props = defineProps({
295 activityId: [String, Number]
296 })
297 const remarks = ref() 299 const remarks = ref()
298 const timeData = ref() 300 const timeData = ref()
299 const endTime = ref() 301 const endTime = ref()
...@@ -312,6 +314,7 @@ const tickList = ref([]) ...@@ -312,6 +314,7 @@ const tickList = ref([])
312 const currVenue = ref(null) 314 const currVenue = ref(null)
313 const currTick = ref(null) 315 const currTick = ref(null)
314 const matchData = ref({}) 316 const matchData = ref({})
317 const tickArr = ref([])
315 318
316 watch(show, (val) => { 319 watch(show, (val) => {
317 if (!val) { 320 if (!val) {
...@@ -342,8 +345,23 @@ async function getTicketList() { ...@@ -342,8 +345,23 @@ async function getTicketList() {
342 }) 345 })
343 tickClass.value = res.rows 346 tickClass.value = res.rows
344 if (tickClass.value.length > 0) { 347 if (tickClass.value.length > 0) {
345 selectForm.value.latId = tickClass.value?.[0]?.id 348 const nowDay = dayjs().format('YYYY-MM-DD')
346 await getVenueList() 349 tickArr.value = []
350 for (const val of tickClass.value) {
351 const tickDay = dayjs(val.name).format('YYYY-MM-DD')
352 if (tickDay < nowDay) {
353 val.disabled = true
354 } else {
355 val.disabled = false
356 if (val.ticketPackage != 1) {
357 tickArr.value.push(val)
358 }
359 }
360 }
361 if (tickArr.value.length > 0) {
362 selectForm.value.latId = tickArr.value?.[0]?.id
363 await getVenueList()
364 }
347 } 365 }
348 } 366 }
349 367
...@@ -420,6 +438,9 @@ function toSelectSeat() { ...@@ -420,6 +438,9 @@ function toSelectSeat() {
420 useStore.setVisitor() 438 useStore.setVisitor()
421 return 439 return
422 } 440 }
441 if (!selectForm.value.latstId) {
442 return proxy.$modal.confirm(language.value == 0 ? '请选择票型' : 'Please select a ticket type')
443 }
423 checkNonPayment().then(res => { 444 checkNonPayment().then(res => {
424 if (res.data) { 445 if (res.data) {
425 router.push({ 446 router.push({
...@@ -548,6 +569,7 @@ getmatchData() ...@@ -548,6 +569,7 @@ getmatchData()
548 } 569 }
549 570
550 .forbid { 571 .forbid {
572 pointer-events: none;
551 opacity: 0.5 !important; 573 opacity: 0.5 !important;
552 cursor: not-allowed !important; 574 cursor: not-allowed !important;
553 } 575 }
...@@ -798,4 +820,10 @@ getmatchData() ...@@ -798,4 +820,10 @@ getmatchData()
798 line-height: 40px; 820 line-height: 40px;
799 color: #2b2f3a; 821 color: #2b2f3a;
800 } 822 }
823
824 .disabled {
825 background: #878787 !important;
826 color: #4a4a4a !important;
827 cursor: no-drop !important;
828 }
801 </style> 829 </style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!