|
|
@@ -1,14 +1,19 @@
|
|
|
<template>
|
|
|
- <app-view>
|
|
|
+ <app-view class="g-form">
|
|
|
<template #header>
|
|
|
<app-navbar title="添加签约用户" />
|
|
|
</template>
|
|
|
<Form ref="formRef" class="g-form__container" @submit="formSubmit">
|
|
|
<CellGroup inset>
|
|
|
- <app-select v-model="formData.OpenBankAccId" name="BankName" label="开户银行" placeholder="请选择开户银行" :rules="formRules.OpenBankAccId" :options="banklist" />
|
|
|
- <Field name="BankNo" label="银行卡号" v-model="formData.BankAccountNo" placeholder="请输入银行卡账号" :rules="formRules.BankAccountNo" />
|
|
|
- <Field name="AccountName" label="姓名" v-model="formData.BankAccountName" placeholder="请输入银行卡账户名" :rules="formRules.BankAccountName" />
|
|
|
- <Field name="BranchBankName" label="支行名称" v-model="formData.OpenBankName" placeholder="请输入银行卡支行名称" :rules="formRules.OpenBankName" />
|
|
|
+ <app-select v-model="formData.OpenBankAccId" name="BankName" label="开户银行" placeholder="请选择开户银行"
|
|
|
+ :rules="formRules.OpenBankAccId" :options="banklist"
|
|
|
+ :optionProps="{ label: 'bankname', value: 'bankid' }" />
|
|
|
+ <Field name="BankNo" label="银行卡号" v-model="formData.BankAccountNo" placeholder="请输入银行卡账号"
|
|
|
+ :rules="formRules.BankAccountNo" />
|
|
|
+ <Field name="AccountName" label="姓名" v-model="formData.BankAccountName" placeholder="请输入银行卡账户名"
|
|
|
+ :rules="formRules.BankAccountName" />
|
|
|
+ <Field name="BranchBankName" label="支行名称" v-model="formData.OpenBankName" placeholder="请输入银行卡支行名称"
|
|
|
+ :rules="formRules.OpenBankName" />
|
|
|
<Field v-if="false" name="SignStatus" label="签约状态" readonly model-value="签约中" />
|
|
|
</CellGroup>
|
|
|
</Form>
|
|
|
@@ -22,7 +27,7 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
|
-import { shallowRef, computed } from 'vue'
|
|
|
+import { shallowRef } from 'vue'
|
|
|
import { CellGroup, Button, Field, Form, FormInstance, FieldRule, Toast } from 'vant'
|
|
|
import { fullloading, dialog } from '@/utils/vant'
|
|
|
import { doBankSign, } from '@/business/bank'
|
|
|
@@ -30,22 +35,15 @@ import { useNavigation } from '@/hooks/navigation'
|
|
|
import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
import { validateRules } from '@/constants/regex'
|
|
|
|
|
|
-const {router}=useNavigation()
|
|
|
-const { formData, onSubmit, cusSignBank } = doBankSign()
|
|
|
+const { router } = useNavigation()
|
|
|
+const { formData, onSubmit, banklist } = doBankSign()
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
|
|
|
-/// 银行列表
|
|
|
-const banklist=computed(()=> {
|
|
|
- return (cusSignBank.value?.Banklst ?? []).filter(obj=>{
|
|
|
- return obj.status == 0
|
|
|
- }).map((e)=>({label:e.bankname, value:e.bankid}))
|
|
|
-})
|
|
|
-
|
|
|
// 表单验证规则
|
|
|
const formRules: { [key in keyof Proto.t2bBankSignReq]?: FieldRule[] } = {
|
|
|
OpenBankAccId: [{
|
|
|
message: '请选择银行信息',
|
|
|
- validator:()=>{
|
|
|
+ validator: () => {
|
|
|
return !!formData.OpenBankAccId
|
|
|
}
|
|
|
}],
|