Handy_Cao 10 miesięcy temu
rodzic
commit
5ebcf76cb8

+ 7 - 5
src/business/bank/index.ts

@@ -140,13 +140,14 @@ export function useDoBankSign() {
     const loading = shallowRef(false)
     const bankInfo = shallowRef<Model.BankAccountSignRsp>()
     const banklist = shallowRef<Model.BankInfoRsp[]>([]) // 银行列表
-    const system_1010 = shallowRef(getSystemParamValue('1010') ?? '1')
     const cusBanks = shallowRef<Model.CusBankSignBankRsp[]>([]) /// 托管银行信息
-    const system_1013 = shallowRef(getSystemParamValue('1013') ?? '30')
     const selectCusBank = shallowRef<Model.CusBankSignBankRsp>() // 选中的托管银行
-
     const extendInfo = ref<{ [key: string]: string }>({}) // 银行扩展信息
 
+    const system_1013 = shallowRef(getSystemParamValue('1013') ?? '30')
+    const system_1010 = shallowRef(getSystemParamValue('1010') ?? '1')
+    const system_1016 = shallowRef(getSystemParamValue('1016') ?? '0')
+
     /// 数据
     const formData = reactive<Partial<Proto.t2bBankSignReq>>({
         AccountType: useStore.userInfo?.userinfotype,
@@ -197,7 +198,6 @@ export function useDoBankSign() {
         }
     })
 
-
     /// 判断是否有签约信息 有就做修改
     queryBankAccountSign().then((res) => {
         bankInfo.value = res.data.filter(obj => {
@@ -266,10 +266,12 @@ export function useDoBankSign() {
         smsVerificationCode,
         system_1010,
         system_1013,
+        system_1016,
         bankInfo,
         extendInfo,
         swsFormData,
-        cusBanks
+        cusBanks,
+        banklist
     }
 }
 

+ 17 - 2
src/packages/mobile/views/bank/sign/components/edit/Index.vue

@@ -84,7 +84,7 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, ref, computed, defineAsyncComponent, watch } from 'vue'
+import { shallowRef, ref, computed, defineAsyncComponent, watch, onMounted } from 'vue'
 import { CellGroup, Button, Field, Form, FormInstance, FieldRule, showFailToast, Popup, Picker } from 'vant'
 import { fullloading, dialog } from '@/utils/vant'
 import { useDoBankSign, useDoCusBankExtendConfigs } from '@/business/bank'
@@ -92,6 +92,7 @@ import { validateRules } from '@/constants/regex'
 import { useCountDown } from '@vant/use'
 import { useUserStore, i18n } from '@/stores'
 import AppModal from '@/components/base/modal/index.vue'
+import { queryMemberCusBankInfo } from '@/services/api/bank'
 
 const props = defineProps({
     isedit: {
@@ -105,7 +106,7 @@ const SelectBank = defineAsyncComponent(() => import('./select-bank/index.vue'))
 // 搜索支行
 const SearchBank = defineAsyncComponent(() => import('./search-bank/index.vue'))
 
-const { formData, onSubmit, cusBanks, selectCusBank, swsFormData, bankInfo, extendInfo, system_1010, system_1013, smsVerificationCode } = useDoBankSign()
+const { formData, onSubmit, cusBanks, selectCusBank, swsFormData, bankInfo, extendInfo, system_1010, system_1016, system_1013, smsVerificationCode } = useDoBankSign()
 const showModal = shallowRef(true)
 const refresh = shallowRef(false) // 是否刷新父组件数据
 const formRef = shallowRef<FormInstance>()
@@ -311,6 +312,20 @@ watch(configs, (data) => {
     }
 })
 
+onMounted(() => {
+    // 任务 #6605
+    if (system_1016.value === '1') {
+        queryMemberCusBankInfo().then((res) => {
+            // 签约界面可用渠道列表逻辑变更: 若1016参数有且为1时,通过userid查询经纪会员配置(Qhj/QueryMemberCusBankInfo)的可用渠道列表;1016无或为其它值值,使用原逻辑取得的渠道列表
+            cusBanks.value = res.data ?? []
+            // 默认选中第一个
+            if (res.data.length != 0) {
+                selectCusBank.value = res.data[0]
+            }
+        })
+    }
+})
+
 // 暴露组件属性给父组件调用
 defineExpose({
     closed,

+ 1 - 2
src/packages/tss/views/bank/sign/components/edit/Index.vue

@@ -7,7 +7,6 @@
             </template>
             <Form ref="formRef" class="g-form__container" @submit="formSubmit">
                 <CellGroup inset>
-                    <span>3333</span>
                     <Field name="OpenBankAccId" :label="$t('banksign.bankname')" v-model="selectedBankName"
                         :placeholder="$t('banksign.Pleaseselectyourbank')" :rules="formRules.OpenBankAccId"
                         @click-input="showSelect = true" readonly is-link />
@@ -83,7 +82,7 @@ const SelectBank = defineAsyncComponent(() => import('./select-bank/index.vue'))
 // 搜索支行
 const SearchBank = defineAsyncComponent(() => import('./search-bank/index.vue'))
 
-const { formData, onSubmit, banklist, bankInfo, system_1010, system_1013, smsVerificationCode } = useDoBankSign()
+const { formData, onSubmit, banklist, bankInfo, system_1010, system_1013, smsVerificationCode, system_1016 } = useDoBankSign()
 const showModal = shallowRef(true)
 const refresh = shallowRef(false) // 是否刷新父组件数据
 const formRef = shallowRef<FormInstance>()

+ 13 - 0
src/services/api/bank/index.ts

@@ -246,4 +246,17 @@ export function queryGtwithholddepositapply(config: RequestConfig<Model.GTWithHo
             ...config.data
         }
     })
+}
+
+/**
+ * 查询所属机构托管银行
+ */
+export function queryMemberCusBankInfo(config: RequestConfig<Model.BankAccountSignReq> = {}) {
+    return http.commonRequest<Model.CusBankSignBankRsp[]>({
+        url: '/Qhj/QueryMemberCusBankInfo',
+        params: {
+            userid: loginStore.userId,
+            ...config.data
+        },
+    })
 }