世锦赛关于签证服务的修改
Showing
3 changed files
with
147 additions
and
40 deletions
| ... | @@ -775,6 +775,13 @@ export function addInvitation(data) { | ... | @@ -775,6 +775,13 @@ export function addInvitation(data) { |
| 775 | data: data | 775 | data: data |
| 776 | }) | 776 | }) |
| 777 | } | 777 | } |
| 778 | export function sendVisaCode(data) { | ||
| 779 | return request({ | ||
| 780 | url: `/league/visa/sendCode`, | ||
| 781 | method: 'post', | ||
| 782 | data: data | ||
| 783 | }) | ||
| 784 | } | ||
| 778 | export function getVisaInfo(query) { | 785 | export function getVisaInfo(query) { |
| 779 | return request({ | 786 | return request({ |
| 780 | url: `/league/visa/getVisa`, | 787 | url: `/league/visa/getVisa`, | ... | ... |
| ... | @@ -183,10 +183,9 @@ function handleBeforeUpload(file) { | ... | @@ -183,10 +183,9 @@ function handleBeforeUpload(file) { |
| 183 | number.value++ | 183 | number.value++ |
| 184 | return true | 184 | return true |
| 185 | } | 185 | } |
| 186 | |||
| 187 | // 文件个数超出 | 186 | // 文件个数超出 |
| 188 | function handleExceed() { | 187 | function handleExceed() { |
| 189 | proxy.$modal.msgError(`上传文件数量不能超过 ${props.limit} 个!`) | 188 | proxy.$modal.msgError(language=='0'?`上传文件数量不能超过 ${props.limit} 个!`:`Maximum file count: ${props.limit}`) |
| 190 | } | 189 | } |
| 191 | 190 | ||
| 192 | // 上传失败 | 191 | // 上传失败 | ... | ... |
| ... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
| 17 | Your invitation letter application has been received,<br/> | 17 | Your invitation letter application has been received,<br/> |
| 18 | and we will process it as soon as possible. | 18 | and we will process it as soon as possible. |
| 19 | <br/> | 19 | <br/> |
| 20 | Please be patient while waiting. | 20 | Thank you so much for your kind patience. |
| 21 | </h4> | 21 | </h4> |
| 22 | </div> | 22 | </div> |
| 23 | 23 | ||
| ... | @@ -30,15 +30,15 @@ | ... | @@ -30,15 +30,15 @@ |
| 30 | <el-option label="Supplier" value="4"/> | 30 | <el-option label="Supplier" value="4"/> |
| 31 | <el-option label="Other" value="5"/> | 31 | <el-option label="Other" value="5"/> |
| 32 | </el-select> | 32 | </el-select> |
| 33 | <el-input v-if="form.applicatType==5" placeholder="Please specify" v-model="form.remarks"/> | 33 | <el-input class="mt10" v-if="form.applicatType==5" placeholder="Please specify" v-model="form.remarks"/> |
| 34 | </el-form-item> | 34 | </el-form-item> |
| 35 | <el-form-item :label="language==0?'邀请函类别':'Application Type'" required prop="invitationType"> | 35 | <el-form-item :label="language==0?'邀请函类别':'Invitation Type'" required prop="invitationType"> |
| 36 | <el-select v-model="form.invitationType"> | 36 | <el-select v-model="form.invitationType"> |
| 37 | <el-option :label="language==0?'一般邀请函':'General Invitation'" value="1"/> | 37 | <el-option :label="language==0?'一般邀请函':'General Invitation'" value="1"/> |
| 38 | <el-option :label="language==0?'TE/PU(外办)邀请函':'TE/PU(Foreign) Invitation'" value="2"/> | 38 | <el-option :label="language==0?'TE/PU(外办)邀请函':'TE/PU Invitation'" value="2"/> |
| 39 | </el-select> | 39 | </el-select> |
| 40 | </el-form-item> | 40 | </el-form-item> |
| 41 | <el-form-item :label="language==0?'是否需要中文邀请函':'Chinese Invitation'" required prop="chinese"> | 41 | <el-form-item :label="language==0?'是否需要中文邀请函':'Do you need a Chinese invitation?'" required prop="chinese"> |
| 42 | <el-radio-group v-model="form.chinese"> | 42 | <el-radio-group v-model="form.chinese"> |
| 43 | <el-radio :value="1">{{ language == 0 ? '是' : 'Yes' }}</el-radio> | 43 | <el-radio :value="1">{{ language == 0 ? '是' : 'Yes' }}</el-radio> |
| 44 | <el-radio :value="0">{{ language == 0 ? '否' : 'No' }}</el-radio> | 44 | <el-radio :value="0">{{ language == 0 ? '否' : 'No' }}</el-radio> |
| ... | @@ -46,20 +46,29 @@ | ... | @@ -46,20 +46,29 @@ |
| 46 | </el-form-item> | 46 | </el-form-item> |
| 47 | 47 | ||
| 48 | <!-- 一般信息--> | 48 | <!-- 一般信息--> |
| 49 | <el-form-item :label="language==0?'国家/地区协会名':'MNA/Team Name'" :required="form.applicatType!=2" | 49 | <el-form-item :label="language==0?'国家/地区协会名':'MNA Name'" :required="form.applicatType!=2" |
| 50 | prop="associationCode"> | 50 | prop="associationCode"> |
| 51 | <el-select v-model="form.associationCode" filterable> | 51 | <el-select v-model="form.associationCode" filterable> |
| 52 | <el-option v-for="item in mnaList" :key="item.code" :label="language==0?item.nameCn:item.nameEn" | 52 | <el-option v-for="item in mnaList" :key="item.code" :label="language==0?item.nameCn:item.nameEn" |
| 53 | :value="item.code"/> | 53 | :value="item.code"/> |
| 54 | </el-select> | 54 | </el-select> |
| 55 | </el-form-item> | 55 | </el-form-item> |
| 56 | <el-form-item :label="language==0?'国家/地区协会地址':'MNA/Team Address'" :required="form.applicatType!=2" | 56 | <el-form-item :label="language==0?'国家/地区协会地址':'MNA Address'" :required="form.applicatType!=2" |
| 57 | prop="associationAddress"> | 57 | prop="associationAddress"> |
| 58 | <el-input v-model="form.associationAddress"/> | 58 | <el-input v-model="form.associationAddress"/> |
| 59 | </el-form-item> | 59 | </el-form-item> |
| 60 | <el-form-item :label="language==0?'邮箱':'Email'" required prop="email"> | 60 | <el-form-item :label="language==0?'邮箱':'Contact Email'" required prop="email"> |
| 61 | <el-input v-model="form.email" type="email"/> | 61 | <el-input v-model="form.email" type="email"> |
| 62 | <div class="tip"></div> | 62 | <template #append> |
| 63 | <el-button @click="sendEmail" v-loading="codeloading"> | ||
| 64 | {{ language == 0 ? '发送验证码' : 'Send Code' }} | ||
| 65 | </el-button> | ||
| 66 | </template> | ||
| 67 | </el-input> | ||
| 68 | <!-- <div class="tip"></div>--> | ||
| 69 | </el-form-item> | ||
| 70 | <el-form-item prop="code" required> | ||
| 71 | <el-input placeholder="Email verification code" v-model="form.code"/> | ||
| 63 | </el-form-item> | 72 | </el-form-item> |
| 64 | <el-form-item :label="language==0?'姓名':'Full Name'" required prop="fullName"> | 73 | <el-form-item :label="language==0?'姓名':'Full Name'" required prop="fullName"> |
| 65 | <el-input v-model="form.fullName"/> | 74 | <el-input v-model="form.fullName"/> |
| ... | @@ -71,6 +80,7 @@ | ... | @@ -71,6 +80,7 @@ |
| 71 | <el-option label="Coach" value="2"/> | 80 | <el-option label="Coach" value="2"/> |
| 72 | <el-option label="Other" value="3"/> | 81 | <el-option label="Other" value="3"/> |
| 73 | </el-select> | 82 | </el-select> |
| 83 | <el-input v-if="form.position==3" class="mt10" placeholder="Please specify" v-model="form.remarks1"/> | ||
| 74 | </el-form-item> | 84 | </el-form-item> |
| 75 | <el-form-item :label="language==0?'联系电话':'Phone'" required prop="phone"> | 85 | <el-form-item :label="language==0?'联系电话':'Phone'" required prop="phone"> |
| 76 | <el-input v-model="form.phone"/> | 86 | <el-input v-model="form.phone"/> |
| ... | @@ -85,7 +95,7 @@ | ... | @@ -85,7 +95,7 @@ |
| 85 | <!--上传护照,多张--> | 95 | <!--上传护照,多张--> |
| 86 | <div class="cptVisaInfoBosTable"> | 96 | <div class="cptVisaInfoBosTable"> |
| 87 | <el-form-item :label="language==0?'有效证件':'Passport Copy'" required> | 97 | <el-form-item :label="language==0?'有效证件':'Passport Copy'" required> |
| 88 | <ImageUpload v-model="form.passportCopy" :is-show-tip="false" | 98 | <ImageUpload v-model="form.passportCopy" :is-show-tip="false" :limit="100" |
| 89 | :action="'/league/visa/getPersonInfoFromCert/3'" | 99 | :action="'/league/visa/getPersonInfoFromCert/3'" |
| 90 | paramName="pic" list-type="text" :show-file-list="false" | 100 | paramName="pic" list-type="text" :show-file-list="false" |
| 91 | :button-text="language==0?'上传':'Upload'" @response="getPassportInfo" | 101 | :button-text="language==0?'上传':'Upload'" @response="getPassportInfo" |
| ... | @@ -95,35 +105,65 @@ | ... | @@ -95,35 +105,65 @@ |
| 95 | <div v-if="form.cptVisaInfoBos?.length>0" class="border"> | 105 | <div v-if="form.cptVisaInfoBos?.length>0" class="border"> |
| 96 | <el-table :data="form.cptVisaInfoBos" border size="small"> | 106 | <el-table :data="form.cptVisaInfoBos" border size="small"> |
| 97 | <el-table-column prop="passportCopy" :label="language==0?'护照':'Passport Copy'" min-width="100"> | 107 | <el-table-column prop="passportCopy" :label="language==0?'护照':'Passport Copy'" min-width="100"> |
| 108 | <template #header> | ||
| 109 | <div class="esp"> | ||
| 110 | <span class="red">*</span>Passport Copy | ||
| 111 | </div> | ||
| 112 | </template> | ||
| 98 | <template #default="scope"> | 113 | <template #default="scope"> |
| 99 | <el-image style="width: 60px" | 114 | <el-image style="width: 60px;z-index: 999;" :src="fillImgUrl(scope.row.passportCopy)" |
| 100 | :src="fillImgUrl(scope.row.passportCopy)"/> | 115 | :preview-src-list="[fillImgUrl(scope.row.passportCopy)]" preview-teleported/> |
| 101 | </template> | 116 | </template> |
| 102 | </el-table-column> | 117 | </el-table-column> |
| 103 | <el-table-column prop="position" :label="'position'" min-width="100"> | 118 | <el-table-column prop="position" :label="'position'" min-width="100"> |
| 119 | <template #header> | ||
| 120 | <div class="esp"> | ||
| 121 | <span class="red">*</span>Position | ||
| 122 | </div> | ||
| 123 | </template> | ||
| 104 | <template #default="scope"> | 124 | <template #default="scope"> |
| 105 | <el-input v-model="scope.row.position" size="small"/> | 125 | <el-input v-model="scope.row.position" size="small"/> |
| 106 | </template> | 126 | </template> |
| 107 | </el-table-column> | 127 | </el-table-column> |
| 108 | <el-table-column prop="lastName" :label="'lastName'" min-width="100"> | 128 | <el-table-column prop="lastName" :label="'lastName'" min-width="100"> |
| 129 | <template #header> | ||
| 130 | <div class="esp"> | ||
| 131 | <span class="red">*</span>LastName | ||
| 132 | </div> | ||
| 133 | </template> | ||
| 109 | <template #default="scope"> | 134 | <template #default="scope"> |
| 110 | <el-input v-model="scope.row.lastName" size="small"/> | 135 | <el-input v-model="scope.row.lastName" size="small"/> |
| 111 | </template> | 136 | </template> |
| 112 | </el-table-column> | 137 | </el-table-column> |
| 113 | <el-table-column prop="fristName" :label="'firstName'" min-width="100"> | 138 | <el-table-column prop="fristName" :label="'firstName'" min-width="100"> |
| 139 | <template #header> | ||
| 140 | <div class="esp"> | ||
| 141 | <span class="red">*</span>firstName | ||
| 142 | </div> | ||
| 143 | </template> | ||
| 114 | <template #default="scope"> | 144 | <template #default="scope"> |
| 115 | <el-input v-model="scope.row.fristName" size="small"/> | 145 | <el-input v-model="scope.row.fristName" size="small"/> |
| 116 | </template> | 146 | </template> |
| 117 | </el-table-column> | 147 | </el-table-column> |
| 118 | <el-table-column prop="sex" :label="language==0?'性别':'Gender'" width="100"> | 148 | <el-table-column prop="sex" :label="language==0?'性别':'Gender'" width="70"> |
| 149 | <template #header> | ||
| 150 | <div class="esp"> | ||
| 151 | <span class="red">*</span>Gender | ||
| 152 | </div> | ||
| 153 | </template> | ||
| 119 | <template #default="scope"> | 154 | <template #default="scope"> |
| 120 | <el-select v-model="scope.row.sex" size="small"> | 155 | <el-select v-model="scope.row.sex" size="small"> |
| 121 | <el-option label="male" value="0"/> | 156 | <el-option label="M" value="0"/> |
| 122 | <el-option label="female" value="1"/> | 157 | <el-option label="F" value="1"/> |
| 123 | </el-select> | 158 | </el-select> |
| 124 | </template> | 159 | </template> |
| 125 | </el-table-column> | 160 | </el-table-column> |
| 126 | <el-table-column prop="nationality" :label="language==0?'国籍':'Nationality'" width="110px"> | 161 | <el-table-column prop="nationality" :label="language==0?'国籍':'Nationality'" width="110px"> |
| 162 | <template #header> | ||
| 163 | <div class="esp"> | ||
| 164 | <span class="red">*</span>Nationality | ||
| 165 | </div> | ||
| 166 | </template> | ||
| 127 | <template #default="scope"> | 167 | <template #default="scope"> |
| 128 | <el-select v-model="scope.row.nationality" size="small" filterable> | 168 | <el-select v-model="scope.row.nationality" size="small" filterable> |
| 129 | <el-option v-for="item in countrys" :key="item.id" :label="language==0?item.name:item.enName" | 169 | <el-option v-for="item in countrys" :key="item.id" :label="language==0?item.name:item.enName" |
| ... | @@ -132,6 +172,11 @@ | ... | @@ -132,6 +172,11 @@ |
| 132 | </template> | 172 | </template> |
| 133 | </el-table-column> | 173 | </el-table-column> |
| 134 | <el-table-column prop="birth" :label="language==0?'出生日期':'Birth'" width="130px"> | 174 | <el-table-column prop="birth" :label="language==0?'出生日期':'Birth'" width="130px"> |
| 175 | <template #header> | ||
| 176 | <div class="esp"> | ||
| 177 | <span class="red">*</span>Birth | ||
| 178 | </div> | ||
| 179 | </template> | ||
| 135 | <template #default="scope"> | 180 | <template #default="scope"> |
| 136 | <el-date-picker size="small" | 181 | <el-date-picker size="small" |
| 137 | v-model="scope.row.birthday" | 182 | v-model="scope.row.birthday" |
| ... | @@ -141,11 +186,21 @@ | ... | @@ -141,11 +186,21 @@ |
| 141 | </template> | 186 | </template> |
| 142 | </el-table-column> | 187 | </el-table-column> |
| 143 | <el-table-column prop="passportNo" :label="language==0?'护照号':'Passport No.'" width="110px"> | 188 | <el-table-column prop="passportNo" :label="language==0?'护照号':'Passport No.'" width="110px"> |
| 189 | <template #header> | ||
| 190 | <div class="esp"> | ||
| 191 | <span class="red">*</span>Passport No. | ||
| 192 | </div> | ||
| 193 | </template> | ||
| 144 | <template #default="scope"> | 194 | <template #default="scope"> |
| 145 | <el-input v-model="scope.row.passportNo" size="small"/> | 195 | <el-input v-model="scope.row.passportNo" size="small"/> |
| 146 | </template> | 196 | </template> |
| 147 | </el-table-column> | 197 | </el-table-column> |
| 148 | <el-table-column prop="expiryDate" :label="language==0?'护照签发日':'Expiry Date'" width="130px"> | 198 | <el-table-column prop="expiryDate" :label="language==0?'护照签发日':'DATE OF ISSUE'" width="130px"> |
| 199 | <template #header> | ||
| 200 | <div class="esp"> | ||
| 201 | <span class="red">*</span>DATE OF ISSUE | ||
| 202 | </div> | ||
| 203 | </template> | ||
| 149 | <template #default="scope"> | 204 | <template #default="scope"> |
| 150 | <el-date-picker | 205 | <el-date-picker |
| 151 | v-model="scope.row.issueDate" size="small" | 206 | v-model="scope.row.issueDate" size="small" |
| ... | @@ -154,7 +209,12 @@ | ... | @@ -154,7 +209,12 @@ |
| 154 | /> | 209 | /> |
| 155 | </template> | 210 | </template> |
| 156 | </el-table-column> | 211 | </el-table-column> |
| 157 | <el-table-column prop="arrival" :label="language==0?'护照过期日':'Expiration date'" width="130px"> | 212 | <el-table-column prop="arrival" :label="language==0?'护照过期日':'DATE OF EXPIRY'" width="130px"> |
| 213 | <template #header> | ||
| 214 | <div class="esp"> | ||
| 215 | <span class="red">*</span>DATE OF EXPIRY | ||
| 216 | </div> | ||
| 217 | </template> | ||
| 158 | <template #default="scope"> | 218 | <template #default="scope"> |
| 159 | <el-date-picker | 219 | <el-date-picker |
| 160 | v-model="scope.row.expiryDate" size="small" | 220 | v-model="scope.row.expiryDate" size="small" |
| ... | @@ -163,11 +223,9 @@ | ... | @@ -163,11 +223,9 @@ |
| 163 | /> | 223 | /> |
| 164 | </template> | 224 | </template> |
| 165 | </el-table-column> | 225 | </el-table-column> |
| 166 | <el-table-column label="Actions"> | 226 | <el-table-column label="Actions" fixed="right"> |
| 167 | <template #default="scope"> | 227 | <template #default="scope"> |
| 168 | <el-button type="danger" size="small" @click="delPassportInfo(scope.row)"> | 228 | <el-button type="danger" size="small" @click="delPassportInfo(scope.row)" icon="delete"/> |
| 169 | {{ language == 0 ? '删除' : 'Delete' }} | ||
| 170 | </el-button> | ||
| 171 | </template> | 229 | </template> |
| 172 | </el-table-column> | 230 | </el-table-column> |
| 173 | </el-table> | 231 | </el-table> |
| ... | @@ -197,7 +255,7 @@ import {useStorage} from "@vueuse/core/index"; | ... | @@ -197,7 +255,7 @@ import {useStorage} from "@vueuse/core/index"; |
| 197 | import {getCurrentInstance, watch} from "vue"; | 255 | import {getCurrentInstance, watch} from "vue"; |
| 198 | import {nextTick} from "@vue/runtime-core"; | 256 | import {nextTick} from "@vue/runtime-core"; |
| 199 | import {ElMessage, ElMessageBox} from "element-plus"; | 257 | import {ElMessage, ElMessageBox} from "element-plus"; |
| 200 | import {addInvitation, associationList, countryList, getVisaInfo} from "@/apiPc/match"; | 258 | import {addInvitation, associationList, countryList, getVisaInfo, sendVisaCode} from "@/apiPc/match"; |
| 201 | import ImageUpload from '@/components/ImageUpload/index.vue' | 259 | import ImageUpload from '@/components/ImageUpload/index.vue' |
| 202 | import useUserStore from "@/store/modules/user"; | 260 | import useUserStore from "@/store/modules/user"; |
| 203 | import _ from 'lodash' | 261 | import _ from 'lodash' |
| ... | @@ -211,6 +269,7 @@ const form = ref({ | ... | @@ -211,6 +269,7 @@ const form = ref({ |
| 211 | cptVisaInfoBos: [] | 269 | cptVisaInfoBos: [] |
| 212 | }) | 270 | }) |
| 213 | const show = ref(false) | 271 | const show = ref(false) |
| 272 | const codeloading = ref(false) | ||
| 214 | const showR = ref(false) | 273 | const showR = ref(false) |
| 215 | const title = ref('') | 274 | const title = ref('') |
| 216 | const countrys = ref([]) | 275 | const countrys = ref([]) |
| ... | @@ -268,13 +327,24 @@ function getMNAList() { | ... | @@ -268,13 +327,24 @@ function getMNAList() { |
| 268 | const submit = () => { | 327 | const submit = () => { |
| 269 | console.log(form.value) | 328 | console.log(form.value) |
| 270 | if (form.value.email?.indexOf('@') == -1) { | 329 | if (form.value.email?.indexOf('@') == -1) { |
| 271 | if (language.value == 0) { | 330 | ElMessage.warning(language.value == 0?'请填写正确的邮箱':'Invalid Emaill Address!') |
| 272 | ElMessage.warning('请填写正确的邮箱') | 331 | return |
| 273 | } else { | 332 | } |
| 274 | ElMessage.warning('Please fill in the correct email') | 333 | if(form.value.applicatType==5 && !form.value.remarks){ |
| 275 | } | 334 | ElMessage.warning('Please specify Applicant Type') |
| 276 | return | 335 | return |
| 277 | } | 336 | } |
| 337 | if(form.value.position==3 && !form.value.remarks1){ | ||
| 338 | ElMessage.warning('Please specify position') | ||
| 339 | return | ||
| 340 | } | ||
| 341 | for (let row of form.value.cptVisaInfoBos){ | ||
| 342 | if(!row.position){ | ||
| 343 | ElMessage.warning(`Please specify ${row.fristName}'s position`) | ||
| 344 | return | ||
| 345 | } | ||
| 346 | } | ||
| 347 | |||
| 278 | if (form.value.files && Array.isArray(form.value.files)) { | 348 | if (form.value.files && Array.isArray(form.value.files)) { |
| 279 | form.value.files = form.value.files[0]?.url | 349 | form.value.files = form.value.files[0]?.url |
| 280 | } | 350 | } |
| ... | @@ -289,8 +359,12 @@ const submit = () => { | ... | @@ -289,8 +359,12 @@ const submit = () => { |
| 289 | }).then(() => { | 359 | }).then(() => { |
| 290 | form.value.cptId = cptId.value | 360 | form.value.cptId = cptId.value |
| 291 | addInvitation(form.value).then((res) => { | 361 | addInvitation(form.value).then((res) => { |
| 292 | ElMessage.success(language.value == 0 ? '提交成功' : 'Successfully!') | 362 | if(res.data==-200){ |
| 293 | showR.value = true | 363 | ElMessage.error(language.value == 0 ? '邮箱验证码不正确':'Invalid email verification code') |
| 364 | } else { | ||
| 365 | ElMessage.success(language.value == 0 ? '提交成功' : 'Successfully!') | ||
| 366 | showR.value = true | ||
| 367 | } | ||
| 294 | }) | 368 | }) |
| 295 | }) | 369 | }) |
| 296 | } | 370 | } |
| ... | @@ -301,14 +375,14 @@ const getPassportInfo = (res) => { | ... | @@ -301,14 +375,14 @@ const getPassportInfo = (res) => { |
| 301 | if (res.data) { | 375 | if (res.data) { |
| 302 | var obj = { | 376 | var obj = { |
| 303 | position: '', | 377 | position: '', |
| 304 | lastName: '', | 378 | lastName: res.data.surname, |
| 305 | fristName: res.data.name, | 379 | fristName: res.data.givenName, |
| 306 | sex: res.data.sex, | 380 | sex: res.data.sex, |
| 307 | birthday: res.data.birth?.slice(0, 10), | 381 | birthday: res.data.birth?.slice(0, 10), |
| 308 | nationality: '', | 382 | nationality: res.data.nationality, |
| 309 | passportNo: res.data.code, | 383 | passportNo: res.data.code, |
| 310 | issueDate: '', | 384 | issueDate: res.data.issueDate?.slice(0, 10), |
| 311 | expiryDate: '', | 385 | expiryDate: res.data.validToDate?.slice(0, 10), |
| 312 | passportCopy: res.data.pic | 386 | passportCopy: res.data.pic |
| 313 | } | 387 | } |
| 314 | form.value.cptVisaInfoBos.push(obj) | 388 | form.value.cptVisaInfoBos.push(obj) |
| ... | @@ -319,12 +393,39 @@ const getPassportInfo = (res) => { | ... | @@ -319,12 +393,39 @@ const getPassportInfo = (res) => { |
| 319 | 393 | ||
| 320 | function delPassportInfo(row) { | 394 | function delPassportInfo(row) { |
| 321 | console.log(row,form.value.cptVisaInfoBos) | 395 | console.log(row,form.value.cptVisaInfoBos) |
| 322 | form.value.cptVisaInfoBos = _.remove(form.value.cptVisaInfoBos, row) | 396 | if(form.value.cptVisaInfoBos.length==1){ |
| 397 | form.value.cptVisaInfoBos = [] | ||
| 398 | }else { | ||
| 399 | for(let n of form.value.cptVisaInfoBos){ | ||
| 400 | if(n.passportNo==row.passportNo){ | ||
| 401 | form.value.cptVisaInfoBos.splice(form.value.cptVisaInfoBos.indexOf(n),1) | ||
| 402 | } | ||
| 403 | } | ||
| 404 | } | ||
| 405 | } | ||
| 406 | function sendEmail() { | ||
| 407 | if(!form.value.email){ | ||
| 408 | ElMessage.error(language.value == 0 ? '请输入邮箱' : 'Please enter contact Email') | ||
| 409 | return | ||
| 410 | } | ||
| 411 | if (!/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(form.value.email)) { | ||
| 412 | ElMessage.error(language.value == 0 ? '请输入正确的邮箱' : 'Please enter the correct contact email') | ||
| 413 | return | ||
| 414 | } | ||
| 415 | codeloading.value = true | ||
| 416 | sendVisaCode({email:form.value.email}).then(res=>{ | ||
| 417 | codeloading.value = false | ||
| 418 | if(res.code == 200){ | ||
| 419 | ElMessage.success(language.value == 0 ? '发送成功,请前往邮箱查看' : 'Send success, please check your email') | ||
| 420 | }else{ | ||
| 421 | ElMessage.error(res.msg) | ||
| 422 | } | ||
| 423 | }) | ||
| 323 | } | 424 | } |
| 324 | |||
| 325 | </script> | 425 | </script> |
| 326 | 426 | ||
| 327 | <style scoped lang="scss"> | 427 | <style scoped lang="scss"> |
| 428 | .red{color: red!important;} | ||
| 328 | :deep(.el-upload--picture-card) { | 429 | :deep(.el-upload--picture-card) { |
| 329 | --el-upload-picture-card-size: 60px; | 430 | --el-upload-picture-card-size: 60px; |
| 330 | } | 431 | } |
| ... | @@ -344,7 +445,7 @@ h4 { | ... | @@ -344,7 +445,7 @@ h4 { |
| 344 | } | 445 | } |
| 345 | 446 | ||
| 346 | .cptVisaInfoBosTable { | 447 | .cptVisaInfoBosTable { |
| 347 | padding: 15px; | 448 | padding: 10px; |
| 348 | margin-bottom: 20px; | 449 | margin-bottom: 20px; |
| 349 | border: 1px dashed #ebeef5; | 450 | border: 1px dashed #ebeef5; |
| 350 | 451 | ... | ... |
-
Please register or sign in to post a comment