Handy_Cao преди 1 година
родител
ревизия
decca42fef

+ 1 - 1
oem/zrwyt/config/appconfig.json

@@ -3,7 +3,7 @@
   "appName": "中融文遗通",
   "version": "1.0.23",
   "versionCode": "100023",
-  "apiUrl": "http://192.168.31.205:8080/cfg?key=test_205",
+  "apiUrl": "http://192.168.31.134:8080/cfg?key=test_134",
   "tradeChannel": "ws",
   "modules": [
     "register",

+ 19 - 9
src/packages/pc/views/account/sign/index.vue

@@ -3,14 +3,13 @@
     <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="canBankSign">
+            <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"
-                    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>
+            <template v-if="[AuthStatus.Certified, AuthStatus.Submitted].includes(authStatus) && hasAQAuth">
                 <el-button type="primary" size="small"
-                    v-if="[AuthStatus.Certified, AuthStatus.Submitted].includes(authStatus)"
+                    
                     @click="showComponent('protocol')">合同签署</el-button>
             </template>
             <el-button type="warning" size="small" v-if="authStatus === AuthStatus.Uncertified"
@@ -40,7 +39,7 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, defineAsyncComponent, onMounted, computed } from 'vue'
+import { shallowRef, defineAsyncComponent, onMounted, computed, ref } from 'vue'
 import { ElMessageBox } from 'element-plus'
 import { useComponent } from '@/hooks/component'
 import { useComposeTable } from '@pc/components/base/table'
@@ -93,22 +92,33 @@ const { dataList: records} = useRequest(queryUsereSignRecords, {
     params: {
         userId: getUserId(),
         memberUserId: getMemberUserId(),
-        templatetype: 2,
     }
 })
 
 /// 判断是否能签约
