|
|
@@ -22,9 +22,10 @@
|
|
|
</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)" />
|
|
|
+ <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" />
|
|
|
@@ -67,13 +68,14 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</app-view>
|
|
|
+ <component :is="Reciver" v-model:show="showReciver" @change="onChange" />
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { reactive, shallowRef } from 'vue'
|
|
|
-import { Form, Field, Cell, CellGroup, FormInstance, Button, FieldRule, RadioGroup, Radio } from 'vant'
|
|
|
+import { reactive, shallowRef, defineAsyncComponent } from 'vue'
|
|
|
+import { Form, Field, Cell, CellGroup, FormInstance, Button, FieldRule } from 'vant'
|
|
|
import { fullloading, dialog, } from '@/utils/vant'
|
|
|
-import { useDoWithdraw, useAccountFundInfo, useDoCusBankExtendConfigs, useQueryHybridReceiverOnboards } from '@/business/bank'
|
|
|
+import { useDoWithdraw, useAccountFundInfo, useDoCusBankExtendConfigs } from '@/business/bank'
|
|
|
import { getServerTime } from '@/services/api/common'
|
|
|
import { useNavigation } from '@mobile/router/navigation'
|
|
|
import { useUserStore, i18n } from '@/stores'
|
|
|
@@ -83,7 +85,6 @@ 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()
|
|
|
@@ -95,20 +96,32 @@ const msg_317 = getSystemParamValue('317')
|
|
|
const { global: { t } } = i18n
|
|
|
|
|
|
const userStore = useUserStore()
|
|
|
-const { mobile2, cardnum, userinfotype } = userStore.userInfo
|
|
|
+const { userinfotype } = userStore.userInfo
|
|
|
+
|
|
|
+const showReciver = shallowRef(false)
|
|
|
+const Reciver = defineAsyncComponent(() => import('./reciver/Index.vue'))
|
|
|
|
|
|
const onboard = reactive<Partial<Model.HybridReceiverOnboard>>({
|
|
|
- phone_number: mobile2,
|
|
|
- cert_no: cardnum,
|
|
|
receiver_type: userinfotype === 1 ? 'Individual' : 'Organization'
|
|
|
})
|
|
|
|
|
|
const channel_banks = shallowRef<Model.HybridBank[]>([])
|
|
|
|
|
|
+// 选择接收人信息
|
|
|
+const onChange = (item: Model.HybridReceiverOnboard) => {
|
|
|
+ channel_code.value = item.channel_code
|
|
|
+ onboard.cert_no = item.cert_no
|
|
|
+ onboard.phone_number = item.phone_number
|
|
|
+ onboard.bank_account = item.bank_account
|
|
|
+ showReciver.value = false
|
|
|
+ // 切换银行
|
|
|
+ channel_banks.value = hybrids.value.find(e => e.channel_code === item.channel_code)?.bank_infos.filter(e => e.out_in_flag === 0 && e.is_enabled === 1) ?? []
|
|
|
+ bank_code.value = item.bank_code
|
|
|
+}
|
|
|
+
|
|
|
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) {
|
|
|
+ if(channel_banks.value.length && bank_code.value) {
|
|
|
bank_code.value = channel_banks.value[0].bank_code ?? ''
|
|
|
}
|
|
|
}
|
|
|
@@ -182,18 +195,18 @@ const formSubmit = () => {
|
|
|
// 拓展信息
|
|
|
hybrid['channel_code'] = channel_code.value
|
|
|
hybrid['bank_code'] = bank_code.value
|
|
|
+
|
|
|
const receiver: { [key: string]: unknown } = Object.create({})
|
|
|
receiver['bank_account'] = onboard.bank_account
|
|
|
receiver['cert_no'] = onboard.cert_no
|
|
|
- receiver['phone_number'] = mobile2
|
|
|
+ receiver['phone_number'] = onboard.phone_number
|
|
|
receiver['name'] = sign.value.bankaccountname
|
|
|
- receiver['receiver_type'] = 'Individual'
|
|
|
+ receiver['receiver_type'] = onboard.receiver_type
|
|
|
hybrid['receiver_onboard'] = receiver
|
|
|
+
|
|
|
obj['hybrid'] = hybrid
|
|
|
}
|
|
|
|
|
|
- console.log(obj)
|
|
|
-
|
|
|
fullloading((hideLoading) => {
|
|
|
let isComplete = false // 请求是否结束
|
|
|
const complete = () => {
|