Handy_Cao hai 9 meses
pai
achega
a6e14dbc4f

+ 15 - 1
src/business/bank/index.ts

@@ -15,7 +15,8 @@ import {
     YJF_WithholdSignInSMS,
     YJF_WithholdSignOut,
     queryMemberCusBankInfo,
-    getHybridConfigs
+    getHybridConfigs,
+    queryHybridReceiverOnboards
 } from '@/services/api/bank'
 import { SignStatus } from '@/constants/bank'
 import { decryptAES } from '@/services/websocket/package/crypto'
@@ -472,6 +473,19 @@ export function useQueryCusBankSignBank() {
     return { cusBank, banklist, request }
 }
 
+/// 查询混合支付出金接收者信息
+export function useQueryHybridReceiverOnboards() {
+    /// 数据
+    const receivers = shallowRef<Partial<Model.HybridReceiverOnboard[]>>([])
+    /// 查询混合支付出金接收者信息
+    const request = queryHybridReceiverOnboards().then((res) => {
+        if (res.data.length) {
+            receivers.value = res.data
+        }
+    })
+    return { receivers, request }
+}
+
 /// 云缴费代扣解约请求
 export function useDoYJF_WithholdSignOut() {
     /// 获取UserId

+ 16 - 14
src/packages/tss/views/bank/wallet/components/deposit/Index.vue

@@ -38,7 +38,7 @@
                             :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' }" />
@@ -194,24 +194,28 @@ const onCopy = (status: boolean) => {
 const formSubmit = () => {
     fullloading((hideLoading) => {
         const obj: { [key: string]: unknown } = Object.create({})
-        const hybrid: { [key: string]: unknown } = Object.create({})
         configs.value.forEach((e) => {
             if (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['hybrid'] = hybrid
-        if (channel_code.value === 'chillpay') {
-            const personinfo: { [key: string]: unknown } = Object.create({})
-            personinfo['phone_number'] = mobile2
-            hybrid['person_info'] = personinfo
+
+        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 personinfo: { [key: string]: unknown } = Object.create({})
+                personinfo['phone_number'] = mobile2
+                hybrid['person_info'] = personinfo
+            }
+            obj['hybrid'] = hybrid
         }
+        obj['certificate_photo_url'] = certificate_photo_url.value
 
-        let isComplete = false // 请求是否结束
+        // 请求是否结束
+        let isComplete = false 
         const complete = () => {
             isComplete = true
             dialog({
@@ -224,8 +228,6 @@ const formSubmit = () => {
         // 请求等待可能会超过30秒导致请求超时,所以2秒内没回应直接提示成功
         const t = setTimeout(() => complete(), 2000)
         formData.extendInfo = JSON.stringify(obj)
-
-        console.log(formData.extendInfo)
         
         onSubmit().then(() => {
             if (!isComplete) {

+ 52 - 10
src/packages/tss/views/bank/wallet/components/withdraw/Index.vue

@@ -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) {

+ 1 - 1
src/types/model/bank.d.ts

@@ -595,7 +595,7 @@ declare namespace Model {
         cert_no: string // 证件号码
         channel_code: number // 渠道代码
         name: string // 名称 / 企业名称
-        phone_number: string // 电话号码
+        phone_number?: string // 电话号码
         receiver_type: string // 接收者类型 // 个人-Individual 企业-Organization
     }
 }