|
@@ -5,38 +5,52 @@
|
|
|
</template>
|
|
</template>
|
|
|
<Form ref="formRef" class="g-form__container" @submit="onSubmit">
|
|
<Form ref="formRef" class="g-form__container" @submit="onSubmit">
|
|
|
<CellGroup inset>
|
|
<CellGroup inset>
|
|
|
- <Field v-model="formData.username" name="username" :label="$t('user.authentication.customername')" :placeholder="$t('user.authentication.pleaseentertheusername')"
|
|
|
|
|
- :rules="formRules.username" />
|
|
|
|
|
|
|
+ <Field v-model="formData.username" name="username" :label="$t('user.authentication.customername')"
|
|
|
|
|
+ :placeholder="$t('user.authentication.pleaseentertheusername')" :rules="formRules.username" />
|
|
|
<Field name="cardtype" :label="$t('user.authentication.cardtype')" :rules="formRules.cardtype" is-link>
|
|
<Field name="cardtype" :label="$t('user.authentication.cardtype')" :rules="formRules.cardtype" is-link>
|
|
|
<template #input>
|
|
<template #input>
|
|
|
- <app-select v-model="formData.cardtype" :placeholder="$t('user.authentication.pleaseselectthecardtype')"
|
|
|
|
|
|
|
+ <app-select v-model="formData.cardtype"
|
|
|
|
|
+ :placeholder="$t('user.authentication.pleaseselectthecardtype')"
|
|
|
:options="getCerTypePersonList()" />
|
|
:options="getCerTypePersonList()" />
|
|
|
</template>
|
|
</template>
|
|
|
</Field>
|
|
</Field>
|
|
|
- <Field v-model="formData.cardnum" name="cardnum" :label="$t('user.authentication.cardnum')"
|
|
|
|
|
- :placeholder="$t('user.authentication.pleaseenterthecardnum')" :rules="formRules.cardnum" />
|
|
|
|
|
- <Field name="cardfrontphotourl" :label="$t('user.authentication.cardfrontphoto')" :rules="formRules.cardfrontphotourl">
|
|
|
|
|
|
|
+ <Field v-model="formData.cardnum" name="cardnum" :label="$t('user.authentication.cardnum')"
|
|
|
|
|
+ :placeholder="$t('user.authentication.pleaseenterthecardnum')" :rules="formRules.cardnum" />
|
|
|
|
|
+ <Field name="bankid" label="开户银行" :rules="formRules.bankid" is-link>
|
|
|
|
|
+ <template #input>
|
|
|
|
|
+ <app-select v-model="formData.bankid" placeholder="请选择开户银行" :options="banklist"
|
|
|
|
|
+ :optionProps="{ label: 'bankname', value: 'bankid' }" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </Field>
|
|
|
|
|
+ <Field label="银行卡号" v-model="formData.bankaccount" name="bankaccount" placeholder="请输入银行卡号"
|
|
|
|
|
+ :rules="formRules.bankaccount" />
|
|
|
|
|
+ <Field name="cardfrontphotourl" :label="$t('user.authentication.cardfrontphoto')"
|
|
|
|
|
+ :rules="formRules.cardfrontphotourl">
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<app-uploader @success="b_afterRead" />
|
|
<app-uploader @success="b_afterRead" />
|
|
|
</template>
|
|
</template>
|
|
|
</Field>
|
|
</Field>
|
|
|
- <Field name="cardbackphotourl" v-if="showCardBackPhoto === '1'" :label="$t('user.authentication.cardbackphoto')" :rules="formRules.cardbackphotourl">
|
|
|
|
|
|
|
+ <Field name="cardbackphotourl" v-if="showCardBackPhoto === '1'"
|
|
|
|
|
+ :label="$t('user.authentication.cardbackphoto')" :rules="formRules.cardbackphotourl">
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<app-uploader @success="f_afterRead" />
|
|
<app-uploader @success="f_afterRead" />
|
|
|
</template>
|
|
</template>
|
|
|
</Field>
|
|
</Field>
|
|
|
- <Field name="halfbodyphotourl" v-if="showHalfBodyPhoto === '1'" :label="halfBodyPhotoTitle" :rules="formRules.halfbodyphotourl">
|
|
|
|
|
|
|
+ <Field name="halfbodyphotourl" v-if="showHalfBodyPhoto === '1'" :label="halfBodyPhotoTitle"
|
|
|
|
|
+ :rules="formRules.halfbodyphotourl">
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<app-uploader @success="h_afterRead" />
|
|
<app-uploader @success="h_afterRead" />
|
|
|
</template>
|
|
</template>
|
|
|
</Field>
|
|
</Field>
|
|
|
- <Field v-if="modifyremark != ''" v-model="modifyremark" readonly name="modifyremark" :label="$t('user.authentication.modifyremark')" />
|
|
|
|
|
|
|
+ <Field v-if="modifyremark != ''" v-model="modifyremark" readonly name="modifyremark"
|
|
|
|
|
+ :label="$t('user.authentication.modifyremark')" />
|
|
|
</CellGroup>
|
|
</CellGroup>
|
|
|
</Form>
|
|
</Form>
|
|
|
<img src="../../../assets/images/certification.png" />
|
|
<img src="../../../assets/images/certification.png" />
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="g-form__footer inset">
|
|
<div class="g-form__footer inset">
|
|
|
- <Button type="danger" @click="formRef?.submit" round block>{{ $t('user.authentication.submit') }}</Button>
|
|
|
|
|
|
|
+ <Button type="danger" @click="formRef?.submit" round block>{{ $t('user.authentication.submit')
|
|
|
|
|
+ }}</Button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</app-view>
|
|
</app-view>
|
|
@@ -53,6 +67,7 @@ import { getIdCardAge } from '@/filters'
|
|
|
import { validateRules } from '@/constants/regex'
|
|
import { validateRules } from '@/constants/regex'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { getWskhOpenAccountConfigs } from '@/services/api/account'
|
|
import { getWskhOpenAccountConfigs } from '@/services/api/account'
|
|
|
|
|
+import { useQueryCusBankSignBank } from '@/business/bank'
|
|
|
import { i18n } from '@/stores'
|
|
import { i18n } from '@/stores'
|
|
|
import AppUploader from '@mobile/components/base/uploader/index.vue'
|
|
import AppUploader from '@mobile/components/base/uploader/index.vue'
|
|
|
import AppSelect from '@mobile/components/base/select/index.vue'
|
|
import AppSelect from '@mobile/components/base/select/index.vue'
|
|
@@ -60,12 +75,14 @@ import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
const { formData, formSubmit, modifyremark } = addAuthReq()
|
|
const { formData, formSubmit, modifyremark } = addAuthReq()
|
|
|
const { router } = useNavigation()
|
|
const { router } = useNavigation()
|
|
|
-const { global: { t }} = i18n
|
|
|
|
|
|
|
+const { global: { t } } = i18n
|
|
|
|
|
|
|
|
const showHalfBodyPhoto = shallowRef('0')
|
|
const showHalfBodyPhoto = shallowRef('0')
|
|
|
const showCardBackPhoto = shallowRef('0')
|
|
const showCardBackPhoto = shallowRef('0')
|
|
|
const halfBodyPhotoTitle = shallowRef(t('user.authentication.halfbodyphoto'))
|
|
const halfBodyPhotoTitle = shallowRef(t('user.authentication.halfbodyphoto'))
|
|
|
|
|
|
|
|
|
|
+const { banklist } = useQueryCusBankSignBank()
|
|
|
|
|
+
|
|
|
// 获取网上开户配置
|
|
// 获取网上开户配置
|
|
|
useRequest(getWskhOpenAccountConfigs, {
|
|
useRequest(getWskhOpenAccountConfigs, {
|
|
|
params: {
|
|
params: {
|
|
@@ -92,7 +109,7 @@ const h_afterRead = (filePath: string) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
|
-const formRules: { [key in keyof Model.AddAuthReq]?: FieldRule[] } = {
|
|
|
|
|
|
|
+const formRules: { [key:string]: FieldRule[] } = {
|
|
|
username: [{
|
|
username: [{
|
|
|
required: true,
|
|
required: true,
|
|
|
message: t("user.authentication.pleaseentertheusername"),
|
|
message: t("user.authentication.pleaseentertheusername"),
|
|
@@ -122,6 +139,21 @@ const formRules: { [key in keyof Model.AddAuthReq]?: FieldRule[] } = {
|
|
|
required: true,
|
|
required: true,
|
|
|
message: t("user.authentication.pleaseuploadthecardfrontphoto"),
|
|
message: t("user.authentication.pleaseuploadthecardfrontphoto"),
|
|
|
}],
|
|
}],
|
|
|
|
|
+ bankid: [{
|
|
|
|
|
+ message: '请选择开户银行',
|
|
|
|
|
+ validator: () => {
|
|
|
|
|
+ return !!formData.bankid
|
|
|
|
|
+ }
|
|
|
|
|
+ }],
|
|
|
|
|
+ bankaccount: [{
|
|
|
|
|
+ message: '请输入银行卡号',
|
|
|
|
|
+ validator: (val) => {
|
|
|
|
|
+ if (validateRules.bankcardno.validate(val)) {
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+ return validateRules.bankcardno.message
|
|
|
|
|
+ }
|
|
|
|
|
+ }],
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const onSubmit = () => {
|
|
const onSubmit = () => {
|