|
@@ -4,7 +4,7 @@
|
|
|
:expand-row-keys="expandKeys" @row-click="rowClick">
|
|
:expand-row-keys="expandKeys" @row-click="rowClick">
|
|
|
<template #headerLeft>
|
|
<template #headerLeft>
|
|
|
<template v-if="authStatus === AuthStatus.Certified">
|
|
<template v-if="authStatus === AuthStatus.Certified">
|
|
|
- <template v-if="hasSignContract">
|
|
|
|
|
|
|
+ <template v-if="records.length === 0 || records.some(e => e.recordstatus === 3)">
|
|
|
<el-button type="primary" size="small" @click="showComponent('sign')"
|
|
<el-button type="primary" size="small" @click="showComponent('sign')"
|
|
|
v-if="![SignStatus.Audit, SignStatus.Signing, SignStatus.Signed].includes(signStatus)">
|
|
v-if="![SignStatus.Audit, SignStatus.Signing, SignStatus.Signed].includes(signStatus)">
|
|
|
{{ t('banksign.addbanksign') }}
|
|
{{ t('banksign.addbanksign') }}
|
|
@@ -50,14 +50,14 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, defineAsyncComponent, onMounted, computed } from 'vue'
|
|
|
|
|
|
|
+import { shallowRef, defineAsyncComponent, computed } from 'vue'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import { useComposeTable } from '@pc/components/base/table'
|
|
import { useComposeTable } from '@pc/components/base/table'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { queryBankAccountSign, queryCusBankSignBank } from '@/services/api/bank'
|
|
import { queryBankAccountSign, queryCusBankSignBank } from '@/services/api/bank'
|
|
|
import { getSignStatusName, SignStatus } from '@/constants/bank'
|
|
import { getSignStatusName, SignStatus } from '@/constants/bank'
|
|
|
import { getCertificateTypeCodeName } from '@/constants/account'
|
|
import { getCertificateTypeCodeName } from '@/constants/account'
|
|
|
-import { queryUserAccount, queryTencentUsereSignRecords } from '@/services/api/account'
|
|
|
|
|
|
|
+import { queryTencentUsereSignRecords } from '@/services/api/account'
|
|
|
import { AuthStatus } from '@/constants/account'
|
|
import { AuthStatus } from '@/constants/account'
|
|
|
import { useUserStore, i18n } from '@/stores'
|
|
import { useUserStore, i18n } from '@/stores'
|
|
|
import { ElMessage } from 'element-plus'
|
|
import { ElMessage } from 'element-plus'
|
|
@@ -72,13 +72,18 @@ const componentMap = new Map<string, unknown>([
|
|
|
['protocol', defineAsyncComponent(() => import('./components/protocol/index.vue'))], // 合同签署
|
|
['protocol', defineAsyncComponent(() => import('./components/protocol/index.vue'))], // 合同签署
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
-const useStore = useUserStore()
|
|
|
|
|
-const authStatus = shallowRef(AuthStatus.Certified) // 实名认证状态
|
|
|
|
|
|
|
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
|
|
|
|
|
+ run()
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+const { t } = i18n.global
|
|
|
|
|
+const userStore = useUserStore()
|
|
|
const signStatus = shallowRef(SignStatus.Unsigned)
|
|
const signStatus = shallowRef(SignStatus.Unsigned)
|
|
|
const cusBank = shallowRef<Model.CusBankSignBankRsp>()
|
|
const cusBank = shallowRef<Model.CusBankSignBankRsp>()
|
|
|
-const { t } = i18n.global
|
|
|
|
|
const dataList = shallowRef<Model.BankAccountSignRsp[]>()
|
|
const dataList = shallowRef<Model.BankAccountSignRsp[]>()
|
|
|
|
|
|
|
|
|
|
+const authStatus = computed(() => userStore.userAccount.hasauth) // 实名认证状态
|
|
|
|
|
+
|
|
|
const { rowKey, expandKeys, rowClick, selectedRow } = useComposeTable<Model.BankAccountSignRsp>({ rowKey: 'applyexchticket' })
|
|
const { rowKey, expandKeys, rowClick, selectedRow } = useComposeTable<Model.BankAccountSignRsp>({ rowKey: 'applyexchticket' })
|
|
|
// 需求 #5692: 交易系统通用问题2024
|
|
// 需求 #5692: 交易系统通用问题2024
|
|
|
const { loading, run } = useRequest(queryBankAccountSign, {
|
|
const { loading, run } = useRequest(queryBankAccountSign, {
|
|
@@ -96,14 +101,6 @@ const { loading, run } = useRequest(queryBankAccountSign, {
|
|
|
/// 查询爱签签约协议信息
|
|
/// 查询爱签签约协议信息
|
|
|
const { dataList: records } = useRequest(queryTencentUsereSignRecords)
|
|
const { dataList: records } = useRequest(queryTencentUsereSignRecords)
|
|
|
|
|
|
|
|
-/// 判断是否能签约
|
|
|
|
|
-const hasSignContract = computed(() => {
|
|
|
|
|
- if (records.value.length) {
|
|
|
|
|
- return records.value.some(e => e.recordstatus === 3)
|
|
|
|
|
- }
|
|
|
|
|
- return true
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
/// 查询托管银行信息
|
|
/// 查询托管银行信息
|
|
|
useRequest(queryCusBankSignBank, {
|
|
useRequest(queryCusBankSignBank, {
|
|
|
onSuccess: (res) => {
|
|
onSuccess: (res) => {
|
|
@@ -114,10 +111,6 @@ useRequest(queryCusBankSignBank, {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
|
|
|
|
|
- run()
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
const showComponent = ((componentName: string) => {
|
|
const showComponent = ((componentName: string) => {
|
|
|
/// 认证请求中 不能操作
|
|
/// 认证请求中 不能操作
|
|
|
if (authStatus.value === AuthStatus.Submitted) {
|
|
if (authStatus.value === AuthStatus.Submitted) {
|
|
@@ -140,12 +133,4 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
|
{ field: 'remark', label: 'banksign.remark' },
|
|
{ field: 'remark', label: 'banksign.remark' },
|
|
|
{ field: 'updatetime', label: 'banksign.remark' },
|
|
{ field: 'updatetime', label: 'banksign.remark' },
|
|
|
])
|
|
])
|
|
|
-
|
|
|
|
|
-onMounted(() => {
|
|
|
|
|
- useStore.getUserData()
|
|
|
|
|
- // 获取用户账号信息----------------待处理,直接用useStore
|
|
|
|
|
- queryUserAccount().then((res) => {
|
|
|
|
|
- authStatus.value = res.data.hasauth
|
|
|
|
|
- })
|
|
|
|
|
-})
|
|
|
|
|
</script>
|
|
</script>
|