| File was renamed from src/views/FinanceManage/BalanceManageDetail.vue |
| | |
| | | <template> |
| | | <LoadingLayout :loading="isLoading"> |
| | | <LoadingLayout :loading="state.loading"> |
| | | <AppContainer> |
| | | <ChunkCell title="账户信息"> |
| | | <ProForm :model="form" ref="formRef" label-width="120px" :is-read="true"> |
| | | <ProFormCol> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="账户余额:" prop="name"> |
| | | <ProFormInputNumber v-model="form.name" format-value="money"> </ProFormInputNumber> |
| | | <ProFormItemV2 label="账户余额:" prop="balance"> |
| | | <ProFormInputNumber v-model="form.balance" format-value="money"> |
| | | </ProFormInputNumber> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="账户类型:" prop="settlementAmount"> |
| | | <ProFormSelect v-model="form.name" :valueEnum="[]"> </ProFormSelect> |
| | | <ProFormItemV2 label="账户类型:" prop="access"> |
| | | <ProFormSelect v-model="form.access" :valueEnum="EnumEnterpriseWalletAccessText"> |
| | | </ProFormSelect> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="户号:" prop="actualSettlementAmount"> |
| | | <ProFormText v-model.trim="form.name"> </ProFormText> |
| | | <ProFormItemV2 label="户号:" prop="identity"> |
| | | <ProFormText v-model.trim="form.identity"> </ProFormText> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | |
| | | <template #query> |
| | | <QueryFilterItem> |
| | | <FieldDatePicker |
| | | v-model="extraParamState.time" |
| | | v-model="extraParamState.creationTime" |
| | | type="daterange" |
| | | range-separator="~" |
| | | start-placeholder="起始日期" |
| | |
| | | v-bind="proTableProps" |
| | | :columns="BalanceManageDetailColumns" |
| | | :show-operation-column="false" |
| | | :auto-height="false" |
| | | :table-props="{ |
| | | height: '400px', |
| | | }" |
| | | > |
| | | </ProTableV2> |
| | | </ChunkCell> |
| | |
| | | ProFormSelect, |
| | | } from '@bole-core/components'; |
| | | import { BalanceManageDetailColumns } from './constants'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { EnumWalletTransactionStatusText, EnumEnterpriseWalletAccessText } from '@/constants'; |
| | | import * as taskServices from '@/services/api/task'; |
| | | import * as taskUserServices from '@/services/api/taskUser'; |
| | | import * as userServices from '@/services/api/user'; |
| | | import { Message } from '@bole-core/core'; |
| | | import { downloadFileByUrl, setOSSLink } from '@/utils'; |
| | | import { downloadFileByUrl, format, setOSSLink } from '@/utils'; |
| | | import _ from 'lodash'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | |
| | | defineOptions({ |
| | | name: 'BalanceManageDetail', |
| | | name: 'EnterpriseBalanceManageDetail', |
| | | }); |
| | | |
| | | const route = useRoute(); |
| | | const id = (route.params.id as string) ?? ''; |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | | identity: '', |
| | | access: '' as any as EnumEnterpriseWalletAccess, |
| | | balance: 0, |
| | | }); |
| | | |
| | | const BaseState = { |
| | |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | | |
| | | const { isLoading, refetch } = useQuery({ |
| | | queryKey: ['taskUserServices/getSettlementTaskUsers', id], |
| | | queryFn: async () => { |
| | | return await taskUserServices.getSettlementTaskUsers( |
| | | { id: id }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | placeholderData: () => ({} as API.GetSettlementTaskUsersQueryResult), |
| | | onSuccess(res) { |
| | | if (res?.detail) { |
| | | form.name = res?.detail?.name; |
| | | } |
| | | getList(); |
| | | }, |
| | | enabled: !!id, |
| | | }); |
| | | |
| | | const { |
| | | getDataSource: getList, |
| | |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetPersonalUserWalletBalancesQuery = { |
| | | let params: API.GetPersonalUserTransactionsQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | createdTimeStart: format(extraParamState.creationTime?.[0] ?? '', 'YYYY-MM-DD 00:00:00'), |
| | | createdTimeEnd: format(extraParamState.creationTime?.[1] ?? '', 'YYYY-MM-DD 23:59:59'), |
| | | enterpriseWalletId: id, |
| | | }; |
| | | |
| | | let res = await userServices.getPersonalUserWalletBalances(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | let res = await userServices.getPersonalUserTransactions(params); |
| | | if (res.objectData?.enterpriseWallet) { |
| | | form.identity = res.objectData.enterpriseWallet.identity; |
| | | form.access = res.objectData.enterpriseWallet.access; |
| | | form.balance = res.objectData.enterpriseWallet.balance; |
| | | } |
| | | return res; |
| | | } catch (error) {} |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | time: [] as unknown as ModelValueType, |
| | | creationTime: [] as unknown as ModelValueType, |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | }, |
| | | columnsRenderProps: { |
| | | balance: { type: 'money' }, |
| | | transDate: { type: 'date' }, |
| | | sendTime: { type: 'date' }, |
| | | amount: { type: 'money' }, |
| | | transactionStatus: { type: 'enum', valueEnum: EnumWalletTransactionStatusText }, |
| | | ereceiptDownloadOssUrl: { |
| | | type: 'url', |
| | | formatter: (row: API.GetPersonalUserTransactionsQueryResultItem) => |
| | | row.ereceiptDownloadOssUrl ? setOSSLink(row.ereceiptDownloadOssUrl) : '', |
| | | }, |
| | | }, |
| | | } |
| | | ); |
| | |
| | | }; |
| | | let res = await taskServices.exportTaskSettlementOrderRosters(params); |
| | | if (res) { |
| | | downloadFileByUrl(setOSSLink(res), `${form.name}`); |
| | | downloadFileByUrl(setOSSLink(res)); |
| | | } |
| | | } catch (error) {} |
| | | }, |
| | | 1000, |
| | | { leading: true, trailing: false } |
| | | ); |
| | | |
| | | onMounted(() => { |
| | | state.loading = false; |
| | | getList(); |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |