| | |
| | | CommonServerSyncDatabase = 8, |
| | | /**短信工具 */ |
| | | CommonServerSmsUtils = 9, |
| | | /**配置 */ |
| | | CommonServerSettings = 10, |
| | | /**用户认证 */ |
| | | UserServerAuth = 10, |
| | | UserServerAuth = 11, |
| | | /**用户菜单 */ |
| | | UserServerMenu = 11, |
| | | UserServerMenu = 12, |
| | | /**用户资源 */ |
| | | UserServerResource = 12, |
| | | UserServerResource = 13, |
| | | /**用户角色 */ |
| | | UserServerRole = 13, |
| | | UserServerRole = 14, |
| | | /**用户信息 */ |
| | | UserServerUser = 14, |
| | | UserServerUser = 15, |
| | | /**用户钱包 */ |
| | | UserServerUserWallet = 15, |
| | | UserServerUserWallet = 16, |
| | | /**电子签 */ |
| | | UserServerElectronSign = 16, |
| | | UserServerElectronSign = 17, |
| | | /**用户简历 */ |
| | | UserServerUserResume = 17, |
| | | UserServerUserResume = 18, |
| | | /**企业信息 */ |
| | | UserServerEnterprise = 18, |
| | | UserServerEnterprise = 19, |
| | | /**企业钱包 */ |
| | | UserServerEnterpriseWallet = 19, |
| | | UserServerEnterpriseWallet = 20, |
| | | /**灵工信息 */ |
| | | UserServerEnterpriseEmployee = 20, |
| | | UserServerEnterpriseEmployee = 21, |
| | | /**电子签 */ |
| | | ElectronSignServerElectronSign = 21, |
| | | ElectronSignServerElectronSign = 22, |
| | | /**电子签 */ |
| | | ToolServerSms = 22, |
| | | ToolServerSms = 23, |
| | | } |
| | | |
| | | /** 资源请求方式 */ |
| | |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | // { |
| | | // path: '/BalanceManageList', |
| | | // name: 'BalanceManageList', |
| | | // hidden: false, |
| | | // alwaysShow: true, |
| | | // component: () => import('@/views/FinanceManage/BalanceManageList.vue'), |
| | | // meta: { |
| | | // rank: 10072, |
| | | // title: '余额管理', |
| | | // // rootMenu: true, |
| | | // icon: 'home', |
| | | // }, |
| | | // }, |
| | | // { |
| | | // path: '/BalanceManageDetail', |
| | | // name: 'BalanceManageDetail', |
| | | // hidden: true, |
| | | // alwaysShow: false, |
| | | // component: () => import('@/views/FinanceManage/BalanceManageDetail.vue'), |
| | | // meta: { |
| | | // rank: 10073, |
| | | // title: '详情', |
| | | // // rootMenu: true, |
| | | // icon: 'home', |
| | | // }, |
| | | // }, |
| | | ], |
| | | }, |
| | | { |
| | |
| | | import * as resource from './resource'; |
| | | import * as enterpriseWallet from './enterpriseWallet'; |
| | | import * as dictionary from './dictionary'; |
| | | import * as settings from './settings'; |
| | | import * as codeUrl from './codeUrl'; |
| | | import * as electronSign from './electronSign'; |
| | | import * as userResume from './userResume'; |
| | |
| | | resource, |
| | | enterpriseWallet, |
| | | dictionary, |
| | | settings, |
| | | codeUrl, |
| | | electronSign, |
| | | userResume, |
New file |
| | |
| | | /* eslint-disable */ |
| | | // @ts-ignore |
| | | import { request } from '@/utils/request'; |
| | | |
| | | /** 查询微信小程序配置信息 GET /api/common/settings/getWxmpSettings */ |
| | | export async function getWxmpSettings( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetWxmpSettingsParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetWxmpSettingsQueryResult>('/api/common/settings/getWxmpSettings', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | request: undefined, |
| | | ...params['request'], |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | interface APIgetSettlementTaskUsersParams { |
| | | /** 结算订单Id */ |
| | | id?: string; |
| | | /** 任务Id */ |
| | | taskInfoId?: string; |
| | | /** 结算通道 */ |
| | | settlementAccess?: EnumEnterpriseWalletAccess; |
| | | } |
| | | |
| | | interface APIgetTaskEnterpriseParams { |
| | |
| | | interface APIgetUserResumeWorkExperienceParams { |
| | | /** 查询用户简历-工作经验 */ |
| | | request?: GetUserResumeWorkExperienceQuery; |
| | | } |
| | | |
| | | interface APIgetWxmpSettingsParams { |
| | | /** 查询微信小程序配置信息 */ |
| | | request?: GetWxmpSettingsQuery; |
| | | } |
| | | |
| | | interface ApplyTaskCommand { |
| | |
| | | CommonServerSyncDatabase = 8, |
| | | /**短信工具 */ |
| | | CommonServerSmsUtils = 9, |
| | | /**配置 */ |
| | | CommonServerSettings = 10, |
| | | /**用户认证 */ |
| | | UserServerAuth = 10, |
| | | UserServerAuth = 11, |
| | | /**用户菜单 */ |
| | | UserServerMenu = 11, |
| | | UserServerMenu = 12, |
| | | /**用户资源 */ |
| | | UserServerResource = 12, |
| | | UserServerResource = 13, |
| | | /**用户角色 */ |
| | | UserServerRole = 13, |
| | | UserServerRole = 14, |
| | | /**用户信息 */ |
| | | UserServerUser = 14, |
| | | UserServerUser = 15, |
| | | /**用户钱包 */ |
| | | UserServerUserWallet = 15, |
| | | UserServerUserWallet = 16, |
| | | /**电子签 */ |
| | | UserServerElectronSign = 16, |
| | | UserServerElectronSign = 17, |
| | | /**用户简历 */ |
| | | UserServerUserResume = 17, |
| | | UserServerUserResume = 18, |
| | | /**企业信息 */ |
| | | UserServerEnterprise = 18, |
| | | UserServerEnterprise = 19, |
| | | /**企业钱包 */ |
| | | UserServerEnterpriseWallet = 19, |
| | | UserServerEnterpriseWallet = 20, |
| | | /**灵工信息 */ |
| | | UserServerEnterpriseEmployee = 20, |
| | | UserServerEnterpriseEmployee = 21, |
| | | /**电子签 */ |
| | | ElectronSignServerElectronSign = 21, |
| | | ElectronSignServerElectronSign = 22, |
| | | /**电子签 */ |
| | | ToolServerSms = 22, |
| | | ToolServerSms = 23, |
| | | } |
| | | |
| | | enum EnumResourceMethod { |
| | |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: GetUserResumeWorkExperienceQueryResult; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultGetWxmpSettingsQueryResult { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: GetWxmpSettingsQueryResult; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | |
| | | name?: string; |
| | | /** 身份证号 */ |
| | | identity?: string; |
| | | /** 微信开放Id */ |
| | | wxmpOpenId?: string; |
| | | /** 手机号 */ |
| | | contactPhoneNumber?: string; |
| | | /** 所属银行 */ |
| | |
| | | workSeniority?: string; |
| | | /** 工作经验 */ |
| | | workExperience?: string; |
| | | } |
| | | |
| | | type GetWxmpSettingsQuery = Record<string, any>; |
| | | |
| | | interface GetWxmpSettingsQueryResult { |
| | | /** 隐藏支付宝 */ |
| | | hiddenAlipay?: boolean; |
| | | } |
| | | |
| | | interface ImportEnterpriseEmployeesCommand { |
| | |
| | | interface SureTaskSettlementCommand { |
| | | /** 任务Id */ |
| | | taskInfoId?: string; |
| | | settlementAccess?: EnumEnterpriseWalletAccess; |
| | | } |
| | | |
| | | type SyncDatabaseCommand = Record<string, any>; |
New file |
| | |
| | | <template> |
| | | <LoadingLayout :loading="isLoading"> |
| | | <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> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="账户类型:" prop="settlementAmount"> |
| | | <ProFormSelect v-model="form.name" :valueEnum="[]"> </ProFormSelect> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="户号:" prop="actualSettlementAmount"> |
| | | <ProFormText v-model.trim="form.name"> </ProFormText> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | | </ProForm> |
| | | </ChunkCell> |
| | | <ChunkCell title="发放明细" style="flex: 1" class="settlement-user-list-chunk"> |
| | | <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> |
| | | </template> |
| | | <template #btn> |
| | | <el-button type="primary" @click="handleExport()">导出</el-button> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="BalanceManageDetailColumns" |
| | | :show-operation-column="false" |
| | | > |
| | | </ProTableV2> |
| | | </ChunkCell> |
| | | </AppContainer> |
| | | </LoadingLayout> |
| | | </template> |
| | | <script setup lang="ts"> |
| | | import { |
| | | LoadingLayout, |
| | | AppContainer, |
| | | ChunkCell, |
| | | ProForm, |
| | | ProFormItemV2, |
| | | ProFormText, |
| | | ProFormCol, |
| | | ProFormColItem, |
| | | FieldDatePicker, |
| | | ProFormInputNumber, |
| | | useTable, |
| | | ProTableV2, |
| | | QueryFilterItem, |
| | | ProTableQueryFilterBar, |
| | | ProFormSelect, |
| | | } from '@bole-core/components'; |
| | | import { BalanceManageDetailColumns } from './constants'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | 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 _ from 'lodash'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | |
| | | defineOptions({ |
| | | name: 'BalanceManageDetail', |
| | | }); |
| | | |
| | | const route = useRoute(); |
| | | const id = (route.params.id as string) ?? ''; |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | | }); |
| | | |
| | | const BaseState = { |
| | | loading: true, |
| | | }; |
| | | |
| | | 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, |
| | | proTableProps, |
| | | paginationState, |
| | | extraParamState, |
| | | reset, |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetPersonalUserWalletBalancesQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | }; |
| | | |
| | | let res = await userServices.getPersonalUserWalletBalances(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | return res; |
| | | } catch (error) {} |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | time: [] as unknown as ModelValueType, |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | }, |
| | | columnsRenderProps: { |
| | | balance: { type: 'money' }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | | const handleExport = _.debounce( |
| | | async () => { |
| | | if (paginationState.total === 0) { |
| | | Message.warnMessage('没有数据可以导出哦~'); |
| | | return; |
| | | } |
| | | try { |
| | | let params: API.ExportTaskSettlementOrderRostersCommand = { |
| | | id: id, |
| | | }; |
| | | let res = await taskServices.exportTaskSettlementOrderRosters(params); |
| | | if (res) { |
| | | downloadFileByUrl(setOSSLink(res), `${form.name}`); |
| | | } |
| | | } catch (error) {} |
| | | }, |
| | | 1000, |
| | | { leading: true, trailing: false } |
| | | ); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @use '@/style/common.scss' as *; |
| | | |
| | | .step-wrapper { |
| | | margin: 0 auto; |
| | | padding: 24px 0; |
| | | } |
| | | |
| | | .settlement-user-list-chunk { |
| | | :deep() { |
| | | .no-data img { |
| | | width: 280px; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | <style lang="scss"> |
| | | .text-over-tooltip-content { |
| | | max-width: 600px; |
| | | word-break: break-all; |
| | | } |
| | | </style> |
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="BalanceManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | </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 { BalanceManageColumns } from './constants'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | |
| | | defineOptions({ |
| | | name: 'BalanceManageList', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'rechargeBtn', |
| | | name: '充值', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '详情', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => goDetail(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.Desc }], |
| | | }, |
| | | columnsRenderProps: { |
| | | balance: { type: 'money' }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | | const { dialogProps, handleEdit, editForm } = useFormDialog({ |
| | | defaultFormParams: { |
| | | id: '', |
| | | status: '', |
| | | time: '', |
| | | }, |
| | | }); |
| | | |
| | | function openDialog(row) { |
| | | handleEdit({ |
| | | id: row.id, |
| | | status: '', |
| | | time: '', |
| | | }); |
| | | } |
| | | |
| | | function goDetail(row) { |
| | | router.push({ |
| | | name: 'BalanceManageDetail', |
| | | params: { |
| | | id: row?.id ?? '', |
| | | }, |
| | | }); |
| | | } |
| | | </script> |
| | |
| | | name: '费用(元)', |
| | | }, |
| | | ]); |
| | | |
| | | export const BalanceManageColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'name', |
| | | name: '账户类型', |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'name', |
| | | name: '户号', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'name', |
| | | name: '账户余额', |
| | | }, |
| | | ]); |
| | | |
| | | export const BalanceManageDetailColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'name', |
| | | name: '发放日期', |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'name', |
| | | name: '流水号', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'name', |
| | | name: '状态', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'name', |
| | | name: '金额', |
| | | }, |
| | | { |
| | | id: '5', |
| | | enCode: 'name', |
| | | name: '收款人', |
| | | }, |
| | | { |
| | | id: '6', |
| | | enCode: 'name', |
| | | name: '身份证号', |
| | | }, |
| | | { |
| | | id: '7', |
| | | enCode: 'name', |
| | | name: '收款人账户', |
| | | }, |
| | | { |
| | | id: '8', |
| | | enCode: 'name', |
| | | name: '提现日期', |
| | | }, |
| | | { |
| | | id: '9', |
| | | enCode: 'name', |
| | | name: '电子回单', |
| | | }, |
| | | ]); |
| | |
| | | const route = useRoute(); |
| | | const id = (route.params.id as string) ?? ''; |
| | | const settlement = (route.query.settlement as string) ?? ''; |
| | | const settlementAccess = route.query.settlementAccess ?? ''; |
| | | const isSettlement = computed(() => !!settlement); |
| | | |
| | | const form = reactive({ |
| | |
| | | const state = reactive({ ...BaseState }); |
| | | |
| | | const { isLoading, refetch } = useQuery({ |
| | | queryKey: ['taskUserServices/getSettlementTaskUsers', id], |
| | | queryKey: ['taskUserServices/getSettlementTaskUsers', id, settlementAccess], |
| | | queryFn: async () => { |
| | | return await taskUserServices.getSettlementTaskUsers( |
| | | { id: id }, |
| | | { |
| | | showLoading: false, |
| | | let params: API.APIgetSettlementTaskUsersParams = { |
| | | id: id, |
| | | }; |
| | | if (settlementAccess) { |
| | | params.settlementAccess = Number(settlementAccess); |
| | | } |
| | | ); |
| | | return await taskUserServices.getSettlementTaskUsers(params, { |
| | | showLoading: false, |
| | | }); |
| | | }, |
| | | placeholderData: () => ({} as API.GetSettlementTaskUsersQueryResult), |
| | | onSuccess(res) { |
| | |
| | | code: form.code, |
| | | settlementUserCount: form.settlementTaskUsers.length, |
| | | actualSettlementAmount: form.actualSettlementAmount, |
| | | settlementAccess: '' as any as EnumEnterpriseWalletAccess, |
| | | }); |
| | | } |
| | | |
| | |
| | | code: '', |
| | | settlementUserCount: 0, |
| | | actualSettlementAmount: 0, |
| | | settlementAccess: '' as any as EnumEnterpriseWalletAccess, |
| | | }, |
| | | }); |
| | | |
| | |
| | | try { |
| | | let params: API.SureTaskSettlementCommand = { |
| | | taskInfoId: id, |
| | | settlementAccess: settleEditForm.settlementAccess, |
| | | }; |
| | | let res = await taskServices.sureTaskSettlement(params); |
| | | if (res) { |
| | |
| | | <UploadStatementDialog v-bind="dialogProps" /> |
| | | <!-- <SettleDetailDialog v-bind="dialogSettleProps" /> --> |
| | | <RechargeEnterpriseWalletDialog v-bind="dialogRechargeProps" /> |
| | | <SettlMethodDialog v-bind="dialogSettlMethodProps" /> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | |
| | | import { ModelValueType } from 'element-plus'; |
| | | import UploadStatementDialog from './components/UploadStatementDialog.vue'; |
| | | import SettleDetailDialog from './components/SettleDetailDialog.vue'; |
| | | import SettlMethodDialog from './components/SettlMethodDialog.vue'; |
| | | import RechargeEnterpriseWalletDialog from './components/RechargeEnterpriseWalletDialog.vue'; |
| | | import { Message } from '@bole-core/core'; |
| | | |
| | |
| | | name: '结算', |
| | | }, |
| | | emits: { |
| | | onClick: (role: API.GetSettlementTasksQueryResultItem) => goDetail(role, 'settlement'), |
| | | onClick: (role: API.GetSettlementTasksQueryResultItem) => openSettleMethodDialog(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (role: API.GetSettlementTasksQueryResultItem) => |
| | |
| | | name: '详情', |
| | | }, |
| | | emits: { |
| | | onClick: (role: API.GetSettlementTasksQueryResultItem) => goDetail(role), |
| | | onClick: (role: API.GetSettlementTasksQueryResultItem) => goDetail(role.id), |
| | | }, |
| | | // extraProps: { |
| | | // hide: (role: API.GetSettlementTasksQueryResultItem) => |
| | |
| | | editForm.settlementUrl = [] as UploadUserFile[]; |
| | | } |
| | | |
| | | function goDetail(row: API.GetSettlementTasksQueryResultItem, settlement?: string) { |
| | | const { |
| | | dialogProps: dialogSettlMethodProps, |
| | | handleAdd: handleSettlMethodAdd, |
| | | editForm: settlMethodEditForm, |
| | | } = useFormDialog({ |
| | | onConfirm: handleSettlMethod, |
| | | defaultFormParams: { |
| | | id: '', |
| | | settlementAccess: '' as any as EnumEnterpriseWalletAccess, |
| | | }, |
| | | }); |
| | | |
| | | function openSettleMethodDialog(row: API.GetSettlementTasksQueryResultItem) { |
| | | handleSettlMethodAdd({ |
| | | id: row.id, |
| | | settlementAccess: '' as any as EnumEnterpriseWalletAccess, |
| | | }); |
| | | } |
| | | |
| | | async function handleSettlMethod() { |
| | | goDetail(settlMethodEditForm.id, 'settlement', settlMethodEditForm.settlementAccess); |
| | | } |
| | | |
| | | function goDetail(id: string, settlement?: string, settlementAccess?: EnumEnterpriseWalletAccess) { |
| | | router.push({ |
| | | name: 'ServiceChargeDetail', |
| | | params: { |
| | | id: row?.id ?? '', |
| | | id: id ?? '', |
| | | }, |
| | | query: { |
| | | settlement: settlement ? settlement : '', |
| | | settlementAccess: settlementAccess ? settlementAccess : '', |
| | | }, |
| | | }); |
| | | } |
New file |
| | |
| | | <template> |
| | | <ProDialog |
| | | title="结算方式" |
| | | v-model="visible" |
| | | @close="onDialogClose" |
| | | destroy-on-close |
| | | draggable |
| | | :width="700" |
| | | > |
| | | <ProForm :model="form" ref="dialogForm" label-width="120px"> |
| | | <ProFormItemV2 |
| | | label="结算方式:" |
| | | prop="settlementAccess" |
| | | :check-rules="[{ message: '请选择结算方式' }]" |
| | | > |
| | | <ProFormSelect v-model="form.settlementAccess" :valueEnum="settlementAccessList"> |
| | | </ProFormSelect> |
| | | </ProFormItemV2> |
| | | </ProForm> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="emit('onCancel')">取消</el-button> |
| | | <el-button type="primary" @click="emit('onConfirm')">确认</el-button> |
| | | </span> |
| | | </template> |
| | | </ProDialog> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { FormInstance } from 'element-plus'; |
| | | import { ProDialog, ProForm, ProFormItemV2, ProFormSelect } from '@bole-core/components'; |
| | | import { EnumEnterpriseWalletAccess, EnumEnterpriseWalletAccessTextForSettle } from '@/constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'SettlMethodDialog', |
| | | }); |
| | | |
| | | type Form = { |
| | | title?: string; |
| | | id: string; |
| | | settlementAccess: EnumEnterpriseWalletAccess; |
| | | }; |
| | | |
| | | const { enterpriseWalletAccessSelect } = useEnterpriseWalletAccessSelect(); |
| | | |
| | | const settlementAccessList = computed(() => { |
| | | return enterpriseWalletAccessSelect.value?.length > 0 |
| | | ? enterpriseWalletAccessSelect.value.map((x) => ({ |
| | | label: EnumEnterpriseWalletAccessTextForSettle[x.access], |
| | | value: x.access, |
| | | })) |
| | | : []; |
| | | }); |
| | | |
| | | const visible = defineModel({ type: Boolean }); |
| | | |
| | | const form = defineModel<Form>('form'); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'onConfirm'): void; |
| | | (e: 'onCancel'): void; |
| | | }>(); |
| | | |
| | | const dialogForm = ref<FormInstance>(); |
| | | |
| | | function onDialogClose() { |
| | | if (!dialogForm.value) return; |
| | | dialogForm.value.resetFields(); |
| | | } |
| | | </script> |
| | |
| | | <ProFormInputNumber v-model="form.actualSettlementAmount" unit="元" format-value="money"> |
| | | </ProFormInputNumber> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 |
| | | <!-- <ProFormItemV2 |
| | | label="结算方式:" |
| | | prop="settlementAccess" |
| | | :check-rules="[{ message: '请选择结算方式' }]" |
| | | > |
| | | <ProFormSelect v-model="form.settlementAccess" :valueEnum="settlementAccessList"> |
| | | </ProFormSelect> |
| | | </ProFormItemV2> |
| | | </ProFormItemV2> --> |
| | | </ProForm> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | |
| | | code: string; |
| | | settlementUserCount: number; |
| | | actualSettlementAmount: number; |
| | | settlementAccess: EnumEnterpriseWalletAccess; |
| | | // settlementAccess: EnumEnterpriseWalletAccess; |
| | | }; |
| | | |
| | | const { enterpriseWalletAccessSelect } = useEnterpriseWalletAccessSelect(); |