ffb4a923 by zhangmeng

Merge branch 'devmatch' into dev

2 parents f60aa8bf b594c9fd

827 KB | W: | H:

2.35 MB | W: | H:

src/assets/logo/club.png
src/assets/logo/club.png
src/assets/logo/club.png
src/assets/logo/club.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -552,7 +552,7 @@ function handleRowClick(row) {
const init = () => {
var today = dayjs().format('YYYY-MM-DD HH:mm:ss')
time.value = dayjs('2025-07-17 07:00:00').diff(today, 'millisecond')
etime.value = dayjs('2025-07-22 12:00:00').diff(today, 'millisecond')
etime.value = dayjs('2025-07-20 24:00:00').diff(today, 'millisecond')
getRank().then(res => {
rank.value = res.data
console.log(rank.value)
......
......@@ -533,7 +533,7 @@ function handleRowClick(row) {
const init = () => {
var today = dayjs().format('YYYY-MM-DD HH:mm:ss')
etime.value = dayjs('2025-07-22 12:00:00').diff(today, 'millisecond')
etime.value = dayjs('2025-07-20 24:00:00').diff(today, 'millisecond')
time.value = dayjs('2025-07-17 07:00:00').diff(today, 'millisecond')
getRank().then(res => {
rank.value = res.data
......
......@@ -200,7 +200,7 @@
<addCoachEn ref="dialogAddCoachEnRef" @submitForm="getMyMemberTable" />
<dialogExtraForm ref="popExtraForm" @submitForm="getSignInfoList" />
<insuranceView ref="insuranceViewRef" @checkedChange="checkedChange" @submitForm="submitForm" />
<insuranceView ref="insuranceViewRef" @checkedChange="checkedChange" @scuess="handelSuccess" />
</div>
</template>
......@@ -235,7 +235,7 @@ import { useStorage } from '@vueuse/core/index'
const language = useStorage('language', 0)
const checked = ref('0')
const insuranceFlag = ref()
const insuranceFlag = ref()// 0不够买1强制购买2非强制购买
const insuranceAgreement = ref()
const data = reactive({
......@@ -390,6 +390,7 @@ function getMatch(id) {
}).then(res => {
insuranceAgreement.value = res.data.insuranceAgreement
insuranceFlag.value = res.data.insuranceFlag
if (insuranceFlag.value == 1) checked.value = '1'
signEndTime.value = res.data.signEndTime
noPhotoCanSign.value = res.data.noPhotoCanSign
coachOrLeaderFlag.value = res.data.coachOrLeaderFlag
......@@ -486,57 +487,41 @@ function submitForm() {
}
function commit() {
if (language.value == 0 && insuranceFlag.value == 2 && checked.value == '0') {
ElMessageBox.confirm(language.value == 0 ? '你是否同意赛事方帮忙购买保险?' : 'Do you agree to have the event organizer help purchase insurance?',
language.value == 0 ? '提示' : 'Tip', {
confirmButtonText: language.value == 0 ? '是' : 'Yes',
cancelButtonText: language.value == 0 ? '否,进入下一步' : 'NO,Go Next',
type: 'warning',
closeOnClickModal: false,
showClose: false
}).then(() => {
// checked.value = '1'
// router.push({
// name: 'signPreview',
// query: {
// matchId: matchId.value,
// buy: checked.value
//
// }
// })
handelInsurance()
}).catch(() => {
router.push({
name: 'signPreview',
query: {
matchId: matchId.value,
buy: checked.value
}
})
})
} else if (insuranceFlag.value == 1 && checked.value != '1') {
ElMessageBox.confirm(language.value == 0 ? '请阅读并勾选同意赛事保险购买协议' : 'Please read and tick to agree to the event insurance purchase agreement',
language.value == 0 ? '提示' : 'Tip', {
showCancelButton: false,
confirmButtonText: language.value == 0 ? '是' : 'Yes',
// cancelButtonText: language.value == 0 ? '否,进入下一步' : 'NO,Go Next',
type: 'warning'
}).then(() => {
}).catch(() => {
})
if (language.value == 0 && insuranceFlag.value == 2 && checked.value == 0) {
handelInsurance()
} else {
router.push({
name: 'signPreview',
query: {
matchId: matchId.value,
buy: checked.value
}
})
}
// if (language.value == 0 && insuranceFlag.value == 2 && checked.value == '0') {
// handelInsurance()
// } else if (insuranceFlag.value == 1 && checked.value != '1') {
// ElMessageBox.confirm(language.value == 0 ? '请阅读并勾选同意赛事保险购买协议' : 'Please read and tick to agree to the event insurance purchase agreement',
// language.value == 0 ? '提示' : 'Tip', {
// showCancelButton: false,
// confirmButtonText: language.value == 0 ? '是' : 'Yes',
// // cancelButtonText: language.value == 0 ? '否,进入下一步' : 'NO,Go Next',
// type: 'warning'
// }).then(() => {
//
// }).catch(() => {
//
// })
// } else {
// router.push({
// name: 'signPreview',
// query: {
// matchId: matchId.value,
// buy: checked.value
//
// }
// })
// }
}
function getChoosed(list) {
......@@ -735,9 +720,58 @@ function switchTabletype() {
}
function handelInsurance() {
proxy.$refs['insuranceViewRef'].open(insuranceAgreement.value, checked.value)
proxy.$refs['insuranceViewRef'].open(insuranceAgreement.value, checked.value, insuranceFlag.value)
}
function handelSuccess(v) {
checked.value = v
if (signInfoList.value.length == 0) {
if (language.value == 0) {
ElMessage.warning('请至少选择一个项目')
} else {
ElMessage.warning('select at least one project')
}
return
}
if (signInfoType == '1') {
ElMessageBox.confirm(language.value == 0 ? '已报项,前往我的报项' : 'Reported items, go to my submission',
language.value == 0 ? '提示' : 'Tips', {
confirmButtonText: language.value == 0 ? '确定' : 'OK',
cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
type: 'warning'
}).then(() => {
router.push({ name: 'myMatch' })
})
return
}
if (extraform.value && extraform.value.length > 0) {
let needBuchong = false
for (const e of extraform.value) {
if (e.status == '0') {
needBuchong = true
}
}
for (const s of signInfoList.value) {
if (s.extraPersonInfo == null && needBuchong) {
ElMessage.warning(language.value == 0 ? '请完善运动员补充信息' : 'Complete Supplementary Information')
tableType.value = 0
return
}
}
}
router.push({
name: 'signPreview',
query: {
matchId: matchId.value,
buy: checked.value
}
})
}
// 自行购买保险
function checkedChange(v) {
checked.value = v
}
......
......@@ -236,7 +236,7 @@
<!-- <el-tour-step v-if="projectIds.length>0" target="#signUpBtn" title="第四步" description="点击报项"/>-->
<!-- </el-tour>-->
<insuranceView ref="insuranceViewRef" @checkedChange="checkedChange" @submitForm="submitForm" />
<insuranceView ref="insuranceViewRef" @checkedChange="checkedChange" @scuess="handelSuccess" />
</div>
</template>
......@@ -380,6 +380,7 @@ function getMatch(id) {
extraform.value = JSON.parse(res.data.participantsInfo)
insuranceAgreement.value = res.data.insuranceAgreement
insuranceFlag.value = res.data.insuranceFlag
if (insuranceFlag.value == 1) checked.value = '1'
if (res.data.languageSource == '100') {
isNational.value = false
} else {
......@@ -445,47 +446,8 @@ function submitForm() {
return
}
if (insuranceFlag.value == '1' && checked.value == 0) {
ElMessageBox.confirm(language.value == 0 ? '请阅读并勾选同意赛事保险购买协议' : 'Please read and tick to agree to the event insurance purchase agreement',
language.value == 0 ? '提示' : 'Tip', {
showCancelButton: false,
confirmButtonText: language.value == 0 ? '是' : 'Yes',
// cancelButtonText: language.value == 0 ? '否,进入下一步' : 'NO,Go Next',
type: 'warning'
})
} else if (language.value == 0 && insuranceFlag.value == '2' && checked.value == 0) {
ElMessageBox.confirm(language.value == 0 ? '你是否同意赛事方帮忙购买保险?' : 'Do you agree to have the event organizer help purchase insurance?',
language.value == 0 ? '提示' : 'Tip', {
confirmButtonText: language.value == 0 ? '是' : 'Yes',
cancelButtonText: language.value == 0 ? '否,进入下一步' : 'NO,Go Next',
type: 'warning',
closeOnClickModal: false,
showClose: false
}).then(() => {
// checked.value = '1'
// router.push({
// name: 'signPreview',
// query: {
// matchId: matchId.value,
// groupId: groupId.value,
// isNational: isNational.value,
// buy: checked.value
// }
// })
handelInsurance()
}).catch(() => {
router.push({
name: 'signPreview',
query: {
matchId: matchId.value,
groupId: groupId.value,
isNational: isNational.value,
buy: checked.value
}
})
})
if (language.value == 0 && insuranceFlag.value == 2 && checked.value == 0) {
handelInsurance() // 非购买保险
} else {
router.push({
name: 'signPreview',
......@@ -497,6 +459,58 @@ function submitForm() {
}
})
}
// if (insuranceFlag.value == '1' && checked.value == 0) {
// ElMessageBox.confirm(language.value == 0 ? '请阅读并勾选同意赛事保险购买协议' : 'Please read and tick to agree to the event insurance purchase agreement',
// language.value == 0 ? '提示' : 'Tip', {
// showCancelButton: false,
// confirmButtonText: language.value == 0 ? '是' : 'Yes',
// // cancelButtonText: language.value == 0 ? '否,进入下一步' : 'NO,Go Next',
// type: 'warning'
// })
// } else if (language.value == 0 && insuranceFlag.value == '2' && checked.value == 0) {
// ElMessageBox.confirm(language.value == 0 ? '你是否同意赛事方帮忙购买保险?' : 'Do you agree to have the event organizer help purchase insurance?',
// language.value == 0 ? '提示' : 'Tip', {
// confirmButtonText: language.value == 0 ? '是' : 'Yes',
// cancelButtonText: language.value == 0 ? '否,进入下一步' : 'NO,Go Next',
// type: 'warning',
// closeOnClickModal: false,
// showClose: false
// }).then(() => {
// // checked.value = '1'
// // router.push({
// // name: 'signPreview',
// // query: {
// // matchId: matchId.value,
// // groupId: groupId.value,
// // isNational: isNational.value,
// // buy: checked.value
// // }
// // })
//
// handelInsurance()
// }).catch(() => {
// router.push({
// name: 'signPreview',
// query: {
// matchId: matchId.value,
// groupId: groupId.value,
// isNational: isNational.value,
// buy: checked.value
// }
// })
// })
// } else {
// router.push({
// name: 'signPreview',
// query: {
// matchId: matchId.value,
// groupId: groupId.value,
// isNational: isNational.value,
// buy: checked.value
// }
// })
// }
}
......@@ -895,9 +909,58 @@ watch(choosedchoosed, (newVal, oldVal) => {
})
function handelInsurance() {
proxy.$refs['insuranceViewRef'].open(insuranceAgreement.value, checked.value)
proxy.$refs['insuranceViewRef'].open(insuranceAgreement.value, checked.value, insuranceFlag.value)
}
function handelSuccess(v) {
checked.value = v
if (signInfoType == '1') {
ElMessageBox.confirm(language.value == 0 ? '已报项,前往我的报项' : 'Reported items, go to my submission',
language.value == 0 ? '提示' : 'Tips', {
confirmButtonText: language.value == 0 ? '确定' : 'OK',
cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
type: 'warning'
}).then(() => {
router.push({ name: 'myMatch' })
})
return
}
if (extraform.value && extraform.value.length > 0) {
let needBuchong = false
for (const e of extraform.value) {
if (e.status == '0') {
needBuchong = true
}
}
for (const s of signInfoList.value) {
if (s.extraPersonInfo == null && needBuchong) {
ElMessage.warning(language.value == 0 ? '请完善补充信息' : 'Please fill in the supplementary information')
tableType.value = 0
return
}
}
}
if (signInfoList.value.length == 0) {
if (language.value == 0) {
ElMessage.warning('请至少选择一个项目')
} else {
ElMessage.warning('select at least one project')
}
return
}
router.push({
name: 'signPreview',
query: {
matchId: matchId.value,
groupId: groupId.value,
isNational: isNational.value,
buy: checked.value
}
})
}
function checkedChange(v) {
checked.value = v
}
......@@ -1173,5 +1236,4 @@ function checkedChange(v) {
}
}
}
</style>
......
......@@ -4,12 +4,14 @@
:title="language==0?'赛事购买协议':'Event Insurance Procurement Agreement'" append-to-body center
class="pcloginpop"
close-icon="CircleClose" destroy-on-close
max-width="1200px"
width="80%"
>
<div v-html="data" />
<div class="checkbox">
<el-checkbox
v-model="checked"
:disabled="insuranceViewRef==1"
:label="language==0?'我同意授权赛事方帮忙购买保险':'I agree to authorize the event organizer to purchase insurance on my behalf'"
false-value="0"
size="large" true-value="1"
......@@ -18,8 +20,12 @@
</div>
<template #footer>
<div class="dialog-footer text-center">
<el-button class="btn-lineG w200px" round type="primary" @click="submitForm">{{
language == 0 ? '确定' : 'Save'
<el-button v-if="insuranceViewRef!=1" class="btn-lineG w200px" round type="primary" @click="submitForm()">{{
language == 0 ? '自行购买保险' : 'Buy by oneself'
}}
</el-button>
<el-button class="btn-lineG w200px" round type="primary" @click="submitForm(1)">{{
language == 0 ? '同意委托购买保险' : 'Agree to purchase'
}}
</el-button>
</div>
......@@ -37,16 +43,22 @@ const emit = defineEmits(['submitForm', 'checkedChange'])
const checked = ref('0')
const show = ref(false)
const data = ref()
const open = (row, num) => {
const insuranceViewRef = ref('0')
const open = (row, num, flag) => {
show.value = true
checked.value = num || '0'
data.value = row
insuranceViewRef.value = flag
}
function submitForm() {
function submitForm(v) {
if (v == 1) {
checked.value = '1'
} else {
checked.value = '0'
}
emit('scuess', checked.value)
show.value = false
emit('submitForm')
}
function checkedChange() {
......@@ -68,4 +80,18 @@ defineExpose({ open })
cursor: pointer
}
}
@media (max-width: 767px) {
.w200px {
min-width: 0
}
}
/* 桌面(≥1024px) */
@media (min-width: 1024px) {
.w200px {
min-width: 200px
}
}
</style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!