邮箱正则
Showing
1 changed file
with
64 additions
and
54 deletions
| 1 | <template> | 1 | <template> |
| 2 | <el-dialog | 2 | <el-dialog |
| 3 | v-model="show" :close-on-click-modal="false" :title="title" append-to-body center | 3 | v-model="show" :close-on-click-modal="false" :title="title" append-to-body center |
| 4 | class="pcloginpop" close-icon="CircleClose" | 4 | class="pcloginpop" close-icon="CircleClose" |
| 5 | destroy-on-close | 5 | destroy-on-close |
| 6 | > | 6 | > |
| 7 | <div class="boxInvitation"> | 7 | <div class="boxInvitation"> |
| 8 | 8 | ||
| 9 | <div v-if="showR" class="text-center pd20"> | 9 | <div v-if="showR" class="text-center pd20"> |
| 10 | <img class="mauto" src="@/assets/dance/ok.png"/> | 10 | <img class="mauto" src="@/assets/dance/ok.png"/> |
| 11 | <!-- 提交成功等待审核--> | 11 | <!-- 提交成功等待审核--> |
| ... | @@ -19,13 +19,13 @@ | ... | @@ -19,13 +19,13 @@ |
| 19 | <br/> | 19 | <br/> |
| 20 | Thank you so much for your kind patience. | 20 | Thank you so much for your kind patience. |
| 21 | </h4> | 21 | </h4> |
| 22 | 22 | ||
| 23 | <div class="red">To check your application status, please go to Account > Personal > Visa Review Record, or | 23 | <div class="red">To check your application status, please go to Account > Personal > Visa Review Record, or |
| 24 | refer to your email for any updates. | 24 | refer to your email for any updates. |
| 25 | </div> | 25 | </div> |
| 26 | 26 | ||
| 27 | </div> | 27 | </div> |
| 28 | 28 | ||
| 29 | <el-form v-else ref="iformRef" :model="form" :rules="rules" label-position="top"> | 29 | <el-form v-else ref="iformRef" :model="form" :rules="rules" label-position="top"> |
| 30 | <el-form-item :label="language==0?'申请人类别':'Applicant Type'" prop="applicatType" required> | 30 | <el-form-item :label="language==0?'申请人类别':'Applicant Type'" prop="applicatType" required> |
| 31 | <el-select v-model="form.applicatType" @change="changeApplicatType"> | 31 | <el-select v-model="form.applicatType" @change="changeApplicatType"> |
| ... | @@ -52,14 +52,14 @@ | ... | @@ -52,14 +52,14 @@ |
| 52 | <file-upload v-model="form.invitationFileArr" :button-text="language==0?'上传':'Upload'" :is-show-tip="false" | 52 | <file-upload v-model="form.invitationFileArr" :button-text="language==0?'上传':'Upload'" :is-show-tip="false" |
| 53 | :limit="1"></file-upload> | 53 | :limit="1"></file-upload> |
| 54 | </el-form-item> | 54 | </el-form-item> |
| 55 | <!-- <el-form-item :label="language==0?'是否需要中文邀请函':'Do you need a Chinese invitation?'" prop="chinese"--> | 55 | <!-- <el-form-item :label="language==0?'是否需要中文邀请函':'Do you need a Chinese invitation?'" prop="chinese"--> |
| 56 | <!-- required>--> | 56 | <!-- required>--> |
| 57 | <!-- <el-radio-group v-model="form.chinese">--> | 57 | <!-- <el-radio-group v-model="form.chinese">--> |
| 58 | <!-- <el-radio value="1">{{ language == 0 ? '是' : 'Yes' }}</el-radio>--> | 58 | <!-- <el-radio value="1">{{ language == 0 ? '是' : 'Yes' }}</el-radio>--> |
| 59 | <!-- <el-radio value="0">{{ language == 0 ? '否' : 'No' }}</el-radio>--> | 59 | <!-- <el-radio value="0">{{ language == 0 ? '否' : 'No' }}</el-radio>--> |
| 60 | <!-- </el-radio-group>--> | 60 | <!-- </el-radio-group>--> |
| 61 | <!-- </el-form-item>--> | 61 | <!-- </el-form-item>--> |
| 62 | 62 | ||
| 63 | <!-- 一般信息--> | 63 | <!-- 一般信息--> |
| 64 | <el-form-item :label="language==0?'国家/地区协会名':'MNA/Team Name'" :required="form.applicatType==1" | 64 | <el-form-item :label="language==0?'国家/地区协会名':'MNA/Team Name'" :required="form.applicatType==1" |
| 65 | prop="associationCode"> | 65 | prop="associationCode"> |
| ... | @@ -110,7 +110,7 @@ | ... | @@ -110,7 +110,7 @@ |
| 110 | <el-form-item :label="language==0?'中国大使馆邮箱':'Chinese Embassy Email'" prop="embassyEmail" required> | 110 | <el-form-item :label="language==0?'中国大使馆邮箱':'Chinese Embassy Email'" prop="embassyEmail" required> |
| 111 | <el-input v-model="form.embassyEmail"/> | 111 | <el-input v-model="form.embassyEmail"/> |
| 112 | </el-form-item> | 112 | </el-form-item> |
| 113 | 113 | ||
| 114 | <!--上传护照,多张--> | 114 | <!--上传护照,多张--> |
| 115 | <div class="cptVisaInfoBosTable"> | 115 | <div class="cptVisaInfoBosTable"> |
| 116 | <el-form-item :label="language==0?'有效证件':'Passport Copy'" required> | 116 | <el-form-item :label="language==0?'有效证件':'Passport Copy'" required> |
| ... | @@ -268,9 +268,9 @@ | ... | @@ -268,9 +268,9 @@ |
| 268 | </template> | 268 | </template> |
| 269 | <template #default="scope"> | 269 | <template #default="scope"> |
| 270 | <el-date-picker | 270 | <el-date-picker |
| 271 | v-model="scope.row.issueDate" format="YYYY-MM-DD" | 271 | v-model="scope.row.issueDate" format="YYYY-MM-DD" |
| 272 | placeholder="YYYY-MM-DD" size="small" | 272 | placeholder="YYYY-MM-DD" size="small" |
| 273 | style="width: 100%;" type="date" value-format="YYYY-MM-DD" | 273 | style="width: 100%;" type="date" value-format="YYYY-MM-DD" |
| 274 | /> | 274 | /> |
| 275 | </template> | 275 | </template> |
| 276 | </el-table-column> | 276 | </el-table-column> |
| ... | @@ -282,9 +282,9 @@ | ... | @@ -282,9 +282,9 @@ |
| 282 | </template> | 282 | </template> |
| 283 | <template #default="scope"> | 283 | <template #default="scope"> |
| 284 | <el-date-picker | 284 | <el-date-picker |
| 285 | v-model="scope.row.expiryDate" format="YYYY-MM-DD" | 285 | v-model="scope.row.expiryDate" format="YYYY-MM-DD" |
| 286 | placeholder="YYYY-MM-DD" size="small" | 286 | placeholder="YYYY-MM-DD" size="small" |
| 287 | style="width: 100%;" type="date" value-format="YYYY-MM-DD" | 287 | style="width: 100%;" type="date" value-format="YYYY-MM-DD" |
| 288 | /> | 288 | /> |
| 289 | </template> | 289 | </template> |
| 290 | </el-table-column> | 290 | </el-table-column> |
| ... | @@ -298,7 +298,8 @@ | ... | @@ -298,7 +298,8 @@ |
| 298 | </div> | 298 | </div> |
| 299 | <el-form-item :label="language==0?'备注':'Remarks'" prop="remarks3"> | 299 | <el-form-item :label="language==0?'备注':'Remarks'" prop="remarks3"> |
| 300 | <div class="red"> | 300 | <div class="red"> |
| 301 | You may leave any message here, or let us know if you require additional documents for your visa application. | 301 | You may leave any message here, or let us know if you require additional documents for your visa |
| 302 | application. | ||
| 302 | </div> | 303 | </div> |
| 303 | <el-input v-model="form.remarks3"/> | 304 | <el-input v-model="form.remarks3"/> |
| 304 | </el-form-item> | 305 | </el-form-item> |
| ... | @@ -307,8 +308,8 @@ | ... | @@ -307,8 +308,8 @@ |
| 307 | <file-upload v-model="form.files" :button-text="language==0?'上传':'Upload'" :is-show-tip="false" | 308 | <file-upload v-model="form.files" :button-text="language==0?'上传':'Upload'" :is-show-tip="false" |
| 308 | :limit="1"/> | 309 | :limit="1"/> |
| 309 | </el-form-item> | 310 | </el-form-item> |
| 310 | 311 | ||
| 311 | 312 | ||
| 312 | <div class="text-center"> | 313 | <div class="text-center"> |
| 313 | <el-button :disabled="!cptId" class="btn-lineG" round size="large" type="primary" @click="submit"> | 314 | <el-button :disabled="!cptId" class="btn-lineG" round size="large" type="primary" @click="submit"> |
| 314 | {{ language == 0 ? '提交' : 'SUBMIT' }} | 315 | {{ language == 0 ? '提交' : 'SUBMIT' }} |
| ... | @@ -344,7 +345,7 @@ const {proxy} = getCurrentInstance() | ... | @@ -344,7 +345,7 @@ const {proxy} = getCurrentInstance() |
| 344 | const language = useStorage('language', 0) | 345 | const language = useStorage('language', 0) |
| 345 | const form = ref({ | 346 | const form = ref({ |
| 346 | gender: '0', | 347 | gender: '0', |
| 347 | chinese:'0', | 348 | chinese: '0', |
| 348 | cptVisaInfoBos: [], | 349 | cptVisaInfoBos: [], |
| 349 | email: user?.email, | 350 | email: user?.email, |
| 350 | }) | 351 | }) |
| ... | @@ -356,16 +357,16 @@ const countrys = ref([]) | ... | @@ -356,16 +357,16 @@ const countrys = ref([]) |
| 356 | const mnaList = ref([]) | 357 | const mnaList = ref([]) |
| 357 | const cptId = ref('') | 358 | const cptId = ref('') |
| 358 | const rules = ref( | 359 | const rules = ref( |
| 359 | { | 360 | { |
| 360 | nationality: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},], | 361 | nationality: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},], |
| 361 | name: [{required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter'},], | 362 | name: [{required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter'},], |
| 362 | email: [{required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter'},], | 363 | email: [{required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter'},], |
| 363 | birth: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},], | 364 | birth: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},], |
| 364 | passportNo: [{required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter'},], | 365 | passportNo: [{required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter'},], |
| 365 | passportCopy: [{required: true, trigger: 'blur', message: language.value == 0 ? '请上传' : 'Please Upload'},], | 366 | passportCopy: [{required: true, trigger: 'blur', message: language.value == 0 ? '请上传' : 'Please Upload'},], |
| 366 | arrival: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},], | 367 | arrival: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},], |
| 367 | departure: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},], | 368 | departure: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},], |
| 368 | }) | 369 | }) |
| 369 | const open = (params) => { | 370 | const open = (params) => { |
| 370 | show.value = true | 371 | show.value = true |
| 371 | title.value = params.title | 372 | title.value = params.title |
| ... | @@ -375,7 +376,7 @@ const open = (params) => { | ... | @@ -375,7 +376,7 @@ const open = (params) => { |
| 375 | } | 376 | } |
| 376 | form.value = { | 377 | form.value = { |
| 377 | gender: '0', | 378 | gender: '0', |
| 378 | chinese:'0', | 379 | chinese: '0', |
| 379 | cptVisaInfoBos: [], | 380 | cptVisaInfoBos: [], |
| 380 | email: user?.email, | 381 | email: user?.email, |
| 381 | userId: user?.userId, | 382 | userId: user?.userId, |
| ... | @@ -391,7 +392,7 @@ defineExpose({ | ... | @@ -391,7 +392,7 @@ defineExpose({ |
| 391 | show.value = true | 392 | show.value = true |
| 392 | showR.value = false | 393 | showR.value = false |
| 393 | title.value = language.value == 0 ? '邀请函申请' : 'Visa Invitation Letter ' | 394 | title.value = language.value == 0 ? '邀请函申请' : 'Visa Invitation Letter ' |
| 394 | 395 | ||
| 395 | getCountryList() | 396 | getCountryList() |
| 396 | getMNAList() | 397 | getMNAList() |
| 397 | getInvitation(id).then((res => { | 398 | getInvitation(id).then((res => { |
| ... | @@ -403,11 +404,11 @@ defineExpose({ | ... | @@ -403,11 +404,11 @@ defineExpose({ |
| 403 | _.each(res.data, (item) => { | 404 | _.each(res.data, (item) => { |
| 404 | delete item.id | 405 | delete item.id |
| 405 | }) | 406 | }) |
| 406 | 407 | ||
| 407 | if (form.value.invitationFile) { | 408 | if (form.value.invitationFile) { |
| 408 | form.value.invitationFileArr = JSON.parse(form.value.invitationFile) | 409 | form.value.invitationFileArr = JSON.parse(form.value.invitationFile) |
| 409 | } | 410 | } |
| 410 | 411 | ||
| 411 | form.value.cptVisaInfoBos = res.data | 412 | form.value.cptVisaInfoBos = res.data |
| 412 | }) | 413 | }) |
| 413 | }) | 414 | }) |
| ... | @@ -464,23 +465,23 @@ const submit = () => { | ... | @@ -464,23 +465,23 @@ const submit = () => { |
| 464 | return; | 465 | return; |
| 465 | } | 466 | } |
| 466 | } | 467 | } |
| 467 | 468 | ||
| 468 | if (form.value.files && Array.isArray(form.value.files)) { | 469 | if (form.value.files && Array.isArray(form.value.files)) { |
| 469 | form.value.files = form.value.files[0]?.url | 470 | form.value.files = form.value.files[0]?.url |
| 470 | } | 471 | } |
| 471 | if (form.value.invitationFileArr) { | 472 | if (form.value.invitationFileArr) { |
| 472 | form.value.invitationFile = JSON.stringify(form.value.invitationFileArr) | 473 | form.value.invitationFile = JSON.stringify(form.value.invitationFileArr) |
| 473 | } | 474 | } |
| 474 | 475 | ||
| 475 | proxy.$refs.iformRef.validate(valid => { | 476 | proxy.$refs.iformRef.validate(valid => { |
| 476 | if (valid) { | 477 | if (valid) { |
| 477 | ElMessageBox.confirm( | 478 | ElMessageBox.confirm( |
| 478 | language.value == 0 ? '请确认信息正确并提交吗?' : 'Please confirm that the information is correct and submit it', | 479 | language.value == 0 ? '请确认信息正确并提交吗?' : 'Please confirm that the information is correct and submit it', |
| 479 | language.value == 0 ? '提示' : 'Tips', { | 480 | language.value == 0 ? '提示' : 'Tips', { |
| 480 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', | 481 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', |
| 481 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | 482 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', |
| 482 | type: 'warning' | 483 | type: 'warning' |
| 483 | }).then(() => { | 484 | }).then(() => { |
| 484 | form.value.cptId = cptId.value | 485 | form.value.cptId = cptId.value |
| 485 | addInvitation(form.value).then((res) => { | 486 | addInvitation(form.value).then((res) => { |
| 486 | if (res.data == -200) { | 487 | if (res.data == -200) { |
| ... | @@ -514,7 +515,7 @@ const getPassportInfo = (res) => { | ... | @@ -514,7 +515,7 @@ const getPassportInfo = (res) => { |
| 514 | } else { | 515 | } else { |
| 515 | if (res.data) { | 516 | if (res.data) { |
| 516 | ElMessage.error(res.data.code) | 517 | ElMessage.error(res.data.code) |
| 517 | 518 | ||
| 518 | let obj = { | 519 | let obj = { |
| 519 | position: '', | 520 | position: '', |
| 520 | lastName: '', | 521 | lastName: '', |
| ... | @@ -543,9 +544,18 @@ function sendEmail() { | ... | @@ -543,9 +544,18 @@ function sendEmail() { |
| 543 | ElMessage.error(language.value == 0 ? '请输入邮箱' : 'Please enter contact Email') | 544 | ElMessage.error(language.value == 0 ? '请输入邮箱' : 'Please enter contact Email') |
| 544 | return | 545 | return |
| 545 | } | 546 | } |
| 546 | if (!/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(form.value.email)) { | 547 | |
| 547 | ElMessage.error(language.value == 0 ? '请输入正确的邮箱' : 'Please enter the correct contact email') | 548 | // if (!/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(form.value.email)) { |
| 548 | return | 549 | // ElMessage.error(language.value == 0 ? '请输入正确的邮箱' : 'Please enter the correct contact email') |
| 550 | // return | ||
| 551 | // } | ||
| 552 | |||
| 553 | if (form.value.email.indexOf('@') == -1) { | ||
| 554 | if (language.value == 0) { | ||
| 555 | return ElMessage.error('请填写正确的邮箱') | ||
| 556 | } else { | ||
| 557 | return ElMessage.error('Please fill in the correct email') | ||
| 558 | } | ||
| 549 | } | 559 | } |
| 550 | codeloading.value = true | 560 | codeloading.value = true |
| 551 | sendVisaCode({email: form.value.email}).then(res => { | 561 | sendVisaCode({email: form.value.email}).then(res => { |
| ... | @@ -593,7 +603,7 @@ h4 { | ... | @@ -593,7 +603,7 @@ h4 { |
| 593 | padding: 10px; | 603 | padding: 10px; |
| 594 | margin-bottom: 20px; | 604 | margin-bottom: 20px; |
| 595 | border: 1px dashed #ebeef5; | 605 | border: 1px dashed #ebeef5; |
| 596 | 606 | ||
| 597 | :deep(.el-table .el-table__header-wrapper th) { | 607 | :deep(.el-table .el-table__header-wrapper th) { |
| 598 | font-size: 12px; | 608 | font-size: 12px; |
| 599 | } | 609 | } |
| ... | @@ -607,6 +617,6 @@ h4 { | ... | @@ -607,6 +617,6 @@ h4 { |
| 607 | .codeBtn { | 617 | .codeBtn { |
| 608 | background-color: #0540EC !important; | 618 | background-color: #0540EC !important; |
| 609 | color: #fff !important; | 619 | color: #fff !important; |
| 610 | 620 | ||
| 611 | } | 621 | } |
| 612 | </style> | 622 | </style> | ... | ... |
-
Please register or sign in to post a comment