Handy_Cao 1 рік тому
батько
коміт
dfa660033a

+ 6 - 4
src/packages/mobile/views/swap/list/Index.vue

@@ -66,7 +66,7 @@ const { router, getQueryString, setGlobalUrlParams } = useNavigation()
 const futuresStore = useFuturesStore()
 const userStore = useUserStore()
 const subscribe = quoteSocket.createSubscribe()
-const canBankSign = shallowRef(false)
+const canProtocolSign = shallowRef(false)
 const oem = service.getConfig('oem')
 const title = getQueryString('title')
 const titleName = computed(() => title ? decodeURIComponent(title) : props.marketSection?.displayname ?? '掉期贸易')
@@ -126,7 +126,7 @@ const columns: Model.TableColumn[] = [
 const rowClick = (row: Model.QuoteGoodsListRsp) => {
     /// 这里要去判断是否已经实名认证
     if (userStore.hasAuth) {
-        if (userStore.userInfo.usertype != 2 && !canBankSign.value) {
+        if (userStore.userInfo.usertype != 2 && !canProtocolSign.value) {
             showToast('请先通过“我的”-“合同签署”功能菜单签署相应的合同!')
         } else {
             setGlobalUrlParams(row)
@@ -145,6 +145,8 @@ const { run: initMdUserSwapProtocol } = useRequest(requestInitMdUserSwapProtocol
         memberUserId: getMemberUserId()
     },
     onSuccess: () => {
+        /// 可以交易
+        canProtocolSign.value = true
         /// 重新请求
         showToast('合同已提交签署请求,请耐心等待审核通过!')
     }
@@ -164,12 +166,12 @@ onActivated(() => {
         }
     }).then((res) => {
         if (oem === 'tjmd') { // 天津麦顿
-            canBankSign.value = res.data.some(e => e.protocolstatus === 4)
+            canProtocolSign.value = res.data.some(e => e.protocolstatus === 4)
         } else {
             if (res.data.length === 0) {
                 initMdUserSwapProtocol()
             } else {
-                canBankSign.value = res.data.some(e => e.protocolstatus === 4)
+                canProtocolSign.value = res.data.some(e => e.protocolstatus === 4)
             }
         }
     })

+ 3 - 2
src/packages/pc/views/account/holddeposit/index.vue

@@ -16,7 +16,7 @@
         </template>
          <!-- 状态 -->
          <template #billresult="{ value }">
-            {{ value === 0 ? '扣费成功' : '扣费失败' }}
+            {{ getBillResultName(Number(value)) }}
         </template>
     </app-table>
     <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
@@ -32,9 +32,10 @@ import { useComposeTable } from '@pc/components/base/table'
 import { useRequest } from '@/hooks/request'
 import { queryGtwithholddepositapply, queryGetGtwithholdsigninfo } from '@/services/api/bank'
 import { SignStatus } from '@/constants/bank'
+import { getBillResultName } from '@/constants/order'
+import { formatDate } from '@/filters'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppFilter from '@pc/components/base/table-filter/index.vue'
-import { formatDate } from '@/filters'
 
 const componentMap = new Map<string, unknown>([
     ['deposit', defineAsyncComponent(() => import('./components/deposit/index.vue'))],

+ 0 - 3
src/packages/pc/views/account/holdsign/index.vue

@@ -81,14 +81,11 @@ const showComponent = ((componentName: string) => {
 const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'jfhm', label: ' 用户编号' },
     { prop: 'accountsignstatus', label: '账户签约状态' },
-    // { prop: 'yckfxe', label: '一次扣费限额' },
     { prop: 'xyqsrq', label: '协议签署日期' },
     { prop: 'xysxrq', label: '协议生效日期' },
     { prop: 'xydqrq', label: '协议到期日期' },
     { prop: 'kksjdw', label: '扣款单位时间' },
     { prop: 'kksjbc', label: '扣款时间步长' },
-    // { prop: 'kkzqnkfxe', label: '扣款周期内扣费限额' },
-    // { prop: 'kkzqnxzbs', label: '扣费周期内限制笔数' },
 ])
 
 </script>

+ 23 - 4
src/packages/thj/views/mine/Index.vue

@@ -148,10 +148,12 @@ import { useNavigation } from '@mobile/router/navigation'
 import { AuthStatus } from '@/constants/account'
 import { queryBankAccountSign } from '@/services/api/bank'
 import { useLoginStore, useAccountStore, useUserStore } from '@/stores'
+import { useRequest } from '@/hooks/request'
+import { getMemberUserId, getUserId } from '@/services/methods/user'
+import { queryMdUserSwapProtocol } from '@/services/api/swap'
+import { requestInitMdUserSwapProtocol } from '@/services/api/account'
 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()
@@ -225,6 +227,19 @@ const userLogout = () => {
     })
 }
 
+/// 创建电子签合同
+const { run: initMdUserSwapProtocol } = useRequest(requestInitMdUserSwapProtocol, {
+    manual: true,
+    params: {
+        userId: getUserId(),
+        memberUserId: getMemberUserId()
+    },
+    onSuccess: () => {
+        /// 可以交易
+        canBankSign.value = true
+    }
+})
+
 onActivated(() => {
     if (authStatus.value !== AuthStatus.Certified) {
         userStore.getUserData()
@@ -243,8 +258,12 @@ onActivated(() => {
             userId: loginStore.userId
         }
     }).then((res) => {
-        /// 判断是否能签约
-        canBankSign.value = res.data.some(e => e.protocolstatus === 4)
+        if (res.data.length === 0) {
+            initMdUserSwapProtocol()
+        } else {
+            /// 判断是否能签约
+            canBankSign.value = res.data.some(e => e.protocolstatus === 4)
+        }
     })
 })
 </script>