|
|
@@ -3,15 +3,20 @@
|
|
|
<app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
|
|
|
:expand-row-keys="expandKeys" @row-click="rowClick">
|
|
|
<template #headerLeft>
|
|
|
- <template v-if="((hasAQAuth && hasSignContract) || !hasAQAuth) && [AuthStatus.Certified, AuthStatus.Submitted].includes(authStatus) && ![SignStatus.Audit, SignStatus.Signing, SignStatus.Signed].includes(signStatus)">
|
|
|
- <el-button type="primary" size="small"
|
|
|
- @click="showComponent('sign')">{{ t('banksign.addbanksign') }}</el-button>
|
|
|
+ <template v-if="authStatus === AuthStatus.Certified">
|
|
|
+ <template v-if="hasSignContract">
|
|
|
+ <el-button type="primary" size="small" @click="showComponent('sign')"
|
|
|
+ v-if="![SignStatus.Audit, SignStatus.Signing, SignStatus.Signed].includes(signStatus)">
|
|
|
+ {{ t('banksign.addbanksign') }}
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <el-button type="primary" size="small" @click="showComponent('protocol')" v-else>
|
|
|
+ {{ t('banksign.signagreement') }}
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
- <template v-if="[AuthStatus.Certified, AuthStatus.Submitted].includes(authStatus) && (hasAQAuth && !hasSignContract) ">
|
|
|
- <el-button type="primary" size="small" @click="showComponent('protocol')">{{ t('banksign.signagreement') }}</el-button>
|
|
|
- </template>
|
|
|
- <el-button type="warning" size="small" v-if="authStatus === AuthStatus.Uncertified"
|
|
|
- @click="openComponent('certification-aq')">{{ t('user.authentication.title') }}</el-button>
|
|
|
+ <el-button type="warning" size="small" @click="openComponent('certification-aq')" v-else>
|
|
|
+ {{ t('user.authentication.title') }}
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
<!-- 证件类型 -->
|
|
|
<template #cardtype="{ value }">
|
|
|
@@ -29,10 +34,14 @@
|
|
|
<template #expand="{ row }">
|
|
|
<div class="buttonbar">
|
|
|
<el-button v-if="row.signstatus === SignStatus.Signed && cusBank?.canrelease === 1" type="danger"
|
|
|
- size="small" @click="openComponent('cancel')">{{ t('banksign.cancel') }}</el-button>
|
|
|
+ size="small" @click="openComponent('cancel')">
|
|
|
+ {{ t('banksign.cancel') }}
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
v-if="[SignStatus.Unsigned, SignStatus.Refuse, SignStatus.Rescinded].includes(row.signstatus) || (row.signstatus === SignStatus.Signed && cusBank?.canmodifysigninfo === 1)"
|
|
|
- type="primary" size="small" @click="showComponent('sign')">{{ t('operation.modify') }}</el-button>
|
|
|
+ type="primary" size="small" @click="showComponent('sign')">
|
|
|
+ {{ t('operation.modify') }}
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</app-table>
|
|
|
@@ -48,14 +57,11 @@ import { useRequest } from '@/hooks/request'
|
|
|
import { queryBankAccountSign, queryCusBankSignBank } from '@/services/api/bank'
|
|
|
import { getSignStatusName, SignStatus } from '@/constants/bank'
|
|
|
import { getCertificateTypeCodeName } from '@/constants/account'
|
|
|
-import { queryUserAccount, queryUsereSignRecords } from '@/services/api/account'
|
|
|
+import { queryUserAccount, queryTencentUsereSignRecords } from '@/services/api/account'
|
|
|
import { AuthStatus } from '@/constants/account'
|
|
|
import { useUserStore, i18n } from '@/stores'
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
-import { queryMdUserSwapProtocol } from '@/services/api/swap'
|
|
|
-import { getUserId, getMemberUserId } from '@/services/methods/user'
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
-import service from '@/services'
|
|
|
import { formatDate } from '@/filters'
|
|
|
|
|
|
const componentMap = new Map<string, unknown>([
|
|
|
@@ -70,7 +76,6 @@ const useStore = useUserStore()
|
|
|
const authStatus = shallowRef(AuthStatus.Certified) // 实名认证状态
|
|
|
const signStatus = shallowRef(SignStatus.Unsigned)
|
|
|
const cusBank = shallowRef<Model.CusBankSignBankRsp>()
|
|
|
-const oem = service.getConfig('oem')
|
|
|
const { t } = i18n.global
|
|
|
const dataList = shallowRef<Model.BankAccountSignRsp[]>()
|
|
|
|
|
|
@@ -88,41 +93,13 @@ const { loading, run } = useRequest(queryBankAccountSign, {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
-/// 查询用户掉期协议签署表
|
|
|
-const { dataList: protocolList } = useRequest(queryMdUserSwapProtocol, {
|
|
|
- defaultParams: {
|
|
|
- userId: getUserId()
|
|
|
- }
|
|
|
-})
|
|
|
-
|
|
|
/// 查询爱签签约协议信息
|
|
|
-const { dataList: records} = useRequest(queryUsereSignRecords, {
|
|
|
- defaultParams: {
|
|
|
- userId: getUserId(),
|
|
|
- memberUserId: getMemberUserId(),
|
|
|
- }
|
|
|
-})
|
|
|
+const { dataList: records } = useRequest(queryTencentUsereSignRecords)
|
|
|
|
|
|
/// 判断是否能签约
|
|
|
const hasSignContract = computed(() => {
|
|
|
- if ( oem.toLowerCase() === 'tjmd' ) {
|
|
|
- return protocolList.value.some(e => { return e.protocolstatus === 4 })
|
|
|
- } else if ( oem.toLowerCase() === 'zrwyt' ) {
|
|
|
- return records.value.some(e => { return e.recordstatus === 3 && e.templatetype === 2 })
|
|
|
- } else if (oem.toLowerCase() === 'gcszt' ) {
|
|
|
- return !records.value.some(e => { return e.recordstatus != 3 })
|
|
|
- }
|
|
|
- return true
|
|
|
-})
|
|
|
-
|
|
|
-/// 是否爱签实名认证
|
|
|
-const hasAQAuth = computed(() => {
|
|
|
- if ( oem.toLowerCase() === 'tjmd' ) {
|
|
|
- return true
|
|
|
- } else if ( oem.toLowerCase() === 'zrwyt' ) {
|
|
|
- return records.value.some(e => { return e.recordstatus === 3 && e.templatetype === 1 })
|
|
|
- } else if ( oem.toLowerCase() === 'gcszt' ) {
|
|
|
- return true
|
|
|
+ if (records.value.length) {
|
|
|
+ return records.value.some(e => e.recordstatus === 3)
|
|
|
}
|
|
|
return true
|
|
|
})
|
|
|
@@ -171,5 +148,4 @@ onMounted(() => {
|
|
|
authStatus.value = res.data.hasauth
|
|
|
})
|
|
|
})
|
|
|
-
|
|
|
</script>
|