From 1e77f7e375d797f96e384a9b769df966ee0c52be Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期三, 15 十月 2025 13:46:04 +0800 Subject: [PATCH] fix: bug --- src/views/EnterpriseManage/components/WeChatPayWalletBanksSelect.vue | 29 +++++++++++++++++++++++------ 1 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/views/EnterpriseManage/components/WeChatPayWalletBanksSelect.vue b/src/views/EnterpriseManage/components/WeChatPayWalletBanksSelect.vue index cdace6d..08eab29 100644 --- a/src/views/EnterpriseManage/components/WeChatPayWalletBanksSelect.vue +++ b/src/views/EnterpriseManage/components/WeChatPayWalletBanksSelect.vue @@ -17,10 +17,11 @@ name: 'WeChatPayWalletBanksSelect', }); -// type Props = { -// }; +type Props = { + bank_account_type?: EnumWeChatPayApplymentBankAccountType; +}; -// const props = withDefaults(defineProps<Props>(), {}); +const props = withDefaults(defineProps<Props>(), {}); const bank_alias = defineModel<string>('bank_alias'); const account_bank = defineModel<string>('account_bank'); @@ -29,8 +30,24 @@ const need_bank_branch = defineModel<boolean>('need_bank_branch'); onMounted(() => { - getList(); + if (props.bank_account_type !== ('' as any)) { + getList(); + } }); + +watch( + () => props.bank_account_type, + (newVal) => { + bank_alias.value = ''; + account_bank.value = ''; + account_bank_code.value = '' as any as number; + bank_alias_code.value = ''; + need_bank_branch.value = false; + if (newVal !== ('' as any)) { + getList(); + } + } +); const { getDataSource: getList, @@ -46,7 +63,7 @@ rows: pageSize, page: pageIndex, }, - bank_account_type: 0, + bank_account_type: props.bank_account_type, }; let res = await enterpriseWalletServices.getEnterpriseWeChatPayWalletBanks(params, { @@ -62,11 +79,11 @@ keywords: '', }, queryKey: ['enterpriseWalletServices/getEnterpriseWeChatPayWalletBanks'], + initialPageSize: 200, } ); function handleAccountBankChange(bank_alias: string) { - console.log('bank_alias: ', bank_alias); const bank = proTableProps.value.tableData.find((item) => item.bank_alias === bank_alias); if (bank) { account_bank.value = bank.account_bank; -- Gitblit v1.9.1