-const canBankSign = computed(() => {
+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 })
-    } else if ( oem.toLowerCase() === 'gcszt' ) {
+        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
+    }
+    return true
+})
+
 /// 查询托管银行信息
 useRequest(queryCusBankSignBank, {
     onSuccess: (res) => {

+ 26 - 3
src/packages/pc/views/footer/capital/summary/index.vue

@@ -40,7 +40,8 @@ import { AuthStatus } from '@/constants/account'
 import { queryBankAccountSign } from '@/services/api/bank'
 import { useRequest } from '@/hooks/request'
 import { queryMdUserSwapProtocol } from '@/services/api/swap'
-import { getUserId } from '@/services/methods/user'
+import { queryUsereSignRecords } from '@/services/api/account'
+import { getUserId, getMemberUserId } from '@/services/methods/user'
 import AppTable from '@pc/components/base/table/index.vue'
 import service from '@/services'
 
@@ -63,19 +64,41 @@ const { dataList: protocolList} = useRequest(queryMdUserSwapProtocol, {
     }
 })
 
+/// 查询爱签签约协议信息
+const { dataList: records} = useRequest(queryUsereSignRecords, {
+    params: {
+        userId: getUserId(),
+        memberUserId: getMemberUserId(),
+    }
+})
+
 /// 判断是否能签约
-const canBankSign = computed(() => {
+const hasSignContract = computed(() => {
     /// 机构不需要签合同
     if (userStore.userInfo.usertype === 2) {
         return true
     }
     if (oem === '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 {
         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
+    }
+    return true
+})
+
 const authStatus = computed(() => userStore.userAccount.hasauth) // 实名认证状态
 
 const tableColumns = shallowRef<Model.TableColumn[]>([
@@ -97,7 +120,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
 /// 进行出入金操作判断
 const doInOutMoney = (code: string) => {
     /// 进行合同签署才能进行相关操作
-    if (!canBankSign.value) {
+    if (hasAQAuth.value && !hasSignContract.value) {
         ElMessage({ showClose: true, message: '请前往手机App进行合同签署操作!', })
         return
     }

+ 1 - 1
src/packages/zrwyt/views/account/protocol/Index.vue

@@ -14,7 +14,7 @@
             </CellGroup>
             <CellGroup inset>
                 <template v-for="(item, index) in dataList" :key="index">
-                    <Cell title-class="cell__title" :title="item.templatename" value="去签署" value-class="cell__value" :icon="iconName(item.recordstatus)" @click="signer(item)" is-link />
+                    <Cell title-class="cell__title" :title="item.templatename" :value="item.recordstatus != 3 ? '去签署' : '去查看'" value-class="cell__value" :icon="iconName(item.recordstatus)" @click="signer(item)" is-link />
                 </template>
             </CellGroup>
         </div>

+ 29 - 25
src/packages/zrwyt/views/mine/Index.vue

@@ -96,13 +96,13 @@
                         <Iconfont icon="g-icon-certification">实名认证</Iconfont>
                     </template>
                 </Cell>
-                <Cell is-link :to="{ name: 'bank-sign' }" v-if="authStatus === AuthStatus.Certified && hasSignContract">
-                    <template #title>
+                <Cell is-link :to="{ name: 'bank-sign' }" v-if="authStatus === AuthStatus.Certified && ((hasAQAuth && hasSignContract) || !hasAQAuth)">
+                    <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 && currentAccount.signstatus !== 4">
+                    v-if="userStore.userType != 2 && authStatus === AuthStatus.Certified && hasAQAuth">
                     <template #title>
                         <Iconfont icon="g-icon-order--line">入市协议</Iconfont>
                     </template>
@@ -146,7 +146,7 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, onActivated, computed } from 'vue'
+import { shallowRef, onActivated, computed, ref } from 'vue'
 import { Cell, CellGroup, Button, Icon } from 'vant'
 import { parsePercent } from '@/filters'
 import { fullloading, dialog } from '@/utils/vant'
@@ -164,11 +164,14 @@ const loginStore = useLoginStore()
 const userStore = useUserStore()
 const accountStore = useAccountStore()
 const { currentAccount } = accountStore.$toRefs()
-/// 判断是否能签约
-const hasSignContract = shallowRef(false)
 const headerRef = shallowRef<HTMLDivElement>()
+
 // 实名认证状态
 const authStatus = computed(() => userStore.userAccount.hasauth)
+/// 是否爱签实名认证
+const hasAQAuth = ref(false)
+/// 是否签署合同
+const hasSignContract = shallowRef(false)
 
 const onReady = (el: HTMLDivElement) => {
     // 设置背景图位置
@@ -186,25 +189,25 @@ const doInOutMoney = (tab: string) => {
                 /// 判断当前有签约
                 if (signstatus && signstatus === 4) {
                     /// 已实名未签合同
-                    // if (!hasSignContract.value) {
-                    //     dialog({
-                    //         message: '根据平台规定,请先通过《入市协议》签署协议,谢谢!',
-                    //         showCancelButton: true,
-                    //         cancelButtonText: '暂不签署',
-                    //         confirmButtonText: '立即签署'
-                    //     })
-                    //         .then(() => {
-                    //             router.push({ name: 'account-protocol', query: { memberUserId: getMemberUserId() } })
-                    //         })
-                    //         .catch(() => {
-                    //             router.push({ name: 'bank-wallet', query: { tab } })
-                    //         })
-                    // } else {
+                    if (hasAQAuth.value && !hasSignContract.value) {
+                        dialog({
+                            message: '根据平台规定,请先通过《入市协议》签署协议,谢谢!',
+                            showCancelButton: true,
+                            cancelButtonText: '暂不签署',
+                            confirmButtonText: '立即签署'
+                        }).then(() => {
+                                router.push({ name: 'account-protocol', query: { memberUserId: getMemberUserId() } })
+                            })
+                            .catch(() => {
+                                router.push({ name: 'bank-wallet', query: { tab } })
+                            })
+                            
+                    } else {
                         router.push({ name: 'bank-wallet', query: { tab } })
-                    // }
+                    }
                 } else {
                     /// 未签约
-                    if (!hasSignContract.value) {
+                    if (hasAQAuth.value && !hasSignContract.value) {
                         dialog({
                             message: '根据平台规定,请先通过《入市协议》签署协议,谢谢!',
                             showCancelButton: true,
@@ -266,11 +269,12 @@ onActivated(() => {
         data: {
             userId: loginStore.userId,
             memberUserId: getMemberUserId(),
-            templatetype: 2
         }
     }).then((res) => {
-        /// 判断是否能签约
-        hasSignContract.value = res.data.some(e => e.recordstatus === 3)
+        /// 如果是有实名认证协议 并且 已签署
+        hasAQAuth.value = res.data.some(e => e.templatetype === 1 && e.recordstatus === 3)
+        /// 是否签署合同
+        hasSignContract.value = res.data.some(e => e.templatetype === 2 && e.recordstatus === 3)
     })
 })
 </script>