添加人员ocr
Showing
1 changed file
with
47 additions
and
7 deletions
| ... | @@ -59,19 +59,36 @@ | ... | @@ -59,19 +59,36 @@ |
| 59 | <el-option v-for="l in labels" :key="l.value" :label="language==0?l.label:l.enlabel" :value="l.value" /> | 59 | <el-option v-for="l in labels" :key="l.value" :label="language==0?l.label:l.enlabel" :value="l.value" /> |
| 60 | </el-select> | 60 | </el-select> |
| 61 | </el-form-item> | 61 | </el-form-item> |
| 62 | <el-form-item :label="language==0?'有效证件':'Valid Passport'" required> | 62 | <!-- <el-form-item :label="language==0?'有效证件':'Valid Passport'" required>--> |
| 63 | <!-- <image-upload--> | ||
| 64 | <!-- v-model="form.passportUrl" :button-text="language==0?'上传':'Upload'" :is-show-tip="false"--> | ||
| 65 | <!-- :limit="1"--> | ||
| 66 | <!-- />--> | ||
| 67 | <!-- <div class="tip">--> | ||
| 68 | <!-- <span v-if="language==0">请上传有效身份证件扫描件,用于核实身份信息、申请签证邀请函及购买保险等</span>--> | ||
| 69 | <!-- <span v-else>Please upload a scanned copy of your valid passport for verification of identity information,application of visa invitation letter and purchasing insurance etc.</span>--> | ||
| 70 | <!-- </div>--> | ||
| 71 | <!-- </el-form-item>--> | ||
| 72 | |||
| 73 | <el-form-item :label="language==0?'有效证件':'Valid Passport'" prop="" required> | ||
| 63 | <image-upload | 74 | <image-upload |
| 64 | v-model="form.passportUrl" :button-text="language==0?'上传':'Upload'" :is-show-tip="false" | 75 | ref="uploadPassportRef" |
| 76 | v-model="form.passportUrl" | ||
| 77 | :action="'/common/getPersonInfoFromCert/6'" | ||
| 78 | :button-text="language==0?'上传':'Upload'" | ||
| 79 | :is-show-tip="false" | ||
| 65 | :limit="1" | 80 | :limit="1" |
| 81 | param-name="pic" | ||
| 82 | @response="ocrSuccess" | ||
| 66 | /> | 83 | /> |
| 67 | <div class="tip"> | 84 | <div class="tip"> |
| 68 | <span v-if="language==0">请上传有效身份证件扫描件,用于核实身份信息、申请签证邀请函及购买保险等</span> | 85 | <span v-if="language==0">请上传有效身份证件扫描件,用于核实身份信息、申请签证邀请函及购买保险等 </span> |
| 69 | <span v-else>Please upload a scanned copy of your valid passport for verification of identity information, | 86 | <span v-else> |
| 87 | Please upload a scanned copy of your valid passport for verification of identity information, | ||
| 70 | application of visa invitation letter and purchasing insurance etc.</span> | 88 | application of visa invitation letter and purchasing insurance etc.</span> |
| 71 | </div> | 89 | </div> |
| 90 | |||
| 72 | </el-form-item> | 91 | </el-form-item> |
| 73 | |||
| 74 | |||
| 75 | </el-col> | 92 | </el-col> |
| 76 | <el-col :lg="12" class="touxiang"> | 93 | <el-col :lg="12" class="touxiang"> |
| 77 | <el-form-item :label="language==0?'个人照片':'Photo'" prop="picUrl"> | 94 | <el-form-item :label="language==0?'个人照片':'Photo'" prop="picUrl"> |
| ... | @@ -80,7 +97,9 @@ | ... | @@ -80,7 +97,9 @@ |
| 80 | class="threeFour" | 97 | class="threeFour" |
| 81 | /> | 98 | /> |
| 82 | </el-form-item> | 99 | </el-form-item> |
| 83 | 100 | <el-form-item :label="language==0?'证件姓名':'Name'" prop="certName"> | |
| 101 | <el-input v-model="form.certName" :disabled="editgay" /> | ||
| 102 | </el-form-item> | ||
| 84 | <el-form-item | 103 | <el-form-item |
| 85 | :label="language==0?'证件类型':'ID Type'" :required="!form.wdsfMin&&form.labelArr.indexOf('0')>-1" | 104 | :label="language==0?'证件类型':'ID Type'" :required="!form.wdsfMin&&form.labelArr.indexOf('0')>-1" |
| 86 | prop="idcType" | 105 | prop="idcType" |
| ... | @@ -154,6 +173,7 @@ import { dayjs, ElMessage } from 'element-plus' | ... | @@ -154,6 +173,7 @@ import { dayjs, ElMessage } from 'element-plus' |
| 154 | import _ from 'lodash' | 173 | import _ from 'lodash' |
| 155 | import { useStorage } from '@vueuse/core/index' | 174 | import { useStorage } from '@vueuse/core/index' |
| 156 | import { checkWdsf, getCaptchaSms } from '@/apiPc/match' | 175 | import { checkWdsf, getCaptchaSms } from '@/apiPc/match' |
| 176 | import ImageUpload from '/@/components/ImageUpload/index.vue' | ||
| 157 | 177 | ||
| 158 | const language = useStorage('language', 0) | 178 | const language = useStorage('language', 0) |
| 159 | const certificates = ref([ | 179 | const certificates = ref([ |
| ... | @@ -414,6 +434,23 @@ function giveBirthDay() { | ... | @@ -414,6 +434,23 @@ function giveBirthDay() { |
| 414 | } | 434 | } |
| 415 | } | 435 | } |
| 416 | 436 | ||
| 437 | // 有效证件 | ||
| 438 | const ocrSuccess = (res) => { | ||
| 439 | // form.value.passportUrl = res.data.url | ||
| 440 | console.log(form.value.passportUrl) | ||
| 441 | if (res.code == 200) { | ||
| 442 | form.value.passportUrl = res.data.url | ||
| 443 | form.value.idcCode = res.data.code | ||
| 444 | form.value.birth = res.data.birth?.slice(0, 10) | ||
| 445 | form.value.sex = res.data.sex | ||
| 446 | form.value.certName = res.data.name | ||
| 447 | form.value.idcType = res.data.type == '3' ? '1' : '0' | ||
| 448 | } else if (res.code == 500) { | ||
| 449 | ElMessage.warning(res.msg) | ||
| 450 | form.value.passportCopy = '' | ||
| 451 | } | ||
| 452 | } | ||
| 453 | |||
| 417 | function submitForm() { | 454 | function submitForm() { |
| 418 | proxy.$refs['dialogRef'].validate((valid) => { | 455 | proxy.$refs['dialogRef'].validate((valid) => { |
| 419 | if (valid) { | 456 | if (valid) { |
| ... | @@ -451,6 +488,7 @@ function submitForm() { | ... | @@ -451,6 +488,7 @@ function submitForm() { |
| 451 | if (groupId.value != 0) { | 488 | if (groupId.value != 0) { |
| 452 | // 团队 | 489 | // 团队 |
| 453 | form.value.groupId = groupId.value | 490 | form.value.groupId = groupId.value |
| 491 | form.value.ocrFlag = '1' | ||
| 454 | match.savePersonForMyGroup(form.value).then(res => { | 492 | match.savePersonForMyGroup(form.value).then(res => { |
| 455 | ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful') | 493 | ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful') |
| 456 | show.value = false | 494 | show.value = false |
| ... | @@ -466,6 +504,7 @@ function submitForm() { | ... | @@ -466,6 +504,7 @@ function submitForm() { |
| 466 | }) | 504 | }) |
| 467 | } else { | 505 | } else { |
| 468 | if (isMe.value) { | 506 | if (isMe.value) { |
| 507 | form.value.ocrFlag = '1' | ||
| 469 | match.saveMyBaseInfo(form.value).then(res => { | 508 | match.saveMyBaseInfo(form.value).then(res => { |
| 470 | ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful') | 509 | ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful') |
| 471 | show.value = false | 510 | show.value = false |
| ... | @@ -473,6 +512,7 @@ function submitForm() { | ... | @@ -473,6 +512,7 @@ function submitForm() { |
| 473 | }) | 512 | }) |
| 474 | } else { | 513 | } else { |
| 475 | form.value.cptId = cptId.value | 514 | form.value.cptId = cptId.value |
| 515 | form.value.ocrFlag = '1' | ||
| 476 | match.savePersonForMyPerson(form.value).then(res => { | 516 | match.savePersonForMyPerson(form.value).then(res => { |
| 477 | ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful') | 517 | ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful') |
| 478 | show.value = false | 518 | show.value = false | ... | ... |
-
Please register or sign in to post a comment