85bea01c by zhangmeng

报名校验

1 parent 529802ed
...@@ -815,4 +815,21 @@ export function preCheckForPerson(params) { ...@@ -815,4 +815,21 @@ export function preCheckForPerson(params) {
815 }) 815 })
816 } 816 }
817 817
818 // 人员OCR校验
819 export function checkOcr(data) {
820 return request({
821 url: `/systemj/personInfo/checkOcr`,
822 method: 'post',
823 data
824 })
825 }
826
827 // 修改人员
828 export function editOcr(data) {
829 return request({
830 url: `/systemj/personInfo/editOcr`,
831 method: 'post',
832 data
833 })
834 }
818 835
......
1 <template>
2 <el-dialog v-model="show" :title="title" append-to-body width="1000px">
3
4 <div class="from-Card">
5 <el-form :inline="true" :model="query" class="mt20" label-width="60" size="small">
6 <el-form-item :label="language==0?'姓名':'Name'">
7 <el-input v-model="query.realName" clearable style="width: 120px;" />
8 </el-form-item>
9 <el-form-item v-if="!isNational" :label="language==0?'证件类型':'ID Type'">
10 <el-select v-model="query.idcType" clearable style="width: 100px;" @change="getList">
11 <el-option
12 v-for="item in certificates"
13 :key="item.value"
14 :label="item.label"
15 :value="item.value"
16 />
17 </el-select>
18 </el-form-item>
19 <el-form-item v-if="!isNational" :label="language==0?'证件号码':'ID NO.'">
20 <el-input v-model="query.idcCode" clearable style="width: 120px;" />
21 </el-form-item>
22 <el-form-item>
23 <el-button type="primary" @click="getList">{{ language == 0 ? '查询' : 'Search' }}</el-button>
24 </el-form-item>
25 </el-form>
26 </div>
27 <p v-if="noPhotoCanSign == 0" class="text-danger">
28 {{
29 language == 0 ? '*完善信息才可报名' : '*Please complete the information before signing up'
30 }}
31 </p>
32
33 <el-table
34 ref="allSportmenTable" v-loading="loading" :data="tableData" height="60vh"
35 >
36 <el-table-column
37 :label="language==0?'序号':'Index'" align="center" type="index"
38 width="70"
39 />
40 <el-table-column v-if="isNational" :label="language==0?'WDSF 会员号':'WDSF MIN'" prop="wdsfMin" width="100" />
41 <el-table-column
42 v-if="!isNational" :label="language==0?'姓名':'Real Name'" align="center" min-width="100"
43 prop="realName"
44 />
45 <el-table-column
46 v-if="isNational" :label="language==0?'姓氏':'Surname'" align="center" min-width="100"
47 prop="xing"
48 />
49 <el-table-column v-if="isNational" :label="language==0?'名':'Name'" align="center" min-width="100" prop="ming" />
50 <el-table-column
51 v-if="isNational" :label="language==0?'代表':'Representing'" align="center" min-width="120"
52 prop="representing"
53 />
54 <el-table-column
55 v-if="!isNational" :label="language==0?'所属国家/地区':'Nationality'" align="center"
56 min-width="110" prop="countryName"
57 />
58 <el-table-column :label="language==0?'性别':'Gender'" prop="sexStr" />
59 <el-table-column
60 v-if="isNational" :label="language==0?'年龄组':'Age group'" align="center" min-width="100"
61 prop="ageGroup"
62 />
63 <el-table-column
64 v-if="isNational" :label="language==0?'舞种':'Division'" align="center" min-width="100"
65 prop="division"
66 />
67 <el-table-column v-if="!isNational" :label="language==0?'年龄':'Age'" prop="age" />
68 <el-table-column v-if="!isNational" :label="language==0?'出生日期':'Date of Birth'" prop="birth" width="130" />
69 <el-table-column v-if="!isNational" :label="language==0?'证件类型':'ID Type'" prop="idcTypeStr" width="120" />
70 <el-table-column v-if="!isNational" :label="language==0?'证件号码':'ID NO.'" prop="idcCode" width="200" />
71 <el-table-column :label="language==0?'操作':'Actions'" align="center" fixed="right" width="100">
72 <template #default="scope">
73 <el-button v-if="scope.row.ocrFlag=='0'" link type="danger" @click="editPerson(scope.row)">
74 {{ language == 0 ? '完善信息' : 'Complete' }}
75 </el-button>
76 <el-button v-else disabled link type="danger">
77 {{ language == 0 ? '完善信息' : 'Complete' }}
78 </el-button>
79 </template>
80 </el-table-column>
81 </el-table>
82
83 <paginationPc
84 v-show="total>0"
85 v-model:limit="query.pageSize"
86 v-model:page="query.pageNum"
87 :total="total"
88 @pagination="getList"
89 />
90 </el-dialog>
91
92 <!-- 国内赛运动员-->
93 <!-- <add-coach ref="dialogAddCoach" @submitForm="getList" />-->
94 <!-- 国际赛运动员-->
95 <checkOcr ref="checkOcrRef" @submitForm="getList" />
96 <Import ref="dialogImportProps" @submitForm="getList" />
97 </template>
98
99 <script setup>
100 import { reactive, ref, toRefs } from 'vue'
101 import { getCurrentInstance } from 'vue'
102 import * as match from '@/apiPc/match'
103 import checkOcr from '../components/checkOcr'
104 import Import from '../components/import'
105 import { useStorage } from '@vueuse/core/index'
106 import { getPerPersonList } from '@/apiPc/match'
107
108 const language = useStorage('language', 0)
109 const { proxy } = getCurrentInstance()
110 const data = reactive({
111 query: {
112 label: '0',
113 pageSize: 10,
114 pageNum: 1
115 },
116 tableData: [],
117 show: false,
118 loading: false,
119 title: '运动员',
120 noPhotoCanSign: 0,
121 total: 0,
122 isNational: false
123 })
124 const { query, tableData, show, title, loading, noPhotoCanSign, total, isNational } = toRefs(data)
125
126 const certificates = ref([
127 {
128 value: '0',
129 label: language.value == 0 ? '居民身份证' : 'Resident ID card'
130 },
131 {
132 value: '1',
133 label: language.value == 0 ? '护照' : 'Passport'
134 },
135 {
136 value: '2',
137 label: language.value == 0 ? '其他' : 'Other'
138 }
139 ])
140 let groupId
141 const type = ref('1')
142
143
144 const open = (id, val) => {
145 show.value = true
146 query.value.id = id
147 type.value = val
148 getList()
149 }
150
151 const getList = async() => {
152 loading.value = true
153 let res
154 if (type.value == 1) {
155 res = await match.getPerPersonList(query.value, query.value.id)
156 } else {
157 res = await match.getGroupPersonList(query.value, query.value.id)
158 }
159
160 tableData.value = res.rows
161 total.value = res.total
162 loading.value = false
163 }
164
165 function editPerson(row) {
166 console.log(isNational.value)
167 const params = {
168 id: row.id,
169 title: language.value == 0 ? '编辑人员' : 'Edit Person',
170 groupId: groupId,
171 label: '0'
172 }
173 proxy.$refs['checkOcrRef'].open(params)
174 }
175
176 defineExpose({
177 open
178 })
179 </script>
180 <style lang="scss" scoped>
181 .el-form--inline .el-form-item {
182 width: auto;
183 }
184 </style>
1 <template>
2 <el-dialog
3 v-model="show" :close-on-click-modal="false" :title="title" append-to-body center
4 class="pcloginpop"
5 close-icon="CircleClose" destroy-on-close width="800px"
6 @close="cancel"
7 >
8 <!-- wdsf 个人/舞伴/国际赛运动员-->
9 <div class="pd10" />
10 <el-form ref="dialogRef" :label-width="language==0?120:180" :model="form" inline>
11 <div class="leftboderTT">
12 {{ language == 0 ? '完善信息' : 'ADDITIONAL INFORMATION' }}
13 </div>
14 <div class="h20" />
15 <el-form-item :label="language==0?'个人照片':'photo'" prop="picUrl">
16 <ImageUpload2
17 v-model="form.picUrl"
18 :crop-height="280"
19 :crop-width="200"
20 :is-show-tip="false"
21 :limit="1"
22 class="threeFour"
23 />
24 </el-form-item>
25
26 <el-form-item :label="language==0?'有效证件':'Valid Passport'" required>
27 <image-upload
28 ref="uploadPassportRef"
29 v-model="form.passportUrl"
30 :action="'/common/getPersonInfoFromCert/6'"
31 :button-text="language==0?'上传':'Upload'"
32 :is-show-tip="false"
33 :limit="1"
34 param-name="pic"
35 @response="ocrSuccess"
36 />
37 <div class="tip">
38 <span v-if="language==0">请上传有效身份证件扫描件,用于核实身份信息、申请签证邀请函及购买保险等 </span>
39 <span v-else>
40 Please upload a scanned copy of your valid passport for verification of identity information,
41 application of visa invitation letter and purchasing insurance etc.</span>
42 </div>
43
44 </el-form-item>
45 <el-form-item :label="language==0?'姓名':'Name'" required>
46 <el-input v-model="form.certName" />
47 </el-form-item>
48
49 <el-form-item :label="language==0?'性别':'Gender'" required>
50 <el-radio-group v-model="form.sex">
51 <el-radio value="0">{{ language == 0 ? '女' : 'female' }}</el-radio>
52 <el-radio value="1">{{ language == 0 ? '男' : 'male' }}</el-radio>
53 </el-radio-group>
54 </el-form-item>
55
56 <el-form-item :label="language==0?'出生日期':'Date of Birth'" required>
57 <el-date-picker
58 v-model="form.birth"
59 :disabled-date="disabledBirth" format="YYYY-MM-DD"
60 style="width: 100%;" type="date" value-format="YYYY-MM-DD"
61 />
62 </el-form-item>
63
64 <el-form-item :label="language==0?'证件号':'Passport number'" required>
65 <el-input v-model="form.passportNumber" />
66 </el-form-item>
67
68 </el-form>
69 <template #footer>
70 <div class="dialog-footer text-center">
71 <el-button class="btn-lineG w200px" round type="primary" @click="submitForm">
72 {{ language == 0 ? '确定' : 'Save' }}
73 </el-button>
74 </div>
75 </template>
76 </el-dialog>
77 </template>
78
79 <script setup>
80 import { reactive, ref, toRefs, watch } from 'vue'
81 import { getCurrentInstance, nextTick } from '@vue/runtime-core'
82 import * as match from '@/apiPc/match'
83 import { ElMessage } from 'element-plus'
84 import { useStorage } from '@vueuse/core/index'
85 import ImageUpload from '@/components/ImageUpload/index.vue'
86 import ImageUpload2 from '@/components/ImageUpload/index2.vue'
87
88 const language = useStorage('language', 0)
89 const { proxy } = getCurrentInstance()
90 const emit = defineEmits(['submitForm'])
91 const data = reactive({
92 form: {},
93 card: '',
94 show: false,
95 showVcode: false,
96 labels: [
97 { value: '0', label: '运动员', enlabel: 'Sportsman' },
98 { value: '1', label: '教练', enlabel: 'Coach' },
99 { value: '2', label: '领队', enlabel: 'Head of team' },
100 { value: '4', label: '队医', enlabel: 'Team Doctor' },
101 { value: '5', label: '翻译', enlabel: 'Interpreter' },
102 { value: '6', label: '官员', enlabel: 'Official' },
103 { value: '3', label: '其他', enlabel: 'Other' }
104 ],
105 title: '添加选手信息',
106 isMe: false,
107 isCodeTrue: false,
108 cptId: '',
109 failVcode: '验证失败,请重试',
110 successVcode: '验证通过!',
111 sliderText: '拖动滑块完成拼图'
112 })
113 const {
114 form, show, showVcode, title, isCodeTrue, card, cptId, uploadPassportRef
115 } = toRefs(data)
116
117 const groupId = ref('0')
118
119 const open = (params) => {
120 show.value = true
121 console.log(params)
122 title.value = params.title
123 cptId.value = params.cptId
124 groupId.value = params.groupId
125 form.value.id = params.id
126
127 // getMyInfo()
128 getFormById(params.id)
129 }
130
131 function getMyInfo() {
132 match.getMyPersonInfo().then(res => {
133 form.value = res.data
134 })
135 }
136
137 function getFormById(id) {
138 match.getPersonInfoById(id).then(res => {
139 form.value = res.data
140 form.value.certName = res.data.realName
141 form.value.passportNumber = res.data.idcCode
142 form.value.passportUrl = ''
143 })
144 }
145
146 watch(show, (value) => {
147 if (!value) {
148 card.value = ''
149 isCodeTrue.value = false
150 form.value = {
151 // sex: '0'
152 }
153 }
154 nextTick(() => {
155 proxy.$refs['dialogRef'].clearValidate()
156 })
157 })
158 const ocrSuccess = (res) => {
159 // form.value.passportUrl = res.data.url
160 console.log(form.value.passportUrl)
161 if (res.code == 200) {
162 form.value.passportUrl = res.data.url
163 form.value.passportNumber = res.data.code
164 form.value.birth = res.data.birth?.slice(0, 10)
165 form.value.sex = res.data.sex
166 form.value.certName = res.data.name
167 } else if (res.code == 500) {
168 ElMessage.warning(res.msg)
169 form.value.passportUrl = ''
170 }
171 }
172
173 function submitForm() {
174 // if (!form.value.wdsfMin && !card.value) {
175 // ElMessage.warning(language.value == 0 ? '请输入你的WDSF会员号' : 'Please fill in your WDSF MIN')
176 // return
177 // }
178 // if (card.value && !isCodeTrue.value) {
179 // ElMessage.warning(language.value == 0 ? '请验证你的WDSF会员号' : 'Please verify your WDSF MIN')
180 // return
181 // }
182 if (!form.value.passportNumber) {
183 ElMessage.warning(language.value == 0 ? '请输入你的证件号' : 'Please fill in your passport number')
184 return
185 }
186 if (!form.value.birth) {
187 ElMessage.warning(language.value == 0 ? '请输入你的出生日期' : 'Please fill in your birthday')
188 return
189 }
190
191 if (!form.value.sex) {
192 ElMessage.warning(language.value == 0 ? '请选择性别' : 'Please select your gender')
193 return
194 }
195 if (!form.value.certName) {
196 ElMessage.warning(language.value == 0 ? '请输入姓名' : 'Please enter your name')
197 return
198 }
199 if (!form.value.passportUrl || form.value.passportUrl == '' || form.value.passportUrl.length == 0) {
200 ElMessage.warning(language.value == 0 ? '请上传有效证件' : 'Please upload valid identification documents')
201 return
202 }
203
204 form.value.cptId = cptId.value
205 if (Array.isArray(form.value.passportUrl)) {
206 form.value.passportUrl = form.value.passportUrl[0].url
207 }
208 match.editOcr(form.value).then(res => {
209 ElMessage.success(language.value == 0 ? '保存成功' : 'Successfully')
210 show.value = false
211 emit('submitForm')
212 })
213
214
215 // if (editgay) {
216 // // id不是0
217 //
218 // } else {
219 // if (Array.isArray(form.value.passportUrl)) {
220 // form.value.passportUrl = form.value.passportUrl[0].url
221 // }
222 // if (isMe.value) {
223 // match.saveMyBaseInfo(form.value).then(res => {
224 // ElMessage.success('保存成功')
225 // show.value = false
226 // emit('submitForm')
227 // })
228 // } else {
229 // delete form.value.status
230 // delete form.value.id
231 // form.value.label = '0'
232 // form.value.cptId = cptId.value
233 // form.value.wdsfMin = form.value.min
234 // form.value.idcCode = form.value.passportNumber
235 // form.value.idcType = '1'
236 // if (Array.isArray(form.value.passportUrl)) {
237 // form.value.passportUrl = form.value.passportUrl[0].url
238 // }
239 // if (groupId.value == '0' || !groupId.value) {
240 // addPersonal()
241 // } else {
242 // if (groupId.value) {
243 // addGroupMember()
244 // }
245 // }
246 // }
247 // }
248 }
249
250 function addPersonal() {
251 match.savePersonForMyPerson2(form.value).then(res => {
252 ElMessage.success('保存成功')
253 show.value = false
254 emit('submitForm', res.data)
255 })
256 }
257
258 function addGroupMember() {
259 form.value.groupId = groupId
260 match.savePersonForMyGroup(form.value).then(res => {
261 ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful')
262 show.value = false
263 emit('submitForm')
264 })
265 }
266
267 function cancel() {
268 show.value = false
269 showVcode.value = false
270 }
271
272 // function resetCode() {
273 // isCodeTrue.value = false
274 // }
275 //
276 // function checkCard() {
277 // if (isCodeTrue.value) {
278 // return
279 // }
280 // if (!card.value) {
281 // if (language.value == 0) {
282 // ElMessage.warning('请填写WDSF卡号')
283 // } else {
284 // ElMessage.warning('Please fill in your WDSF code')
285 // }
286 // return
287 // }
288 // showVcode.value = true
289 // }
290 //
291 // function codeSuccess(msg) {
292 // console.log('验证通过' + msg)
293 // showVcode.value = false
294 // isCodeTrue.value = true
295 // checkWdsfAthletes({ card: card.value, groupId: groupId }).then(res => {
296 // if (res.data.wdsfFlag == -1) {
297 // ElMessage.warning(language.value == 0 ? '您添加的运动员代表国家/地区,与团体账号注册的国家/地区不符,无法添加' : 'The athlete \'s representing, does not match the group account‘s country/region and cannot be added.')
298 // isCodeTrue.value = false
299 // return
300 // }
301 //
302 // form.value = res.data
303 // form.value.xing = form.value.surname
304 // form.value.ming = form.value.name
305 // form.value.wdsfStatus = res.data.status
306 // if (form.value.sex) {
307 // form.value.sex = res.data.sex
308 // }
309 // if (form.value.wdsfFlag == '0') {
310 // isCodeTrue.value = false
311 // if (language.value == 0) {
312 // ElMessage.warning('WDSF卡号错误')
313 // } else {
314 // ElMessage.warning('WDSF MIN is Error')
315 // }
316 // }
317 // })
318 // }
319
320 function disabledBirth(time) {
321 return time.getTime() > new Date().getTime()
322 }
323
324 defineExpose({ open })
325
326 </script>
327
328 <style lang="scss">
329 .el-input-group__append button.el-button, .el-input-group__append button.el-button:hover {
330 color: var(--el-color-primary);
331 background: #efefff;
332 border: var(--el-color-primary) solid 1px;
333 border-radius: 0;
334 }
335
336 .leftboderTT {
337 color: var(--el-color-primary);
338 font-size: 16px;
339 font-weight: 600;
340
341 span {
342 color: #929AA0;
343 font-size: 14px;
344 }
345 }
346
347 .threeFour {
348 width: 100%;
349
350 .el-upload--picture-card {
351 width: 120px;
352 height: 160px;
353 }
354
355 .el-upload-list--picture-card .el-upload-list__item {
356 width: 120px;
357 height: 160px;
358 }
359 }
360
361 .tip {
362 font-size: 13px;
363 color: #999;
364 line-height: 1.6;
365 margin: 10px 0;
366
367 i {
368 color: red;
369 margin: 0 4px 0 0;
370 }
371 }
372
373 .shenfen {
374 .el-upload--picture-card {
375 width: 320px;
376 height: 200px;
377 }
378
379 .el-upload-list--picture-card .el-upload-list__item {
380 width: 320px;
381 height: 200px;
382 }
383 }
384
385 .touxiang {
386 :deep(.el-upload--picture-card ) {
387 width: 140px;
388 height: 200px;
389 }
390 }
391
392 .touxiang {
393 :deep(.el-upload-list__item ) {
394 width: 140px;
395 height: 200px;
396 }
397
398 }
399
400 .el-form--inline .el-form-item {
401 width: 100%
402 }
403
404
405 .boxDialog {
406 .el-dialog__header {
407 background: linear-gradient(#ed2c22, #fe6d45);
408 margin-right: 0;
409 height: 52px;
410
411 span {
412 color: #fff;
413 }
414 }
415 }
416
417 </style>
...@@ -392,6 +392,8 @@ ...@@ -392,6 +392,8 @@
392 @click="openPickup" 392 @click="openPickup"
393 >{{ language == 0 ? '接 / 送机服务' : 'Pick-up/drop-off service' }}</a> 393 >{{ language == 0 ? '接 / 送机服务' : 'Pick-up/drop-off service' }}</a>
394 <pickup ref="pickupRef" /> 394 <pickup ref="pickupRef" />
395
396 <checkAllSportsman ref="checkAllSportsmanRef" />
395 </div> 397 </div>
396 </template> 398 </template>
397 399
...@@ -407,6 +409,8 @@ import { getCurrentInstance, ref } from 'vue' ...@@ -407,6 +409,8 @@ import { getCurrentInstance, ref } from 'vue'
407 import { reactive, onMounted } from '@vue/runtime-core' 409 import { reactive, onMounted } from '@vue/runtime-core'
408 import { useRoute, useRouter } from 'vue-router' 410 import { useRoute, useRouter } from 'vue-router'
409 import AffixInvitation from '@/viewsPc/match/components/affix-invitation' 411 import AffixInvitation from '@/viewsPc/match/components/affix-invitation'
412 import checkAllSportsman from '@/viewsPc/match/components/checkAllSportsman'
413
410 414
411 const language = useStorage('language', 0) 415 const language = useStorage('language', 0)
412 const route = useRoute() 416 const route = useRoute()
...@@ -589,18 +593,7 @@ function goTeamSign() { ...@@ -589,18 +593,7 @@ function goTeamSign() {
589 return 593 return
590 } 594 }
591 595
592 handelPreCheckForGroup( 596 handelPreCheckForGroup(goTeamSignCn)
593 router.push({
594 path: `${route.params.id}/teamSignCn`,
595 query: {
596 matchId: matchId.value,
597 groupId: groupId.value,
598 signType: matchData.value.signType,
599 languageSource: matchData.value.languageSource,
600 isNational: false
601 }
602 })
603 )
604 } else { 597 } else {
605 // 国际赛 598 // 国际赛
606 if (group?.type != '4' && matchData.value.countryLimit == '1') { 599 if (group?.type != '4' && matchData.value.countryLimit == '1') {
...@@ -615,7 +608,11 @@ function goTeamSign() { ...@@ -615,7 +608,11 @@ function goTeamSign() {
615 ) 608 )
616 return 609 return
617 } 610 }
618 handelPreCheckForGroup( 611 handelPreCheckForGroup(goTamSign)
612 }
613 }
614
615 function goTamSign() {
619 router.push({ 616 router.push({
620 path: `${route.params.id}/teamSign`, 617 path: `${route.params.id}/teamSign`,
621 query: { 618 query: {
...@@ -626,8 +623,19 @@ function goTeamSign() { ...@@ -626,8 +623,19 @@ function goTeamSign() {
626 languageSource: matchData.value.languageSource 623 languageSource: matchData.value.languageSource
627 } 624 }
628 }) 625 })
629 ) 626 }
627
628 function goTeamSignCn() {
629 router.push({
630 path: `${route.params.id}/teamSignCn`,
631 query: {
632 matchId: matchId.value,
633 groupId: groupId.value,
634 signType: matchData.value.signType,
635 languageSource: matchData.value.languageSource,
636 isNational: false
630 } 637 }
638 })
631 } 639 }
632 640
633 function goPersonalSign() { 641 function goPersonalSign() {
...@@ -833,7 +841,8 @@ async function handelGeRenNext() { ...@@ -833,7 +841,8 @@ async function handelGeRenNext() {
833 } 841 }
834 // 正常报名 842 // 正常报名
835 if (res.data == 1) { 843 if (res.data == 1) {
836 goPersonalSign() 844 const flag = await getCheckOcr({ type: '1' })
845 if (flag) await goPersonalSign()
837 } 846 }
838 // 提示 847 // 提示
839 if (res.data == 2) { 848 if (res.data == 2) {
...@@ -843,7 +852,8 @@ async function handelGeRenNext() { ...@@ -843,7 +852,8 @@ async function handelGeRenNext() {
843 : 'The athlete`s WDSF membership number has been changed. Should it be updated?' 852 : 'The athlete`s WDSF membership number has been changed. Should it be updated?'
844 ) 853 )
845 await match.preCheckForPerson({ type: '2' }) 854 await match.preCheckForPerson({ type: '2' })
846 await goPersonalSign() 855 const flag = await getCheckOcr({ type: '1' })
856 if (flag) await goPersonalSign()
847 } 857 }
848 } 858 }
849 859
...@@ -867,7 +877,8 @@ const openPickup = () => { ...@@ -867,7 +877,8 @@ const openPickup = () => {
867 async function handelPreCheckForGroup(fn) { 877 async function handelPreCheckForGroup(fn) {
868 const res = await match.preCheckForGroup(groupId.value, '1') 878 const res = await match.preCheckForGroup(groupId.value, '1')
869 if (res.data == 1 || res.data == 0) { 879 if (res.data == 1 || res.data == 0) {
870 await fn() 880 const flag = await getCheckOcr({ type: '2', groupId: groupId.value })
881 if (flag) await fn()
871 } 882 }
872 if (res.data == 2) { 883 if (res.data == 2) {
873 await proxy.$modal.confirm( 884 await proxy.$modal.confirm(
...@@ -875,9 +886,23 @@ async function handelPreCheckForGroup(fn) { ...@@ -875,9 +886,23 @@ async function handelPreCheckForGroup(fn) {
875 ? '运动员的WDSF会员号已变更,是否更新?' 886 ? '运动员的WDSF会员号已变更,是否更新?'
876 : 'The athlete`s WDSF membership number has been changed. Should it be updated?') 887 : 'The athlete`s WDSF membership number has been changed. Should it be updated?')
877 await match.preCheckForGroup(groupId.value, '2') 888 await match.preCheckForGroup(groupId.value, '2')
878 await fn() 889 const flag = await getCheckOcr({ type: '2', groupId: groupId.value })
890 if (flag) await fn()
891 }
892 }
893
894 async function getCheckOcr(obj) {
895 const { data } = await match.checkOcr(obj)
896 if (!data) {
897 // 人员ocr未通过
898 await proxy.$modal.confirm(language.value == 0 ? '请完善人员信息' : 'Please complete the personnel information')
899 await proxy.$refs['checkAllSportsmanRef'].open(obj.type == 1 ? user.userId : groupId.value, obj.type)
900 return false
901 } else {
902 return true
879 } 903 }
880 } 904 }
905
881 </script> 906 </script>
882 907
883 <style lang="scss" scoped> 908 <style lang="scss" scoped>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!