|
|
@@ -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
|