zhengyiming
5 天以前 5913b702de5cbb9d0b2bb84a420f786026c4be6c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<template>
  <ProFormPaginationSelect
    v-model="modelValue"
    :proTableProps="proTableProps"
    @change="handleAccountBankChange"
  >
  </ProFormPaginationSelect>
</template>
 
<script setup lang="ts">
import { useTable } from '@bole-core/components';
import * as enterpriseWalletServices from '@/services/api/enterpriseWallet';
 
defineOptions({
  name: 'WeChatPayWalletBanksSelect',
});
 
// type Props = {
// };
 
// const props = withDefaults(defineProps<Props>(), {});
 
const modelValue = defineModel<string>();
 
onMounted(() => {
  getList();
});
 
const {
  getDataSource: getList,
  proTableProps,
  paginationState,
  extraParamState,
  reset,
} = useTable(
  async ({ pageIndex, pageSize }, extraParamState) => {
    try {
      let params: API.GetEnterpriseWeChatPayWalletBanksQuery = {
        pageModel: {
          rows: pageSize,
          page: pageIndex,
        },
        bank_account_type: 0,
      };
 
      let res = await enterpriseWalletServices.getEnterpriseWeChatPayWalletBanks(params, {
        showLoading: true,
      });
      return res;
    } catch (error) {
      console.log('error: ', error);
    }
  },
  {
    defaultExtraParams: {
      keywords: '',
    },
    queryKey: ['enterpriseWalletServices/getEnterpriseWeChatPayWalletBanks'],
  }
);
 
function handleAccountBankChange(val: string) {
  console.log('val: ', val);
}
</script>