|
@@ -10,7 +10,7 @@
|
|
|
<Field v-model="mobile2" name="mobile" label="手机号码" placeholder="请输入手机号码" />
|
|
<Field v-model="mobile2" name="mobile" label="手机号码" placeholder="请输入手机号码" />
|
|
|
<Field name="idCardType" label="证件类型" :rules="formRules.idCardType" is-link>
|
|
<Field name="idCardType" label="证件类型" :rules="formRules.idCardType" is-link>
|
|
|
<template #input>
|
|
<template #input>
|
|
|
- <app-select v-model="formData.idCardType" placeholder="请选择证件类型" :options="enums" />
|
|
|
|
|
|
|
+ <app-select v-model="formData.idCardType" placeholder="请选择证件类型" :options="getAQCertificateTypeList()" />
|
|
|
</template>
|
|
</template>
|
|
|
</Field>
|
|
</Field>
|
|
|
<Field v-model="formData.idCard" name="cardnum" label="证件号码" placeholder="请输入证件号码"
|
|
<Field v-model="formData.idCard" name="cardnum" label="证件号码" placeholder="请输入证件号码"
|
|
@@ -38,7 +38,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, computed, defineAsyncComponent } from 'vue'
|
|
|
|
|
|
|
+import { shallowRef, defineAsyncComponent } from 'vue'
|
|
|
import { CellGroup, Button, Field, Form, FormInstance, showFailToast, FieldRule } from 'vant'
|
|
import { CellGroup, Button, Field, Form, FormInstance, showFailToast, FieldRule } from 'vant'
|
|
|
import { fullloading, dialog } from '@/utils/vant';
|
|
import { fullloading, dialog } from '@/utils/vant';
|
|
|
import { getAQCertificateTypeList } from "@/constants/account";
|
|
import { getAQCertificateTypeList } from "@/constants/account";
|
|
@@ -55,7 +55,6 @@ import { useNavigation } from '../../../router/navigation'
|
|
|
const { router } = useNavigation()
|
|
const { router } = useNavigation()
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
const { formData, formSubmit } = adddUserReq()
|
|
const { formData, formSubmit } = adddUserReq()
|
|
|
-const error = shallowRef(false)
|
|
|
|
|
const canAdd = shallowRef(false)
|
|
const canAdd = shallowRef(false)
|
|
|
|
|
|
|
|
const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
|
|
const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
|
|
@@ -68,17 +67,15 @@ const componentMap = new Map<string, unknown>([
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
/// 查询记录
|
|
/// 查询记录
|
|
|
-const { loading, dataList } = useRequest(queryUserESignRecord, {
|
|
|
|
|
- onError: () => {
|
|
|
|
|
- error.value = true
|
|
|
|
|
- },
|
|
|
|
|
- onFinally: () => {
|
|
|
|
|
- dataList.value.map(obj => {
|
|
|
|
|
- if (obj.templatetype === 1 && obj.recordstatus === 1) {
|
|
|
|
|
- canAdd.value = true
|
|
|
|
|
- } else if (obj.templatetype === 1 && obj.recordstatus === 3) {
|
|
|
|
|
|
|
+const { loading } = useRequest(queryUserESignRecord, {
|
|
|
|
|
+ onSuccess: (res) => {
|
|
|
|
|
+ if(res.data.some((e)=>e.templatetype === 1 && e.recordstatus === 1)) {
|
|
|
|
|
+ canAdd.value = true
|
|
|
|
|
+ } else {
|
|
|
|
|
+ const item = res.data.find((e)=>e.templatetype === 1 && e.recordstatus === 3)
|
|
|
|
|
+ if (item) {
|
|
|
canAdd.value = false
|
|
canAdd.value = false
|
|
|
- const { name, idCard, idCardPhoto, idCardPhotoBackURL, mobile, idCardType } = JSON.parse(obj.authinfo)
|
|
|
|
|
|
|
+ const { name, idCard, idCardPhoto, idCardPhotoBackURL, mobile, idCardType } = JSON.parse(item.authinfo)
|
|
|
formData.name = name
|
|
formData.name = name
|
|
|
formData.idCard = idCard
|
|
formData.idCard = idCard
|
|
|
formData.idCardPhoto = idCardPhoto
|
|
formData.idCardPhoto = idCardPhoto
|
|
@@ -88,13 +85,10 @@ const { loading, dataList } = useRequest(queryUserESignRecord, {
|
|
|
/// 进行下一步
|
|
/// 进行下一步
|
|
|
openComponent('certification-next')
|
|
openComponent('certification-next')
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-/// 获取对应的证件枚举类型
|
|
|
|
|
-const enums = computed(() => { return getAQCertificateTypeList().map(obj => { return { label: obj.label, value: obj.value } }) })
|
|
|
|
|
-
|
|
|
|
|
const b_afterRead = (filePath: string) => {
|
|
const b_afterRead = (filePath: string) => {
|
|
|
formData.idCardPhoto = filePath
|
|
formData.idCardPhoto = filePath
|
|
|
}
|
|
}
|