소스 검색

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP20_WEB_GLOBAL

li.shaoyi 2 년 전
부모
커밋
197c258071
3개의 변경된 파일15개의 추가작업 그리고 10개의 파일을 삭제
  1. 12 7
      src/business/bank/index.ts
  2. 1 1
      src/packages/pc/views/account/sign/components/cancel/index.vue
  3. 2 2
      src/packages/pc/views/account/sign/index.vue

+ 12 - 7
src/business/bank/index.ts

@@ -1,11 +1,12 @@
 import { reactive, shallowRef, computed } from 'vue'
-import { useAccountStore, useUserStore } from '@/stores'
+import { useAccountStore, useUserStore, useLoginStore } from '@/stores'
 import { t2bBankWithdraw, queryBankAccountSign, t2bBankDeposit, queryCusBankSignBank, t2bBankSign, t2bBankCancelSign, accountFundInfoReq } from '@/services/api/bank'
 import { SignStatus } from '@/constants/bank'
 import { decryptAES } from '@/services/websocket/package/crypto'
 import moment from "moment"
 
 const accountStore = useAccountStore()
+const loginStore = useLoginStore()
 
 // 提现请求
 export function useDoWithdraw() {
@@ -210,18 +211,23 @@ export function useDoCancelBankSign() {
     /// 获取当前是否已签约
     const sign = shallowRef<Model.BankAccountSignRsp[]>([])
 
-    const formRefresh = () => {
-        queryBankAccountSign().then((res) => {
+    const request = queryBankAccountSign({
+        data: {
+            userid: loginStore.userId
+        }
+    }).then((res) => {
+        if (res.data.length) {
             bankInfo.value = res.data[0];
             ({
                 currency: formData.Currency,
                 cusbankid: formData.CusBankID,
                 accountcode: formData.AccountCode,
             } = bankInfo.value ?? {})
-        })
-    }
+        }
+    })
 
     const cancelSubmit = async () => {
+        await request
         // await request
         loading.value = true
         /// 发起请求
@@ -240,8 +246,7 @@ export function useDoCancelBankSign() {
         cancelSubmit,
         formData,
         sign,
-        bankInfo,
-        formRefresh
+        bankInfo
     }
 }
 

+ 1 - 1
src/packages/pc/views/account/sign/components/cancel/index.vue

@@ -3,8 +3,8 @@
     <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
         <div>确认要解约吗?</div>
         <template #footer>
-            <el-button type="primary" @click="onCancelSumit()">提交</el-button>
             <el-button @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="primary" @click="onCancelSumit()">提交</el-button>
         </template>
     </app-drawer>
 </template>

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

@@ -7,7 +7,7 @@
         </template>
         <!-- 证件类型 -->
         <template #cardtype="{ value }">
-            {{ getCertificateTypeCodeName(value) }}
+            {{ getCertificateTypeCodeName(Number(value)) }}
         </template>
         <!-- 状态 -->
         <template #signstatus="{ value }">
@@ -19,7 +19,7 @@
                 <el-button v-if="row.signstatus === SignStatus.Signed" type="danger" size="small"
                     @click="showComponent('cancel', row)">解约</el-button>
                 <el-button v-if="[SignStatus.Unsigned, SignStatus.Refuse, SignStatus.Signed].includes(row.signstatus)"
-                    type="danger" size="small" @click="showComponent('sign', row)">修改</el-button>
+                    type="primary" size="small" @click="showComponent('sign', row)">修改</el-button>
             </div>
         </template>
     </app-table>