|
|
@@ -5,7 +5,10 @@
|
|
|
</template>
|
|
|
<Form ref="formRef" class="g-form__container" @submit="formSubmit">
|
|
|
<CellGroup inset>
|
|
|
- <Field name="BankName" is-link label="开户银行" placeholder="请选择银行信息" @click="showPicker = true" />
|
|
|
+ <!-- <Field name="BankName" is-link label="开户银行" placeholder="请选择银行信息" @click="showPicker = true" /> -->
|
|
|
+ <app-select v-model="formData.OpenBankAccId" name="BankName" label="开户银行"
|
|
|
+ :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" />
|
|
|
@@ -26,12 +29,13 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
|
-import { shallowRef } from 'vue'
|
|
|
+import { shallowRef,computed } from 'vue'
|
|
|
import { CellGroup, Button, Field, Form, FormInstance, FieldRule, Toast, Picker, Popup } from 'vant'
|
|
|
import { fullloading, dialog } from '@/utils/vant'
|
|
|
import { doBankSign } from '@/business/bank'
|
|
|
import { ref } from 'vue';
|
|
|
import { useNavigation } from '@/hooks/navigation'
|
|
|
+import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
|
|
|
const {router}=useNavigation()
|
|
|
const { formData, onSubmit, cusSignBank } = doBankSign()
|
|
|
@@ -39,8 +43,9 @@ const result = ref('');
|
|
|
const showPicker = ref(false);
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
|
|
|
-/// 获取银行信息
|
|
|
-const columns = ['杭州', '宁波', '温州', '绍兴', '湖州', '嘉兴', '金华'];
|
|
|
+const banklist=computed(()=> {
|
|
|
+ return (cusSignBank.value[0]?.Banklst ?? []).map((e)=>({label:e.bankname,value:e.bankid}))
|
|
|
+})
|
|
|
|
|
|
const onConfirm = (value: any) => {
|
|
|
result.value = value;
|
|
|
@@ -49,6 +54,12 @@ const onConfirm = (value: any) => {
|
|
|
|
|
|
// 表单验证规则
|
|
|
const formRules: { [key in keyof Proto.t2bBankSignReq]?: FieldRule[] } = {
|
|
|
+ OpenBankAccId: [{
|
|
|
+ message: '请选择银行信息',
|
|
|
+ validator:()=>{
|
|
|
+ return !!formData.OpenBankAccId
|
|
|
+ }
|
|
|
+ }],
|
|
|
BankAccountNo: [{
|
|
|
required: true,
|
|
|
message: '请输入银行卡账号',
|