| | |
| | | "AreaType": true, |
| | | "CategoryCode": true, |
| | | "CertificateTypeCodeEnum": true, |
| | | "CommonAnnexTableColumns": true, |
| | | "Component": true, |
| | | "ComponentPublicInstance": true, |
| | | "ComputedRef": true, |
| | |
| | | "EnumUserType": true, |
| | | "EnumUserTypeText": true, |
| | | "EnumUserWalletTransactionType": true, |
| | | "EnumUserWalletTransactionTypeText": true, |
| | | "EnumWalletTransactionStatus": true, |
| | | "EnumWalletTransactionStatusText": true, |
| | | "ExtractDefaultPropTypes": true, |
| | | "ExtractPropTypes": true, |
| | | "ExtractPublicPropTypes": true, |
| | |
| | | "ThemeColorName": true, |
| | | "ThemeColors": true, |
| | | "ThemeColorsType": true, |
| | | "UsePortraitTableColumnsItem": true, |
| | | "UsePortraitTableOptions": true, |
| | | "VNode": true, |
| | | "WelfareCodeEnum": true, |
| | | "WritableComputedRef": true, |
| | |
| | | "useModel": true, |
| | | "useOmit": true, |
| | | "useOmitProps": true, |
| | | "usePortraitTable": true, |
| | | "usePortraitTableWithAttachment": true, |
| | | "useResizeHander": true, |
| | | "useRoute": true, |
| | | "useRouteView": true, |
| | |
| | | const AreaType: typeof import('./src/constants/enum')['AreaType'] |
| | | const CategoryCode: typeof import('./src/constants/dic')['CategoryCode'] |
| | | const CertificateTypeCodeEnum: typeof import('./src/constants/dic')['CertificateTypeCodeEnum'] |
| | | const CommonAnnexTableColumns: typeof import('@/constants')['CommonAnnexTableColumns'] |
| | | const CommonAnnexTableColumns: typeof import('./src/constants/common')['CommonAnnexTableColumns'] |
| | | const EditorType: typeof import('./src/constants/editor')['EditorType'] |
| | | const EditorTypeText: typeof import('./src/constants/editor')['EditorTypeText'] |
| | | const EducationCodeEnum: typeof import('./src/constants/dic')['EducationCodeEnum'] |
| | |
| | | const EnumUserType: typeof import('./src/constants/apiEnum')['EnumUserType'] |
| | | const EnumUserTypeText: typeof import('./src/constants/apiEnumText')['EnumUserTypeText'] |
| | | const EnumUserWalletTransactionType: typeof import('./src/constants/apiEnum')['EnumUserWalletTransactionType'] |
| | | const EnumUserWalletTransactionTypeText: typeof import('./src/constants/finance')['EnumUserWalletTransactionTypeText'] |
| | | const EnumWalletTransactionStatus: typeof import('./src/constants/apiEnum')['EnumWalletTransactionStatus'] |
| | | const EnumWalletTransactionStatusText: typeof import('./src/constants/finance')['EnumWalletTransactionStatusText'] |
| | | const FastButtonMap: typeof import('./src/constants/module')['FastButtonMap'] |
| | | const FastColumnList: typeof import('./src/constants/module')['FastColumnList'] |
| | | const FastDataButtonList: typeof import('./src/constants/module')['FastDataButtonList'] |
| | |
| | | const useModel: typeof import('vue')['useModel'] |
| | | const useOmit: typeof import('./src/hooks/help')['useOmit'] |
| | | const useOmitProps: typeof import('./src/hooks/help')['useOmitProps'] |
| | | const usePortraitTable: typeof import('./src/hooks/portraitTable')['usePortraitTable'] |
| | | const usePortraitTableWithAttachment: typeof import('./src/hooks/portraitTable')['usePortraitTableWithAttachment'] |
| | | const useResizeHander: typeof import('./src/hooks/useResizeHander')['useResizeHander'] |
| | | const useRoute: typeof import('vue-router')['useRoute'] |
| | | const useRouteView: typeof import('./src/hooks/useRouteView')['useRouteView'] |
| | |
| | | // @ts-ignore |
| | | export type { GlobalEvent, GlobalEventListener, GlobalEventContext } from './src/hooks/useEvent' |
| | | import('./src/hooks/useEvent') |
| | | // @ts-ignore |
| | | export type { UsePortraitTableColumnsItem, UsePortraitTableOptions } from './src/hooks/portraitTable' |
| | | import('./src/hooks/portraitTable') |
| | | } |
| | | |
| | | // for vue template auto import |
| | |
| | | readonly AreaType: UnwrapRef<typeof import('./src/constants/enum')['AreaType']> |
| | | readonly CategoryCode: UnwrapRef<typeof import('./src/constants/dic')['CategoryCode']> |
| | | readonly CertificateTypeCodeEnum: UnwrapRef<typeof import('./src/constants/dic')['CertificateTypeCodeEnum']> |
| | | readonly CommonAnnexTableColumns: UnwrapRef<typeof import('./src/constants/common')['CommonAnnexTableColumns']> |
| | | readonly EditorType: UnwrapRef<typeof import('./src/constants/editor')['EditorType']> |
| | | readonly EditorTypeText: UnwrapRef<typeof import('./src/constants/editor')['EditorTypeText']> |
| | | readonly EducationCodeEnum: UnwrapRef<typeof import('./src/constants/dic')['EducationCodeEnum']> |
| | |
| | | readonly EnumUserType: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumUserType']> |
| | | readonly EnumUserTypeText: UnwrapRef<typeof import('./src/constants/apiEnumText')['EnumUserTypeText']> |
| | | readonly EnumUserWalletTransactionType: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumUserWalletTransactionType']> |
| | | readonly EnumUserWalletTransactionTypeText: UnwrapRef<typeof import('./src/constants/finance')['EnumUserWalletTransactionTypeText']> |
| | | readonly EnumWalletTransactionStatus: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumWalletTransactionStatus']> |
| | | readonly EnumWalletTransactionStatusText: UnwrapRef<typeof import('./src/constants/finance')['EnumWalletTransactionStatusText']> |
| | | readonly FastButtonMap: UnwrapRef<typeof import('./src/constants/module')['FastButtonMap']> |
| | | readonly FastColumnList: UnwrapRef<typeof import('./src/constants/module')['FastColumnList']> |
| | | readonly FastDataButtonList: UnwrapRef<typeof import('./src/constants/module')['FastDataButtonList']> |
| | |
| | | readonly useModel: UnwrapRef<typeof import('vue')['useModel']> |
| | | readonly useOmit: UnwrapRef<typeof import('./src/hooks/help')['useOmit']> |
| | | readonly useOmitProps: UnwrapRef<typeof import('./src/hooks/help')['useOmitProps']> |
| | | readonly usePortraitTable: UnwrapRef<typeof import('./src/hooks/portraitTable')['usePortraitTable']> |
| | | readonly usePortraitTableWithAttachment: UnwrapRef<typeof import('./src/hooks/portraitTable')['usePortraitTableWithAttachment']> |
| | | readonly useResizeHander: UnwrapRef<typeof import('./src/hooks/useResizeHander')['useResizeHander']> |
| | | readonly useRoute: UnwrapRef<typeof import('vue-router')['useRoute']> |
| | | readonly useRouteView: UnwrapRef<typeof import('./src/hooks/useRouteView')['useRouteView']> |
New file |
| | |
| | | <template> |
| | | <PortraitTable v-bind="portraitTableProps" :label-width="labelWidth"> </PortraitTable> |
| | | <div class="enclosure-list-title">附件列表</div> |
| | | <ProTableV2 |
| | | :table-data="annexList" |
| | | :columns="CommonAnnexTableColumns" |
| | | :operation-btns="operationListBtns" |
| | | :show-pagination="false" |
| | | :show-no-data="false" |
| | | :auto-height="false" |
| | | :show-table-column-setting="false" |
| | | :table-props="{ maxHeight: '400px' }" |
| | | :column-render-map="columnsRenderProps" |
| | | > |
| | | </ProTableV2> |
| | | </template> |
| | | |
| | | <script setup lang="ts" generic="TAnnexItem"> |
| | | import { downloadFileByUrl } from '@bole-core/core'; |
| | | import { CommonAnnexTableColumns } from '@/constants'; |
| | | import { ProTableV2, ProTableV2Props } from '@bole-core/components'; |
| | | |
| | | defineOptions({ |
| | | name: 'PortraitTableWithAttachment', |
| | | }); |
| | | |
| | | type Props = { |
| | | annexList: TAnnexItem[]; |
| | | customDownLoad?: (row: TAnnexItem) => Promise<any>; |
| | | labelWidth?: string; |
| | | portraitTableProps: any; |
| | | columnsRenderProps?: ProTableV2Props['columnRenderMap']; |
| | | downloadFileKey?: keyof TAnnexItem; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | | labelWidth: '180px', |
| | | columnsRenderProps: () => ({}), |
| | | downloadFileKey: 'url' as any, |
| | | }); |
| | | |
| | | const operationListBtns = [ |
| | | { |
| | | data: { |
| | | enCode: 'downloadBtn', |
| | | name: '下载', |
| | | }, |
| | | emits: { |
| | | onClick: (row) => handleDownload(row), |
| | | }, |
| | | }, |
| | | ]; |
| | | |
| | | function handleDownload(row: TAnnexItem) { |
| | | if (props.customDownLoad) { |
| | | props.customDownLoad(row); |
| | | } else { |
| | | downloadFileByUrl(row[props.downloadFileKey] as any); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @use '@/style/common.scss' as *; |
| | | |
| | | .enclosure-list-title { |
| | | padding: 16px 0; |
| | | font-size: 14px; |
| | | color: getCssVar('text-color', 'primary'); |
| | | line-height: 19px; |
| | | } |
| | | </style> |
New file |
| | |
| | | import { defineColumns } from '@bole-core/components'; |
| | | |
| | | export const CommonAnnexTableColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'name', |
| | | name: '文件名', |
| | | }, |
| | | ]); |
New file |
| | |
| | | export const EnumUserWalletTransactionTypeText = { |
| | | [EnumUserWalletTransactionType.Income]: '收入', |
| | | [EnumUserWalletTransactionType.Withdraw]: '提现', |
| | | }; |
| | | |
| | | export const EnumWalletTransactionStatusText = { |
| | | [EnumWalletTransactionStatus.WaitSubmit]: '待提交', |
| | | [EnumWalletTransactionStatus.WaitPay]: '待支付', |
| | | [EnumWalletTransactionStatus.Dealing]: '处理中', |
| | | [EnumWalletTransactionStatus.Success]: '成功', |
| | | [EnumWalletTransactionStatus.Refund]: '退票', |
| | | [EnumWalletTransactionStatus.Fail]: '失败', |
| | | }; |
| | |
| | | export * from './enterpriseEmployee'; |
| | | export * from './electronSign'; |
| | | export * from './enterpriseWallet'; |
| | | export * from './finance'; |
| | | export * from './common'; |
| | |
| | | export * from './dic'; |
| | | export * from './sign'; |
| | | export * from './settlement'; |
| | | export * from './portraitTable'; |
New file |
| | |
| | | import { ColumnsRenderProps } from '@bole-core/components'; |
| | | import { MaybeRef } from 'vue'; |
| | | |
| | | export type UsePortraitTableColumnsItem<TData extends object = object> = ColumnsRenderProps & { |
| | | label?: string; |
| | | key?: keyof TData; |
| | | }; |
| | | |
| | | export type UsePortraitTableOptions<TData extends object> = { |
| | | data: Ref<TData>; |
| | | columns?: UsePortraitTableColumnsItem<TData>[]; |
| | | }; |
| | | |
| | | export function usePortraitTable<TData extends object>(options: UsePortraitTableOptions<TData>) { |
| | | const portraitTableProps = computed( |
| | | () => |
| | | ({ |
| | | data: options.data.value, |
| | | columns: options.columns ?? [], |
| | | } as any) |
| | | ); |
| | | |
| | | return { |
| | | portraitTableProps, |
| | | }; |
| | | } |
| | | |
| | | type UsePortraitTableWithAttachmentOptions< |
| | | TData extends object, |
| | | TAnnexItem extends object = object |
| | | > = UsePortraitTableOptions<TData> & { |
| | | annexList: Ref<TAnnexItem[]>; |
| | | columnsRenderProps?: { [key in keyof TAnnexItem]?: ColumnsRenderProps }; |
| | | }; |
| | | |
| | | export function usePortraitTableWithAttachment< |
| | | TData extends object, |
| | | TAnnexItem extends object = object |
| | | >(options: UsePortraitTableWithAttachmentOptions<TData, TAnnexItem>) { |
| | | const { annexList, columnsRenderProps } = options; |
| | | const { portraitTableProps } = usePortraitTable(options); |
| | | |
| | | const portraitTableWithAttachmentProps = computed(() => ({ |
| | | annexList: annexList.value, |
| | | portraitTableProps: portraitTableProps.value, |
| | | columnsRenderProps, |
| | | })); |
| | | |
| | | return { portraitTableWithAttachmentProps }; |
| | | } |
| | |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | // { |
| | | // path: '/BalanceManage', |
| | | // name: 'BalanceManage', |
| | | // hidden: false, |
| | | // alwaysShow: true, |
| | | // component: () => import('@/views/ServiceChargeManage/BalanceManage.vue'), |
| | | // meta: { |
| | | // rank: 10042, |
| | | // title: '余额管理', |
| | | // // rootMenu: true, |
| | | // icon: 'home', |
| | | // }, |
| | | // }, |
| | | { |
| | | path: '/BalanceManage', |
| | | name: 'BalanceManage', |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | component: () => import('@/views/ServiceChargeManage/BalanceManage.vue'), |
| | | meta: { |
| | | rank: 10042, |
| | | title: '余额管理', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/ServiceChargeDetail/:id', |
| | | name: 'ServiceChargeDetail', |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // path: '/WithdrawManage', |
| | | // redirect: 'noRedirect', |
| | | // component: Layout, |
| | | // hidden: false, |
| | | // alwaysShow: true, |
| | | // meta: { |
| | | // rank: 10060, |
| | | // title: '提现管理', |
| | | // rootMenu: true, |
| | | // icon: 'home', |
| | | // }, |
| | | // children: [ |
| | | // { |
| | | // path: '/WithdrawManageList', |
| | | // name: 'WithdrawManageList', |
| | | // hidden: false, |
| | | // alwaysShow: true, |
| | | // component: () => import('@/views/WithdrawManage/WithdrawManageList.vue'), |
| | | // meta: { |
| | | // rank: 10061, |
| | | // title: '提现管理', |
| | | // // rootMenu: true, |
| | | // icon: 'home', |
| | | // }, |
| | | // }, |
| | | // ], |
| | | // }, |
| | | { |
| | | path: '/FinanceManage', |
| | | redirect: 'noRedirect', |
| | |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | meta: { |
| | | rank: 10060, |
| | | rank: 10070, |
| | | title: '财务管理', |
| | | rootMenu: true, |
| | | icon: 'home', |
| | |
| | | alwaysShow: true, |
| | | component: () => import('@/views/FinanceManage/FinanceManage.vue'), |
| | | meta: { |
| | | rank: 10061, |
| | | rank: 10071, |
| | | title: '财务管理', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | |
| | | /** 创建时间-截止 */ |
| | | createdTimeEnd?: string; |
| | | type?: EnumUserWalletTransactionType; |
| | | /** 用户Id */ |
| | | userId?: string; |
| | | pageModel?: PagedListQueryPageModel; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | interface GetPersonalUserWalletBalancesQueryResult { |
| | | pageModel?: PagedListQueryResultPageModel; |
| | | /** 数据 */ |
| | | data?: GetPersonalUserWalletBalancesQueryResultItem[]; |
| | | } |
| | | |
| | | interface GetPersonalUserWalletBalancesQueryResultItem { |
| | | /** 用户Id */ |
| | | id?: string; |
| | | /** 姓名 */ |
| | |
| | | identity?: string; |
| | | /** 余额 */ |
| | | balance?: number; |
| | | pageModel?: PagedListQueryResultPageModel; |
| | | /** 数据 */ |
| | | data?: GetPersonalUserWalletBalancesQueryResultItem[]; |
| | | } |
| | | |
| | | type GetPersonalUserWalletBalancesQueryResultItem = Record<string, any>; |
| | | |
| | | interface GetResourceFieldsQueryResultItem { |
| | | /** 编号 */ |
| | |
| | | <template #query> |
| | | <QueryFilterItem tip-content="余额范围"> |
| | | <el-input-number |
| | | v-model="extraParamState.minAmount" |
| | | v-model="extraParamState.balanceMin" |
| | | placeholder="余额最小金额" |
| | | size="small" |
| | | style="width: 150px" |
| | | :controls="false" |
| | | />~ |
| | | <el-input-number |
| | | v-model="extraParamState.maxAmount" |
| | | v-model="extraParamState.balanceMax" |
| | | placeholder="余额最大金额" |
| | | size="small" |
| | | style="width: 150px" |
| | |
| | | </QueryFilterItem> |
| | | <QueryFilterItem> |
| | | <SearchInput |
| | | v-model="extraParamState.keyword" |
| | | v-model="extraParamState.keywords" |
| | | style="width: 260px" |
| | | placeholder="姓名/手机号/身份证号" |
| | | @on-click-search="getList" |
| | |
| | | useFormDialog, |
| | | defineOperationBtns, |
| | | } from '@bole-core/components'; |
| | | import * as enterpriseServices from '@/services/api/enterprise'; |
| | | import * as userServices from '@/services/api/user'; |
| | | import BalanceDetailDialog from './components/BalanceDetailDialog.vue'; |
| | | import { BalanceManageColumns } from './constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'BalanceManage', |
| | | name: 'WithdrawManageList', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | |
| | | }, |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | extraProps: { |
| | | hide: () => false, |
| | | }, |
| | | }, |
| | | ]); |
| | |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetEnterprisesQuery = { |
| | | let params: API.GetPersonalUserWalletBalancesQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | // searchKeys: extraParamState.keyword, |
| | | keywords: extraParamState.keywords, |
| | | balanceMin: extraParamState.balanceMin, |
| | | balanceMax: extraParamState.balanceMax, |
| | | }; |
| | | let res = await enterpriseServices.getEnterprises(params, { |
| | | |
| | | let res = await userServices.getPersonalUserWalletBalances(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | return res; |
| | |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | keyword: '', |
| | | status: '', |
| | | minAmount: null as number, |
| | | maxAmount: null as number, |
| | | keywords: '', |
| | | balanceMin: null as number, |
| | | balanceMax: null as number, |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Asc }], |
| | | }, |
| | | columnsRenderProps: {}, |
| | | columnsRenderProps: { |
| | | balance: { type: 'money' }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | |
| | | <template #query> |
| | | <QueryFilterItem> |
| | | <FieldSelect |
| | | v-model="extraParamState.status" |
| | | :valueEnum="[]" |
| | | v-model="extraParamState.type" |
| | | :valueEnum="EnumUserWalletTransactionTypeText" |
| | | clearable |
| | | filterable |
| | | placeholder="交易类型" |
| | |
| | | </QueryFilterItem> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 v-bind="proTableProps" :columns="columns" :showOperationColumn="false"> |
| | | <ProTableV2 v-bind="proTableProps" :columns="columns" :operationBtns="operationBtns"> |
| | | <template #income="{ row }"> |
| | | <div style="color: #67c23a" v-if="row.type === EnumUserWalletTransactionType.Income"> |
| | | {{ `+${toThousand(row.amount)}` }} |
| | | </div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | <template #outcome="{ row }"> |
| | | <div style="color: #f56c6c" v-if="row.type === EnumUserWalletTransactionType.Withdraw"> |
| | | {{ toThousand(row.amount) }} |
| | | </div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | <template #account="{ row }"> |
| | | {{ `${row.receiveAccount} - ${row.receiveName}` }} |
| | | </template> |
| | | </ProTableV2> |
| | | </ProDialogTableWrapper> |
| | | <FinanceDetailDialog v-bind="dialogProps"></FinanceDetailDialog> |
| | | </ProDialog> |
| | | </template> |
| | | |
| | |
| | | FieldSelect, |
| | | ProTableV2, |
| | | ProTableQueryFilterBar, |
| | | defineOperationBtns, |
| | | useFormDialog, |
| | | } from '@bole-core/components'; |
| | | import * as enterpriseServices from '@/services/api/enterprise'; |
| | | import * as userServices from '@/services/api/user'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import { format, toThousand } from '@/utils'; |
| | | import { EnumUserWalletTransactionType, EnumUserWalletTransactionTypeText } from '@/constants'; |
| | | import FinanceDetailDialog from './FinanceDetailDialog.vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'FinanceDetailDialog', |
| | |
| | | const columns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'name', |
| | | enCode: 'transDate', |
| | | name: '交易时间', |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'name', |
| | | enCode: 'income', |
| | | name: '收入', |
| | | width: 100, |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'name', |
| | | enCode: 'outcome', |
| | | name: '支出', |
| | | width: 100, |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'name', |
| | | enCode: 'balance', |
| | | name: '账户余额', |
| | | width: 100, |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'name', |
| | | id: '5', |
| | | enCode: 'account', |
| | | name: '对方帐号/户名', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'name', |
| | | id: '6', |
| | | enCode: 'purpose', |
| | | name: '用途', |
| | | }, |
| | | ]); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '明细', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | }, |
| | | ]); |
| | | |
| | |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetEnterprisesQuery = { |
| | | let params: API.GetPersonalUserTransactionsQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | // searchKeys: extraParamState.keyword, |
| | | createdTimeStart: format(extraParamState.creationTime?.[0] ?? '', 'YYYY-MM-DD 00:00:00'), |
| | | createdTimeEnd: format(extraParamState.creationTime?.[1] ?? '', 'YYYY-MM-DD 23:59:59'), |
| | | type: extraParamState.type, |
| | | userId: form.value.id, |
| | | }; |
| | | let res = await enterpriseServices.getEnterprises(params); |
| | | let res = await userServices.getPersonalUserTransactions(params); |
| | | return res; |
| | | } catch (error) {} |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | status: '', |
| | | type: '' as any as EnumUserWalletTransactionType, |
| | | creationTime: [] as unknown as ModelValueType, |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Asc }], |
| | | }, |
| | | columnsRenderProps: {}, |
| | | columnsRenderProps: { |
| | | transDate: { type: 'date', format: 'YYYY-MM-DD HH:mm:ss' }, |
| | | balance: { type: 'money' }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | | const { dialogProps, handleEdit, editForm } = useFormDialog({ |
| | | defaultFormParams: { |
| | | id: '', |
| | | }, |
| | | }); |
| | | |
| | | function openDialog(row: API.GetPersonalUserTransactionsQueryResultItem) { |
| | | handleEdit({ |
| | | id: row.id, |
| | | }); |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
New file |
| | |
| | | <template> |
| | | <ProDialog title="明细" v-model="visible" destroy-on-close draggable> |
| | | <PortraitTable v-bind="portraitTableProps" label-width="140px" :col-number="2"></PortraitTable> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="emit('onCancel')" type="primary">确定</el-button> |
| | | </span> |
| | | </template> |
| | | </ProDialog> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { ProDialog, toThousand } from '@bole-core/components'; |
| | | import { usePortraitTable } from '@/hooks'; |
| | | import * as userServices from '@/services/api/user'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { EnumWalletTransactionStatusText } from '@/constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'FinanceDetailDialog', |
| | | }); |
| | | |
| | | type Form = { |
| | | id?: string; |
| | | }; |
| | | |
| | | const visible = defineModel({ type: Boolean }); |
| | | const form = defineModel<Form>('form'); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'update:modelValue', value: boolean): void; |
| | | (e: 'onCancel'): void; |
| | | }>(); |
| | | |
| | | const { data: detail } = useQuery({ |
| | | queryKey: ['userResumeServices/getUserResume', form.value.id], |
| | | queryFn: async () => { |
| | | return await userServices.getPersonalUserTransaction({ id: form.value.id }); |
| | | }, |
| | | placeholderData: () => ({} as API.GetPersonalUserTransactionQueryResult), |
| | | enabled: computed(() => !!form.value.id), |
| | | }); |
| | | |
| | | const { portraitTableProps } = usePortraitTable({ |
| | | data: detail, |
| | | columns: [ |
| | | { |
| | | label: '付款人账户', |
| | | key: 'payerAccount', |
| | | }, |
| | | { |
| | | label: '收款人账户', |
| | | key: 'receiveAccount', |
| | | }, |
| | | { |
| | | label: '付款人名称', |
| | | key: 'payerName', |
| | | }, |
| | | { |
| | | label: '收款人名称', |
| | | key: 'receiveName', |
| | | }, |
| | | { |
| | | label: '付款人开户行', |
| | | key: 'payerBank', |
| | | }, |
| | | { |
| | | label: '收款人开户行', |
| | | key: 'receiveBank', |
| | | }, |
| | | { |
| | | label: '币种', |
| | | key: 'currency', |
| | | }, |
| | | { |
| | | label: '交易金额', |
| | | key: 'actualAmount', |
| | | type: 'money', |
| | | }, |
| | | { |
| | | label: '用途', |
| | | key: 'purpose', |
| | | }, |
| | | { |
| | | label: '摘要', |
| | | key: 'failReason', |
| | | }, |
| | | { |
| | | label: '交易时间', |
| | | key: 'transDate', |
| | | type: 'date', |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | }, |
| | | { |
| | | label: '交易状态', |
| | | key: 'transactionStatus', |
| | | type: 'enum', |
| | | valueEnum: EnumWalletTransactionStatusText, |
| | | }, |
| | | ], |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @use '@/style/common.scss' as *; |
| | | </style> |
| | |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'name', |
| | | enCode: 'contactPhoneNumber', |
| | | name: '手机号', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'name', |
| | | enCode: 'identity', |
| | | name: '身份证号', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'name', |
| | | enCode: 'balance', |
| | | name: '账户余额', |
| | | }, |
| | | ]); |
New file |
| | |
| | | <template> |
| | | <LoadingLayout :loading="state.loading"> |
| | | <AppContainer> |
| | | <ProTableQueryFilterBar @on-reset="reset"> |
| | | <template #query> |
| | | <QueryFilterItem> |
| | | <FieldDatePicker |
| | | v-model="extraParamState.time" |
| | | type="daterange" |
| | | range-separator="~" |
| | | start-placeholder="起始日期" |
| | | end-placeholder="截止日期" |
| | | clearable |
| | | @change="getList()" |
| | | tooltipContent="申请时间" |
| | | ></FieldDatePicker> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem tip-content="提现状态"> |
| | | <FieldRadio |
| | | v-model="extraParamState.status" |
| | | :value-enum="[]" |
| | | buttonStyle |
| | | showAllBtn |
| | | @change="getList()" |
| | | /> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem> |
| | | <SearchInput |
| | | v-model="extraParamState.keywords" |
| | | style="width: 260px" |
| | | placeholder="姓名/电话/身份证号" |
| | | @on-click-search="getList" |
| | | > |
| | | </SearchInput> |
| | | </QueryFilterItem> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="WithdrawManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | <WithdrawalDetailDialog v-bind="dialogProps" /> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { |
| | | ProTableQueryFilterBar, |
| | | ProTableV2, |
| | | SearchInput, |
| | | LoadingLayout, |
| | | AppContainer, |
| | | QueryFilterItem, |
| | | useTable, |
| | | useFormDialog, |
| | | defineOperationBtns, |
| | | FieldDatePicker, |
| | | FieldRadio, |
| | | } from '@bole-core/components'; |
| | | import * as userServices from '@/services/api/user'; |
| | | import WithdrawalDetailDialog from './components/WithdrawalDetailDialog.vue'; |
| | | import { WithdrawManageColumns } from './constants'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | |
| | | defineOptions({ |
| | | name: 'WithdrawManageList', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '详情', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | }, |
| | | ]); |
| | | |
| | | const router = useRouter(); |
| | | const BaseState = { |
| | | loading: true, |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | | |
| | | onMounted(async () => { |
| | | await getList(); |
| | | state.loading = false; |
| | | }); |
| | | |
| | | const { |
| | | getDataSource: getList, |
| | | proTableProps, |
| | | paginationState, |
| | | extraParamState, |
| | | reset, |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetPersonalUserWalletBalancesQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | keywords: extraParamState.keywords, |
| | | }; |
| | | |
| | | let res = await userServices.getPersonalUserWalletBalances(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | return res; |
| | | } catch (error) {} |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | keywords: '', |
| | | status: '', |
| | | time: [] as unknown as ModelValueType, |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Asc }], |
| | | }, |
| | | columnsRenderProps: { |
| | | balance: { type: 'money' }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | | const { dialogProps, handleEdit, editForm } = useFormDialog({ |
| | | defaultFormParams: { |
| | | id: '', |
| | | status: '', |
| | | time: '', |
| | | }, |
| | | }); |
| | | |
| | | function openDialog(row) { |
| | | handleEdit({ |
| | | id: row.id, |
| | | status: '', |
| | | time: '', |
| | | }); |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <ProDialog title="详情" v-model="visible" @close="onDialogClose" destroy-on-close draggable> |
| | | <!-- <PortraitTableWithAttachment v-bind="portraitTableWithAttachmentProps" /> --> |
| | | <ProForm :model="form" ref="dialogForm" label-width="90px" style="margin-top: 20px" is-read> |
| | | <ProFormCol> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 label="提现状态:" prop="status"> |
| | | <ProFormRadio v-model="form.status" :value-enum="[]" /> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | | <ProFormCol> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 label="提现日期:" prop="time"> |
| | | <ProFormDatePicker v-model="form.time" type="date" format="YYYY-MM-DD HH:mm" /> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | | </ProForm> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="emit('onCancel')">取 消</el-button> |
| | | <el-button type="primary" @click="emit('onCancel')">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </ProDialog> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { FormInstance } from 'element-plus'; |
| | | import { |
| | | ProDialog, |
| | | ProForm, |
| | | ProFormItemV2, |
| | | ProFormCol, |
| | | ProFormColItem, |
| | | ProFormRadio, |
| | | ProFormDatePicker, |
| | | } from '@bole-core/components'; |
| | | import { usePortraitTableWithAttachment } from '@/hooks'; |
| | | import { convertApi2FormUrl } from '@/utils'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | |
| | | defineOptions({ |
| | | name: 'WithdrawalDetailDialog', |
| | | }); |
| | | |
| | | const visible = defineModel({ type: Boolean }); |
| | | |
| | | type Form = { |
| | | title?: string; |
| | | id: string; |
| | | status: string; |
| | | time: string; |
| | | }; |
| | | |
| | | const form = defineModel<Form>('form'); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'onConfirm'): void; |
| | | (e: 'onCancel'): void; |
| | | }>(); |
| | | |
| | | watch( |
| | | () => visible.value, |
| | | (val) => { |
| | | if (val) { |
| | | // refetch(); |
| | | } |
| | | } |
| | | ); |
| | | |
| | | // const { |
| | | // data: detail, |
| | | // refetch, |
| | | // isLoading, |
| | | // } = useQuery({ |
| | | // queryKey: ['parkBountyApplyServices/getEnterpriseDrawWithDetail', form.value?.id], |
| | | // queryFn: async () => { |
| | | // return await parkBountyApplyServices.getEnterpriseDrawWithDetail( |
| | | // { |
| | | // drawWithId: form.value?.id, |
| | | // }, |
| | | // { |
| | | // showLoading: true, |
| | | // } |
| | | // ); |
| | | // }, |
| | | // placeholderData: () => ({}), |
| | | // enabled: !!form.value?.id, |
| | | // onSuccess(data) {}, |
| | | // }); |
| | | |
| | | // const { portraitTableWithAttachmentProps } = usePortraitTableWithAttachment({ |
| | | // data: detail, |
| | | // annexList: computed(() => |
| | | // detail.value?.invoiceUrl |
| | | // ? detail.value?.invoiceUrl.split('|').map((item) => convertApi2FormUrl(item)) |
| | | // : [] |
| | | // ), |
| | | // columns: [ |
| | | // { |
| | | // label: '姓名', |
| | | // key: 'enterpriseName', |
| | | // }, |
| | | // { |
| | | // label: '身份证号', |
| | | // key: 'societyCreditCode', |
| | | // }, |
| | | // { |
| | | // label: '账户名称', |
| | | // key: 'accountName', |
| | | // }, |
| | | // { |
| | | // label: '银行帐号', |
| | | // key: 'bankNumber', |
| | | // }, |
| | | // { |
| | | // label: '开户银行', |
| | | // key: 'bankName', |
| | | // }, |
| | | // { |
| | | // label: '开户支行', |
| | | // key: 'bankResumeName', |
| | | // }, |
| | | // { |
| | | // label: '提现金额', |
| | | // key: 'amount', |
| | | // type: 'money', |
| | | // }, |
| | | // { |
| | | // label: '申请日期', |
| | | // key: 'creationTime', |
| | | // type: 'date', |
| | | // }, |
| | | // ], |
| | | // }); |
| | | |
| | | const dialogForm = ref<FormInstance>(); |
| | | |
| | | function onDialogClose() { |
| | | if (!dialogForm.value) return; |
| | | dialogForm.value.resetFields(); |
| | | } |
| | | </script> |
New file |
| | |
| | | import { defineColumns } from '@bole-core/components'; |
| | | |
| | | export const WithdrawManageColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'name', |
| | | name: '姓名', |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'code', |
| | | name: '身份证号', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'checkReceiveStatus', |
| | | name: '电话', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'settlementOrderStatus', |
| | | name: '申请时间', |
| | | }, |
| | | { |
| | | id: '5', |
| | | enCode: 'settlementOrderName', |
| | | name: '申请提现金额(元)', |
| | | }, |
| | | { |
| | | id: '6', |
| | | enCode: 'settlementOrderTime', |
| | | name: '提现状态', |
| | | }, |
| | | { |
| | | id: '7', |
| | | enCode: 'actualSettlementAmount', |
| | | name: '提现时间', |
| | | }, |
| | | ]); |
New file |
| | |
| | | export * from './columns'; |