|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <ContentScrollView :paddingH="false"> | 
|---|
|  |  |  | <nut-form :model-value="form" ref="formRef" :rules="rules"> | 
|---|
|  |  |  | <!-- <nut-form :model-value="form" ref="formRef" :rules="rules"> | 
|---|
|  |  |  | <nut-form-item label="营业执照:" class="bole-form-item alignTop" prop="licenseUrl" required> | 
|---|
|  |  |  | <Uploader | 
|---|
|  |  |  | v-model:file-list="form.licenseUrl" | 
|---|
|  |  |  | 
|---|
|  |  |  | <span class="primary" @click="downloadPowerAttorneyTemplate">授权书模板下载</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </nut-form-item> | 
|---|
|  |  |  | </nut-form> | 
|---|
|  |  |  | </nut-form> --> | 
|---|
|  |  |  | </ContentScrollView> | 
|---|
|  |  |  | <PageFooter :isOnlyAction="false"> | 
|---|
|  |  |  | <PageFooterBtn type="primary" @click="handleSubmit()" :loading="loading" | 
|---|
|  |  |  | <!-- <PageFooterBtn type="primary" @click="handleSubmit()" :loading="loading" | 
|---|
|  |  |  | >提交认证</PageFooterBtn | 
|---|
|  |  |  | > | 
|---|
|  |  |  | > --> | 
|---|
|  |  |  | </PageFooter> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script setup lang="ts"> | 
|---|
|  |  |  | import { useAuthenticationFlow, useDownloadPowerAttorneyTemplate } from '../hooks'; | 
|---|
|  |  |  | // import { useAuthenticationFlow, useDownloadPowerAttorneyTemplate } from '../hooks'; | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | UserCertificationModeEnumV2, | 
|---|
|  |  |  | VerificationCodeBusinessType, | 
|---|
|  |  |  | 
|---|
|  |  |  | import { ProFormCaptcha, ProFormItemCell } from 'senin-mini/components'; | 
|---|
|  |  |  | import * as commonServices from '@12333/services/api/Common'; | 
|---|
|  |  |  | import { FileItem } from '@nutui/nutui-taro/dist/types/__VUE/uploader/type'; | 
|---|
|  |  |  | import { vatLicense, userCredentialVerifyOcrIDCard } from '@12333/hooks'; | 
|---|
|  |  |  | import { vatLicense } from '@12333/hooks'; | 
|---|
|  |  |  | import { Message } from '@12333/utils'; | 
|---|
|  |  |  | import { Photograph } from '@nutui/icons-vue-taro'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | name: 'InnerPage', | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { form, rules, formRef, handleSubmit, loading } = useAuthenticationFlow({ | 
|---|
|  |  |  | certificationMode: UserCertificationModeEnumV2.ProxyPersonPhoneCertification, | 
|---|
|  |  |  | certificationElement: UserCertificationElementEnum.Identity3, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | // const { form, rules, formRef, handleSubmit, loading } = useAuthenticationFlow({ | 
|---|
|  |  |  | //   certificationMode: UserCertificationModeEnumV2.ProxyPersonPhoneCertification, | 
|---|
|  |  |  | //   certificationElement: UserCertificationElementEnum.Identity3, | 
|---|
|  |  |  | // }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { downloadPowerAttorneyTemplate } = useDownloadPowerAttorneyTemplate(); | 
|---|
|  |  |  | // const { downloadPowerAttorneyTemplate } = useDownloadPowerAttorneyTemplate(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | async function onGetCaptcha(phoneNumber: string) { | 
|---|
|  |  |  | await commonServices.sendPhoneCertificationVerificationCode( | 
|---|
|  |  |  | { | 
|---|
|  |  |  | name: form.proxyPersonName, | 
|---|
|  |  |  | identity: form.proxyPersonIdNumber, | 
|---|
|  |  |  | mobile: form.proxyPersonContactPhone, | 
|---|
|  |  |  | businessType: VerificationCodeBusinessType.UserCertificationPhoneCertification, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { showLoading: false } | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // async function onGetCaptcha(phoneNumber: string) { | 
|---|
|  |  |  | //   await commonServices.sendPhoneCertificationVerificationCode( | 
|---|
|  |  |  | //     { | 
|---|
|  |  |  | //       name: form.proxyPersonName, | 
|---|
|  |  |  | //       identity: form.proxyPersonIdNumber, | 
|---|
|  |  |  | //       mobile: form.proxyPersonContactPhone, | 
|---|
|  |  |  | //       businessType: VerificationCodeBusinessType.UserCertificationPhoneCertification, | 
|---|
|  |  |  | //     }, | 
|---|
|  |  |  | //     { showLoading: false } | 
|---|
|  |  |  | //   ); | 
|---|
|  |  |  | // } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const handleLicenseUrlChange = (response: FileItem) => { | 
|---|
|  |  |  | vatLicense(response, { | 
|---|
|  |  |  | onSuccess(res) { | 
|---|
|  |  |  | let tips: string[] = []; | 
|---|
|  |  |  | res?.name ? (form.enterpriseName = res.name) : tips.push('企业名称'); | 
|---|
|  |  |  | res?.societyCode ? (form.societyCreditCode = res.societyCode) : tips.push('统一社会信用代码'); | 
|---|
|  |  |  | if (tips.length > 0) { | 
|---|
|  |  |  | Message.error(`未能识别到您上传的图片,请重新上传清晰的图片或手动输入${tips.join('和')}`); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | // const handleLicenseUrlChange = (response: FileItem) => { | 
|---|
|  |  |  | //   vatLicense(response, { | 
|---|
|  |  |  | //     onSuccess(res) { | 
|---|
|  |  |  | //       let tips: string[] = []; | 
|---|
|  |  |  | //       res?.name ? (form.enterpriseName = res.name) : tips.push('企业名称'); | 
|---|
|  |  |  | //       res?.societyCode ? (form.societyCreditCode = res.societyCode) : tips.push('统一社会信用代码'); | 
|---|
|  |  |  | //       if (tips.length > 0) { | 
|---|
|  |  |  | //         Message.error(`未能识别到您上传的图片,请重新上传清晰的图片或手动输入${tips.join('和')}`); | 
|---|
|  |  |  | //       } | 
|---|
|  |  |  | //     }, | 
|---|
|  |  |  | //   }); | 
|---|
|  |  |  | // }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function handleFrontImgUrlChange(response: FileItem) { | 
|---|
|  |  |  | userCredentialVerifyOcrIDCard(response, { | 
|---|
|  |  |  | onSuccess(res) { | 
|---|
|  |  |  | if (res.realName) form.proxyPersonName = res.realName; | 
|---|
|  |  |  | if (res.idcardNum) form.proxyPersonIdNumber = res.idcardNum; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | // userCredentialVerifyOcrIDCard(response, { | 
|---|
|  |  |  | //   onSuccess(res) { | 
|---|
|  |  |  | //     if (res.realName) form.proxyPersonName = res.realName; | 
|---|
|  |  |  | //     if (res.idcardNum) form.proxyPersonIdNumber = res.idcardNum; | 
|---|
|  |  |  | //   }, | 
|---|
|  |  |  | // }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|