Przeglądaj źródła

中融文通实名认证增加开户银行以及未签合约可以进行出入金修改

Handy_Cao 1 rok temu
rodzic
commit
26659333f1

+ 6 - 1
src/business/bank/index.ts

@@ -348,7 +348,12 @@ export function useQueryCusBankSignBank() {
         }
     })
 
-    return { cusBank, request }
+    /// 银行列表
+    const banklist = computed(() => {
+        return (cusBank.value?.Banklst ?? []).filter(e => e.status == 0)
+    })
+
+    return { cusBank, banklist, request }
 }
 
 /// 银行获取手机验证码请求

+ 25 - 6
src/packages/zrwyt/views/account/certification/Index.vue

@@ -7,8 +7,15 @@
             <!-- 个人 -->
             <CellGroup v-if="getUserInfoType() === 1" inset>
                 <Field v-model="person.realName" :readonly="isReadonly && person.realName != ''" name="realName" label="姓名" placeholder="请输入用户姓名" :rules="PFormRules.realName" />
-                <Field v-model="person.mobile" name="mobile" readonly label="手机号码" :rules="PFormRules.mobile"/>
-                <Field v-model="person.bankCard" :readonly="isReadonly && person.bankCard != ''" name="bankCard" label="银行卡号" placeholder="请输入银行卡号" :rules="PFormRules.bankCard" />
+                <Field v-model="person.mobile" name="mobile" readonly label="预留手机号" :rules="PFormRules.mobile"/>
+                <Field name="bankId" label="开户银行" :rules="PFormRules.bankId" is-link>
+                    <template #input>
+                        <app-select v-model="person.bankId" placeholder="请选择开户银行" :options="banklist"
+                            :optionProps="{ label: 'bankname', value: 'bankid' }" />
+                    </template>
+                </Field>
+                <Field label="银行卡号" v-model="person.bankCard" :readonly="isReadonly && person.bankCard != ''" name="bankCard" placeholder="请输入银行卡号" :rules="PFormRules.bankCard" />
+                <span style="font-size: 12px; padding-left: 15px; color: #FF162F;">此银行卡作为后续签约银行卡,请谨慎填写</span>
                 <Field v-model="person.idCardNo" :readonly="isReadonly && person.idCardNo != ''" name="idCardNo" label="证件号码" placeholder="请输入证件号码" :rules="PFormRules.idCardNo" />
                 <Field name="idCardPhoto" label="证件正面照片" :rules="PFormRules.idCardPhoto">
                     <template #input>
@@ -56,7 +63,7 @@
 <script lang="ts" setup>
 import { shallowRef, onMounted, ref, defineAsyncComponent } from 'vue'
 import { useComponent } from '@/hooks/component'
-import { CellGroup, Button, Field, Form, FormInstance, showFailToast, FieldRule, Image } from 'vant'
+import { CellGroup, Button, Field, Form, FormInstance, showFailToast, FieldRule, Image, Cell } from 'vant'
 import { fullloading, dialog } from '@/utils/vant';
 import { getFileUrl, getIdCardAge } from '@/filters';
 import { useRequest } from '@/hooks/request'
@@ -66,14 +73,16 @@ import { validateRules } from '@/constants/regex';
 import { useUserStore } from '@/stores'
 import { useNavigation } from '@mobile/router/navigation'
 import { getUserId, getMemberUserId, getUserInfoType } from '@/services/methods/user'
-import AppUploader from '@mobile/components/base/uploader/index.vue'
 import { decryptAES } from '@/services/websocket/package/crypto';
 import { queryBankAccountSign } from '@/services/api/bank'
+import { useQueryCusBankSignBank } from '@/business/bank';
+import AppUploader from '@mobile/components/base/uploader/index.vue'
+import AppSelect from '@mobile/components/base/select/index.vue'
 
 const componentMap = new Map<string, unknown>([
     ['captcha', defineAsyncComponent(() => import('./components/captcha/Index.vue'))],
 ])
-
+const { banklist } = useQueryCusBankSignBank()
 const { router } = useNavigation()
 const userStore = useUserStore()
 const formRef = shallowRef<FormInstance>()
@@ -133,6 +142,9 @@ const PFormRules: { [key in keyof Model.PersonBankCard4]?: FieldRule[] } = {
     realName: [{
         required: true,
         message: '请输入用户姓名',
+        validator: () => {
+            return !!person.value.realName
+        }
     }],
     mobile: [{
         required: true,
@@ -144,6 +156,12 @@ const PFormRules: { [key in keyof Model.PersonBankCard4]?: FieldRule[] } = {
             return validateRules.phone.message
         }
     }],
+    bankId: [{
+        message: '请选择开户银行',
+        validator: () => {
+            return !!person.value.bankId
+        }
+    }],
     bankCard: [{
         required: true,
         message: '请输入银行卡号',
@@ -266,13 +284,14 @@ const onCheckCardNum = () => {
 }
 
 onMounted(() => {
-    const { customername, mobile2, cardnum, bankaccount } = userStore.userInfo
+    const { customername, mobile2, cardnum, bankaccount, bankid } = userStore.userInfo
     // 个人
     if (getUserInfoType() === 1) {
         person.value.idCardNo = decryptAES(cardnum)
         person.value.mobile = mobile2
         person.value.realName = customername
         person.value.bankCard = decryptAES(bankaccount)
+        person.value.bankId = bankid
     } else {
         // 企业
         company.value.mobile = mobile2

+ 0 - 1
src/services/api/account/index.ts

@@ -314,7 +314,6 @@ export function requestCaptchaVerify(config: RequestConfig<Model.CaptchaVerifyRe
     })
 }
 
-
 /**
  * 查询用户电子签记录表-爱签
  */

+ 2 - 0
src/types/model/user.d.ts

@@ -248,6 +248,8 @@ declare namespace Model {
     }
 
     interface PersonBankCard4 {
+        /// 银行编码
+        bankId?: string
         // 银行卡号(仅限印有“银联”字样的银行卡)
         bankCard?: string
         // 身份证号