|
@@ -1,3 +1,4 @@
|
|
|
|
|
+<!-- 充值-界面 -->
|
|
|
<template>
|
|
<template>
|
|
|
<app-view class="g-form bank-wallet-deposit">
|
|
<app-view class="g-form bank-wallet-deposit">
|
|
|
<Form ref="formRef" class="g-form__container" @submit="doDepositWarning">
|
|
<Form ref="formRef" class="g-form__container" @submit="doDepositWarning">
|
|
@@ -28,9 +29,21 @@
|
|
|
<Cell :title="$t('mine.balance')" :value="currentAccount.currentbalance?.toFixed(2)" />
|
|
<Cell :title="$t('mine.balance')" :value="currentAccount.currentbalance?.toFixed(2)" />
|
|
|
<Cell :title="$t('banksign.wallet.withdraw.bankaccountname')"
|
|
<Cell :title="$t('banksign.wallet.withdraw.bankaccountname')"
|
|
|
:value="handleNoneValue(sign.bankaccountname)" />
|
|
:value="handleNoneValue(sign.bankaccountname)" />
|
|
|
- <Cell :title="$t('banksign.wallet.withdraw.bankname')" :value="handleNoneValue(sign.bankname)" />
|
|
|
|
|
- <Cell :title="$t('banksign.wallet.withdraw.bankaccountno')"
|
|
|
|
|
|
|
+ <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)" />
|
|
:value="handleNoneValue(sign.bankaccountno)" />
|
|
|
|
|
+ <Field v-if="sign.ismix === 1" label="银行渠道" 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" label="银行名称" 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>
|
|
|
</CellGroup>
|
|
</CellGroup>
|
|
|
<CellGroup>
|
|
<CellGroup>
|
|
|
<Cell :title="$t('banksign.wallet.deposit.platformdepositbankname')" v-if="msg_320">
|
|
<Cell :title="$t('banksign.wallet.deposit.platformdepositbankname')" v-if="msg_320">
|
|
@@ -83,12 +96,13 @@ import { useDoDeposit, useDoCusBankExtendConfigs } from '@/business/bank'
|
|
|
import { getServerTime } from '@/services/api/common'
|
|
import { getServerTime } from '@/services/api/common'
|
|
|
import { useUserStore, useAccountStore, i18n } from '@/stores'
|
|
import { useUserStore, useAccountStore, i18n } from '@/stores'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
import { useComponent } from '@/hooks/component'
|
|
|
|
|
+import { handleNoneValue } from '@/filters'
|
|
|
import Stepper from '@mobile/components/base/stepper/index.vue'
|
|
import Stepper from '@mobile/components/base/stepper/index.vue'
|
|
|
|
|
+import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
|
-import { handleNoneValue } from '@/filters'
|
|
|
|
|
|
|
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
-const { formData, onSubmit, sign } = useDoDeposit()
|
|
|
|
|
|
|
+const { formData, onSubmit, sign, hybrids, channel_code, bank_code } = useDoDeposit()
|
|
|
const { getSystemParamValue } = useUserStore()
|
|
const { getSystemParamValue } = useUserStore()
|
|
|
const { configs, cusBank, startTime, endTime } = useDoCusBankExtendConfigs(2)
|
|
const { configs, cusBank, startTime, endTime } = useDoCusBankExtendConfigs(2)
|
|
|
const certificate_photo_url = ref('')
|
|
const certificate_photo_url = ref('')
|
|
@@ -97,6 +111,9 @@ const { global: { t } } = i18n
|
|
|
|
|
|
|
|
const accountStore = useAccountStore()
|
|
const accountStore = useAccountStore()
|
|
|
const { currentAccount } = accountStore.$toRefs()
|
|
const { currentAccount } = accountStore.$toRefs()
|
|
|
|
|
+const { mobile2 } = userStore.userInfo
|
|
|
|
|
+
|
|
|
|
|
+const channel_banks = shallowRef<Model.HybridBank[]>([])
|
|
|
|
|
|
|
|
const msg_320 = getSystemParamValue('320')
|
|
const msg_320 = getSystemParamValue('320')
|
|
|
const msg_321 = getSystemParamValue('321')
|
|
const msg_321 = getSystemParamValue('321')
|
|
@@ -118,6 +135,13 @@ const onRadioChange = (value: number) => {
|
|
|
formData.Amount = value
|
|
formData.Amount = value
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const onHibirdChange = (code: string) => {
|
|
|
|
|
+ // 银行信息
|
|
|
|
|
+ channel_banks.value = hybrids.value.find(e => e.channel_code === code)?.bank_infos.filter(e => e.out_in_flag === 1 && e.is_enabled === 1) ?? []
|
|
|
|
|
+ // 默认选中第一个
|
|
|
|
|
+ if(channel_banks.value.length) { bank_code.value = channel_banks.value[0].bank_code ?? '' }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
|
const formRules: { [key: string]: FieldRule[] } = {
|
|
const formRules: { [key: string]: FieldRule[] } = {
|
|
|
Amount: [{
|
|
Amount: [{
|
|
@@ -170,13 +194,22 @@ const onCopy = (status: boolean) => {
|
|
|
const formSubmit = () => {
|
|
const formSubmit = () => {
|
|
|
fullloading((hideLoading) => {
|
|
fullloading((hideLoading) => {
|
|
|
const obj: { [key: string]: unknown } = Object.create({})
|
|
const obj: { [key: string]: unknown } = Object.create({})
|
|
|
|
|
+ const hybrid: { [key: string]: unknown } = Object.create({})
|
|
|
configs.value.forEach((e) => {
|
|
configs.value.forEach((e) => {
|
|
|
if (e.value) {
|
|
if (e.value) {
|
|
|
obj[e.fieldcode] = e.value
|
|
obj[e.fieldcode] = e.value
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+ // 拓展信息
|
|
|
|
|
+ hybrid['channel_code'] = channel_code.value
|
|
|
|
|
+ hybrid['bank_code'] = bank_code.value
|
|
|
obj['certificate_photo_url'] = certificate_photo_url.value
|
|
obj['certificate_photo_url'] = certificate_photo_url.value
|
|
|
- formData.extendInfo = JSON.stringify(obj)
|
|
|
|
|
|
|
+ obj['hybrid'] = hybrid
|
|
|
|
|
+ if (channel_code.value === 'chillpay') {
|
|
|
|
|
+ const personinfo: { [key: string]: unknown } = Object.create({})
|
|
|
|
|
+ personinfo['phone_number'] = mobile2
|
|
|
|
|
+ hybrid['person_info'] = personinfo
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
let isComplete = false // 请求是否结束
|
|
let isComplete = false // 请求是否结束
|
|
|
const complete = () => {
|
|
const complete = () => {
|
|
@@ -190,7 +223,10 @@ const formSubmit = () => {
|
|
|
|
|
|
|
|
// 请求等待可能会超过30秒导致请求超时,所以2秒内没回应直接提示成功
|
|
// 请求等待可能会超过30秒导致请求超时,所以2秒内没回应直接提示成功
|
|
|
const t = setTimeout(() => complete(), 2000)
|
|
const t = setTimeout(() => complete(), 2000)
|
|
|
|
|
+ formData.extendInfo = JSON.stringify(obj)
|
|
|
|
|
|
|
|
|
|
+ console.log(formData.extendInfo)
|
|
|
|
|
+
|
|
|
onSubmit().then(() => {
|
|
onSubmit().then(() => {
|
|
|
if (!isComplete) {
|
|
if (!isComplete) {
|
|
|
complete()
|
|
complete()
|