| | |
| | | "EnumUserType": true, |
| | | "EnumUserTypeText": true, |
| | | "EnumUserWalletTransactionType": true, |
| | | "EnumUserWalletTransactionTypeText": true, |
| | | "EnumWalletTransactionStatus": true, |
| | | "EnumWalletTransactionStatusText": true, |
| | | "ExtractDefaultPropTypes": true, |
| | | "ExtractPropTypes": true, |
| | | "ExtractPublicPropTypes": true, |
| | |
| | | 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'] |
| | |
| | | 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']> |
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'; |
| | |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultGetPersonalUserWalletBalancesQueryResult { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: GetPersonalUserWalletBalancesQueryResult; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultGetResourceLogsQueryResult { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | |
| | | interface GetPersonalUserInfoSignContractsQuery { |
| | | /** 用户Id */ |
| | | id?: string; |
| | | /** 灵工Id */ |
| | | enterpriseEmployeeId?: string; |
| | | pageModel?: PagedListQueryPageModel; |
| | | } |
| | | |
| | |
| | | settlementAmount?: number; |
| | | /** 实发金额/提现金额 */ |
| | | amount?: number; |
| | | /** 收款人姓名 */ |
| | | receiveName?: string; |
| | | /** 付款人账户 */ |
| | | payerAccount?: string; |
| | | /** 付款人名称 */ |
| | | payerName?: string; |
| | | /** 付款人开户行 */ |
| | | payerBank?: string; |
| | | /** 付款人支行 */ |
| | | payerBankBranch?: string; |
| | | /** 收款账户 */ |
| | | receiveAccount?: string; |
| | | /** 收款人名称 */ |
| | | receiveName?: string; |
| | | /** 收款人开户行 */ |
| | | receiveBank?: string; |
| | | /** 收款人支行 */ |
| | | receiveBankBranch?: string; |
| | | /** 币种 */ |
| | | currency?: string; |
| | | /** 用途 */ |
| | | purpose?: string; |
| | | /** 服务费 */ |
| | | serviceFee?: number; |
| | | /** 实际到账 */ |
| | |
| | | transDate?: string; |
| | | /** 创建时间 */ |
| | | createdTime?: string; |
| | | transactionStatus?: EnumWalletTransactionStatus; |
| | | /** 失败原因 */ |
| | | failReason?: string; |
| | | } |
| | |
| | | /** 创建时间-截止 */ |
| | | createdTimeEnd?: string; |
| | | type?: EnumUserWalletTransactionType; |
| | | /** 用户Id */ |
| | | userId?: string; |
| | | pageModel?: PagedListQueryPageModel; |
| | | } |
| | | |
| | |
| | | interface GetPersonalUserTransactionsQueryResultItem { |
| | | /** 收支Id */ |
| | | id?: string; |
| | | type?: EnumUserWalletTransactionType; |
| | | /** 标题 */ |
| | | title?: string; |
| | | /** 创建时间 */ |
| | | createdTime?: string; |
| | | /** 金额 */ |
| | | amount?: number; |
| | | /** 余额 */ |
| | | balance?: number; |
| | | /** 企业名称 */ |
| | | enterpriseName?: string; |
| | | /** 付款人账户 */ |
| | | payerAccount?: string; |
| | | /** 付款人名称 */ |
| | | payerName?: string; |
| | | /** 付款人账号 */ |
| | | payerUserName?: string; |
| | | /** 付款人联系人 */ |
| | | payerContacts?: string; |
| | | /** 付款人联系电话 */ |
| | | payerContactPhoneNumber?: string; |
| | | /** 收款账户 */ |
| | | receiveAccount?: string; |
| | | /** 收款人名称 */ |
| | | receiveName?: string; |
| | | /** 用途 */ |
| | | purpose?: string; |
| | | /** 创建时间 */ |
| | | createdTime?: string; |
| | | /** 交易时间 */ |
| | | transDate?: string; |
| | | } |
| | | |
| | | interface GetPersonalUserTransactionsQueryResultObjectData { |
| | |
| | | sumWithdraw?: number; |
| | | } |
| | | |
| | | interface GetPersonalUserWalletBalancesQuery { |
| | | /** 最小余额 */ |
| | | balanceMin?: number; |
| | | /** 最大余额 */ |
| | | balanceMax?: number; |
| | | /** 关键字 */ |
| | | keywords?: string; |
| | | pageModel?: PagedListQueryPageModel; |
| | | } |
| | | |
| | | interface GetPersonalUserWalletBalancesQueryResult { |
| | | pageModel?: PagedListQueryResultPageModel; |
| | | /** 数据 */ |
| | | data?: GetPersonalUserWalletBalancesQueryResultItem[]; |
| | | } |
| | | |
| | | interface GetPersonalUserWalletBalancesQueryResultItem { |
| | | /** 用户Id */ |
| | | id?: string; |
| | | /** 姓名 */ |
| | | name?: string; |
| | | /** 手机号 */ |
| | | contactPhoneNumber?: string; |
| | | /** 身份证号 */ |
| | | identity?: string; |
| | | /** 余额 */ |
| | | balance?: number; |
| | | } |
| | | |
| | | interface GetResourceFieldsQueryResultItem { |
| | | /** 编号 */ |
| | | code?: string; |
| | |
| | | ); |
| | | } |
| | | |
| | | /** 查询个人钱包余额分页列表 POST /api/user/user/getPersonalUserWalletBalances */ |
| | | export async function getPersonalUserWalletBalances( |
| | | body: API.GetPersonalUserWalletBalancesQuery, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetPersonalUserWalletBalancesQueryResult>( |
| | | '/api/user/user/getPersonalUserWalletBalances', |
| | | { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | } |
| | | |
| | | /** 查询用户角色列表 GET /api/user/user/getUserInfoRoles */ |
| | | export async function getUserInfoRoles( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | |
| | | <AppContainer> |
| | | <ProTableQueryFilterBar @on-reset="reset"> |
| | | <template #query> |
| | | <QueryFilterItem> |
| | | <FieldSelect |
| | | placeholder="所属公司" |
| | | v-model="extraParamState.status" |
| | | :value-enum="[]" |
| | | @change="getList()" |
| | | /> |
| | | </QueryFilterItem> |
| | | <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" |
| | |
| | | FieldSelect, |
| | | } from '@bole-core/components'; |
| | | import { useAccess } from '@/hooks'; |
| | | import * as enterpriseServices from '@/services/api/enterprise'; |
| | | import * as userServices from '@/services/api/user'; |
| | | import BalanceDetailDialog from './components/BalanceDetailDialog.vue'; |
| | | |
| | | defineOptions({ |
| | |
| | | } = 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: {}, |
| | |
| | | } from '@bole-core/components'; |
| | | import { useAccess } from '@/hooks'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import * as enterpriseServices from '@/services/api/enterprise'; |
| | | import * as userServices from '@/services/api/user'; |
| | | import FinanceDetailDialog from './components/FinanceDetailDialog.vue'; |
| | | |
| | | defineOptions({ |
| | |
| | | } = 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, |
| | | type: EnumUserWalletTransactionType.Income, |
| | | }; |
| | | let res = await enterpriseServices.getEnterprises(params, { |
| | | let res = await userServices.getPersonalUserTransactions(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | return res; |
| | |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | keyword: '', |
| | | pageType: '' as any as number, |
| | | status: '' as any as boolean, |
| | | beginDate: [] as unknown as ModelValueType, |
| | | endDate: [] as unknown as ModelValueType, |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Asc }], |
| | | }, |
| | | columnsRenderProps: {}, |
| | | columnsRenderProps: { |
| | | transDate: { type: 'date', format: 'YYYY-MM-DD HH:mm:ss' }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | |
| | | <template #query> |
| | | <QueryFilterItem> |
| | | <FieldSelect |
| | | v-model="extraParamState.status" |
| | | :valueEnum="[]" |
| | | v-model="extraParamState.type" |
| | | :valueEnum="EnumUserWalletTransactionTypeText" |
| | | clearable |
| | | filterable |
| | | placeholder="交易类型" |
| | | @change="getList()" |
| | | /> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem tip-content="查询日期"> |
| | |
| | | </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, |
| | | useFormDialog, |
| | | defineOperationBtns, |
| | | } 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 { EnumUserWalletTransactionTypeText, EnumUserWalletTransactionType } 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: '收入', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'name', |
| | | enCode: 'outcome', |
| | | name: '支出', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'name', |
| | | enCode: 'balance', |
| | | name: '账户余额', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'name', |
| | | enCode: 'account', |
| | | name: '对方帐号/户名', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'name', |
| | | 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> |
| | |
| | | <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', |
| | |
| | | (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: form, |
| | | data: detail, |
| | | columns: [ |
| | | { |
| | | label: '付款人账户', |
| | | key: 'id', |
| | | type: 'text', |
| | | key: 'payerAccount', |
| | | }, |
| | | { |
| | | label: '收款人账户', |
| | | key: 'id', |
| | | type: 'text', |
| | | key: 'receiveAccount', |
| | | }, |
| | | { |
| | | label: '付款人名称', |
| | | key: 'id', |
| | | type: 'text', |
| | | key: 'payerName', |
| | | }, |
| | | { |
| | | label: '收款人名称', |
| | | key: 'id', |
| | | type: 'text', |
| | | key: 'receiveName', |
| | | }, |
| | | { |
| | | label: '付款人开户行', |
| | | key: 'id', |
| | | type: 'text', |
| | | key: 'payerBank', |
| | | }, |
| | | { |
| | | label: '收款人开户行', |
| | | key: 'id', |
| | | type: 'text', |
| | | key: 'receiveBank', |
| | | }, |
| | | { |
| | | label: '币种', |
| | | key: 'id', |
| | | type: 'text', |
| | | key: 'currency', |
| | | }, |
| | | { |
| | | label: '交易金额', |
| | | key: 'id', |
| | | key: 'actualAmount', |
| | | type: 'money', |
| | | }, |
| | | { |
| | | label: '用途', |
| | | key: 'id', |
| | | type: 'text', |
| | | key: 'purpose', |
| | | }, |
| | | { |
| | | label: '摘要', |
| | | key: 'id', |
| | | type: 'text', |
| | | key: 'failReason', |
| | | }, |
| | | { |
| | | label: '交易时间', |
| | | key: 'id', |
| | | type: 'text', |
| | | key: 'transDate', |
| | | type: 'date', |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | }, |
| | | { |
| | | label: '交易状态', |
| | | key: 'id', |
| | | type: 'text', |
| | | key: 'transactionStatus', |
| | | type: 'enum', |
| | | valueEnum: EnumWalletTransactionStatusText, |
| | | }, |
| | | ], |
| | | }); |