|
|
@@ -3,11 +3,23 @@
|
|
|
<app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
|
|
|
:expand-row-keys="expandKeys" @row-click="rowClick">
|
|
|
<template #headerLeft>
|
|
|
- <el-button type="primary" size="small"
|
|
|
+ <template v-if="oem === 'tjmd'">
|
|
|
+ <template v-if="cusBank">
|
|
|
+ <el-button type="primary" size="small"
|
|
|
+ v-if="[AuthStatus.Certified, AuthStatus.Submitted].includes(authStatus) && ![SignStatus.Audit, SignStatus.Signing, SignStatus.Signed].includes(signStatus)"
|
|
|
+ @click="showComponent('sign')">添加签约账户</el-button>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <el-button type="primary" size="small"
|
|
|
+ v-if="[AuthStatus.Certified, AuthStatus.Submitted].includes(authStatus)"
|
|
|
+ @click="showComponent('protocol')">合同签署</el-button>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <el-button type="primary" size="small"
|
|
|
v-if="[AuthStatus.Certified, AuthStatus.Submitted].includes(authStatus) && ![SignStatus.Audit, SignStatus.Signing, SignStatus.Signed].includes(signStatus)"
|
|
|
@click="showComponent('sign')">添加签约账户</el-button>
|
|
|
- <!-- <el-button type="warning" size="small" v-if="authStatus === AuthStatus.Uncertified"
|
|
|
- @click="openComponent('certification')">实名认证</el-button> -->
|
|
|
+ </template>
|
|
|
<el-button type="warning" size="small" v-if="authStatus === AuthStatus.Uncertified"
|
|
|
@click="openComponent('certification-aq')">实名认证</el-button>
|
|
|
</template>
|
|
|
@@ -25,7 +37,7 @@
|
|
|
<el-button v-if="row.signstatus === SignStatus.Signed && cusBank?.canrelease === 1" type="danger"
|
|
|
size="small" @click="openComponent('cancel')">解约</el-button>
|
|
|
<el-button
|
|
|
- v-if="[SignStatus.Refuse, SignStatus.Rescinded].includes(row.signstatus) || (row.signstatus === SignStatus.Signed && cusBank?.canmodifysigninfo === 1)"
|
|
|
+ v-if="[SignStatus.Unsigned, SignStatus.Refuse, SignStatus.Rescinded].includes(row.signstatus) || (row.signstatus === SignStatus.Signed && cusBank?.canmodifysigninfo === 1)"
|
|
|
type="primary" size="small" @click="beforeShowComponent(row)">修改</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -35,7 +47,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, defineAsyncComponent, onMounted } from 'vue'
|
|
|
+import { shallowRef, defineAsyncComponent, onMounted, computed } from 'vue'
|
|
|
import { ElMessageBox } from 'element-plus'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import { useComposeTable } from '@pc/components/base/table'
|
|
|
@@ -48,18 +60,23 @@ import { AuthStatus } from '@/constants/account'
|
|
|
import { useUserStore } from '@/stores'
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
+import service from '@/services'
|
|
|
+import { queryMdUserSwapProtocol } from '@/services/api/swap'
|
|
|
+import { getUserId } from '@/services/methods/user'
|
|
|
|
|
|
const componentMap = new Map<string, unknown>([
|
|
|
['cancel', defineAsyncComponent(() => import('./components/cancel/index.vue'))],
|
|
|
['sign', defineAsyncComponent(() => import('./components/sign/index.vue'))],
|
|
|
['certification', defineAsyncComponent(() => import('./components/certification/index.vue'))], // 实名认证,
|
|
|
['certification-aq', defineAsyncComponent(() => import('./components/certification-aq/index.vue'))], // 实名认证
|
|
|
+ ['protocol', defineAsyncComponent(() => import('./components/protocol/index.vue'))], // 合同签署
|
|
|
])
|
|
|
|
|
|
const useStore = useUserStore()
|
|
|
const authStatus = shallowRef(AuthStatus.Certified) // 实名认证状态
|
|
|
const signStatus = shallowRef(SignStatus.Unsigned)
|
|
|
const cusBank = shallowRef<Model.CusBankSignBankRsp>()
|
|
|
+const oem = service.getConfig('oem')
|
|
|
|
|
|
const { rowKey, expandKeys, rowClick, selectedRow } = useComposeTable<Model.BankAccountSignRsp>({ rowKey: 'applyexchticket' })
|
|
|
const { loading, dataList, run } = useRequest(queryBankAccountSign, {
|
|
|
@@ -71,6 +88,18 @@ const { loading, dataList, run } = useRequest(queryBankAccountSign, {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+/// 查询用户掉期协议签署表
|
|
|
+const { dataList: protocolList} = useRequest(queryMdUserSwapProtocol, {
|
|
|
+ params: {
|
|
|
+ userId: getUserId()
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+/// 判断是否能签约
|
|
|
+const canBankSign = computed(() => {
|
|
|
+ return protocolList.value.some(e => { return e.protocolstatus === 4 })
|
|
|
+})
|
|
|
+
|
|
|
/// 查询托管银行信息
|
|
|
useRequest(queryCusBankSignBank, {
|
|
|
onSuccess: (res) => {
|