e0aef7c0 by zhangmeng

Merge branch 'devdev' into 报名

2 parents 5622fee7 f14fdc57
......@@ -449,6 +449,10 @@ const ocrSuccess = (res) => {
ElMessage.warning(res.msg)
form.value.passportCopy = ''
}
if (res.data.msg) {
return proxy.$modal.msgWarning(res.data.msg
)
}
}
function submitForm() {
......
......@@ -253,6 +253,10 @@ const ocrSuccess = (res) => {
} else if (res.code == 500) {
ElMessage.warning(res.msg)
}
if (res.data.msg) {
return proxy.$modal.msgWarning(res.data.msg
)
}
}
function submitForm() {
......
......@@ -123,23 +123,16 @@ const open = (params) => {
cptId.value = params.cptId
groupId.value = params.groupId
form.value.id = params.id
// getMyInfo()
getFormById(params.id)
}
function getMyInfo() {
match.getMyPersonInfo().then(res => {
form.value = res.data
})
}
function getFormById(id) {
match.getPersonInfoById(id).then(res => {
form.value = res.data
form.value.certName = res.data.realName
form.value.passportNumber = res.data.idcCode
form.value.passportUrl = ''
// form.value.passportUrl =
})
}
......@@ -156,8 +149,6 @@ watch(show, (value) => {
})
})
const ocrSuccess = (res) => {
// form.value.passportUrl = res.data.url
console.log(form.value.passportUrl)
if (res.code == 200) {
form.value.passportUrl = res.data.url
form.value.passportNumber = res.data.code
......@@ -168,17 +159,14 @@ const ocrSuccess = (res) => {
ElMessage.warning(res.msg)
form.value.passportUrl = ''
}
if (res.data.msg) {
return proxy.$modal.msgWarning(res.data.msg
)
}
}
function submitForm() {
// if (!form.value.wdsfMin && !card.value) {
// ElMessage.warning(language.value == 0 ? '请输入你的WDSF会员号' : 'Please fill in your WDSF MIN')
// return
// }
// if (card.value && !isCodeTrue.value) {
// ElMessage.warning(language.value == 0 ? '请验证你的WDSF会员号' : 'Please verify your WDSF MIN')
// return
// }
if (!form.value.passportNumber) {
ElMessage.warning(language.value == 0 ? '请输入你的证件号' : 'Please fill in your passport number')
return
......@@ -205,63 +193,12 @@ function submitForm() {
if (Array.isArray(form.value.passportUrl)) {
form.value.passportUrl = form.value.passportUrl[0].url
}
form.value.ocrFlag = '1'
match.editOcr(form.value).then(res => {
ElMessage.success(language.value == 0 ? '保存成功' : 'Successfully')
show.value = false
emit('submitForm')
})
// if (editgay) {
// // id不是0
//
// } else {
// if (Array.isArray(form.value.passportUrl)) {
// form.value.passportUrl = form.value.passportUrl[0].url
// }
// if (isMe.value) {
// match.saveMyBaseInfo(form.value).then(res => {
// ElMessage.success('保存成功')
// show.value = false
// emit('submitForm')
// })
// } else {
// delete form.value.status
// delete form.value.id
// form.value.label = '0'
// form.value.cptId = cptId.value
// form.value.wdsfMin = form.value.min
// form.value.idcCode = form.value.passportNumber
// form.value.idcType = '1'
// if (Array.isArray(form.value.passportUrl)) {
// form.value.passportUrl = form.value.passportUrl[0].url
// }
// if (groupId.value == '0' || !groupId.value) {
// addPersonal()
// } else {
// if (groupId.value) {
// addGroupMember()
// }
// }
// }
// }
}
function addPersonal() {
match.savePersonForMyPerson2(form.value).then(res => {
ElMessage.success('保存成功')
show.value = false
emit('submitForm', res.data)
})
}
function addGroupMember() {
form.value.groupId = groupId
match.savePersonForMyGroup(form.value).then(res => {
ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful')
show.value = false
emit('submitForm')
})
}
function cancel() {
......@@ -269,54 +206,6 @@ function cancel() {
showVcode.value = false
}
// function resetCode() {
// isCodeTrue.value = false
// }
//
// function checkCard() {
// if (isCodeTrue.value) {
// return
// }
// if (!card.value) {
// if (language.value == 0) {
// ElMessage.warning('请填写WDSF卡号')
// } else {
// ElMessage.warning('Please fill in your WDSF code')
// }
// return
// }
// showVcode.value = true
// }
//
// function codeSuccess(msg) {
// console.log('验证通过' + msg)
// showVcode.value = false
// isCodeTrue.value = true
// checkWdsfAthletes({ card: card.value, groupId: groupId }).then(res => {
// if (res.data.wdsfFlag == -1) {
// ElMessage.warning(language.value == 0 ? '您添加的运动员代表国家/地区,与团体账号注册的国家/地区不符,无法添加' : 'The athlete \'s representing, does not match the group account‘s country/region and cannot be added.')
// isCodeTrue.value = false
// return
// }
//
// form.value = res.data
// form.value.xing = form.value.surname
// form.value.ming = form.value.name
// form.value.wdsfStatus = res.data.status
// if (form.value.sex) {
// form.value.sex = res.data.sex
// }
// if (form.value.wdsfFlag == '0') {
// isCodeTrue.value = false
// if (language.value == 0) {
// ElMessage.warning('WDSF卡号错误')
// } else {
// ElMessage.warning('WDSF MIN is Error')
// }
// }
// })
// }
function disabledBirth(time) {
return time.getTime() > new Date().getTime()
}
......
......@@ -499,6 +499,10 @@ const ocrSuccess = (res) => {
} else if (res.code == 500) {
ElMessage.warning(res.msg)
}
if (res.data.msg) {
return proxy.$modal.msgWarning(res.data.msg
)
}
}
</script>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!