b6c72052 by zhangmeng

邮箱正则

1 parent 8fdfc7b0
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">
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
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>
...@@ -308,8 +308,8 @@ ...@@ -308,8 +308,8 @@
308 <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"
309 :limit="1"/> 309 :limit="1"/>
310 </el-form-item> 310 </el-form-item>
311 311
312 312
313 <div class="text-center"> 313 <div class="text-center">
314 <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">
315 {{ language == 0 ? '提交' : 'SUBMIT' }} 315 {{ language == 0 ? '提交' : 'SUBMIT' }}
...@@ -357,16 +357,16 @@ const countrys = ref([]) ...@@ -357,16 +357,16 @@ const countrys = ref([])
357 const mnaList = ref([]) 357 const mnaList = ref([])
358 const cptId = ref('') 358 const cptId = ref('')
359 const rules = ref( 359 const rules = ref(
360 { 360 {
361 nationality: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},], 361 nationality: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},],
362 name: [{required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter'},], 362 name: [{required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter'},],
363 email: [{required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter'},], 363 email: [{required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter'},],
364 birth: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},], 364 birth: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},],
365 passportNo: [{required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter'},], 365 passportNo: [{required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter'},],
366 passportCopy: [{required: true, trigger: 'blur', message: language.value == 0 ? '请上传' : 'Please Upload'},], 366 passportCopy: [{required: true, trigger: 'blur', message: language.value == 0 ? '请上传' : 'Please Upload'},],
367 arrival: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},], 367 arrival: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},],
368 departure: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},], 368 departure: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},],
369 }) 369 })
370 const open = (params) => { 370 const open = (params) => {
371 show.value = true 371 show.value = true
372 title.value = params.title 372 title.value = params.title
...@@ -392,7 +392,7 @@ defineExpose({ ...@@ -392,7 +392,7 @@ defineExpose({
392 show.value = true 392 show.value = true
393 showR.value = false 393 showR.value = false
394 title.value = language.value == 0 ? '邀请函申请' : 'Visa Invitation Letter ' 394 title.value = language.value == 0 ? '邀请函申请' : 'Visa Invitation Letter '
395 395
396 getCountryList() 396 getCountryList()
397 getMNAList() 397 getMNAList()
398 getInvitation(id).then((res => { 398 getInvitation(id).then((res => {
...@@ -404,11 +404,11 @@ defineExpose({ ...@@ -404,11 +404,11 @@ defineExpose({
404 _.each(res.data, (item) => { 404 _.each(res.data, (item) => {
405 delete item.id 405 delete item.id
406 }) 406 })
407 407
408 if (form.value.invitationFile) { 408 if (form.value.invitationFile) {
409 form.value.invitationFileArr = JSON.parse(form.value.invitationFile) 409 form.value.invitationFileArr = JSON.parse(form.value.invitationFile)
410 } 410 }
411 411
412 form.value.cptVisaInfoBos = res.data 412 form.value.cptVisaInfoBos = res.data
413 }) 413 })
414 }) 414 })
...@@ -465,23 +465,23 @@ const submit = () => { ...@@ -465,23 +465,23 @@ const submit = () => {
465 return; 465 return;
466 } 466 }
467 } 467 }
468 468
469 if (form.value.files && Array.isArray(form.value.files)) { 469 if (form.value.files && Array.isArray(form.value.files)) {
470 form.value.files = form.value.files[0]?.url 470 form.value.files = form.value.files[0]?.url
471 } 471 }
472 if (form.value.invitationFileArr) { 472 if (form.value.invitationFileArr) {
473 form.value.invitationFile = JSON.stringify(form.value.invitationFileArr) 473 form.value.invitationFile = JSON.stringify(form.value.invitationFileArr)
474 } 474 }
475 475
476 proxy.$refs.iformRef.validate(valid => { 476 proxy.$refs.iformRef.validate(valid => {
477 if (valid) { 477 if (valid) {
478 ElMessageBox.confirm( 478 ElMessageBox.confirm(
479 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',
480 language.value == 0 ? '提示' : 'Tips', { 480 language.value == 0 ? '提示' : 'Tips', {
481 confirmButtonText: language.value == 0 ? '确定' : 'Confirm', 481 confirmButtonText: language.value == 0 ? '确定' : 'Confirm',
482 cancelButtonText: language.value == 0 ? '取消' : 'Cancel', 482 cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
483 type: 'warning' 483 type: 'warning'
484 }).then(() => { 484 }).then(() => {
485 form.value.cptId = cptId.value 485 form.value.cptId = cptId.value
486 addInvitation(form.value).then((res) => { 486 addInvitation(form.value).then((res) => {
487 if (res.data == -200) { 487 if (res.data == -200) {
...@@ -515,7 +515,7 @@ const getPassportInfo = (res) => { ...@@ -515,7 +515,7 @@ const getPassportInfo = (res) => {
515 } else { 515 } else {
516 if (res.data) { 516 if (res.data) {
517 ElMessage.error(res.data.code) 517 ElMessage.error(res.data.code)
518 518
519 let obj = { 519 let obj = {
520 position: '', 520 position: '',
521 lastName: '', 521 lastName: '',
...@@ -544,8 +544,16 @@ function sendEmail() { ...@@ -544,8 +544,16 @@ function sendEmail() {
544 ElMessage.error(language.value == 0 ? '请输入邮箱' : 'Please enter contact Email') 544 ElMessage.error(language.value == 0 ? '请输入邮箱' : 'Please enter contact Email')
545 return 545 return
546 } 546 }
547 if (!/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(form.value.email)) { 547 // if (!/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(form.value.email)) {
548 ElMessage.error(language.value == 0 ? '请输入正确的邮箱' : 'Please enter the correct contact email') 548 // ElMessage.error(language.value == 0 ? '请输入正确的邮箱' : 'Please enter the correct contact email')
549 // return
550 // }
551 if (form.value.email.indexOf('@') == -1) {
552 if (language.value == 0) {
553 ElMessage.warning('请填写正确的邮箱')
554 } else {
555 ElMessage.warning('Please fill in the correct email')
556 }
549 return 557 return
550 } 558 }
551 codeloading.value = true 559 codeloading.value = true
...@@ -594,7 +602,7 @@ h4 { ...@@ -594,7 +602,7 @@ h4 {
594 padding: 10px; 602 padding: 10px;
595 margin-bottom: 20px; 603 margin-bottom: 20px;
596 border: 1px dashed #ebeef5; 604 border: 1px dashed #ebeef5;
597 605
598 :deep(.el-table .el-table__header-wrapper th) { 606 :deep(.el-table .el-table__header-wrapper th) {
599 font-size: 12px; 607 font-size: 12px;
600 } 608 }
...@@ -608,6 +616,6 @@ h4 { ...@@ -608,6 +616,6 @@ h4 {
608 .codeBtn { 616 .codeBtn {
609 background-color: #0540EC !important; 617 background-color: #0540EC !important;
610 color: #fff !important; 618 color: #fff !important;
611 619
612 } 620 }
613 </style> 621 </style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!