| | |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="DistributionDetailColumns" |
| | | :operationBtns="operationBtns" |
| | | :showOperationColumn="false" |
| | | > |
| | | </ProTableV2> |
| | | </AppContainer> |
| | |
| | | useTable, |
| | | defineOperationBtns, |
| | | } from '@bole-core/components'; |
| | | // import * as flexEnterpriseServices from '@/services/api/FlexEnterprise'; |
| | | import { DistributionDetailColumns } from '../constants'; |
| | | import { FlexEnterpriseSettingStatus } from '@/constants'; |
| | | import { OrderInputType } from '@bole-core/core'; |
| | | import * as userServices from '@/services/api/user'; |
| | | import { EnumTaskSettlementStatusText } from '@/constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'DistributionDetailView', |
| | |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | | |
| | | onMounted(async () => { |
| | | await getList(); |
| | | state.loading = false; |
| | | }); |
| | | |
| | | const { |
| | | getDataSource: getList, |
| | | proTableProps, |
| | |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetFlexEnterpriseInput = { |
| | | let params: API.GetPersonalUserTransactionsQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | flexEnterpriseSettingStatus: extraParamState.flexEnterpriseSettingStatus, |
| | | searchWord: extraParamState.searchWord, |
| | | type: EnumUserWalletTransactionType.Income, |
| | | }; |
| | | |
| | | let res = await flexEnterpriseServices.getFlexEnterpriseList(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | let res = await userServices.getPersonalUserTransactions(params); |
| | | return res; |
| | | } catch (error) { |
| | | console.log('error: ', error); |
| | | } |
| | | } catch (error) {} |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | searchWord: '', |
| | | orderInput: [{ property: 'id', order: OrderInputType.Desc }], |
| | | flexEnterpriseSettingStatus: '' as any as FlexEnterpriseSettingStatus, |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Asc }], |
| | | }, |
| | | queryKey: ['flexEnterpriseServices/getFlexEnterpriseList'], |
| | | columnsRenderProps: {}, |
| | | columnsRenderProps: { |
| | | amount: { type: 'money' }, |
| | | settlementStatus: { type: 'enum', valueEnum: EnumTaskSettlementStatusText }, |
| | | settlementTime: { type: 'date' }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | | onMounted(async () => { |
| | | await getList(); |
| | | state.loading = false; |
| | | }); |
| | | </script> |