|
@@ -30,7 +30,7 @@
|
|
|
</CellGroup>
|
|
</CellGroup>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="g-form__footer inset">
|
|
<div class="g-form__footer inset">
|
|
|
- <Button type="danger" :disable="!canAdd" @click="formRef?.submit" round block>提交认证</Button>
|
|
|
|
|
|
|
+ <Button type="danger" :disable="!canAdd" @click="completed()" round block>提交认证</Button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</app-view>
|
|
</app-view>
|
|
@@ -39,24 +39,24 @@
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import { shallowRef, computed, PropType} from 'vue'
|
|
import { shallowRef, computed, PropType} from 'vue'
|
|
|
-import { CellGroup, Button, Cell, Field, Icon, FormInstance, showFailToast } from 'vant'
|
|
|
|
|
|
|
+import { CellGroup, Button, Cell, Field, Icon, showFailToast } from 'vant'
|
|
|
import { fullloading, dialog } from '@/utils/vant';
|
|
import { fullloading, dialog } from '@/utils/vant';
|
|
|
import { getAQCertificateTypeListName } from "@/constants/account";
|
|
import { getAQCertificateTypeListName } from "@/constants/account";
|
|
|
import { useRequest } from '@/hooks/request'
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { queryUserESignRecord } from '@/services/api/account';
|
|
import { queryUserESignRecord } from '@/services/api/account';
|
|
|
-import { useRequestCreateContractAndAddSigner } from '@/business/user/account';
|
|
|
|
|
|
|
+import { useRequestCreateContractAndAddSigner, useRequestSignCompleted } from '@/business/user/account';
|
|
|
import AppModal from '@/components/base/modal/index.vue'
|
|
import AppModal from '@/components/base/modal/index.vue'
|
|
|
import plus from '@/utils/h5plus'
|
|
import plus from '@/utils/h5plus'
|
|
|
import { onMounted } from 'vue';
|
|
import { onMounted } from 'vue';
|
|
|
import { getFileUrl } from '@/filters';
|
|
import { getFileUrl } from '@/filters';
|
|
|
|
|
|
|
|
-const formRef = shallowRef<FormInstance>()
|
|
|
|
|
const error = shallowRef(false)
|
|
const error = shallowRef(false)
|
|
|
const showModal = shallowRef(true)
|
|
const showModal = shallowRef(true)
|
|
|
// 是否刷新父组件数据
|
|
// 是否刷新父组件数据
|
|
|
const refresh = shallowRef(false)
|
|
const refresh = shallowRef(false)
|
|
|
const dataList = shallowRef<Model.UserESignRecordRsq[]>([])
|
|
const dataList = shallowRef<Model.UserESignRecordRsq[]>([])
|
|
|
const { createSigner, templateNoFormData} = useRequestCreateContractAndAddSigner()
|
|
const { createSigner, templateNoFormData} = useRequestCreateContractAndAddSigner()
|
|
|
|
|
+const { signCompleted} = useRequestSignCompleted()
|
|
|
/// 可以认证
|
|
/// 可以认证
|
|
|
const canAdd = shallowRef(false)
|
|
const canAdd = shallowRef(false)
|
|
|
|
|
|
|
@@ -96,16 +96,16 @@ const props = defineProps({
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-const onSubmit = () => {
|
|
|
|
|
|
|
+const completed = () => {
|
|
|
fullloading((hideLoading) => {
|
|
fullloading((hideLoading) => {
|
|
|
- // formSubmit().then(() => {
|
|
|
|
|
- // hideLoading()
|
|
|
|
|
- // dialog('实名认证提交请求成功').then(() => {
|
|
|
|
|
- // // router.back()
|
|
|
|
|
- // })
|
|
|
|
|
- // }).catch((err) => {
|
|
|
|
|
- // showFailToast(err)
|
|
|
|
|
- // })
|
|
|
|
|
|
|
+ signCompleted().then(() => {
|
|
|
|
|
+ hideLoading()
|
|
|
|
|
+ dialog('实名认证提交请求成功').then(() => {
|
|
|
|
|
+ // router.back()
|
|
|
|
|
+ })
|
|
|
|
|
+ }).catch((err) => {
|
|
|
|
|
+ showFailToast(err)
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -136,10 +136,12 @@ onMounted(() => {
|
|
|
useRequest(queryUserESignRecord, {
|
|
useRequest(queryUserESignRecord, {
|
|
|
onSuccess: (res) => {
|
|
onSuccess: (res) => {
|
|
|
if (res.data.length != 0) {
|
|
if (res.data.length != 0) {
|
|
|
- dataList.value = res.data
|
|
|
|
|
|
|
+ dataList.value = res.data.filter(obj => {
|
|
|
|
|
+ return obj.templatetype === 2
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
/// 只有全部签署才可以进行下一步
|
|
/// 只有全部签署才可以进行下一步
|
|
|
- canAdd.value = res.data.some(obj => { [1, 2, 4].includes(obj.recordstatus) })
|
|
|
|
|
|
|
+ canAdd.value = dataList.value.some(obj => { [1, 2, 4].includes(obj.recordstatus) })
|
|
|
},
|
|
},
|
|
|
onError: () => {
|
|
onError: () => {
|
|
|
error.value = true
|
|
error.value = true
|