e0aef7c0 by zhangmeng

Merge branch 'devdev' into 报名

2 parents 5622fee7 f14fdc57
...@@ -449,6 +449,10 @@ const ocrSuccess = (res) => { ...@@ -449,6 +449,10 @@ const ocrSuccess = (res) => {
449 ElMessage.warning(res.msg) 449 ElMessage.warning(res.msg)
450 form.value.passportCopy = '' 450 form.value.passportCopy = ''
451 } 451 }
452 if (res.data.msg) {
453 return proxy.$modal.msgWarning(res.data.msg
454 )
455 }
452 } 456 }
453 457
454 function submitForm() { 458 function submitForm() {
......
...@@ -253,6 +253,10 @@ const ocrSuccess = (res) => { ...@@ -253,6 +253,10 @@ const ocrSuccess = (res) => {
253 } else if (res.code == 500) { 253 } else if (res.code == 500) {
254 ElMessage.warning(res.msg) 254 ElMessage.warning(res.msg)
255 } 255 }
256 if (res.data.msg) {
257 return proxy.$modal.msgWarning(res.data.msg
258 )
259 }
256 } 260 }
257 261
258 function submitForm() { 262 function submitForm() {
......
...@@ -123,23 +123,16 @@ const open = (params) => { ...@@ -123,23 +123,16 @@ const open = (params) => {
123 cptId.value = params.cptId 123 cptId.value = params.cptId
124 groupId.value = params.groupId 124 groupId.value = params.groupId
125 form.value.id = params.id 125 form.value.id = params.id
126
127 // getMyInfo()
128 getFormById(params.id) 126 getFormById(params.id)
129 } 127 }
130 128
131 function getMyInfo() {
132 match.getMyPersonInfo().then(res => {
133 form.value = res.data
134 })
135 }
136 129
137 function getFormById(id) { 130 function getFormById(id) {
138 match.getPersonInfoById(id).then(res => { 131 match.getPersonInfoById(id).then(res => {
139 form.value = res.data 132 form.value = res.data
140 form.value.certName = res.data.realName 133 form.value.certName = res.data.realName
141 form.value.passportNumber = res.data.idcCode 134 form.value.passportNumber = res.data.idcCode
142 form.value.passportUrl = '' 135 // form.value.passportUrl =
143 }) 136 })
144 } 137 }
145 138
...@@ -156,8 +149,6 @@ watch(show, (value) => { ...@@ -156,8 +149,6 @@ watch(show, (value) => {
156 }) 149 })
157 }) 150 })
158 const ocrSuccess = (res) => { 151 const ocrSuccess = (res) => {
159 // form.value.passportUrl = res.data.url
160 console.log(form.value.passportUrl)
161 if (res.code == 200) { 152 if (res.code == 200) {
162 form.value.passportUrl = res.data.url 153 form.value.passportUrl = res.data.url
163 form.value.passportNumber = res.data.code 154 form.value.passportNumber = res.data.code
...@@ -168,17 +159,14 @@ const ocrSuccess = (res) => { ...@@ -168,17 +159,14 @@ const ocrSuccess = (res) => {
168 ElMessage.warning(res.msg) 159 ElMessage.warning(res.msg)
169 form.value.passportUrl = '' 160 form.value.passportUrl = ''
170 } 161 }
162
163 if (res.data.msg) {
164 return proxy.$modal.msgWarning(res.data.msg
165 )
166 }
171 } 167 }
172 168
173 function submitForm() { 169 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) { 170 if (!form.value.passportNumber) {
183 ElMessage.warning(language.value == 0 ? '请输入你的证件号' : 'Please fill in your passport number') 171 ElMessage.warning(language.value == 0 ? '请输入你的证件号' : 'Please fill in your passport number')
184 return 172 return
...@@ -205,63 +193,12 @@ function submitForm() { ...@@ -205,63 +193,12 @@ function submitForm() {
205 if (Array.isArray(form.value.passportUrl)) { 193 if (Array.isArray(form.value.passportUrl)) {
206 form.value.passportUrl = form.value.passportUrl[0].url 194 form.value.passportUrl = form.value.passportUrl[0].url
207 } 195 }
196 form.value.ocrFlag = '1'
208 match.editOcr(form.value).then(res => { 197 match.editOcr(form.value).then(res => {
209 ElMessage.success(language.value == 0 ? '保存成功' : 'Successfully') 198 ElMessage.success(language.value == 0 ? '保存成功' : 'Successfully')
210 show.value = false 199 show.value = false
211 emit('submitForm') 200 emit('submitForm')
212 }) 201 })
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 } 202 }
266 203
267 function cancel() { 204 function cancel() {
...@@ -269,54 +206,6 @@ function cancel() { ...@@ -269,54 +206,6 @@ function cancel() {
269 showVcode.value = false 206 showVcode.value = false
270 } 207 }
271 208
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) { 209 function disabledBirth(time) {
321 return time.getTime() > new Date().getTime() 210 return time.getTime() > new Date().getTime()
322 } 211 }
......
...@@ -499,6 +499,10 @@ const ocrSuccess = (res) => { ...@@ -499,6 +499,10 @@ const ocrSuccess = (res) => {
499 } else if (res.code == 500) { 499 } else if (res.code == 500) {
500 ElMessage.warning(res.msg) 500 ElMessage.warning(res.msg)
501 } 501 }
502 if (res.data.msg) {
503 return proxy.$modal.msgWarning(res.data.msg
504 )
505 }
502 } 506 }
503 </script> 507 </script>
504 508
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!