|
|
@@ -22,22 +22,35 @@
|
|
|
</template>
|
|
|
</CellGroup>
|
|
|
<CellGroup>
|
|
|
- <Cell :title="$t('banksign.wallet.withdraw.bankaccountname')"
|
|
|
- :value="handleNoneValue(sign.bankaccountname)" />
|
|
|
+ <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)" />
|
|
|
+ <Cell v-if="sign.ismix === 0" :title="$t('banksign.wallet.withdraw.bankaccountno')" :value="handleNoneValue(sign.bankaccountno)" />
|
|
|
+ <Field label="接收者类型">
|
|
|
+ <template #input>
|
|
|
+ <RadioGroup v-model="onboard.receiver_type" direction="horizontal">
|
|
|
+ <Radio v-for="(item, index) in [{value: 'Individual', label: '个人'}, {value: 'Organization', label: '组织'}]" :key="index" :name="item.value">{{
|
|
|
+ item.label
|
|
|
+ }}</Radio>
|
|
|
+ </RadioGroup>
|
|
|
+ </template>
|
|
|
+ </Field>
|
|
|
+ <Field v-if="sign.ismix === 1" name="name" label="姓名" v-model.trim="onboard.name" placeholder="姓名" :rules="formRules.name" />
|
|
|
+ <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 >
|
|
|
<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 >
|
|
|
+ <Field v-if="sign.ismix === 1 && channel_banks.length != 0" 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>
|
|
|
+ <Field v-if="sign.ismix === 1" type="number" name="bank_account" label="银行卡号" maxlength="30" v-model.trim="onboard.bank_account" :placeholder="$t('banksign.Pleaseenterbankaccountno')"
|
|
|
+ :rules="formRules.bank_account" />
|
|
|
</CellGroup>
|
|
|
<CellGroup v-if="msg_317">
|
|
|
<Cell :title="$t('common.tips')">
|
|
|
@@ -67,10 +80,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef } from 'vue'
|
|
|
-import { Form, Field, Cell, CellGroup, FormInstance, Button, FieldRule } from 'vant'
|
|
|
+import { reactive, shallowRef } from 'vue'
|
|
|
+import { Form, Field, Cell, CellGroup, FormInstance, Button, FieldRule, RadioGroup, Radio } from 'vant'
|
|
|
import { fullloading, dialog, } from '@/utils/vant'
|
|
|
-import { useDoWithdraw, useAccountFundInfo, useDoCusBankExtendConfigs } from '@/business/bank'
|
|
|
+import { useDoWithdraw, useAccountFundInfo, useDoCusBankExtendConfigs, useQueryHybridReceiverOnboards } from '@/business/bank'
|
|
|
import { getServerTime } from '@/services/api/common'
|
|
|
import { useNavigation } from '@mobile/router/navigation'
|
|
|
import { useUserStore, i18n } from '@/stores'
|
|
|
@@ -80,6 +93,8 @@ import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
|
|
|
const { formData, onSubmit, sign, hybrids, channel_code, bank_code } = useDoWithdraw()
|
|
|
const { configs, cusBank, startTime, endTime } = useDoCusBankExtendConfigs(3)
|
|
|
+const { receivers } = useQueryHybridReceiverOnboards()
|
|
|
+
|
|
|
/// 资金账户信息
|
|
|
const { fund } = useAccountFundInfo()
|
|
|
const { router } = useNavigation()
|
|
|
@@ -87,9 +102,17 @@ const formRef = shallowRef<FormInstance>()
|
|
|
const { getSystemParamValue } = useUserStore()
|
|
|
const msg = getSystemParamValue('302')
|
|
|
const msg_317 = getSystemParamValue('317')
|
|
|
-const userStore = useUserStore()
|
|
|
const { global: { t } } = i18n
|
|
|
|
|
|
+const userStore = useUserStore()
|
|
|
+const { mobile2, cardnum } = userStore.userInfo
|
|
|
+
|
|
|
+const onboard = reactive<Partial<Model.HybridReceiverOnboard>>({
|
|
|
+ phone_number: mobile2,
|
|
|
+ cert_no: cardnum,
|
|
|
+ receiver_type: 'Individual'
|
|
|
+})
|
|
|
+
|
|
|
const channel_banks = shallowRef<Model.HybridBank[]>([])
|
|
|
|
|
|
const onHibirdChange = (code: string) => {
|
|
|
@@ -145,12 +168,30 @@ const doWithDrawWarning = () => {
|
|
|
|
|
|
const formSubmit = () => {
|
|
|
const obj: { [key: string]: unknown } = Object.create({})
|
|
|
+ // 拓展信息
|
|
|
configs.value.forEach((e) => {
|
|
|
if (e.value) {
|
|
|
obj[e.fieldcode] = e.value
|
|
|
}
|
|
|
})
|
|
|
- formData.extendInfo = JSON.stringify(obj)
|
|
|
+
|
|
|
+ if (channel_code.value != 'autobank') {
|
|
|
+ const hybrid: { [key: string]: unknown } = Object.create({})
|
|
|
+ // 拓展信息
|
|
|
+ hybrid['channel_code'] = channel_code.value
|
|
|
+ hybrid['bank_code'] = bank_code.value
|
|
|
+ if (channel_code.value === 'chillpay') {
|
|
|
+ const receiver: { [key: string]: unknown } = Object.create({})
|
|
|
+ receiver['phone_number'] = mobile2
|
|
|
+ receiver['bank_account'] = onboard.bank_account
|
|
|
+ receiver['cert_no'] = onboard.cert_no
|
|
|
+ receiver['name'] = onboard.name
|
|
|
+ receiver['receiver_type'] = 'Individual'
|
|
|
+ hybrid['receiver_onboard'] = receiver
|
|
|
+ }
|
|
|
+ obj['hybrid'] = hybrid
|
|
|
+ }
|
|
|
+
|
|
|
fullloading((hideLoading) => {
|
|
|
let isComplete = false // 请求是否结束
|
|
|
const complete = () => {
|
|
|
@@ -162,6 +203,7 @@ const formSubmit = () => {
|
|
|
|
|
|
// 请求等待可能会超过30秒导致请求超时,所以2秒内没回应直接提示成功
|
|
|
const t = setTimeout(() => complete(), 2000)
|
|
|
+ formData.extendInfo = JSON.stringify(obj)
|
|
|
|
|
|
onSubmit().then(() => {
|
|
|
if (!isComplete) {
|