|
@@ -3,9 +3,9 @@
|
|
|
<app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
|
|
<app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
|
|
|
:expand-row-keys="expandKeys" @row-click="rowClick">
|
|
:expand-row-keys="expandKeys" @row-click="rowClick">
|
|
|
<template #header>
|
|
<template #header>
|
|
|
- <el-button type="primary" v-if="authStatus === AuthStatus.Certified"
|
|
|
|
|
|
|
+ <el-button type="primary" v-if="authStatus === AuthStatus.Certified && ![SignStatus.Audit, SignStatus.Signed].includes(signStatus)"
|
|
|
@click="openComponent('sign')">添加签约账户</el-button>
|
|
@click="openComponent('sign')">添加签约账户</el-button>
|
|
|
- <el-button type="warning" v-else @click="openComponent('certification')">实名认证</el-button>
|
|
|
|
|
|
|
+ <el-button type="warning" v-if="authStatus === AuthStatus.Uncertified" @click="openComponent('certification')">实名认证</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
<!-- 证件类型 -->
|
|
<!-- 证件类型 -->
|
|
|
<template #cardtype="{ value }">
|
|
<template #cardtype="{ value }">
|
|
@@ -47,9 +47,18 @@ const componentMap = new Map<string, unknown>([
|
|
|
['certification', defineAsyncComponent(() => import('./components/certification/index.vue'))], // 实名认证
|
|
['certification', defineAsyncComponent(() => import('./components/certification/index.vue'))], // 实名认证
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
|
|
+const authStatus = shallowRef(AuthStatus.Certified) // 实名认证状态
|
|
|
|
|
+const signStatus = shallowRef(SignStatus.Unsigned)
|
|
|
|
|
+
|
|
|
const { rowKey, expandKeys, rowClick, selectedRow } = useComposeTable<Model.BankAccountSignRsp>({ rowKey: 'applyexchticket' })
|
|
const { rowKey, expandKeys, rowClick, selectedRow } = useComposeTable<Model.BankAccountSignRsp>({ rowKey: 'applyexchticket' })
|
|
|
-const { loading, dataList, run } = useRequest(queryBankAccountSign, {})
|
|
|
|
|
-const authStatus = shallowRef(AuthStatus.Uncertified) // 实名认证状态
|
|
|
|
|
|
|
+const { loading, dataList, run } = useRequest(queryBankAccountSign, {
|
|
|
|
|
+ onSuccess: (res) => {
|
|
|
|
|
+ /// 签约状态
|
|
|
|
|
+ if (res.data.length != 0) {
|
|
|
|
|
+ signStatus.value = res.data[0].signstatus
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+})
|
|
|
|
|
|
|
|
const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
|
|
const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
|
|
|
run()
|
|
run()
|