|
|
@@ -90,11 +90,17 @@
|
|
|
<Iconfont icon="g-icon-certification">实名认证</Iconfont>
|
|
|
</template>
|
|
|
</Cell>
|
|
|
- <Cell is-link :to="{ name: 'bank-sign' }" v-if="authStatus === AuthStatus.Certified">
|
|
|
+ <Cell is-link :to="{ name: 'bank-sign' }" v-if="authStatus === AuthStatus.Certified && canBankSign">
|
|
|
<template #title>
|
|
|
<Iconfont icon="g-icon-sign">签约账户</Iconfont>
|
|
|
</template>
|
|
|
</Cell>
|
|
|
+ <Cell is-link :to="{ name: 'account-protocol', query: { memberUserId: getMemberUserId() } }"
|
|
|
+ v-if="userStore.userType != 2 && authStatus === AuthStatus.Certified">
|
|
|
+ <template #title>
|
|
|
+ <Iconfont icon="g-icon-order--line">合同签署</Iconfont>
|
|
|
+ </template>
|
|
|
+ </Cell>
|
|
|
<Cell is-link :to="{ name: 'mine-profile' }">
|
|
|
<template #title>
|
|
|
<Iconfont icon="g-icon-profile">个人信息</Iconfont>
|
|
|
@@ -144,13 +150,16 @@ import { queryBankAccountSign } from '@/services/api/bank'
|
|
|
import { useLoginStore, useAccountStore, useUserStore } from '@/stores'
|
|
|
import eventBus from '@/services/bus'
|
|
|
import Iconfont from '@/components/base/iconfont/index.vue'
|
|
|
+import { getMemberUserId } from '@/services/methods/user'
|
|
|
+import { queryMdUserSwapProtocol } from '@/services/api/swap'
|
|
|
|
|
|
const { router, routerTo } = useNavigation()
|
|
|
const loginStore = useLoginStore()
|
|
|
const userStore = useUserStore()
|
|
|
const accountStore = useAccountStore()
|
|
|
const { currentAccount } = accountStore.$toRefs()
|
|
|
-
|
|
|
+/// 判断是否能签约
|
|
|
+const canBankSign = shallowRef(false)
|
|
|
const headerRef = shallowRef<HTMLDivElement>()
|
|
|
const authStatus = computed(() => userStore.userAccount.hasauth) // 实名认证状态
|
|
|
|
|
|
@@ -162,6 +171,19 @@ const onReady = (el: HTMLDivElement) => {
|
|
|
/// 进行出入金操作判断
|
|
|
const doInOutMoney = (tab: string) => {
|
|
|
if (authStatus.value === AuthStatus.Certified) {
|
|
|
+ /// 当前未签署合同
|
|
|
+ if (!canBankSign.value) {
|
|
|
+ dialog({
|
|
|
+ message: '请先去签署合同条例!',
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonText: '去签署合同'
|
|
|
+ }).then(() => {
|
|
|
+ router.push({ name: 'account-protocol', query: { memberUserId: getMemberUserId() } })
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ // 判断是否已签约
|
|
|
fullloading((hideLoading) => {
|
|
|
queryBankAccountSign().then((res) => {
|
|
|
hideLoading()
|
|
|
@@ -208,6 +230,22 @@ onActivated(() => {
|
|
|
userStore.getUserData()
|
|
|
}
|
|
|
accountStore.getAccountList()
|
|
|
+
|
|
|
+ // 机构不需要签合同
|
|
|
+ if (userStore.userInfo.usertype === 2) {
|
|
|
+ canBankSign.value = true
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ /// 查询数据
|
|
|
+ queryMdUserSwapProtocol({
|
|
|
+ data: {
|
|
|
+ userId: loginStore.userId
|
|
|
+ }
|
|
|
+ }).then((res) => {
|
|
|
+ /// 判断是否能签约
|
|
|
+ canBankSign.value = res.data.some(e => e.protocolstatus === 4)
|
|
|
+ })
|
|
|
})
|
|
|
</script>
|
|
|
|