|
|
@@ -25,22 +25,28 @@
|
|
|
<Cell v-if="sign.ismix === 0" :title="$t('banksign.wallet.withdraw.bankaccountname')" :value="handleNoneValue(sign.bankaccountname)" />
|
|
|
<Cell v-if="sign.ismix === 0" :title="$t('banksign.wallet.withdraw.bankname')" :value="handleNoneValue(sign.bankname)" />
|
|
|
<Cell v-if="sign.ismix === 0" :title="$t('banksign.wallet.withdraw.bankaccountno')" :value="handleNoneValue(sign.bankaccountno)" />
|
|
|
- <Field v-if="sign.ismix === 1" name="bankaccountname" :label="$t('banksign.wallet.withdraw.bankaccountname')" v-model.trim="sign.bankaccountname" @click="showReciver = true" is-link readonly />
|
|
|
- <Field v-if="sign.ismix === 1" type="number" name="phone_number" label="电话号码" maxlength="30" v-model.trim="onboard.phone_number" :placeholder="$t('banksign.Pleaseenterbankaccountno')"
|
|
|
- :rules="formRules.phone_number" />
|
|
|
- <Field v-if="sign.ismix === 1" type="number" name="cert_no" label="证件号码" maxlength="30" v-model.trim="onboard.cert_no" placeholder="请输入证件号码" :rules="formRules.cert_no" />
|
|
|
- <Field v-if="sign.ismix === 1" label="银行渠道" name="channel_code" is-link >
|
|
|
+ <Field v-if="sign.ismix === 1" name="bankaccountname" :label="$t('banksign.wallet.withdraw.bankaccountname')"
|
|
|
+ v-model.trim="sign.bankaccountname" @click="showReciver = true" is-link readonly />
|
|
|
+ <Field v-if="sign.ismix === 1" type="number" name="phone_number" :label="$t('banksign.mobilephone')" maxlength="30" v-model.trim="onboard.phone_number" :placeholder="$t('banksign.Pleaseenterbankaccountno')"
|
|
|
+ :rules="formRules.phone_number" />
|
|
|
+ <Field v-if="sign.ismix === 1" type="number" name="cert_no" :label="$t('banksign.cardno')" maxlength="30" v-model.trim="onboard.cert_no" :placeholder="$t('user.authentication.pleaseenterthecardnum')" :rules="formRules.cert_no" />
|
|
|
+ <Field v-if="sign.ismix === 1" :label="$t('banksign.bankchannel')" name="channel_code" is-link >
|
|
|
<template #input>
|
|
|
<app-select v-model="channel_code" :options="hybrids" :optionProps="{ label: 'channel_name', value: 'channel_code' }"
|
|
|
@confirm="onHibirdChange"/>
|
|
|
</template>
|
|
|
</Field>
|
|
|
- <Field v-if="sign.ismix === 1 && channel_banks.length != 0" label="银行名称" name="bank_code" is-link >
|
|
|
+ <Field v-if="sign.ismix === 1" label="银行类型" name="channel_code" is-link >
|
|
|
+ <template #input>
|
|
|
+ <app-select v-model="method_type" :options="methodTypes" @confirm="onMethodTypeChange"/>
|
|
|
+ </template>
|
|
|
+ </Field>
|
|
|
+ <Field v-if="sign.ismix === 1 && channel_banks.length != 0" :label="$t('banksign.bankname1')" name="bank_code" is-link >
|
|
|
<template #input>
|
|
|
<app-select v-model="bank_code" :options="channel_banks" :optionProps="{ label: 'bank_name', value: 'bank_code' }" />
|
|
|
</template>
|
|
|
</Field>
|
|
|
- <Field v-if="sign.ismix === 1" type="number" name="bank_account" label="银行卡号" maxlength="30" v-model.trim="onboard.bank_account" :placeholder="$t('banksign.Pleaseenterbankaccountno')"
|
|
|
+ <Field v-if="sign.ismix === 1" type="number" name="bank_account" :label="$t('banksign.bankno')" maxlength="30" v-model.trim="onboard.bank_account" :placeholder="$t('banksign.Pleaseenterbankaccountno')"
|
|
|
:rules="formRules.bank_account" />
|
|
|
</CellGroup>
|
|
|
<CellGroup v-if="msg_317">
|
|
|
@@ -72,10 +78,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { reactive, shallowRef, defineAsyncComponent } from 'vue'
|
|
|
+import { reactive, shallowRef, defineAsyncComponent, computed } from 'vue'
|
|
|
import { Form, Field, Cell, CellGroup, FormInstance, Button, FieldRule } from 'vant'
|
|
|
import { fullloading, dialog, } from '@/utils/vant'
|
|
|
-import { useDoWithdraw, useAccountFundInfo, useDoCusBankExtendConfigs } from '@/business/bank'
|
|
|
+import { useDoWithdraw, useAccountFundInfo, useDoCusBankExtendConfigs, getMethodTypeKeys } from '@/business/bank'
|
|
|
import { getServerTime } from '@/services/api/common'
|
|
|
import { useNavigation } from '@mobile/router/navigation'
|
|
|
import { useUserStore, i18n } from '@/stores'
|
|
|
@@ -83,7 +89,7 @@ import { handleNoneValue } from '@/filters'
|
|
|
import moment from 'moment'
|
|
|
import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
|
|
|
-const { formData, onSubmit, sign, hybrids, channel_code, bank_code, channel_banks } = useDoWithdraw()
|
|
|
+const { formData, onSubmit, sign, hybrids, channel_code, bank_code, method_type, method_types, channel_banks } = useDoWithdraw()
|
|
|
const { configs, cusBank, startTime, endTime } = useDoCusBankExtendConfigs(3)
|
|
|
|
|
|
/// 资金账户信息
|
|
|
@@ -105,6 +111,10 @@ const onboard = reactive<Partial<Model.HybridReceiverOnboard>>({
|
|
|
receiver_type: userinfotype === 1 ? 'Individual' : 'Organization'
|
|
|
})
|
|
|
|
|
|
+const methodTypes = computed(() => {
|
|
|
+ return method_types.value.map(e => { return { label: e, value: e } })
|
|
|
+})
|
|
|
+
|
|
|
// 选择接收人信息
|
|
|
const onChange = (item: Model.HybridReceiverOnboard) => {
|
|
|
channel_code.value = item.channel_code
|
|
|
@@ -117,9 +127,26 @@ const onChange = (item: Model.HybridReceiverOnboard) => {
|
|
|
}
|
|
|
|
|
|
const onHibirdChange = (code: string) => {
|
|
|
- channel_banks.value = hybrids.value.find(e => e.channel_code === code)?.bank_infos.filter(e => e.out_in_flag === 0 && e.is_enabled === 1) ?? []
|
|
|
- if(channel_banks.value.length && bank_code.value) {
|
|
|
- bank_code.value = channel_banks.value[0].bank_code ?? ''
|
|
|
+ // 默认选择第一个下面的银行类型
|
|
|
+ const hybird = hybrids.value.filter(e => e.channel_code === code)[0]
|
|
|
+ method_types.value = getMethodTypeKeys(hybird.out_bank_infos)
|
|
|
+ if (method_types.value.length != 0) {
|
|
|
+ method_type.value = method_types.value[0]
|
|
|
+ // 默认去下面的银行信息
|
|
|
+ channel_banks.value = hybird.out_bank_infos[method_type.value]
|
|
|
+ if (channel_banks.value.length != 0) {
|
|
|
+ bank_code.value = channel_banks.value[0].bank_code
|
|
|
+ console.log(method_types.value, method_type.value, hybird.out_bank_infos[method_type.value], bank_code.value)
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const onMethodTypeChange = (code: string) => {
|
|
|
+ // 默认选择第一个下面的银行类型
|
|
|
+ const hybird = hybrids.value.filter(e => e.channel_code === channel_code.value)[0]
|
|
|
+ channel_banks.value = hybird.out_bank_infos[code]
|
|
|
+ if (channel_banks.value.length != 0) {
|
|
|
+ bank_code.value = channel_banks.value[0].bank_code
|
|
|
}
|
|
|
}
|
|
|
|