4个文件已删除
36个文件已修改
2 文件已重命名
6个文件已添加
| | |
| | | "EnumEnterpriseCooperationWalletTransactionStatusTextForConfirm": true, |
| | | "EnumEnterpriseCostStatus": true, |
| | | "EnumEnterpriseCostType": true, |
| | | "EnumEnterpriseEmployeeSource": true, |
| | | "EnumEnterpriseEmployeeSourceText": true, |
| | | "EnumEnterpriseRealMethod": true, |
| | | "EnumEnterpriseType": true, |
| | | "EnumEnterpriseTypeText": true, |
| | | "EnumEnterpriseWalletAccess": true, |
| | | "EnumEnterpriseWalletAccessText": true, |
| | | "EnumEnterpriseWalletAccessTextForSettle": true, |
| | |
| | | "GlobalEventListener": true, |
| | | "IdentityCodeEnum": true, |
| | | "ImportEnterpriseEmployeesTempPath": true, |
| | | "ImportFlexJobTempPath": true, |
| | | "InjectionKey": true, |
| | | "MaybeRef": true, |
| | | "MaybeRefOrGetter": true, |
| | |
| | | const EnumEnterpriseCooperationWalletTransactionStatusTextForConfirm: typeof import('./src/constants/finance')['EnumEnterpriseCooperationWalletTransactionStatusTextForConfirm'] |
| | | const EnumEnterpriseCostStatus: typeof import('./src/constants/apiEnum')['EnumEnterpriseCostStatus'] |
| | | const EnumEnterpriseCostType: typeof import('./src/constants/apiEnum')['EnumEnterpriseCostType'] |
| | | const EnumEnterpriseEmployeeSource: typeof import('./src/constants/apiEnum')['EnumEnterpriseEmployeeSource'] |
| | | const EnumEnterpriseEmployeeSourceText: typeof import('./src/constants/enterpriseEmployee')['EnumEnterpriseEmployeeSourceText'] |
| | | const EnumEnterpriseRealMethod: typeof import('./src/constants/apiEnum')['EnumEnterpriseRealMethod'] |
| | | const EnumEnterpriseType: typeof import('./src/constants/apiEnum')['EnumEnterpriseType'] |
| | | const EnumEnterpriseTypeText: typeof import('./src/constants/apiEnumText')['EnumEnterpriseTypeText'] |
| | | const EnumEnterpriseWalletAccess: typeof import('./src/constants/apiEnum')['EnumEnterpriseWalletAccess'] |
| | | const EnumEnterpriseWalletAccessText: typeof import('./src/constants/enterpriseWallet')['EnumEnterpriseWalletAccessText'] |
| | | const EnumEnterpriseWalletAccessTextForSettle: typeof import('./src/constants/task')['EnumEnterpriseWalletAccessTextForSettle'] |
| | |
| | | const GetTaskInfoQueryResultHireButton: typeof import('./src/constants/apiEnum')['GetTaskInfoQueryResultHireButton'] |
| | | const IdentityCodeEnum: typeof import('./src/constants/dic')['IdentityCodeEnum'] |
| | | const ImportEnterpriseEmployeesTempPath: typeof import('./src/constants/enterpriseEmployee')['ImportEnterpriseEmployeesTempPath'] |
| | | const ImportFlexJobTempPath: typeof import('./src/constants/enterpriseEmployee')['ImportFlexJobTempPath'] |
| | | const MenuSvgIconMap: typeof import('./src/constants/menu')['MenuSvgIconMap'] |
| | | const ModuleColumns: typeof import('./src/constants/module')['ModuleColumns'] |
| | | const MyRegExp: typeof import('./src/constants/regExp')['MyRegExp'] |
| | |
| | | export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' |
| | | import('vue') |
| | | // @ts-ignore |
| | | export type { EnumBillingMethod, EnumClientType, EnumCodeUrlScene, EnumConsoleLogAccess, EnumContractTemplateStatus, EnumContractTemplateValueRecorder, EnumContractTemplateValueType, EnumDataSource, EnumDbAuditOperate, EnumElectronSignAccess, EnumElectronSignVerifyType, EnumEnterpriseCooperationSignStatus, EnumEnterpriseCooperationStatus, EnumEnterpriseCooperationWalletTransactionStatus, EnumEnterpriseCostStatus, EnumEnterpriseCostType, EnumEnterpriseRealMethod, EnumEnterpriseType, EnumEnterpriseWalletAccess, EnumEnterpriseWalletExpandindirectOrderFileType, EnumEnterpriseWalletExpandindirectOrderScene, EnumEnterpriseWalletExpandindirectOrderStatus, EnumEnterpriseWalletSignStatus, EnumEnterpriseWalletTransactionType, EnumGetArrangeTaskUsersQueryApplyStatus, EnumGetCheckReceiveTaskCheckInUsersQueryStatus, EnumGetCheckReceiveTasksQueryResultItemCheckStatus, EnumGetEnterpriseEmployeesQuerySignContractStatus, EnumLogLevel, EnumMenuType, EnumMenuVisitLevel, EnumOcrAccess, EnumPagedListOrder, EnumPayAccess, EnumPersonalFreeTime, EnumPersonalJobSeekingStatus, EnumPersonalRealMethod, EnumPersonalUserRealStatus, EnumRealAccess, EnumResourceController, EnumResourceMethod, EnumRoleWebApiDataPower, EnumSettlementCycle, EnumSmsAccess, EnumSmsStatus, EnumTaskApplyStatus, EnumTaskCheckReceiveMethod, EnumTaskCheckReceiveStatus, EnumTaskPaymentMethod, EnumTaskRecommendStatus, EnumTaskReleaseStatus, EnumTaskSettlementAuditStatus, EnumTaskSettlementOrderStatus, EnumTaskSettlementStatus, EnumTaskStatus, EnumTaskUserApplyStatus, EnumTaskUserArrangeStatus, EnumTaskUserHireStatus, EnumTaskUserSignContractStatus, EnumTaskUserSubmitCheckHistoryType, EnumTaskUserSubmitCheckReceiveStatus, EnumUserBankCardAccess, EnumUserGender, EnumUserRealMethod, EnumUserStatus, EnumUserType, EnumUserWalletTransactionType, EnumWalletTransactionStatus, EnumWeChatPayApplymentBankAccountType, EnumWeChatPayApplymentCertType, EnumWeChatPayApplymentContactType, EnumWeChatPayApplymentFinanceType, EnumWeChatPayApplymentIdDocType, EnumWeChatPayApplymentIdHolderType, EnumWeChatPayApplymentSalesScenesType, EnumWeChatPayApplymentState, EnumWeChatPayApplymentSubjectType, EnumWeChatPaySettlementModifyVerifyResult, EnumWeChatPaySettlementVerifyResult, GetPersonalApplyTaskInfosQueryStatus, GetPersonalHireTaskInfosQueryStatus, GetSettlementTasksQueryPaymentStatus, GetSettlementTasksQuerySupplierPaymentStatus, GetTaskInfoQueryResultApplyButton, GetTaskInfoQueryResultHireButton, SettlementReceiveStatus, EnumBillingMethod, EnumClientType, EnumCodeUrlScene, EnumConsoleLogAccess, EnumContractTemplateStatus, EnumContractTemplateValueRecorder, EnumContractTemplateValueType, EnumDataSource, EnumDbAuditOperate, EnumElectronSignAccess, EnumElectronSignVerifyType, EnumEnterpriseCooperationSignStatus, EnumEnterpriseCooperationStatus, EnumEnterpriseCooperationWalletTransactionStatus, EnumEnterpriseCostStatus, EnumEnterpriseCostType, EnumEnterpriseRealMethod, EnumEnterpriseType, EnumEnterpriseWalletAccess, EnumEnterpriseWalletExpandindirectOrderFileType, EnumEnterpriseWalletExpandindirectOrderScene, EnumEnterpriseWalletExpandindirectOrderStatus, EnumEnterpriseWalletSignStatus, EnumEnterpriseWalletTransactionType, EnumGetArrangeTaskUsersQueryApplyStatus, EnumGetCheckReceiveTaskCheckInUsersQueryStatus, EnumGetCheckReceiveTasksQueryResultItemCheckStatus, EnumGetEnterpriseEmployeesQuerySignContractStatus, EnumLogLevel, EnumMenuType, EnumMenuVisitLevel, EnumOcrAccess, EnumPagedListOrder, EnumPayAccess, EnumPersonalFreeTime, EnumPersonalJobSeekingStatus, EnumPersonalRealMethod, EnumPersonalUserRealStatus, EnumRealAccess, EnumResourceController, EnumResourceMethod, EnumRoleWebApiDataPower, EnumSettlementCycle, EnumSmsAccess, EnumSmsStatus, EnumTaskApplyStatus, EnumTaskCheckReceiveMethod, EnumTaskCheckReceiveStatus, EnumTaskPaymentMethod, EnumTaskRecommendStatus, EnumTaskReleaseStatus, EnumTaskSettlementAuditStatus, EnumTaskSettlementOrderStatus, EnumTaskSettlementStatus, EnumTaskStatus, EnumTaskUserApplyStatus, EnumTaskUserArrangeStatus, EnumTaskUserHireStatus, EnumTaskUserSignContractStatus, EnumTaskUserSubmitCheckHistoryType, EnumTaskUserSubmitCheckReceiveStatus, EnumUserBankCardAccess, EnumUserGender, EnumUserRealMethod, EnumUserStatus, EnumUserType, EnumUserWalletTransactionType, EnumWalletTransactionStatus, EnumWeChatPayApplymentBankAccountType, EnumWeChatPayApplymentCertType, EnumWeChatPayApplymentContactType, EnumWeChatPayApplymentFinanceType, EnumWeChatPayApplymentIdDocType, EnumWeChatPayApplymentIdHolderType, EnumWeChatPayApplymentSalesScenesType, EnumWeChatPayApplymentState, EnumWeChatPayApplymentSubjectType, EnumWeChatPaySettlementModifyVerifyResult, EnumWeChatPaySettlementVerifyResult, GetPersonalApplyTaskInfosQueryStatus, GetPersonalHireTaskInfosQueryStatus, GetSettlementTasksQueryPaymentStatus, GetSettlementTasksQuerySupplierPaymentStatus, GetTaskInfoQueryResultApplyButton, GetTaskInfoQueryResultHireButton, SettlementReceiveStatus } from './src/constants/apiEnum' |
| | | export type { EnumBillingMethod, EnumClientType, EnumCodeUrlScene, EnumConsoleLogAccess, EnumContractTemplateStatus, EnumContractTemplateValueRecorder, EnumContractTemplateValueType, EnumDataSource, EnumDbAuditOperate, EnumElectronSignAccess, EnumElectronSignVerifyType, EnumEnterpriseCooperationSignStatus, EnumEnterpriseCooperationStatus, EnumEnterpriseCooperationWalletTransactionStatus, EnumEnterpriseCostStatus, EnumEnterpriseCostType, EnumEnterpriseEmployeeSource, EnumEnterpriseRealMethod, EnumEnterpriseType, EnumEnterpriseWalletAccess, EnumEnterpriseWalletExpandindirectOrderFileType, EnumEnterpriseWalletExpandindirectOrderScene, EnumEnterpriseWalletExpandindirectOrderStatus, EnumEnterpriseWalletSignStatus, EnumEnterpriseWalletTransactionType, EnumGetArrangeTaskUsersQueryApplyStatus, EnumGetCheckReceiveTaskCheckInUsersQueryStatus, EnumGetCheckReceiveTasksQueryResultItemCheckStatus, EnumGetEnterpriseEmployeesQuerySignContractStatus, EnumLogLevel, EnumMenuType, EnumMenuVisitLevel, EnumOcrAccess, EnumPagedListOrder, EnumPayAccess, EnumPersonalFreeTime, EnumPersonalJobSeekingStatus, EnumPersonalRealMethod, EnumPersonalUserRealStatus, EnumRealAccess, EnumResourceController, EnumResourceMethod, EnumRoleWebApiDataPower, EnumSettlementCycle, EnumSmsAccess, EnumSmsStatus, EnumTaskApplyStatus, EnumTaskCheckReceiveMethod, EnumTaskCheckReceiveStatus, EnumTaskPaymentMethod, EnumTaskRecommendStatus, EnumTaskReleaseStatus, EnumTaskSettlementAuditStatus, EnumTaskSettlementOrderStatus, EnumTaskSettlementStatus, EnumTaskStatus, EnumTaskUserApplyStatus, EnumTaskUserArrangeStatus, EnumTaskUserHireStatus, EnumTaskUserSignContractStatus, EnumTaskUserSubmitCheckHistoryType, EnumTaskUserSubmitCheckReceiveStatus, EnumUserBankCardAccess, EnumUserGender, EnumUserRealMethod, EnumUserStatus, EnumUserType, EnumUserWalletTransactionType, EnumWalletTransactionStatus, EnumWeChatPayApplymentBankAccountType, EnumWeChatPayApplymentCertType, EnumWeChatPayApplymentContactType, EnumWeChatPayApplymentFinanceType, EnumWeChatPayApplymentIdDocType, EnumWeChatPayApplymentIdHolderType, EnumWeChatPayApplymentSalesScenesType, EnumWeChatPayApplymentState, EnumWeChatPayApplymentSubjectType, EnumWeChatPaySettlementModifyVerifyResult, EnumWeChatPaySettlementVerifyResult, GetPersonalApplyTaskInfosQueryStatus, GetPersonalHireTaskInfosQueryStatus, GetSettlementTasksQueryPaymentStatus, GetSettlementTasksQuerySupplierPaymentStatus, GetTaskInfoQueryResultApplyButton, GetTaskInfoQueryResultHireButton, SettlementReceiveStatus, EnumBillingMethod, EnumClientType, EnumCodeUrlScene, EnumConsoleLogAccess, EnumContractTemplateStatus, EnumContractTemplateValueRecorder, EnumContractTemplateValueType, EnumDataSource, EnumDbAuditOperate, EnumElectronSignAccess, EnumElectronSignVerifyType, EnumEnterpriseCooperationSignStatus, EnumEnterpriseCooperationStatus, EnumEnterpriseCooperationWalletTransactionStatus, EnumEnterpriseCostStatus, EnumEnterpriseCostType, EnumEnterpriseEmployeeSource, EnumEnterpriseRealMethod, EnumEnterpriseType, EnumEnterpriseWalletAccess, EnumEnterpriseWalletExpandindirectOrderFileType, EnumEnterpriseWalletExpandindirectOrderScene, EnumEnterpriseWalletExpandindirectOrderStatus, EnumEnterpriseWalletSignStatus, EnumEnterpriseWalletTransactionType, EnumGetArrangeTaskUsersQueryApplyStatus, EnumGetCheckReceiveTaskCheckInUsersQueryStatus, EnumGetCheckReceiveTasksQueryResultItemCheckStatus, EnumGetEnterpriseEmployeesQuerySignContractStatus, EnumLogLevel, EnumMenuType, EnumMenuVisitLevel, EnumOcrAccess, EnumPagedListOrder, EnumPayAccess, EnumPersonalFreeTime, EnumPersonalJobSeekingStatus, EnumPersonalRealMethod, EnumPersonalUserRealStatus, EnumRealAccess, EnumResourceController, EnumResourceMethod, EnumRoleWebApiDataPower, EnumSettlementCycle, EnumSmsAccess, EnumSmsStatus, EnumTaskApplyStatus, EnumTaskCheckReceiveMethod, EnumTaskCheckReceiveStatus, EnumTaskPaymentMethod, EnumTaskRecommendStatus, EnumTaskReleaseStatus, EnumTaskSettlementAuditStatus, EnumTaskSettlementOrderStatus, EnumTaskSettlementStatus, EnumTaskStatus, EnumTaskUserApplyStatus, EnumTaskUserArrangeStatus, EnumTaskUserHireStatus, EnumTaskUserSignContractStatus, EnumTaskUserSubmitCheckHistoryType, EnumTaskUserSubmitCheckReceiveStatus, EnumUserBankCardAccess, EnumUserGender, EnumUserRealMethod, EnumUserStatus, EnumUserType, EnumUserWalletTransactionType, EnumWalletTransactionStatus, EnumWeChatPayApplymentBankAccountType, EnumWeChatPayApplymentCertType, EnumWeChatPayApplymentContactType, EnumWeChatPayApplymentFinanceType, EnumWeChatPayApplymentIdDocType, EnumWeChatPayApplymentIdHolderType, EnumWeChatPayApplymentSalesScenesType, EnumWeChatPayApplymentState, EnumWeChatPayApplymentSubjectType, EnumWeChatPaySettlementModifyVerifyResult, EnumWeChatPaySettlementVerifyResult, GetPersonalApplyTaskInfosQueryStatus, GetPersonalHireTaskInfosQueryStatus, GetSettlementTasksQueryPaymentStatus, GetSettlementTasksQuerySupplierPaymentStatus, GetTaskInfoQueryResultApplyButton, GetTaskInfoQueryResultHireButton, SettlementReceiveStatus } from './src/constants/apiEnum' |
| | | import('./src/constants/apiEnum') |
| | | // @ts-ignore |
| | | export type { CategoryCode, IdentityCodeEnum, EducationCodeEnum, CertificateTypeCodeEnum, WelfareCodeEnum } from './src/constants/dic' |
| | |
| | | readonly EnumEnterpriseCooperationWalletTransactionStatusTextForConfirm: UnwrapRef<typeof import('./src/constants/finance')['EnumEnterpriseCooperationWalletTransactionStatusTextForConfirm']> |
| | | readonly EnumEnterpriseCostStatus: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumEnterpriseCostStatus']> |
| | | readonly EnumEnterpriseCostType: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumEnterpriseCostType']> |
| | | readonly EnumEnterpriseEmployeeSource: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumEnterpriseEmployeeSource']> |
| | | readonly EnumEnterpriseEmployeeSourceText: UnwrapRef<typeof import('./src/constants/enterpriseEmployee')['EnumEnterpriseEmployeeSourceText']> |
| | | readonly EnumEnterpriseRealMethod: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumEnterpriseRealMethod']> |
| | | readonly EnumEnterpriseType: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumEnterpriseType']> |
| | | readonly EnumEnterpriseTypeText: UnwrapRef<typeof import('./src/constants/apiEnumText')['EnumEnterpriseTypeText']> |
| | | readonly EnumEnterpriseWalletAccess: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumEnterpriseWalletAccess']> |
| | | readonly EnumEnterpriseWalletAccessText: UnwrapRef<typeof import('./src/constants/enterpriseWallet')['EnumEnterpriseWalletAccessText']> |
| | | readonly EnumEnterpriseWalletAccessTextForSettle: UnwrapRef<typeof import('./src/constants/task')['EnumEnterpriseWalletAccessTextForSettle']> |
| | |
| | | readonly GetTaskInfoQueryResultHireButton: UnwrapRef<typeof import('./src/constants/apiEnum')['GetTaskInfoQueryResultHireButton']> |
| | | readonly IdentityCodeEnum: UnwrapRef<typeof import('./src/constants/dic')['IdentityCodeEnum']> |
| | | readonly ImportEnterpriseEmployeesTempPath: UnwrapRef<typeof import('./src/constants/enterpriseEmployee')['ImportEnterpriseEmployeesTempPath']> |
| | | readonly ImportFlexJobTempPath: UnwrapRef<typeof import('./src/constants/enterpriseEmployee')['ImportFlexJobTempPath']> |
| | | readonly MenuSvgIconMap: UnwrapRef<typeof import('./src/constants/menu')['MenuSvgIconMap']> |
| | | readonly ModuleColumns: UnwrapRef<typeof import('./src/constants/module')['ModuleColumns']> |
| | | readonly MyRegExp: UnwrapRef<typeof import('./src/constants/regExp')['MyRegExp']> |
| | |
| | | ElectronSign = 20, |
| | | } |
| | | |
| | | /** 灵工来源 */ |
| | | export enum EnumEnterpriseEmployeeSource { |
| | | /**内部 */ |
| | | Internal = 10, |
| | | /**外部 */ |
| | | External = 20, |
| | | } |
| | | |
| | | /** 企业实名方式 */ |
| | | export enum EnumEnterpriseRealMethod { |
| | | /**企业三要素 */ |
| | |
| | | [EnumUserType.Operation]: '运营', |
| | | }; |
| | | |
| | | export const EnumEnterpriseTypeText = { |
| | | [EnumEnterpriseType.Supplier]: '承揽', |
| | | [EnumEnterpriseType.PartyA]: '甲方', |
| | | }; |
| | | |
| | | export const EnumRoleWebApiDataPowerText = { |
| | | [EnumRoleWebApiDataPower.Custom]: '自定义', |
| | | [EnumRoleWebApiDataPower.Creator]: '个人数据', |
| | |
| | | import { EnumTaskUserHireStatus, EnumTaskUserSignContractStatus,EnumGetArrangeTaskUsersQueryApplyStatus } from './apiEnum'; |
| | | import { |
| | | EnumTaskUserHireStatus, |
| | | EnumTaskUserSignContractStatus, |
| | | EnumGetArrangeTaskUsersQueryApplyStatus, |
| | | } from './apiEnum'; |
| | | |
| | | export const EnumTaskUserHireStatusText = { |
| | | [EnumTaskUserHireStatus.Wait]: '待录用', |
| | |
| | | |
| | | export const ImportEnterpriseEmployeesTempPath = `${TempFolderPath}/%E7%81%B5%E5%B7%A5%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`; |
| | | |
| | | export const ImportFlexJobTempPath = `${TempFolderPath}/%E7%81%B5%E5%B7%A5%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BFV2.xlsx`; |
| | | |
| | | export const EnumGetArrangeTaskUsersQueryApplyStatusText = { |
| | | [EnumGetArrangeTaskUsersQueryApplyStatus.None]: '未报名', |
| | | [EnumGetArrangeTaskUsersQueryApplyStatus.Completed]: '已报名', |
| | | } |
| | | }; |
| | | |
| | | export const EnumEnterpriseEmployeeSourceText = { |
| | | [EnumEnterpriseEmployeeSource.Internal]: '内部', |
| | | [EnumEnterpriseEmployeeSource.External]: '外部', |
| | | }; |
| | |
| | | |
| | | export function useUserInfoRoles({ userInfoId, userType, clientType }: UseUserInfoRolesOptions) { |
| | | const { data: userInfoRoles } = useQuery({ |
| | | queryKey: ['userServices/getUserInfoRoles'], |
| | | queryKey: ['userServices/getUserInfoRoles', userInfoId, userType, clientType], |
| | | queryFn: async () => { |
| | | let res = await userServices.getUserInfoRoles( |
| | | { |
| | |
| | | rootMenu: true, |
| | | }, |
| | | }, |
| | | { |
| | | path: '/CustomerManage', |
| | | redirect: 'noRedirect', |
| | | component: Layout, |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | meta: { |
| | | rank: 10010, |
| | | title: '客户管理', |
| | | rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | children: [ |
| | | { |
| | | path: '/CustomerManage', |
| | | name: 'CustomerManage', |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | component: () => import('@/views/CustomerManage/CustomerManage.vue'), |
| | | meta: { |
| | | rank: 10011, |
| | | title: '客户管理', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/AddOrEditCustomer/:id?', |
| | | name: 'AddOrEditCustomer', |
| | | hidden: true, |
| | | alwaysShow: false, |
| | | component: () => import('@/views/CustomerManage/AddOrEditCustomer.vue'), |
| | | meta: { |
| | | rank: 10011, |
| | | title: '新增客户', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/CustomerDetail/:id', |
| | | name: 'CustomerDetail', |
| | | hidden: true, |
| | | alwaysShow: false, |
| | | component: () => import('@/views/CustomerManage/CustomerDetail.vue'), |
| | | meta: { |
| | | rank: 10011, |
| | | title: '客户详情', |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/FlexJobManage', |
| | | redirect: 'noRedirect', |
| | | component: Layout, |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | meta: { |
| | | rank: 10010, |
| | | title: '灵工管理', |
| | | rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | children: [ |
| | | { |
| | | path: '/FlexJobManageList', |
| | | name: 'FlexJobManageList', |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | component: () => import('@/views/FlexJobManage/FlexJobManage.vue'), |
| | | meta: { |
| | | rank: 10011, |
| | | title: '灵工管理', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/EmploymentManage', |
| | | redirect: 'noRedirect', |
| | | component: Layout, |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | meta: { |
| | | rank: 10020, |
| | | title: '用人管理', |
| | | rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | children: [ |
| | | { |
| | | path: '/TaskManageList', |
| | | name: 'TaskManageList', |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | component: () => import('@/views/EmploymentManage/TaskManageList.vue'), |
| | | meta: { |
| | | rank: 10021, |
| | | title: '任务管理', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/AddOrEditEmployment/:id?', |
| | | name: 'AddOrEditEmployment', |
| | | hidden: true, |
| | | alwaysShow: false, |
| | | component: () => import('@/views/EmploymentManage/AddOrEditEmployment.vue'), |
| | | meta: { |
| | | rank: 10022, |
| | | title: '发布编辑人员', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/EmploymentManageDetail/:id', |
| | | name: 'EmploymentManageDetail', |
| | | hidden: true, |
| | | alwaysShow: false, |
| | | component: () => import('@/views/EmploymentManage/EmploymentManageDetail.vue'), |
| | | meta: { |
| | | rank: 10023, |
| | | title: '人员管理详情', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/EmploymentSignList/:id', |
| | | name: 'EmploymentSignList', |
| | | hidden: true, |
| | | alwaysShow: false, |
| | | component: () => import('@/views/EmploymentManage/EmploymentSignList.vue'), |
| | | meta: { |
| | | rank: 10024, |
| | | title: '报名列表', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/EmploymentManageArrange/:id', |
| | | name: 'EmploymentManageArrange', |
| | | hidden: true, |
| | | alwaysShow: false, |
| | | component: () => import('@/views/EmploymentManage/EmploymentManageArrange.vue'), |
| | | meta: { |
| | | rank: 10025, |
| | | title: '人员安排', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | |
| | | { |
| | | path: '/CheckManage', |
| | | name: 'CheckManage', |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | component: () => import('@/views/EmploymentManage/CheckManage.vue'), |
| | | meta: { |
| | | rank: 10030, |
| | | title: '验收管理', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/CheckReceiveTaskDetail/:id', |
| | | name: 'CheckReceiveTaskDetail', |
| | | hidden: true, |
| | | alwaysShow: false, |
| | | component: () => import('@/views/EmploymentManage/CheckReceiveTaskDetail.vue'), |
| | | meta: { |
| | | rank: 10031, |
| | | title: '验收详情', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/ServiceChargeManage', |
| | | redirect: 'noRedirect', |
| | | component: Layout, |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | meta: { |
| | | rank: 10040, |
| | | title: '服务费管理', |
| | | rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | children: [ |
| | | { |
| | | path: '/ServiceChargeManageList', |
| | | name: 'ServiceChargeManageList', |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | component: () => import('@/views/ServiceChargeManage/ServiceChargeManage.vue'), |
| | | meta: { |
| | | rank: 10041, |
| | | 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', |
| | | hidden: true, |
| | | alwaysShow: false, |
| | | component: () => import('@/views/ServiceChargeManage/ServiceChargeDetail.vue'), |
| | | meta: { |
| | | rank: 10043, |
| | | title: '详情', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/AgreementManage', |
| | | redirect: 'noRedirect', |
| | | component: Layout, |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | meta: { |
| | | rank: 10050, |
| | | title: '协议管理', |
| | | rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | children: [ |
| | | { |
| | | path: '/AgreementManageList', |
| | | name: 'AgreementManageList', |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | component: () => import('@/views/AgreementManage/AgreementManageList.vue'), |
| | | meta: { |
| | | rank: 10051, |
| | | title: '协议管理', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // path: '/WithdrawManage', |
| | | // redirect: 'noRedirect', |
| | |
| | | // }, |
| | | // ], |
| | | // }, |
| | | { |
| | | path: '/FinanceManage', |
| | | redirect: 'noRedirect', |
| | | component: Layout, |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | meta: { |
| | | rank: 10070, |
| | | title: '财务管理', |
| | | rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | children: [ |
| | | { |
| | | path: '/FinanceManageList', |
| | | name: 'FinanceManageList', |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | component: () => import('@/views/FinanceManage/FinanceManage.vue'), |
| | | meta: { |
| | | rank: 10071, |
| | | title: '发放明细', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/EnterpriseBalanceManage', |
| | | name: 'EnterpriseBalanceManage', |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | component: () => import('@/views/FinanceManage/EnterpriseBalanceManage.vue'), |
| | | meta: { |
| | | rank: 10072, |
| | | title: '企业余额管理', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/EnterpriseBalanceManageDetail/:id', |
| | | name: 'EnterpriseBalanceManageDetail', |
| | | hidden: true, |
| | | alwaysShow: false, |
| | | component: () => import('@/views/FinanceManage/EnterpriseBalanceManageDetail.vue'), |
| | | meta: { |
| | | rank: 10073, |
| | | title: '详情', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/CustomerRechargeRecord/:id', |
| | | name: 'CustomerRechargeRecord', |
| | | hidden: true, |
| | | alwaysShow: false, |
| | | component: () => import('@/views/FinanceManage/CustomerRechargeRecord.vue'), |
| | | meta: { |
| | | rank: 10074, |
| | | title: '充值记录', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/AccountManage', |
| | | name: 'AccountManage', |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | component: () => import('@/views/FinanceManage/AccountManage.vue'), |
| | | meta: { |
| | | rank: 10075, |
| | | title: '账户管理', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/CustomerRechargeManage', |
| | | name: 'CustomerRechargeManage', |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | component: () => import('@/views/FinanceManage/CustomerRechargeManage.vue'), |
| | | meta: { |
| | | rank: 10074, |
| | | title: '客户充值管理', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | { |
| | | path: '/UserManage', |
| | | redirect: 'noRedirect', |
| | | component: Layout, |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | meta: { |
| | | rank: 10100, |
| | | title: '用户管理', |
| | | rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | children: [ |
| | | { |
| | | path: '/UserManageList', |
| | | name: 'UserManageList', |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | component: () => import('@/views/UserManage/UserManageList.vue'), |
| | | meta: { |
| | | rank: 10101, |
| | | title: '用户管理', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/Login', |
| | | name: 'Login', |
| | |
| | | // @ts-ignore |
| | | import { request } from '@/utils/request'; |
| | | |
| | | /** 添加灵工信息 POST /api/user/enterpriseEmployee/addEnterpriseEmployee */ |
| | | export async function addEnterpriseEmployee( |
| | | body: API.AddEnterpriseEmployeeCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/user/enterpriseEmployee/addEnterpriseEmployee', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 企业批量签约合同 POST /api/user/enterpriseEmployee/batchEnterpriseSignContract */ |
| | | export async function batchEnterpriseSignContract( |
| | | body: API.BatchEnterpriseSignContractCommand, |
| | |
| | | ); |
| | | } |
| | | |
| | | /** 修复1.3.0.2版本灵工数据 POST /api/user/enterpriseEmployee/repairEnterpriseEmployee_1_3_0_2 */ |
| | | export async function repairEnterpriseEmployee1302( |
| | | body: API.RepairEnterpriseEmployee1302Command, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<boolean>('/api/user/enterpriseEmployee/repairEnterpriseEmployee_1_3_0_2', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 发送邀请签约短信 POST /api/user/enterpriseEmployee/sendInviteElectronSignSms */ |
| | | export async function sendInviteElectronSignSms( |
| | | body: API.SendInviteElectronSignSmsCommand, |
| | |
| | | ); |
| | | } |
| | | |
| | | /** 1.3.0.2版本修复企业钱包交易数据 POST /api/user/enterpriseWallet/repairEnterpriseWalletTransaction_1_3_0_2 */ |
| | | export async function repairEnterpriseWalletTransaction1302( |
| | | body: API.RepairEnterpriseWalletTransaction1302Command, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<boolean>('/api/user/enterpriseWallet/repairEnterpriseWalletTransaction_1_3_0_2', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 修改企业微信支付钱包结算账户 POST /api/user/enterpriseWallet/updateEnterpriseWeChatPayWalletBankAccountInfo */ |
| | | export async function updateEnterpriseWeChatPayWalletBankAccountInfo( |
| | | body: API.UpdateEnterpriseWeChatPayWalletBankAccountInfoCommand, |
| | |
| | | import * as task from './task'; |
| | | import * as enterpriseWallet from './enterpriseWallet'; |
| | | import * as ocrUtils from './ocrUtils'; |
| | | import * as electronSign from './electronSign'; |
| | | import * as resource from './resource'; |
| | | import * as logRecords from './logRecords'; |
| | | import * as dictionary from './dictionary'; |
| | | import * as taskCheckReceive from './taskCheckReceive'; |
| | | import * as electronSign from './electronSign'; |
| | | import * as userResume from './userResume'; |
| | | import * as auth from './auth'; |
| | | import * as taskUser from './taskUser'; |
| | | import * as eventUtils from './eventUtils'; |
| | | import * as enterpriseCooperationWallet from './enterpriseCooperationWallet'; |
| | | import * as codeUrl from './codeUrl'; |
| | | import * as syncDatabase from './syncDatabase'; |
| | | import * as menu from './menu'; |
| | |
| | | import * as userWallet from './userWallet'; |
| | | import * as fileUtils from './fileUtils'; |
| | | import * as settings from './settings'; |
| | | import * as eventUtils from './eventUtils'; |
| | | import * as enterpriseCooperationWallet from './enterpriseCooperationWallet'; |
| | | export default { |
| | | enterprise, |
| | | enterpriseEmployee, |
| | |
| | | task, |
| | | enterpriseWallet, |
| | | ocrUtils, |
| | | electronSign, |
| | | resource, |
| | | logRecords, |
| | | dictionary, |
| | | taskCheckReceive, |
| | | electronSign, |
| | | userResume, |
| | | auth, |
| | | taskUser, |
| | | eventUtils, |
| | | enterpriseCooperationWallet, |
| | | codeUrl, |
| | | syncDatabase, |
| | | menu, |
| | |
| | | userWallet, |
| | | fileUtils, |
| | | settings, |
| | | eventUtils, |
| | | enterpriseCooperationWallet, |
| | | }; |
| | |
| | | [key: string]: any; |
| | | } |
| | | |
| | | interface AddEnterpriseEmployeeCommand { |
| | | /** 姓名 */ |
| | | name: string; |
| | | /** 身份证号 */ |
| | | identity: string; |
| | | /** 手机号 */ |
| | | contactPhoneNumber: string; |
| | | gender?: EnumUserGender; |
| | | /** 年龄 */ |
| | | age?: number; |
| | | /** 身份证人像面 */ |
| | | identityImg?: string; |
| | | /** 身份证国徽面 */ |
| | | identityBackImg?: string; |
| | | /** 电子合同 */ |
| | | contractUrl?: string; |
| | | /** 协议起始时间 */ |
| | | contractBegin?: string; |
| | | /** 协议终止时间 */ |
| | | contractEnd?: string; |
| | | } |
| | | |
| | | interface AgainSureTaskSettlementOrderRosterCommand { |
| | | /** 名单Id */ |
| | | id?: string; |
| | |
| | | interface APIgetMenusParams { |
| | | /** 用户类型 */ |
| | | userType?: EnumUserType; |
| | | /** 企业类型 */ |
| | | enterpriseType?: EnumEnterpriseType; |
| | | /** 客户端类型 */ |
| | | clientType?: EnumClientType; |
| | | /** 角色Id */ |
| | |
| | | } |
| | | |
| | | interface EditEnterpriseEmployeeCommand { |
| | | /** Id */ |
| | | id?: string; |
| | | /** 姓名 */ |
| | | name: string; |
| | | /** 身份证号 */ |
| | |
| | | identityImg?: string; |
| | | /** 身份证国徽面 */ |
| | | identityBackImg?: string; |
| | | /** Id */ |
| | | id?: string; |
| | | /** 电子合同 */ |
| | | contractUrl?: string; |
| | | /** 协议起始时间 */ |
| | | contractBegin?: string; |
| | | /** 协议终止时间 */ |
| | | contractEnd?: string; |
| | | } |
| | | |
| | | interface EditTaskSettlementOrderRosterCommand { |
| | |
| | | SMS = 10, |
| | | /**电子签 */ |
| | | ElectronSign = 20, |
| | | } |
| | | |
| | | enum EnumEnterpriseEmployeeSource { |
| | | /**内部 */ |
| | | Internal = 10, |
| | | /**外部 */ |
| | | External = 20, |
| | | } |
| | | |
| | | enum EnumEnterpriseRealMethod { |
| | |
| | | } |
| | | |
| | | interface GetArrangeTaskUsersQueryResult { |
| | | objectData?: GetArrangeTaskUsersQueryResultObjectData; |
| | | pageModel?: PagedListQueryResultPageModel; |
| | | /** 数据 */ |
| | | data?: GetArrangeTaskUsersQueryResultItem[]; |
| | |
| | | /** 工作经验 */ |
| | | workExperience?: string; |
| | | arrangeStatus?: EnumTaskUserArrangeStatus; |
| | | } |
| | | |
| | | interface GetArrangeTaskUsersQueryResultObjectData { |
| | | /** 是否内部任务 */ |
| | | isInternal?: boolean; |
| | | } |
| | | |
| | | interface GetBankOcrCommand { |
| | |
| | | interface GetCheckReceiveTaskQueryResultObjectData { |
| | | /** 供应商Id */ |
| | | supplierEnterpriseId?: string; |
| | | /** 是否内部任务 */ |
| | | isInternal?: boolean; |
| | | /** 需求人数 */ |
| | | needPeopleNumber?: number; |
| | | /** 任务名称 */ |
| | |
| | | id?: string; |
| | | /** 供应商Id */ |
| | | supplierEnterpriseId?: string; |
| | | /** 是否内部任务 */ |
| | | isInternal?: boolean; |
| | | /** 需求人数 */ |
| | | needPeopleNumber?: number; |
| | | /** 任务名称 */ |
| | |
| | | id?: string; |
| | | /** 任务人员Id */ |
| | | taskInfoUserId?: string; |
| | | /** 是否内部任务 */ |
| | | isInternal?: boolean; |
| | | enterpriseEmployeeUser?: GetCheckReceiveTaskUserSubmitsQueryResultObjectDataEnterpriseEmployeeUser; |
| | | /** 验收时间 */ |
| | | date?: string; |
| | |
| | | addressName?: string; |
| | | /** 验收方式 */ |
| | | checkReceiveMethods?: EnumTaskCheckReceiveMethod[]; |
| | | /** 是否内部任务 */ |
| | | isInternal?: boolean; |
| | | } |
| | | |
| | | interface GetCodeUrlQueryResult { |
| | |
| | | enterpriseSignContractTime?: string; |
| | | /** 电子合同 */ |
| | | contractUrl?: string; |
| | | /** 协议起始时间 */ |
| | | contractBegin?: string; |
| | | /** 协议终止时间 */ |
| | | contractEnd?: string; |
| | | userSignContractStatus?: EnumTaskUserSignContractStatus; |
| | | } |
| | | |
| | |
| | | createdTimeStart?: string; |
| | | /** 登记时间-最晚时间 */ |
| | | createdTimeEnd?: string; |
| | | /** 灵工签约时间-最早时间 */ |
| | | userSignContractTimeStart?: string; |
| | | /** 灵工签约时间-最晚时间 */ |
| | | userSignContractTimeEnd?: string; |
| | | /** 签约时间-最早时间 */ |
| | | signContractTimeStart?: string; |
| | | /** 签约时间-最晚时间 */ |
| | | signContractTimeEnd?: string; |
| | | hireStatus?: EnumTaskUserHireStatus; |
| | | /** 实名时间-最早时间 */ |
| | | userRealTimeStart?: string; |
| | | /** 实名时间-最晚时间 */ |
| | | userRealTimeEnd?: string; |
| | | /** 是否实名 */ |
| | | isReal?: boolean; |
| | | source?: EnumEnterpriseEmployeeSource; |
| | | userSignContractStatus?: EnumTaskUserSignContractStatus; |
| | | enterpriseSignContractStatus?: EnumTaskUserSignContractStatus; |
| | | signContractStatus?: EnumGetEnterpriseEmployeesQuerySignContractStatus; |
| | |
| | | enterpriseSignContractTime?: string; |
| | | /** 电子合同 */ |
| | | contractUrl?: string; |
| | | /** 协议起始时间 */ |
| | | contractBegin?: string; |
| | | /** 协议终止时间 */ |
| | | contractEnd?: string; |
| | | source?: EnumEnterpriseEmployeeSource; |
| | | /** 来源名称 */ |
| | | sourceName?: string; |
| | | /** 创建时间 */ |
| | | createdTime?: string; |
| | | } |
| | | |
| | |
| | | /** 是否选择(用户角色授权) */ |
| | | isChecked?: boolean; |
| | | userType?: EnumUserType; |
| | | enterpriseType?: EnumEnterpriseType; |
| | | clientType?: EnumClientType; |
| | | /** 上级Id */ |
| | | parentId?: string; |
| | |
| | | enterpriseSignContractStatus?: EnumTaskUserSignContractStatus; |
| | | /** 企业签约时间 */ |
| | | enterpriseSignContractTime?: string; |
| | | source?: EnumEnterpriseEmployeeSource; |
| | | /** 来源名称 */ |
| | | sourceName?: string; |
| | | /** 电子合同 */ |
| | | contractUrl?: string; |
| | | /** 协议起始时间 */ |
| | | contractBegin?: string; |
| | | /** 协议终止时间 */ |
| | | contractEnd?: string; |
| | | } |
| | | |
| | | interface GetPersonalUserInfosQuery { |
| | |
| | | dataPower?: EnumRoleWebApiDataPower; |
| | | /** 备注 */ |
| | | remark?: string; |
| | | /** 用户数 */ |
| | | userCount?: number; |
| | | /** 菜单Id */ |
| | | menuIds?: string[]; |
| | | /** 资源 */ |
| | |
| | | isDisabled?: boolean; |
| | | /** 用户数量 */ |
| | | userCount?: number; |
| | | /** 是否公开 */ |
| | | isPublic?: boolean; |
| | | } |
| | | |
| | | interface GetRoleUserInfosQueryResultItem { |
| | |
| | | interface GetSettlementTasksQueryResultItem { |
| | | /** 任务Id */ |
| | | id?: string; |
| | | /** 是否内部任务 */ |
| | | isInternal?: boolean; |
| | | /** 所属任务 */ |
| | | name?: string; |
| | | /** 任务单号 */ |
| | |
| | | checkReceiveEndDate?: string; |
| | | /** 任务名称 */ |
| | | name?: string; |
| | | /** 是否内部任务 */ |
| | | isInternal?: boolean; |
| | | /** 任务单号 */ |
| | | code?: string; |
| | | billingMethod?: EnumBillingMethod; |
| | |
| | | id?: string; |
| | | /** 供应商Id */ |
| | | supplierEnterpriseId?: string; |
| | | /** 是否内部任务 */ |
| | | isInternal?: boolean; |
| | | /** 供应商 */ |
| | | supplierEnterpriseName?: string; |
| | | /** 需求人数 */ |
| | |
| | | id?: string; |
| | | /** 供应商Id */ |
| | | supplierEnterpriseId?: string; |
| | | /** 是否内部任务 */ |
| | | isInternal?: boolean; |
| | | /** 供应商 */ |
| | | supplierEnterpriseName?: string; |
| | | /** 供应商账号 */ |
| | |
| | | } |
| | | |
| | | interface GetTaskUsersQueryResult { |
| | | objectData?: GetTaskUsersQueryResultObjectData; |
| | | pageModel?: PagedListQueryResultPageModel; |
| | | /** 数据 */ |
| | | data?: GetTaskUsersQueryResultItem[]; |
| | |
| | | /** 工作经验 */ |
| | | workExperience?: string; |
| | | hireStatus?: EnumTaskUserHireStatus; |
| | | } |
| | | |
| | | interface GetTaskUsersQueryResultObjectData { |
| | | /** 是否内部任务 */ |
| | | isInternal?: boolean; |
| | | } |
| | | |
| | | interface GetThreeResourceLogsQuery { |
| | |
| | | contactPhoneNumber?: string; |
| | | /** 身份证号 */ |
| | | identity?: string; |
| | | /** 协议起始 */ |
| | | contractBegin?: string; |
| | | /** 协议终止 */ |
| | | contractEnd?: string; |
| | | } |
| | | |
| | | interface ImportTaskSettlementOrderRostersCommand { |
| | |
| | | |
| | | type RepairContractTemplateValuePointBy1202Command = Record<string, any>; |
| | | |
| | | type RepairEnterpriseEmployee1302Command = Record<string, any>; |
| | | |
| | | type RepairEnterpriseUser1302Command = Record<string, any>; |
| | | |
| | | type RepairEnterpriseWalletTransaction1302Command = Record<string, any>; |
| | | |
| | | type RepairTaskEstimatedServiceFee1301Command = Record<string, any>; |
| | | |
| | | interface ResendResourceCommand { |
| | |
| | | |
| | | interface SaveMenuCommand { |
| | | userType?: EnumUserType; |
| | | enterpriseType?: EnumEnterpriseType; |
| | | clientType?: EnumClientType; |
| | | /** 上级Id */ |
| | | parentId?: string; |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 1.3.0.2版本修复企业用户数据 POST /api/user/user/repairEnterpriseUser_1_3_0_2 */ |
| | | export async function repairEnterpriseUser1302( |
| | | body: API.RepairEnterpriseUser1302Command, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<boolean>('/api/user/user/repairEnterpriseUser_1_3_0_2', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 重置用户操作密码 POST /api/user/user/resetUserOperatorPasswords */ |
| | | export async function resetUserOperatorPasswords( |
| | | body: API.ResetUserOperatorPasswordsCommand, |
| | |
| | | import { TreeNodeData } from 'element-plus/es/components/tree/src/tree.type'; |
| | | |
| | | export function getTree( |
| | | data: API.ModuleDto[], |
| | | root?: string, |
| | |
| | | |
| | | return result; |
| | | } |
| | | |
| | | type TreeCallback<T extends TreeNodeData, R> = ( |
| | | data: T, |
| | | index: number, |
| | | array: T[], |
| | | parent?: T |
| | | ) => R; |
| | | |
| | | export function treeEach<T extends TreeNodeData>( |
| | | treeData: T[], |
| | | callback: TreeCallback<T, void>, |
| | | getChildren: (data: T) => T[], |
| | | parent?: T |
| | | ) { |
| | | for (let i = 0; i < treeData.length; i++) { |
| | | const data = treeData[i]; |
| | | callback(data, i, treeData, parent); |
| | | |
| | | const children = getChildren(data); |
| | | if (Array.isArray(children)) { |
| | | treeEach(children, callback, getChildren, data); |
| | | } |
| | | } |
| | | } |
| | |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn> |
| | | <el-button type="primary" @click="handleAdd()">新增模板</el-button> |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'addBtn')" |
| | | type="primary" |
| | | @click="handleAdd()" |
| | | >新增模板</el-button |
| | | > |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="AgreementbManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | <template #code="{ row }"> |
| | | <el-button |
| | | v-if="row.status === EnumContractTemplateStatus.Completed && !!row.wxmpQrCode" |
| | |
| | | useTable, |
| | | FieldDatePicker, |
| | | FieldRadio, |
| | | defineOperationBtns, |
| | | UploadUserFile, |
| | | useFormDialog, |
| | | bolePreview, |
| | | } from '@bole-core/components'; |
| | | import { AgreementbManageColumns } from './constants'; |
| | | import { EnumContractTemplateStatus, EnumContractTemplateStatusText } from '@/constants'; |
| | | import { convertPdfToImage, downloadFileByUrl, format, setOSSLink } from '@/utils'; |
| | | import { ModelValueType } from 'element-plus'; |
| | |
| | | name: 'AgreementManageList', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'checkBtn', |
| | | name: '查看', |
| | | }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | checkBtn: { |
| | | emits: { |
| | | onClick: (role) => handleCheck(role), |
| | | }, |
| | |
| | | hide: (row) => row.status !== EnumContractTemplateStatus.Completed, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'downloadBtn', |
| | | name: '下载', |
| | | }, |
| | | downloadBtn: { |
| | | emits: { |
| | | onClick: (role) => handleDownload(role), |
| | | }, |
| | |
| | | hide: (row) => row.status !== EnumContractTemplateStatus.Completed, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'deleteBtn', |
| | | name: '删除', |
| | | }, |
| | | deleteBtn: { |
| | | emits: { |
| | | onClick: (role) => handleDelete(role), |
| | | }, |
| | |
| | | hide: (row) => row.status !== EnumContractTemplateStatus.Completed, |
| | | }, |
| | | }, |
| | | ]); |
| | | }; |
| | | |
| | | const { column, operationBtns, checkSubModuleItemShow } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const router = useRouter(); |
| | | |
| | |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn> |
| | | <el-button @click="goAddOrEdit()" icon="Plus" type="primary">新增客户</el-button> |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'addBtn')" |
| | | @click="goAddOrEdit()" |
| | | icon="Plus" |
| | | type="primary" |
| | | >新增客户</el-button |
| | | > |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="CustomerManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | </LoadingLayout> |
| | |
| | | name: 'CustomerManage', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '查看', |
| | | }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | detailBtn: { |
| | | emits: { |
| | | onClick: (role) => goDetail(role), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'editBtn', |
| | | name: '编辑', |
| | | }, |
| | | editBtn: { |
| | | emits: { |
| | | onClick: (role) => goAddOrEdit(role), |
| | | }, |
| | | }, |
| | | ]); |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const BaseState = { |
| | | loading: true, |
| | |
| | | </QueryFilterItem> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="CheckManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | </LoadingLayout> |
| | |
| | | useTable, |
| | | FieldDatePicker, |
| | | FieldRadio, |
| | | defineOperationBtns, |
| | | useFormDialog, |
| | | } from '@bole-core/components'; |
| | | import { CheckManageColumns } from './constants'; |
| | | import * as taskCheckReceiveServices from '@/services/api/taskCheckReceive'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import { downloadFileByUrl, format, OrderUtils, setOSSLink } from '@/utils'; |
| | |
| | | name: 'CheckManage', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '详情', |
| | | }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | detailBtn: { |
| | | emits: { |
| | | onClick: (role) => goCheckReceiveTaskDetail(role), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'exportBtn', |
| | | name: '导出', |
| | | }, |
| | | exportBtn: { |
| | | emits: { |
| | | onClick: (role) => handleExport(role), |
| | | }, |
| | |
| | | row.checkReceiveStatus !== EnumTaskCheckReceiveStatus.Completed, |
| | | }, |
| | | }, |
| | | ]); |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const router = useRouter(); |
| | | |
| | |
| | | </ProForm> |
| | | </el-card> |
| | | |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="CheckReceiveTaskDetailColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | <CheckManageDialog v-bind="dialogProps" /> |
| | |
| | | AppContainer, |
| | | useTable, |
| | | useFormDialog, |
| | | defineOperationBtns, |
| | | ProForm, |
| | | ProFormCol, |
| | | ProFormColItem, |
| | | ProFormItemV2, |
| | | ProTableQueryFilterBar, |
| | | } from '@bole-core/components'; |
| | | import * as taskCheckReceiveServices from '@/services/api/taskCheckReceive'; |
| | | import * as taskServices from '@/services/api/task'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { CheckReceiveTaskDetailColumns } from './constants'; |
| | | import { OrderUtils } from '@/utils'; |
| | | import { EnumBillingMethodUnitText, EnumBillingMethod, EnumBillingMethodText } from '@/constants'; |
| | | import dayjs from 'dayjs'; |
| | | import CheckManageDialog from './components/CheckManageDialog.vue'; |
| | | import ManualCheckManageDialog from './components/ManualCheckManageDialog.vue'; |
| | |
| | | name: 'CheckReceiveTaskDetail', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | // { |
| | | // data: { |
| | | // enCode: 'exportBtn', |
| | | // name: '验收', |
| | | // }, |
| | | // emits: { |
| | | // onClick: (role) => openDialog(role), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetCheckReceiveTaskQueryResultItem) => |
| | | // row.checkReceiveStatus === EnumTaskCheckReceiveStatus.Completed || |
| | | // state.checkReceiveMethod === EnumTaskCheckReceiveMethod.CheckIn, |
| | | // }, |
| | | // }, |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '详情', |
| | | }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | detailBtn: { |
| | | emits: { |
| | | onClick: (role) => openDialog(role, true), |
| | | }, |
| | | }, |
| | | ]); |
| | | acceptanceBtn: { |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetCheckReceiveTaskQueryResultItem) => |
| | | !( |
| | | (row.checkReceiveStatus === EnumTaskCheckReceiveStatus.WaitCheckReceive || |
| | | row.checkReceiveStatus === EnumTaskCheckReceiveStatus.WaitSubmit) && |
| | | row.checkReceiveMethods.includes(EnumTaskCheckReceiveMethod.Submit) && |
| | | taskInfo.value?.isInternal |
| | | ), |
| | | }, |
| | | }, |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const route = useRoute(); |
| | | const id = (route.params.id as string) ?? ''; |
| | |
| | | const BaseState = { |
| | | loading: true, |
| | | checkReceiveMethods: [] as any as EnumTaskCheckReceiveMethod[], |
| | | |
| | | isInternal: false, |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | |
| | | showLoading: !state.loading, |
| | | }); |
| | | state.checkReceiveMethods = res.objectData?.checkReceiveMethods; |
| | | state.isInternal = res.objectData?.isInternal; |
| | | return res; |
| | | } catch (error) {} |
| | | }, |
| | |
| | | handleEdit({ |
| | | id: row.id, |
| | | checkReceiveMethods: state.checkReceiveMethods, |
| | | isInternal: state.isInternal, |
| | | tabType: state.checkReceiveMethods.includes(EnumTaskCheckReceiveMethod.CheckIn) |
| | | ? 'signRecord' |
| | | : '', |
| | | isDetail, |
| | | }); |
| | | } |
| | |
| | | defaultFormParams: { |
| | | id: '', |
| | | checkReceiveMethods: [] as any as EnumTaskCheckReceiveMethod[], |
| | | isInternal: false, |
| | | isDetail: false, |
| | | tabType: '', |
| | | }, |
| | | }); |
| | | |
| | |
| | | </QueryFilterItem> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="EmploymentArrangeColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | </LoadingLayout> |
| | |
| | | useTable, |
| | | FieldDatePicker, |
| | | FieldRadio, |
| | | defineOperationBtns, |
| | | } from '@bole-core/components'; |
| | | import { EmploymentArrangeColumns } from './constants'; |
| | | import { Message } from '@bole-core/core'; |
| | | import * as taskUserServices from '@/services/api/taskUser'; |
| | | import { |
| | |
| | | name: 'EmploymentManageArrange', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'arrangeBtn', |
| | | name: '安排', |
| | | }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | arrangeBtn: { |
| | | emits: { |
| | | onClick: (role) => handleArrange(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetArrangeTaskUsersQueryResultItem) => |
| | | row.arrangeStatus === EnumTaskUserArrangeStatus.Complete, |
| | | row.arrangeStatus === EnumTaskUserArrangeStatus.Complete || !state.isInternal, |
| | | }, |
| | | }, |
| | | ]); |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const router = useRouter(); |
| | | const route = useRoute(); |
| | |
| | | |
| | | const BaseState = { |
| | | loading: true, |
| | | isInternal: false, |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | |
| | | let res = await taskUserServices.getArrangeTaskUsers(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | if (res) { |
| | | state.isInternal = res.objectData?.isInternal; |
| | | } |
| | | return res; |
| | | } catch (error) { |
| | | console.log('error: ', error); |
| | |
| | | </QueryFilterItem> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="EmploymentSignColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | <StaffInfoDialog v-bind="dialogStaffInfoProps" /> |
| | |
| | | QueryFilterItem, |
| | | useTable, |
| | | FieldRadio, |
| | | defineOperationBtns, |
| | | useFormDialog, |
| | | UploadUserFile, |
| | | } from '@bole-core/components'; |
| | | import { EmploymentSignColumns } from './constants/columns'; |
| | | import { Message } from '@bole-core/core'; |
| | | import { EnumUserGender, EnumTaskUserHireStatusText } from '@/constants'; |
| | | import StaffInfoDialog from '@/views/FlexJobManage/components/StaffInfoDialog.vue'; |
| | |
| | | name: 'EmploymentSignList', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '详情', |
| | | }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | detailBtn: { |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | }, |
| | | // { |
| | | // data: { |
| | | // enCode: 'recruitBtn', |
| | | // name: '录用', |
| | | // }, |
| | | // emits: { |
| | | // onClick: (role) => setTaskUserHire(role, EnumTaskUserHireStatus.Pass), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetTaskUsersQueryResultItem) => |
| | | // row.hireStatus === EnumTaskUserHireStatus.Pass, |
| | | // }, |
| | | // }, |
| | | // { |
| | | // data: { |
| | | // enCode: 'refuseBtn', |
| | | // name: '谢绝', |
| | | // }, |
| | | // emits: { |
| | | // onClick: (role) => setTaskUserHire(role, EnumTaskUserHireStatus.Refuse), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetTaskUsersQueryResultItem) => |
| | | // row.hireStatus !== EnumTaskUserHireStatus.Wait, |
| | | // }, |
| | | // }, |
| | | ]); |
| | | recruitBtn: { |
| | | emits: { |
| | | onClick: (role) => setTaskUserHire(role, EnumTaskUserHireStatus.Pass), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetTaskUsersQueryResultItem) => |
| | | row.hireStatus === EnumTaskUserHireStatus.Pass || !state.isInternal, |
| | | }, |
| | | }, |
| | | refuseBtn: { |
| | | emits: { |
| | | onClick: (role) => setTaskUserHire(role, EnumTaskUserHireStatus.Refuse), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetTaskUsersQueryResultItem) => |
| | | row.hireStatus !== EnumTaskUserHireStatus.Wait || !state.isInternal, |
| | | }, |
| | | }, |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const router = useRouter(); |
| | | const route = useRoute(); |
| | | const id = route.params.id as string; |
| | | const BaseState = { |
| | | loading: true, |
| | | |
| | | isInternal: false, |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | |
| | | let res = await taskUserServices.getTaskUsers(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | if (res) { |
| | | state.isInternal = res.objectData?.isInternal; |
| | | } |
| | | return res; |
| | | } catch (error) { |
| | | console.log('error: ', error); |
| | |
| | | <SearchInput |
| | | v-model="extraParamState.keywords" |
| | | style="width: 260px" |
| | | placeholder="任务名称" |
| | | placeholder="任务名称/客户" |
| | | @on-click-search="getList" |
| | | > |
| | | </SearchInput> |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn> |
| | | <!-- <el-button @click="goAddOrEdit()" type="primary">发布</el-button> --> |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'addBtn')" |
| | | @click="goAddOrEdit()" |
| | | type="primary" |
| | | >发布</el-button |
| | | > |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="EmploymentManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | <template #userCount="{ row }"> |
| | | <el-button link type="primary" @click="goSignList(row)">{{ |
| | | <el-button v-if="!row.isInternal" link type="primary" @click="goSignList(row)">{{ |
| | | row.userCount || 0 |
| | | }}</el-button> |
| | | <span v-else>/</span> |
| | | </template> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | |
| | | name: 'TaskManageList', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | // { |
| | | // data: { |
| | | // enCode: 'editBtn', |
| | | // name: '编辑', |
| | | // }, |
| | | // emits: { |
| | | // onClick: (role) => goAddOrEdit(role), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetTaskInfosQueryResultItem) => row.status === EnumTaskStatus.Complete, |
| | | // }, |
| | | // }, |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '详情', |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | editBtn: { |
| | | emits: { |
| | | onClick: (role) => goAddOrEdit(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetTaskInfosQueryResultItem) => |
| | | row.status === EnumTaskStatus.Complete || !row.isInternal, |
| | | }, |
| | | }, |
| | | detailBtn: { |
| | | emits: { |
| | | onClick: (row: API.GetTaskInfosQueryResultItem) => goDetail(row), |
| | | }, |
| | | }, |
| | | // { |
| | | // data: { |
| | | // enCode: 'publishBtn', |
| | | // name: '发布', |
| | | // }, |
| | | // emits: { |
| | | // onClick: (row: API.GetTaskInfosQueryResultItem) => |
| | | // setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.InProcess), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetTaskInfosQueryResultItem) => |
| | | // row.releaseStatus === EnumTaskReleaseStatus.InProcess, |
| | | // }, |
| | | // }, |
| | | // { |
| | | // data: { |
| | | // enCode: 'unPublishBtn', |
| | | // name: '停止发布', |
| | | // }, |
| | | // emits: { |
| | | // onClick: (row: API.GetTaskInfosQueryResultItem) => |
| | | // setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.Stopped), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetTaskInfosQueryResultItem) => |
| | | // row.releaseStatus === EnumTaskReleaseStatus.Stopped, |
| | | // }, |
| | | // }, |
| | | // { |
| | | // data: { |
| | | // enCode: 'arrangeBtn', |
| | | // name: '安排', |
| | | // }, |
| | | // emits: { |
| | | // onClick: (row: API.GetTaskInfosQueryResultItem) => handleArrange(row), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetTaskInfosQueryResultItem) => |
| | | // row.releaseStatus === EnumTaskReleaseStatus.Stopped, |
| | | // }, |
| | | // }, |
| | | ]); |
| | | publishBtn: { |
| | | emits: { |
| | | onClick: (row: API.GetTaskInfosQueryResultItem) => |
| | | setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.InProcess), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetTaskInfosQueryResultItem) => |
| | | row.releaseStatus === EnumTaskReleaseStatus.InProcess || !row.isInternal, |
| | | }, |
| | | }, |
| | | unPublishBtn: { |
| | | emits: { |
| | | onClick: (row: API.GetTaskInfosQueryResultItem) => |
| | | setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.Stopped), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetTaskInfosQueryResultItem) => |
| | | row.releaseStatus === EnumTaskReleaseStatus.Stopped || !row.isInternal, |
| | | }, |
| | | }, |
| | | arrangeBtn: { |
| | | emits: { |
| | | onClick: (row: API.GetTaskInfosQueryResultItem) => handleArrange(row), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetTaskInfosQueryResultItem) => |
| | | row.releaseStatus === EnumTaskReleaseStatus.Stopped || !row.isInternal, |
| | | }, |
| | | }, |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const router = useRouter(); |
| | | |
| | |
| | | <LoadingLayout :loading="isLoading && isEdit"> |
| | | <AppContainer> |
| | | <PageFormLayout title="基本信息"> |
| | | <ProForm :model="form" ref="productFormRef" label-width="110px" :is-read="isDetail"> |
| | | <ProForm :model="form" ref="productFormRef" label-width="120px" :is-read="isDetail"> |
| | | <ProFormCol> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 |
| | |
| | | </ProFormCol> |
| | | <ProFormCol> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 label="需求人数:" prop="needPeopleNumber"> |
| | | <ProFormItemV2 |
| | | label="需求人数:" |
| | | prop="needPeopleNumber" |
| | | :check-rules="[{ message: '请输入需求人数' }]" |
| | | > |
| | | <ProFormInputNumber |
| | | :controls="false" |
| | | v-model="form.needPeopleNumber" |
| | |
| | | :max="999999999999" |
| | | :precision="0" |
| | | unit="人" |
| | | @change="calcTaskTotalServiceFee" |
| | | ></ProFormInputNumber> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | |
| | | }, |
| | | }, |
| | | ]" |
| | | @change="calcTaskTotalServiceFee" |
| | | > |
| | | <RadioWithExtra |
| | | v-model="form.billingMethod" |
| | |
| | | :max="999999999999" |
| | | :unit="EnumBillingMethodUnitText[form.billingMethod]" |
| | | :disabled="feeCannotEdit" |
| | | @change="calcTaskTotalServiceFee" |
| | | ></ProFormInputNumber> |
| | | </template> |
| | | </RadioWithExtra> |
| | |
| | | :max="999999999999" |
| | | unit="小时/天" |
| | | :disabled="feeCannotEdit" |
| | | @change="calcTaskTotalServiceFee" |
| | | ></ProFormInputNumber> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | |
| | | :max="999999999999" |
| | | unit="件" |
| | | :disabled="feeCannotEdit" |
| | | @change="calcTaskTotalServiceFee" |
| | | ></ProFormInputNumber> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | |
| | | <ProFormItemV2 |
| | | label="任务时间:" |
| | | prop="time" |
| | | :check-rules="[{ message: '请选择任务时间', type: 'array' }]" |
| | | :check-rules="[ |
| | | { message: '请选择任务时间', type: 'array' }, |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | if (form.billingMethod === EnumBillingMethod.Month) { |
| | | if (dayjs(form.time[1]).diff(dayjs(form.time[0]), 'month') < 1) { |
| | | callback(new Error('月结任务时任务时间需大于一个月')); |
| | | } |
| | | callback(); |
| | | } |
| | | callback(); |
| | | }, |
| | | }, |
| | | ]" |
| | | > |
| | | <ProFormDatePicker |
| | | v-model="form.time" |
| | |
| | | <ProFormCheckbox |
| | | v-model="form.checkReceiveMethods" |
| | | :value-enum="EnumTaskCheckReceiveMethodText" |
| | | :disabled="isEdit" |
| | | ></ProFormCheckbox> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | | <ProFormItemV2 label="预计服务费总额:" prop="totalServiceFee"> |
| | | {{ `${toThousand(form.totalServiceFee)}元` }} |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 |
| | | label="结算方式:" |
| | | prop="settlementAccess" |
| | |
| | | EnumTaskCheckReceiveMethodText, |
| | | EnumEnterpriseWalletAccessText, |
| | | } from '@/constants'; |
| | | import { format, FormValidator } from '@/utils'; |
| | | import { format, FormValidator, toThousand } from '@/utils'; |
| | | import dayjs from 'dayjs'; |
| | | |
| | | defineOptions({ |
| | |
| | | }; |
| | | defineProps<Props>(); |
| | | const route = useRoute(); |
| | | const router = useRouter(); |
| | | const id = route.params.id as string; |
| | | const isEdit = !!id; |
| | | |
| | |
| | | }); |
| | | |
| | | const form = reactive({ |
| | | supplierEnterpriseId: '', |
| | | name: '', |
| | | billingMethod: EnumBillingMethod.Day, |
| | | serviceFee: null, |
| | |
| | | applyTime: [] as unknown as ModelValueType, |
| | | settlementAccess: '' as any as EnumEnterpriseWalletAccess, |
| | | needPeopleNumber: null as number, |
| | | |
| | | totalServiceFee: 0, |
| | | }); |
| | | |
| | | const { isLoading } = useQuery({ |
| | |
| | | }, |
| | | placeholderData: () => ({} as API.GetTaskInfoQueryResult), |
| | | onSuccess(data) { |
| | | form.supplierEnterpriseId = data.supplierEnterpriseId ?? ''; |
| | | form.name = data.name; |
| | | form.billingMethod = data.billingMethod; |
| | | form.serviceFee = data.serviceFee; |
| | |
| | | ]; |
| | | form.settlementAccess = data.settlementAccess; |
| | | form.needPeopleNumber = data.needPeopleNumber; |
| | | form.totalServiceFee = data.estimatedServiceFee; |
| | | }, |
| | | enabled: isEdit, |
| | | }); |
| | |
| | | |
| | | function handleTimeChange() { |
| | | form.applyTime = [] as unknown as ModelValueType; |
| | | calcTaskTotalServiceFee(); |
| | | } |
| | | |
| | | function handleBack() { |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | async function calcTaskTotalServiceFee() { |
| | | try { |
| | | let params: API.CalcTaskTotalServiceFeeCommand = { |
| | | billingMethod: form.billingMethod, |
| | | serviceFee: form.serviceFee ?? 0, |
| | | verifyWorkHours: form.verifyWorkHours ?? 0, |
| | | totalPieceQuantity: form.totalPieceQuantity, |
| | | needPeopleNumber: form.needPeopleNumber ?? 0, |
| | | beginTime: dayjs(form.time[0]).format('YYYY-MM-DD 00:00:00'), |
| | | endTime: dayjs(form.time[1]).format('YYYY-MM-DD 23:59:59'), |
| | | }; |
| | | let res = await taskServices.calcTaskTotalServiceFee(params); |
| | | if (res) { |
| | | form.totalServiceFee = res.totalServiceFee; |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function submit() { |
| | | try { |
| | | await calcTaskTotalServiceFee(); |
| | | let params: API.SaveTaskInfoCommand = { |
| | | supplierEnterpriseId: form.supplierEnterpriseId, |
| | | name: form.name, |
| | | needPeopleNumber: form.needPeopleNumber, |
| | | billingMethod: form.billingMethod, |
| | | totalPieceQuantity: form.totalPieceQuantity, |
| | | serviceFee: form.serviceFee, |
| | | settlementCycle: form.settlementCycle, |
| | | settlementDate: form.settlementDate ? form.settlementDate : 0, |
| | | totalPieceQuantity: form.totalPieceQuantity, |
| | | benefits: form.benefits, |
| | | ageMinLimit: form.ageMinLimit, |
| | | ageMaxLimit: form.ageMaxLimit, |
| | |
| | | checkReceiveMethods: form.checkReceiveMethods, |
| | | settlementAccess: form.settlementAccess, |
| | | }; |
| | | if (form.billingMethod !== EnumBillingMethod.Face) { |
| | | params.serviceFee = form.serviceFee; |
| | | } |
| | | if (isEdit) { |
| | | params.id = id; |
| | | } |
| | | let res = await taskServices.saveTaskInfo(params); |
| | | let res = await taskServices.saveTaskInfo(params, { |
| | | skipErrorHandler: true, |
| | | }); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | eventContext.emit(isEdit ? 'taskManage:edit' : 'taskManage:add'); |
| | | handleBack(); |
| | | } |
| | | } catch (error) {} |
| | | } catch (error) { |
| | | if (error?.info?.errorCode == 'BalanceNotEnough') { |
| | | Message.tipMessage('您当前账户余额不足,暂时无法发布任务,请充值后操作', { |
| | | confirmButtonText: '立即充值', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | callback: (action) => { |
| | | if (action === 'confirm') { |
| | | router.push({ |
| | | name: 'EnterpriseBalanceManage', |
| | | }); |
| | | } |
| | | }, |
| | | }); |
| | | } else { |
| | | Message.errorMessage(error); |
| | | } |
| | | } |
| | | } |
| | | |
| | | function handleCheckBenefitsAllChange(val: boolean) { |
| | |
| | | <template> |
| | | <ProDialog :title="title" v-model="visible" destroy-on-close draggable> |
| | | <ProTabs v-model="tabType" hasBorder v-if="form.checkReceiveMethods?.length > 1"> |
| | | <ProTabs v-model="form.tabType" hasBorder v-if="form.checkReceiveMethods?.length > 1"> |
| | | <ProTabPane lazy label="签到记录" name="signRecord"></ProTabPane> |
| | | <ProTabPane lazy label="提交记录" name="submitRecord"></ProTabPane> |
| | | </ProTabs> |
| | |
| | | type Form = { |
| | | id: string; |
| | | checkReceiveMethods: EnumTaskCheckReceiveMethod[]; |
| | | isInternal: boolean; |
| | | tabType: string; |
| | | isDetail: boolean; |
| | | }; |
| | | |
| | | const visible = defineModel({ type: Boolean }); |
| | | const form = defineModel<Form>('form'); |
| | | const tabType = ref('signRecord'); |
| | | |
| | | const title = computed(() => (form.value.isDetail ? '详情' : '验收')); |
| | | const emit = defineEmits<{ |
| | |
| | | } else if (form.value.checkReceiveMethods.every((x) => x == EnumTaskCheckReceiveMethod.Submit)) { |
| | | return submitColumns; |
| | | } else { |
| | | if (tabType.value == 'signRecord') { |
| | | if (form.value.tabType === 'signRecord') { |
| | | return checkInColumns; |
| | | } else { |
| | | return submitColumns; |
| | |
| | | !( |
| | | row.checkReceiveStatus === EnumTaskUserSubmitCheckReceiveStatus.WaitSubmit || |
| | | row.checkReceiveStatus === EnumTaskUserSubmitCheckReceiveStatus.WaitCheckReceive |
| | | ) || form.value.isDetail, |
| | | ) || |
| | | form.value.isDetail || |
| | | form.value.tabType === 'signRecord' || |
| | | !form.value.isInternal, |
| | | }, |
| | | }, |
| | | { |
| | |
| | | !( |
| | | row.checkReceiveStatus === EnumTaskUserSubmitCheckReceiveStatus.WaitSubmit || |
| | | row.checkReceiveStatus === EnumTaskUserSubmitCheckReceiveStatus.WaitCheckReceive |
| | | ) || form.value.isDetail, |
| | | ) || |
| | | form.value.isDetail || |
| | | form.value.tabType === 'signRecord' || |
| | | !form.value.isInternal, |
| | | }, |
| | | }, |
| | | { |
| | |
| | | </QueryFilterItem> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="CustomerRechargeManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | <CustomerRechargeDialog v-bind="dialogProps" /> |
| | |
| | | } from '@bole-core/components'; |
| | | import * as enterpriseCooperationWalletServices from '@/services/api/enterpriseCooperationWallet'; |
| | | import CustomerRechargeDialog from './components/CustomerRechargeDialog.vue'; |
| | | import { CustomerRechargeManageColumns } from './constants'; |
| | | import { Message } from '@bole-core/core'; |
| | | |
| | | defineOptions({ |
| | | name: 'CustomerRechargeManage', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'confirmBtn', |
| | | name: '确认', |
| | | }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | confirmBtn: { |
| | | emits: { |
| | | onClick: (role) => openDialog(role, false), |
| | | }, |
| | |
| | | role.transactionStatus !== EnumEnterpriseCooperationWalletTransactionStatus.WaitSure, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '详情', |
| | | }, |
| | | detailBtn: { |
| | | emits: { |
| | | onClick: (role) => openDialog(role, true), |
| | | }, |
| | |
| | | role.transactionStatus === EnumEnterpriseCooperationWalletTransactionStatus.WaitSure, |
| | | }, |
| | | }, |
| | | ]); |
| | | }; |
| | | const { column, operationBtns, checkSubModuleItemShow } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const router = useRouter(); |
| | | const BaseState = { |
| | |
| | | <template> |
| | | <LoadingLayout :loading="state.loading"> |
| | | <AppContainer> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="CustomerRechargeRecordColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | <RechargeRecordialog v-bind="dialogProps" /> |
| | |
| | | UploadUserFile, |
| | | } from '@bole-core/components'; |
| | | import * as enterpriseCooperationWalletServices from '@/services/api/enterpriseCooperationWallet'; |
| | | import { CustomerRechargeRecordColumns } from './constants'; |
| | | import RechargeRecordialog from './components/RechargeRecordialog.vue'; |
| | | import { EnumEnterpriseCooperationWalletTransactionStatusText } from '@/constants'; |
| | | |
| | |
| | | const route = useRoute(); |
| | | const id = route.params.id as string; |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '详情', |
| | | }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | detailBtn: { |
| | | emits: { |
| | | onClick: (role: API.GetCooperationWalletRechargeTransactionsQueryResultItem) => |
| | | openDialog(role), |
| | | }, |
| | | }, |
| | | ]); |
| | | }; |
| | | const { column, operationBtns, checkSubModuleItemShow } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const router = useRouter(); |
| | | const BaseState = { |
| | |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn> |
| | | <el-button type="primary" @click="exportPersonalUserTransactionEreceipts()" |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'receiptExportBtn')" |
| | | type="primary" |
| | | @click="exportPersonalUserTransactionEreceipts()" |
| | | >回单导出</el-button |
| | | > |
| | | <el-button type="primary" @click="handleExport()">导出</el-button> |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'exportBtn')" |
| | | type="primary" |
| | | @click="handleExport()" |
| | | >导出</el-button |
| | | > |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="BalanceManageDetailColumns" |
| | | :columns="column" |
| | | :show-operation-column="false" |
| | | :auto-height="false" |
| | | :table-props="{ |
| | |
| | | ProTableQueryFilterBar, |
| | | ProFormSelect, |
| | | } from '@bole-core/components'; |
| | | import { BalanceManageDetailColumns } from './constants'; |
| | | import { EnumWalletTransactionStatusText, EnumEnterpriseWalletAccessText } from '@/constants'; |
| | | import * as enterpriseWalletServices from '@/services/api/enterpriseWallet'; |
| | | import * as userServices from '@/services/api/user'; |
| | |
| | | name: 'EnterpriseBalanceManageDetail', |
| | | }); |
| | | |
| | | const operationBtnMap: Record<string, OperationBtnType> = {}; |
| | | const { column, operationBtns, checkSubModuleItemShow } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const route = useRoute(); |
| | | const id = (route.params.id as string) ?? ''; |
| | | |
| | |
| | | <AppContainer> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="CustomerBalanceManageColumns" |
| | | :operationBtns="operationBtns" |
| | | :columns="customerColumns" |
| | | :operationBtns="customerOperationBtns" |
| | | > |
| | | </ProTableV2> |
| | | </AppContainer> |
| | |
| | | defineOperationBtns, |
| | | } from '@bole-core/components'; |
| | | import * as enterpriseCooperationWalletServices from '@/services/api/enterpriseCooperationWallet'; |
| | | import { CustomerBalanceManageColumns } from '../constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'CustomerBalanceManageView', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'recordBtn', |
| | | name: '充值记录', |
| | | }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | 'customer-recordBtn': { |
| | | emits: { |
| | | onClick: (role: API.GetCooperationWalletsQueryResultItem) => goDetail(role), |
| | | }, |
| | | }, |
| | | ]); |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const [customerColumns] = useGroupColumns(column, ['customer-']); |
| | | const [customerOperationBtns] = useGroupOperationBtns(operationBtns, ['customer-']); |
| | | |
| | | const router = useRouter(); |
| | | const BaseState = { |
| | |
| | | <template> |
| | | <LoadingLayout :loading="state.loading"> |
| | | <AppContainer> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="DistributionDetailColumns" |
| | | :showOperationColumn="false" |
| | | > |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :showOperationColumn="false"> |
| | | <template #settlementStatus="{ row }"> |
| | | {{ |
| | | row.settlementStatus !== EnumTaskSettlementStatus.InProcess && |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { |
| | | ProTableV2, |
| | | LoadingLayout, |
| | | AppContainer, |
| | | useTable, |
| | | defineOperationBtns, |
| | | } from '@bole-core/components'; |
| | | import { DistributionDetailColumns } from '../constants'; |
| | | import { ProTableV2, LoadingLayout, AppContainer, useTable } from '@bole-core/components'; |
| | | import * as userServices from '@/services/api/user'; |
| | | import { |
| | | EnumTaskSettlementStatusText, |
| | |
| | | name: 'DistributionDetailView', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([]); |
| | | const operationBtnMap: Record<string, OperationBtnType> = {}; |
| | | |
| | | const { column, operationBtns, checkSubModuleItemShow } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const BaseState = { |
| | | loading: true, |
| | |
| | | <AppContainer> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="BalanceManageColumns" |
| | | :operationBtns="operationBtns" |
| | | :columns="enterpriseColumns" |
| | | :operationBtns="enterpriseOperationBtns" |
| | | > |
| | | </ProTableV2> |
| | | </AppContainer> |
| | |
| | | AppContainer, |
| | | useTable, |
| | | useFormDialog, |
| | | defineOperationBtns, |
| | | ProTabs, |
| | | ProTabPane, |
| | | } from '@bole-core/components'; |
| | | import * as enterpriseWalletServices from '@/services/api/enterpriseWallet'; |
| | | import { BalanceManageColumns } from '../constants'; |
| | | import RechargeEnterpriseWalletDialog from '@/views/ServiceChargeManage/components/RechargeEnterpriseWalletDialog.vue'; |
| | | import { EnumEnterpriseWalletAccess, EnumEnterpriseWalletAccessText } from '@/constants'; |
| | | |
| | |
| | | name: 'EnterpriseBalanceManageView', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'rechargeBtn', |
| | | name: '充值', |
| | | }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | 'enterprise-rechargeBtn': { |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | |
| | | role.access !== EnumEnterpriseWalletAccess.Alipay, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '详情', |
| | | }, |
| | | 'enterprise-detailBtn': { |
| | | emits: { |
| | | onClick: (role) => goDetail(role), |
| | | }, |
| | | }, |
| | | ]); |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const [enterpriseColumns] = useGroupColumns(column, ['enterprise-']); |
| | | const [enterpriseOperationBtns] = useGroupOperationBtns(operationBtns, ['enterprise-']); |
| | | |
| | | const router = useRouter(); |
| | | const BaseState = { |
| | |
| | | import { defineColumns } from '@bole-core/components'; |
| | | |
| | | export const DistributionDetailColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'enterpriseName', |
| | | name: '客户名称', |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'taskName', |
| | | name: '所属任务', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'taskCode', |
| | | name: '任务单号', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'settlementCode', |
| | | name: '结算单号', |
| | | }, |
| | | { |
| | | id: '5', |
| | | enCode: 'receiveName', |
| | | name: '姓名', |
| | | }, |
| | | { |
| | | id: '6', |
| | | enCode: 'settlementAccess', |
| | | name: '结算方式', |
| | | }, |
| | | { |
| | | id: '7', |
| | | enCode: 'receiveAccount', |
| | | name: '结算账户', |
| | | }, |
| | | { |
| | | id: '8', |
| | | enCode: 'amount', |
| | | name: '结算金额', |
| | | }, |
| | | { |
| | | id: '9', |
| | | enCode: 'settlementStatus', |
| | | name: '结算单确认状态', |
| | | }, |
| | | { |
| | | id: '10', |
| | | enCode: 'settlementTime', |
| | | name: '确认日期', |
| | | }, |
| | | { |
| | | id: '11', |
| | | enCode: 'settlementAuditStatus', |
| | | name: '结算单提交状态', |
| | | }, |
| | | { |
| | | id: '12', |
| | | enCode: 'settlementAuditTime', |
| | | name: '提交时间', |
| | | }, |
| | | { |
| | | id: '13', |
| | | enCode: 'settlementReceiveStatus', |
| | | name: '到账状态', |
| | | }, |
| | | { |
| | | id: '14', |
| | | enCode: 'transDate', |
| | | name: '到账时间', |
| | | }, |
| | | ]); |
| | | |
| | | export const UsageDetailColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | |
| | | id: '4', |
| | | enCode: 'name', |
| | | name: '费用(元)', |
| | | }, |
| | | ]); |
| | | |
| | | export const BalanceManageColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'access', |
| | | name: '账户类型', |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'identity', |
| | | name: '户号', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'balance', |
| | | name: '账户余额', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'availableBalance', |
| | | name: '可用余额', |
| | | }, |
| | | { |
| | | id: '5', |
| | | enCode: 'freezeBalance', |
| | | name: '已冻结', |
| | | }, |
| | | ]); |
| | | |
| | | export const CustomerBalanceManageColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'partyAEnterpriseName', |
| | | name: '客户名称', |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'partyAEnterpriseSocietyCreditCode', |
| | | name: '信用代码', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'balance', |
| | | name: '账户余额', |
| | | }, |
| | | ]); |
| | | |
| | | export const BalanceManageDetailColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'sendTime', |
| | | name: '发放日期', |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'code', |
| | | name: '流水号', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'transactionStatus', |
| | | name: '状态', |
| | | width: 120, |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'amount', |
| | | name: '金额', |
| | | width: 120, |
| | | }, |
| | | { |
| | | id: '5', |
| | | enCode: 'receiveName', |
| | | name: '收款人', |
| | | }, |
| | | { |
| | | id: '6', |
| | | enCode: 'receiveIdentity', |
| | | name: '身份证号', |
| | | }, |
| | | { |
| | | id: '7', |
| | | enCode: 'receiveAccount', |
| | | name: '收款人账户', |
| | | }, |
| | | { |
| | | id: '8', |
| | | enCode: 'transDate', |
| | | name: '提现日期', |
| | | }, |
| | | { |
| | | id: '9', |
| | | enCode: 'ereceiptDownloadOssUrl', |
| | | name: '电子回单', |
| | | }, |
| | | ]); |
| | | |
| | | export const CustomerRechargeManageColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'partyAEnterpriseName', |
| | | name: '客户名称', |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'partyAEnterpriseSocietyCreditCode', |
| | | name: '信用代码', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'amount', |
| | | name: '充值金额', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'transactionStatus', |
| | | name: '充值状态', |
| | | }, |
| | | ]); |
| | | |
| | | export const CustomerRechargeRecordColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'partyAEnterpriseName', |
| | | name: '客户名称', |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'receiveBank', |
| | | name: '开户总行', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'receiveBankBranch', |
| | | name: '开户支行', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'receiveAccount', |
| | | name: '户号', |
| | | }, |
| | | { |
| | | id: '5', |
| | | enCode: 'amount', |
| | | name: '充值金额', |
| | | }, |
| | | { |
| | | id: '6', |
| | | enCode: 'createdTime', |
| | | name: '充值时间', |
| | | }, |
| | | { |
| | | id: '7', |
| | | enCode: 'transactionStatus', |
| | | name: '充值状态', |
| | | }, |
| | | ]); |
| New file |
| | |
| | | <template> |
| | | <LoadingLayout :loading="state.loading"> |
| | | <AppContainer> |
| | | <ProTableQueryFilterBar @on-reset="reset"> |
| | | <template #query> |
| | | <QueryFilterItem tip-content="灵工签约状态"> |
| | | <FieldSelect |
| | | v-model="extraParamState.userSignContractStatus" |
| | | :value-enum="EnumTaskUserSignContractStatusText" |
| | | placeholder="请选择灵工签约状态" |
| | | clearable |
| | | @change="getList()" |
| | | /> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem tip-content="企业签约状态"> |
| | | <FieldSelect |
| | | v-model="extraParamState.enterpriseSignContractStatus" |
| | | :value-enum="EnumTaskUserSignContractStatusText" |
| | | placeholder="请选择企业签约状态" |
| | | clearable |
| | | @change="getList()" |
| | | /> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem> |
| | | <FieldDatePicker |
| | | v-model="extraParamState.userSignContractTime" |
| | | type="daterange" |
| | | range-separator="~" |
| | | start-placeholder="起始日期" |
| | | end-placeholder="截止日期" |
| | | clearable |
| | | @change="getList()" |
| | | tooltipContent="灵工签约时间" |
| | | ></FieldDatePicker> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem> |
| | | <FieldDatePicker |
| | | v-model="extraParamState.signContractTime" |
| | | type="daterange" |
| | | range-separator="~" |
| | | start-placeholder="起始日期" |
| | | end-placeholder="截止日期" |
| | | clearable |
| | | @change="getList()" |
| | | tooltipContent="企业签约时间" |
| | | ></FieldDatePicker> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem> |
| | | <SearchInput |
| | | v-model="extraParamState.searchWord" |
| | | style="width: 300px" |
| | | placeholder="姓名/手机/身份证号" |
| | | @on-click-search="getList" |
| | | @keyup.enter="getList()" |
| | | > |
| | | </SearchInput> |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn> |
| | | <!-- <el-button @click="handleDownloadTemplate()" type="primary" link>模板下载</el-button> --> |
| | | <!-- <el-button @click="handleBatchImportAdd()" type="primary">批量导入</el-button> --> |
| | | <!-- <el-button @click="handleStaffInfoAdd()" type="primary">新建</el-button> --> |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'batchUnSignBtn')" |
| | | @click="handleBatchUnSign()" |
| | | type="primary" |
| | | >批量解约</el-button |
| | | > |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'sendShotMessageBtn')" |
| | | @click="handleSendShotMessage()" |
| | | type="primary" |
| | | >短信发送</el-button |
| | | > |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'batchSignBtn')" |
| | | @click="handleBatchSign()" |
| | | type="primary" |
| | | >批量签约</el-button |
| | | > |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'batchEnterpriseSignBtn')" |
| | | @click="handleEnterpriseBatchSign()" |
| | | type="primary" |
| | | >批量企业签约</el-button |
| | | > |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="column" |
| | | :operationBtns="operationBtns" |
| | | show-column-check |
| | | ref="proTable" |
| | | :table-props="{ |
| | | rowKey: 'id', |
| | | }" |
| | | > |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | <!-- <StaffInfoDialog v-bind="dialogStaffInfoProps" /> --> |
| | | <StaffDetailInfoDialog v-bind="dialogStaffDetailProps" /> |
| | | <BatchImportDialog |
| | | v-bind="dialogBatchImportProps" |
| | | @onDownloadTemplate="handleDownloadTemplate" |
| | | /> |
| | | <SendShotMessageDialog v-bind="dialogShotMessageProps" /> |
| | | <SignDialog v-bind="dialogSignProps" /> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { |
| | | ProTableQueryFilterBar, |
| | | OperationBtnType, |
| | | ProTableV2, |
| | | SearchInput, |
| | | LoadingLayout, |
| | | AppContainer, |
| | | QueryFilterItem, |
| | | useTable, |
| | | FieldDatePicker, |
| | | FieldSelect, |
| | | useFormDialog, |
| | | UploadUserFile, |
| | | XLSXUtils, |
| | | } from '@bole-core/components'; |
| | | import { EnumTaskUserHireStatusText, EnumTaskUserSignContractStatusText } from '@/constants'; |
| | | import { Message } from '@bole-core/core'; |
| | | import { convertApi2FormUrlOnlyOne, downloadFileByUrl, format } from '@/utils'; |
| | | // import StaffInfoDialog from './components/StaffInfoDialog.vue'; |
| | | import BatchImportDialog from './components/BatchImportDialog.vue'; |
| | | import SendShotMessageDialog from './components/SendShotMessageDialog.vue'; |
| | | import StaffDetailInfoDialog from './components/StaffDetailInfoDialog.vue'; |
| | | import SignDialog from './components/SignDialog.vue'; |
| | | import * as enterpriseEmployeeServices from '@/services/api/enterpriseEmployee'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import _ from 'lodash'; |
| | | import { getEnterpriseEmployeesHooks } from './hooks'; |
| | | |
| | | defineOptions({ |
| | | name: 'FlexJobContractManage', |
| | | }); |
| | | |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | // editBtn: { |
| | | // emits: { |
| | | // onClick: (role) => openDialog(role), |
| | | // }, |
| | | // }, |
| | | detailBtn: { |
| | | emits: { |
| | | onClick: (role: API.GetEnterpriseEmployeesQueryResultItem) => |
| | | handleStaffDetailEdit({ id: role.id, tabType: 'info' }), |
| | | }, |
| | | }, |
| | | enterpriseSignBtn: { |
| | | emits: { |
| | | onClick: (role) => handleEnterpriseSign(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetEnterpriseEmployeesQueryResultItem) => |
| | | !( |
| | | row.userSignContractStatus === EnumTaskUserSignContractStatus.Pass && |
| | | row.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Wait |
| | | ), |
| | | }, |
| | | }, |
| | | inviteSignBtn: { |
| | | emits: { |
| | | onClick: (role) => handleInviteSign(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetEnterpriseEmployeesQueryResultItem) => |
| | | !( |
| | | row.source === EnumEnterpriseEmployeeSource.Internal && |
| | | row.userSignContractStatus !== EnumTaskUserSignContractStatus.Pass |
| | | ), |
| | | }, |
| | | }, |
| | | unSignBtn: { |
| | | emits: { |
| | | onClick: (role) => handleUnSign(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetEnterpriseEmployeesQueryResultItem) => |
| | | !( |
| | | row.userSignContractStatus === EnumTaskUserSignContractStatus.Pass && |
| | | row.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Pass |
| | | ), |
| | | }, |
| | | }, |
| | | delBtn: { |
| | | props: { type: 'danger' }, |
| | | emits: { |
| | | onClick: (role) => handleDelete(role), |
| | | }, |
| | | }, |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const BaseState = { |
| | | loading: true, |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | | |
| | | onMounted(async () => { |
| | | await getList(); |
| | | state.loading = false; |
| | | }); |
| | | |
| | | const { getList, proTableProps, paginationState, extraParamState, reset } = |
| | | getEnterpriseEmployeesHooks(); |
| | | |
| | | const proTable = ref<InstanceType<typeof ProTableV2>>(); |
| | | |
| | | function getSelectionRows() { |
| | | if (proTableProps.value.tableData.length) { |
| | | const res = proTable.value.innerTableRef.getSelectionRows(); |
| | | if (res.length > 0) { |
| | | return res; |
| | | } else { |
| | | Message.errorMessage('未选择数据'); |
| | | } |
| | | } else { |
| | | Message.errorMessage('暂无数据'); |
| | | } |
| | | } |
| | | |
| | | const { |
| | | dialogProps: dialogStaffInfoProps, |
| | | handleEdit: handleStaffInfoEdit, |
| | | handleAdd: handleStaffInfoAdd, |
| | | editForm: staffInfoEditForm, |
| | | } = useFormDialog({ |
| | | onConfirm: handleAddOrEdit, |
| | | defaultFormParams: { |
| | | id: '', |
| | | name: '', |
| | | identity: '', |
| | | contactPhoneNumber: '', |
| | | gender: EnumUserGender.Male, |
| | | age: null as any as number, |
| | | identityImg: [] as UploadUserFile[], |
| | | identityBackImg: [] as UploadUserFile[], |
| | | contractUrl: [] as UploadUserFile[], |
| | | regiterTime: '', |
| | | userRealTime: '', |
| | | userSignContractTime: '', |
| | | isDetail: false, |
| | | }, |
| | | }); |
| | | |
| | | async function openDialog(row: API.GetEnterpriseEmployeesQueryResultItem, isDetail = false) { |
| | | try { |
| | | let detail = await enterpriseEmployeeServices.getEnterpriseEmployee({ id: row.id }); |
| | | handleStaffInfoEdit({ |
| | | id: row.id, |
| | | name: row.name, |
| | | identity: row.identity, |
| | | contactPhoneNumber: row.contactPhoneNumber, |
| | | gender: detail.gender, |
| | | age: detail.age ?? null, |
| | | identityImg: convertApi2FormUrlOnlyOne(detail.identityImg), |
| | | identityBackImg: convertApi2FormUrlOnlyOne(detail.identityBackImg), |
| | | contractUrl: convertApi2FormUrlOnlyOne(detail.contractUrl, { |
| | | fileName: detail.contractUrl ? detail.contractUrl.split('/').pop() : '合同', |
| | | }), |
| | | regiterTime: detail.applyTime ?? '', |
| | | userRealTime: row.userRealTime ?? '', |
| | | userSignContractTime: row.userSignContractTime ?? '', |
| | | isDetail: isDetail, |
| | | }); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleAddOrEdit() { |
| | | try { |
| | | let params: API.EditEnterpriseEmployeeCommand = { |
| | | name: staffInfoEditForm.name, |
| | | identity: staffInfoEditForm.identity, |
| | | contactPhoneNumber: staffInfoEditForm.contactPhoneNumber, |
| | | gender: staffInfoEditForm.gender, |
| | | age: staffInfoEditForm.age, |
| | | identityImg: staffInfoEditForm.identityImg[0]?.path ?? '', |
| | | identityBackImg: staffInfoEditForm.identityBackImg[0]?.path ?? '', |
| | | id: staffInfoEditForm.id, |
| | | }; |
| | | let res = await enterpriseEmployeeServices.editEnterpriseEmployee(params); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | const { |
| | | dialogProps: dialogBatchImportProps, |
| | | handleAdd: handleBatchImportAdd, |
| | | editForm: batchImportForm, |
| | | } = useFormDialog({ |
| | | onConfirm: handleBatchImport, |
| | | defaultFormParams: { |
| | | url: [] as UploadUserFile[], |
| | | }, |
| | | }); |
| | | |
| | | async function handleBatchImport() { |
| | | try { |
| | | let params: API.ImportEnterpriseEmployeesCommand = { |
| | | excelUrl: batchImportForm.url[0]?.path ?? '', |
| | | }; |
| | | let res = await enterpriseEmployeeServices.importEnterpriseEmployees(params); |
| | | if (res.failCount > 0) { |
| | | await Message.tipMessage('存在错误数据,是否导出?'); |
| | | XLSXUtils.exportToXLSX({ |
| | | workbookDataList: res.errors, |
| | | fileName: '灵工批量导入-错误数据', |
| | | workbookHeaderMap: { |
| | | name: '姓名', |
| | | identity: '身份证号', |
| | | contactPhoneNumber: '手机号', |
| | | errorMessage: '备注', |
| | | }, |
| | | }); |
| | | } else { |
| | | Message.successMessage('导入成功'); |
| | | getList(); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | const { |
| | | dialogProps: dialogShotMessageProps, |
| | | handleAdd: handleShotMessageAdd, |
| | | editForm: editShotMessageForm, |
| | | } = useFormDialog({ |
| | | onConfirm: sendMessageForSign, |
| | | defaultFormParams: { |
| | | ids: [] as string[], |
| | | customerId: '', |
| | | name: '', |
| | | contractTemplateId: '', |
| | | }, |
| | | }); |
| | | |
| | | async function handleSendShotMessage() { |
| | | try { |
| | | const selectionRows = getSelectionRows(); |
| | | if (selectionRows) { |
| | | if (selectionRows.some((x) => x.source === EnumEnterpriseEmployeeSource.External)) { |
| | | Message.warnMessage('勾选人员中包含外部人员'); |
| | | return; |
| | | } else if ( |
| | | selectionRows.some((x) => x.userSignContractStatus === EnumTaskUserSignContractStatus.Pass) |
| | | ) { |
| | | await Message.tipMessage('勾选人员中包含已签约完成人员,确认要继续发送短信通知吗?'); |
| | | } |
| | | handleShotMessageAdd({ |
| | | ids: selectionRows.map((x) => x.id), |
| | | name: '人员签约通道短信', |
| | | }); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function sendMessageForSign() { |
| | | try { |
| | | let params: API.SendInviteElectronSignSmsCommand = { |
| | | ids: editShotMessageForm.ids, |
| | | contractTemplateId: editShotMessageForm.contractTemplateId, |
| | | }; |
| | | let res = await enterpriseEmployeeServices.sendInviteElectronSignSms(params); |
| | | if (res) { |
| | | Message.successMessage('短信已发送'); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function handleDownloadTemplate() { |
| | | downloadFileByUrl(ImportEnterpriseEmployeesTempPath, '批量导入模板'); |
| | | } |
| | | |
| | | const { |
| | | dialogProps: dialogSignProps, |
| | | handleAdd: handleSignAdd, |
| | | handleEdit: handleSignEdit, |
| | | editForm: signEditForm, |
| | | } = useFormDialog({ |
| | | onConfirm: signContract, |
| | | defaultFormParams: { |
| | | ids: [] as string[], |
| | | contractTemplateId: '', |
| | | }, |
| | | }); |
| | | |
| | | function handleInviteSign(row: API.GetEnterpriseEmployeesQueryResultItem) { |
| | | if (row) { |
| | | handleSignEdit({ |
| | | ids: [row.id], |
| | | contractTemplateId: '', |
| | | }); |
| | | } |
| | | } |
| | | function handleBatchSign() { |
| | | const selectionRows = getSelectionRows(); |
| | | if (selectionRows) { |
| | | const hasSigned = selectionRows?.some( |
| | | (x) => |
| | | x.userSignContractStatus === EnumTaskUserSignContractStatus.Pass || |
| | | x.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Pass || |
| | | x.source === EnumEnterpriseEmployeeSource.External |
| | | ); |
| | | if (hasSigned) { |
| | | Message.warnMessage('勾选人员中包含已签约完成或外部人员'); |
| | | return; |
| | | } |
| | | handleSignAdd({ |
| | | ids: selectionRows.map((x) => x.id), |
| | | contractTemplateId: '', |
| | | }); |
| | | } |
| | | } |
| | | |
| | | const handleEnterpriseBatchSign = _.debounce( |
| | | () => { |
| | | const selectionRows = getSelectionRows(); |
| | | if (selectionRows) { |
| | | const hasSigned = selectionRows?.some( |
| | | (x) => |
| | | !( |
| | | x.userSignContractStatus === EnumTaskUserSignContractStatus.Pass && |
| | | x.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Wait |
| | | ) |
| | | ); |
| | | if (hasSigned) { |
| | | Message.warnMessage('勾选人员中包含已企业签约、未录用人员或未签约完成人员'); |
| | | return; |
| | | } |
| | | const ids = selectionRows.map((x) => x.id); |
| | | handleBatchEnterpriseSign(ids); |
| | | } |
| | | }, |
| | | 1000, |
| | | { leading: true, trailing: false } |
| | | ); |
| | | |
| | | async function handleBatchEnterpriseSign(ids: string[]) { |
| | | try { |
| | | state.loading = true; |
| | | let res = await enterpriseEmployeeServices.batchEnterpriseSignContract({ ids: ids }); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | if (res?.errors?.length > 0) { |
| | | Message.tipMessage('存在签约失败的灵工信息数据,是否导出?').then(() => { |
| | | XLSXUtils.exportToXLSX({ |
| | | workbookDataList: res.errors, |
| | | fileName: '签约失败灵工信息', |
| | | workbookHeaderMap: { |
| | | name: '姓名', |
| | | contactPhoneNumber: '手机号', |
| | | identity: '身份证号', |
| | | errorMessages: '错误信息', |
| | | }, |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | } finally { |
| | | state.loading = false; |
| | | } |
| | | } |
| | | |
| | | async function signContract() { |
| | | try { |
| | | let params: API.InviteElectronSignCommand = { |
| | | ids: signEditForm.ids, |
| | | contractTemplateId: signEditForm.contractTemplateId, |
| | | }; |
| | | let res = await enterpriseEmployeeServices.inviteElectronSign(params); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleEnterpriseSign(row: API.GetEnterpriseEmployeesQueryResultItem) { |
| | | try { |
| | | let res = await enterpriseEmployeeServices.enterpriseUserElectronSign({ id: row.id }); |
| | | if (res) { |
| | | window.open(res?.signContractLongUrl, '_blank'); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function handleUnSign(row: API.GetEnterpriseEmployeesQueryResultItem) { |
| | | stopElectronSign([row.id]); |
| | | } |
| | | |
| | | function handleBatchUnSign() { |
| | | try { |
| | | const selectionRows = getSelectionRows(); |
| | | if (selectionRows) { |
| | | const hasUnSigned = selectionRows?.some( |
| | | (x) => x.enterpriseSignContractStatus !== EnumTaskUserSignContractStatus.Pass |
| | | ); |
| | | if (hasUnSigned) { |
| | | Message.warnMessage('勾选数据中包含企业未签约或已解约数据'); |
| | | return; |
| | | } |
| | | stopElectronSign(selectionRows.map((x) => x.id)); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function stopElectronSign(ids: string[]) { |
| | | try { |
| | | await Message.tipMessage('确定解约用户?'); |
| | | let res = await enterpriseEmployeeServices.stopElectronSign({ ids: ids }); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | const { |
| | | dialogProps: dialogStaffDetailProps, |
| | | handleEdit: handleStaffDetailEdit, |
| | | editForm: staffDetailEditForm, |
| | | } = useFormDialog({ |
| | | defaultFormParams: { |
| | | id: '', |
| | | tabType: 'info', |
| | | }, |
| | | }); |
| | | |
| | | async function handleDelete(row: API.GetEnterpriseEmployeesQueryResultItem) { |
| | | try { |
| | | await Message.deleteMessage(); |
| | | } catch (error) {} |
| | | } |
| | | </script> |
| | |
| | | <AppContainer> |
| | | <ProTableQueryFilterBar @on-reset="reset"> |
| | | <template #query> |
| | | <QueryFilterItem tip-content="录用状态"> |
| | | <!-- <QueryFilterItem tip-content="录用状态"> |
| | | <FieldRadio |
| | | v-model="extraParamState.hireStatus" |
| | | :value-enum="EnumTaskUserHireStatusText" |
| | |
| | | showAllBtn |
| | | @change="getList()" |
| | | /> |
| | | </QueryFilterItem> |
| | | </QueryFilterItem> --> |
| | | <QueryFilterItem tip-content="实名状态"> |
| | | <FieldRadio |
| | | v-model="extraParamState.isReal" |
| | |
| | | buttonStyle |
| | | showAllBtn |
| | | :all-btn-value="null" |
| | | @change="getList()" |
| | | /> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem tip-content="灵工来源"> |
| | | <FieldRadio |
| | | v-model="extraParamState.source" |
| | | :value-enum="EnumEnterpriseEmployeeSourceText" |
| | | buttonStyle |
| | | showAllBtn |
| | | @change="getList()" |
| | | /> |
| | | </QueryFilterItem> |
| | |
| | | @change="getList()" |
| | | /> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem> |
| | | <!-- <QueryFilterItem> |
| | | <FieldDatePicker |
| | | v-model="extraParamState.createdTime" |
| | | type="daterange" |
| | |
| | | @change="getList()" |
| | | tooltipContent="签约时间" |
| | | ></FieldDatePicker> |
| | | </QueryFilterItem> --> |
| | | <QueryFilterItem> |
| | | <FieldDatePicker |
| | | v-model="extraParamState.userRealTime" |
| | | type="daterange" |
| | | range-separator="~" |
| | | start-placeholder="起始日期" |
| | | end-placeholder="截止日期" |
| | | clearable |
| | | @change="getList()" |
| | | tooltipContent="实名时间" |
| | | ></FieldDatePicker> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem> |
| | | <SearchInput |
| | | v-model="extraParamState.searchWord" |
| | | style="width: 300px" |
| | | placeholder="姓名/手机/身份证号/客户" |
| | | placeholder="姓名/手机/身份证号" |
| | | @on-click-search="getList" |
| | | @keyup.enter="getList()" |
| | | > |
| | |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn> |
| | | <el-button @click="handleDownloadTemplate()" type="primary" link>模板下载</el-button> |
| | | <el-button @click="handleBatchImportAdd()" type="primary">批量导入</el-button> |
| | | <el-button @click="handleBatchUnSign()" type="primary">批量解约</el-button> |
| | | <el-button @click="handleSendShotMessage()" type="primary">短信发送</el-button> |
| | | <el-button @click="handleBatchSign()" type="primary">批量签约</el-button> |
| | | <el-button @click="handleEnterpriseBatchSign()" type="primary">批量企业签约</el-button> |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'importBtn')" |
| | | @click="handleDownloadFlexJobTemplate()" |
| | | type="primary" |
| | | link |
| | | >模板下载</el-button |
| | | > |
| | | <BlFileUpload |
| | | v-if="checkSubModuleItemShow('pageButton', 'importBtn')" |
| | | v-model:file-url="state.flexjobUrl" |
| | | ref="uploadRef" |
| | | :showTip="false" |
| | | :show-file-list="false" |
| | | class="pro-table-operation-btn upload-style-btn" |
| | | :on-success="(event) => handleUploadSuccess(event)" |
| | | :limitFileSize="null" |
| | | :limit="1" |
| | | accept="xlsx,xls" |
| | | > |
| | | <el-button type="primary" class="pro-table-operation-btn">批量导入</el-button> |
| | | </BlFileUpload> |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'addBtn')" |
| | | @click="handleInternalStaffAdd()" |
| | | type="primary" |
| | | >新建</el-button |
| | | > |
| | | <!-- <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'batchUnSignBtn')" |
| | | @click="handleBatchUnSign()" |
| | | type="primary" |
| | | >批量解约</el-button |
| | | > |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'sendShotBtn')" |
| | | @click="handleSendShotMessage()" |
| | | type="primary" |
| | | >短信发送</el-button |
| | | > |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'batchSignBtn')" |
| | | @click="handleBatchSign()" |
| | | type="primary" |
| | | >批量签约</el-button |
| | | > |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'enterpriseBatchSignBtn')" |
| | | @click="handleEnterpriseBatchSign()" |
| | | type="primary" |
| | | >批量企业签约</el-button |
| | | > --> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="FlexJobManageColumns" |
| | | :columns="column" |
| | | :operationBtns="operationBtns" |
| | | show-column-check |
| | | ref="proTable" |
| | |
| | | /> |
| | | <SendShotMessageDialog v-bind="dialogShotMessageProps" /> |
| | | <SignDialog v-bind="dialogSignProps" /> |
| | | <AddInternalStaffDialog v-bind="dialogAddInternalStaffProps" /> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | |
| | | FieldDatePicker, |
| | | FieldRadio, |
| | | FieldSelect, |
| | | defineOperationBtns, |
| | | useFormDialog, |
| | | UploadUserFile, |
| | | XLSXUtils, |
| | | BlFileUpload, |
| | | } from '@bole-core/components'; |
| | | import { FlexJobManageColumns } from './constants'; |
| | | import { EnumTaskUserHireStatusText, EnumTaskUserSignContractStatusText } from '@/constants'; |
| | | import { |
| | | EnumTaskUserHireStatusText, |
| | | EnumTaskUserSignContractStatusText, |
| | | EnumEnterpriseEmployeeSourceText, |
| | | } from '@/constants'; |
| | | import { Message } from '@bole-core/core'; |
| | | import { convertApi2FormUrlOnlyOne, downloadFileByUrl, format } from '@/utils'; |
| | | import StaffInfoDialog from './components/StaffInfoDialog.vue'; |
| | | import BatchImportDialog from './components/BatchImportDialog.vue'; |
| | | import SendShotMessageDialog from './components/SendShotMessageDialog.vue'; |
| | | import StaffDetailInfoDialog from './components/StaffDetailInfoDialog.vue'; |
| | | import AddInternalStaffDialog from './components/AddInternalStaffDialog.vue'; |
| | | import SignDialog from './components/SignDialog.vue'; |
| | | import * as enterpriseEmployeeServices from '@/services/api/enterpriseEmployee'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import _ from 'lodash'; |
| | | import { getEnterpriseEmployeesHooks } from './hooks'; |
| | | |
| | | defineOptions({ |
| | | name: 'FlexJobManageList', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'editBtn', |
| | | name: '编辑', |
| | | }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | editBtn: { |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | onClick: (role) => openInternalDialog(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetEnterpriseEmployeesQueryResultItem) => |
| | | row.source === EnumEnterpriseEmployeeSource.External, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '详情', |
| | | }, |
| | | detailBtn: { |
| | | emits: { |
| | | onClick: (role: API.GetEnterpriseEmployeesQueryResultItem) => |
| | | handleStaffDetailEdit({ id: role.id, tabType: 'info' }), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'enterpriseSignBtn', |
| | | name: '企业签约', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handleEnterpriseSign(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetEnterpriseEmployeesQueryResultItem) => |
| | | !( |
| | | row.userSignContractStatus === EnumTaskUserSignContractStatus.Pass && |
| | | row.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Wait |
| | | ), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'inviteSignBtn', |
| | | name: '邀请签约', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handleInviteSign(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetEnterpriseEmployeesQueryResultItem) => |
| | | !( |
| | | row.userSignContractStatus !== EnumTaskUserSignContractStatus.Pass && |
| | | row.hireStatus === EnumTaskUserHireStatus.Pass |
| | | ), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'unSignBtn', |
| | | name: '解约', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handleUnSign(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetEnterpriseEmployeesQueryResultItem) => |
| | | !( |
| | | row.userSignContractStatus === EnumTaskUserSignContractStatus.Pass && |
| | | row.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Pass |
| | | ), |
| | | }, |
| | | }, |
| | | // { |
| | | // data: { |
| | | // enCode: 'delBtn', |
| | | // name: '删除', |
| | | // }, |
| | | // props: { type: 'danger' }, |
| | | // enterpriseSignBtn: { |
| | | // emits: { |
| | | // onClick: (role) => handleDelete(role), |
| | | // onClick: (role) => handleEnterpriseSign(role), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetEnterpriseEmployeesQueryResultItem) => |
| | | // !( |
| | | // row.userSignContractStatus === EnumTaskUserSignContractStatus.Pass && |
| | | // row.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Wait |
| | | // ), |
| | | // }, |
| | | // }, |
| | | ]); |
| | | // inviteSignBtn: { |
| | | // emits: { |
| | | // onClick: (role) => handleInviteSign(role), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetEnterpriseEmployeesQueryResultItem) => |
| | | // !( |
| | | // row.userSignContractStatus !== EnumTaskUserSignContractStatus.Pass && |
| | | // row.hireStatus === EnumTaskUserHireStatus.Pass |
| | | // ), |
| | | // }, |
| | | // }, |
| | | // unSignBtn: { |
| | | // emits: { |
| | | // onClick: (role) => handleUnSign(role), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetEnterpriseEmployeesQueryResultItem) => |
| | | // !( |
| | | // row.userSignContractStatus === EnumTaskUserSignContractStatus.Pass && |
| | | // row.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Pass |
| | | // ), |
| | | // }, |
| | | // }, |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const BaseState = { |
| | | loading: true, |
| | | flexjobUrl: [] as UploadUserFile[], |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | |
| | | state.loading = false; |
| | | }); |
| | | |
| | | const { |
| | | getDataSource: getList, |
| | | proTableProps, |
| | | paginationState, |
| | | extraParamState, |
| | | reset, |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetEnterpriseEmployeesQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | keywords: extraParamState.searchWord, |
| | | createdTimeStart: format(extraParamState.createdTime?.[0] ?? '', 'YYYY-MM-DD 00:00:00'), |
| | | createdTimeEnd: format(extraParamState.createdTime?.[1] ?? '', 'YYYY-MM-DD 23:59:59'), |
| | | signContractTimeStart: format( |
| | | extraParamState.signContractTime?.[0] ?? '', |
| | | 'YYYY-MM-DD 00:00:00' |
| | | ), |
| | | signContractTimeEnd: format( |
| | | extraParamState.signContractTime?.[1] ?? '', |
| | | 'YYYY-MM-DD 23:59:59' |
| | | ), |
| | | hireStatus: extraParamState.hireStatus, |
| | | isReal: extraParamState.isReal, |
| | | userSignContractStatus: extraParamState.userSignContractStatus, |
| | | enterpriseSignContractStatus: extraParamState.enterpriseSignContractStatus, |
| | | }; |
| | | |
| | | let res = await enterpriseEmployeeServices.getEnterpriseEmployees(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | return res; |
| | | } catch (error) { |
| | | console.log('error: ', error); |
| | | } |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | searchWord: '', |
| | | orderInput: [{ property: 'createdTime', order: EnumPagedListOrder.Desc }], |
| | | createdTime: [] as unknown as ModelValueType, |
| | | signContractTime: [] as unknown as ModelValueType, |
| | | hireStatus: '' as any as EnumTaskUserHireStatus, |
| | | isReal: null as any as boolean, |
| | | userSignContractStatus: '' as any as EnumTaskUserSignContractStatus, |
| | | enterpriseSignContractStatus: '' as any as EnumTaskUserSignContractStatus, |
| | | }, |
| | | queryKey: ['enterpriseEmployeeServices/getEnterpriseEmployees'], |
| | | columnsRenderProps: { |
| | | gender: { type: 'enum', valueEnum: EnumUserGenderTextForPerson }, |
| | | hireStatus: { type: 'enum', valueEnum: EnumTaskUserHireStatusText }, |
| | | userIsReal: { |
| | | formatter: (row: API.GetEnterpriseEmployeesQueryResultItem) => { |
| | | return row.userIsReal ? '已实名' : '未实名'; |
| | | }, |
| | | }, |
| | | userSignContractStatus: { type: 'enum', valueEnum: EnumTaskUserSignContractStatusText }, |
| | | hireTime: { type: 'date' }, |
| | | userRealTime: { type: 'date' }, |
| | | userSignContractTime: { type: 'date' }, |
| | | enterpriseSignContractStatus: { type: 'enum', valueEnum: EnumTaskUserSignContractStatusText }, |
| | | enterpriseSignContractTime: { type: 'date' }, |
| | | }, |
| | | } |
| | | ); |
| | | const { getList, proTableProps, paginationState, extraParamState, reset } = |
| | | getEnterpriseEmployeesHooks(); |
| | | |
| | | const proTable = ref<InstanceType<typeof ProTableV2>>(); |
| | | |
| | |
| | | const { |
| | | dialogProps: dialogStaffInfoProps, |
| | | handleEdit: handleStaffInfoEdit, |
| | | handleAdd: handleStaffInfoAdd, |
| | | editForm: staffInfoEditForm, |
| | | } = useFormDialog({ |
| | | onConfirm: handleAddOrEdit, |
| | | onConfirm: editEnterpriseEmployee, |
| | | defaultFormParams: { |
| | | id: '', |
| | | name: '', |
| | |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleAddOrEdit() { |
| | | async function editEnterpriseEmployee() { |
| | | try { |
| | | let params: API.EditEnterpriseEmployeeCommand = { |
| | | name: staffInfoEditForm.name, |
| | |
| | | |
| | | function handleDownloadTemplate() { |
| | | downloadFileByUrl(ImportEnterpriseEmployeesTempPath, '批量导入模板'); |
| | | } |
| | | |
| | | function handleDownloadFlexJobTemplate() { |
| | | downloadFileByUrl(ImportFlexJobTempPath, '批量导入模板'); |
| | | } |
| | | |
| | | const { |
| | |
| | | await Message.deleteMessage(); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function handleUploadSuccess(response: UploadUserFile & { file: File & { uid: number } }) { |
| | | if (response.path) { |
| | | importEnterpriseEmployees(response.path); |
| | | } |
| | | } |
| | | |
| | | async function importEnterpriseEmployees(excelUrl: string) { |
| | | try { |
| | | let params: API.ImportEnterpriseEmployeesCommand = { |
| | | excelUrl: excelUrl, |
| | | }; |
| | | let res = await enterpriseEmployeeServices.importEnterpriseEmployees(params); |
| | | if (res.failCount > 0) { |
| | | await Message.tipMessage('存在错误数据,是否导出?'); |
| | | XLSXUtils.exportToXLSX({ |
| | | workbookDataList: res.errors, |
| | | fileName: '灵工批量导入-错误数据', |
| | | workbookHeaderMap: { |
| | | name: '姓名', |
| | | contactPhoneNumber: '手机号', |
| | | identity: '身份证号', |
| | | contractBegin: '协议起始时间', |
| | | contractEnd: '协议终止时间', |
| | | errorMessage: '错误信息', |
| | | }, |
| | | }); |
| | | } else { |
| | | Message.successMessage('导入成功'); |
| | | getList(); |
| | | } |
| | | } catch (error) { |
| | | } finally { |
| | | state.flexjobUrl = [] as UploadUserFile[]; |
| | | } |
| | | } |
| | | |
| | | const { |
| | | dialogProps: dialogAddInternalStaffProps, |
| | | handleAdd: handleInternalStaffAdd, |
| | | handleEdit: handleInternalStaffEdit, |
| | | editForm: internalStaffEditForm, |
| | | dialogState: internalDialogState, |
| | | } = useFormDialog({ |
| | | onConfirm: addEnterpriseEmployee, |
| | | defaultFormParams: { |
| | | id: '', |
| | | name: '', |
| | | identity: '', |
| | | contactPhoneNumber: '', |
| | | gender: EnumUserGender.Male, |
| | | age: null as any as number, |
| | | identityImg: [] as UploadUserFile[], |
| | | identityBackImg: [] as UploadUserFile[], |
| | | contractUrl: [] as UploadUserFile[], |
| | | regiterTime: '', |
| | | userRealTime: '', |
| | | userSignContractTime: '', |
| | | contractTime: [] as unknown as ModelValueType, |
| | | }, |
| | | closeAfterConfirm: false, |
| | | }); |
| | | |
| | | async function openInternalDialog(row: API.GetEnterpriseEmployeesQueryResultItem) { |
| | | try { |
| | | let detail = await enterpriseEmployeeServices.getEnterpriseEmployee({ id: row.id }); |
| | | handleInternalStaffEdit({ |
| | | id: row.id, |
| | | name: row.name, |
| | | identity: row.identity, |
| | | contactPhoneNumber: row.contactPhoneNumber, |
| | | gender: detail.gender, |
| | | age: detail.age ?? null, |
| | | identityImg: convertApi2FormUrlOnlyOne(detail.identityImg), |
| | | identityBackImg: convertApi2FormUrlOnlyOne(detail.identityBackImg), |
| | | contractUrl: convertApi2FormUrlOnlyOne(detail.contractUrl, { |
| | | fileName: detail.contractUrl ? detail.contractUrl.split('/').pop() : '合同', |
| | | }), |
| | | regiterTime: detail.applyTime ?? '', |
| | | userRealTime: row.userRealTime ?? '', |
| | | userSignContractTime: row.userSignContractTime ?? '', |
| | | contractTime: [row.contractBegin, row.contractEnd], |
| | | }); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function addEnterpriseEmployee() { |
| | | try { |
| | | const isEdit = !!internalStaffEditForm.id; |
| | | let params: API.AddEnterpriseEmployeeCommand = { |
| | | name: internalStaffEditForm.name, |
| | | identity: internalStaffEditForm.identity, |
| | | contactPhoneNumber: internalStaffEditForm.contactPhoneNumber, |
| | | gender: internalStaffEditForm.gender, |
| | | age: internalStaffEditForm.age, |
| | | identityImg: internalStaffEditForm.identityImg[0]?.path ?? '', |
| | | identityBackImg: internalStaffEditForm.identityBackImg[0]?.path ?? '', |
| | | contractUrl: internalStaffEditForm.contractUrl[0]?.path ?? '', |
| | | contractBegin: format(internalStaffEditForm.contractTime[0], 'YYYY-MM-DD 00:00:00'), |
| | | contractEnd: format(internalStaffEditForm.contractTime[1], 'YYYY-MM-DD 23:59:59'), |
| | | }; |
| | | let res; |
| | | if (isEdit) { |
| | | (params as API.EditEnterpriseEmployeeCommand).id = internalStaffEditForm.id; |
| | | res = await enterpriseEmployeeServices.editEnterpriseEmployee(params); |
| | | } else { |
| | | res = await enterpriseEmployeeServices.addEnterpriseEmployee(params); |
| | | } |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | internalDialogState.dialogVisible = false; |
| | | } |
| | | } catch (error) { |
| | | internalDialogState.dialogVisible = true; |
| | | } |
| | | } |
| | | </script> |
| New file |
| | |
| | | <template> |
| | | <ProDialog |
| | | title="新建灵工" |
| | | v-model="visible" |
| | | @close="onDialogClose" |
| | | destroy-on-close |
| | | draggable |
| | | :width="900" |
| | | > |
| | | <ProForm :model="form" ref="dialogForm" label-width="120px"> |
| | | <ProFormCol> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 label="姓名:" prop="name" :check-rules="[{ message: '请输入姓名' }]"> |
| | | <ProFormText placeholder="请输入姓名" v-model.trim="form.name"></ProFormText> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 label="服务协议:" prop="contractUrl"> |
| | | <ProFormUpload |
| | | v-model:file-url="form.contractUrl" |
| | | :limit="1" |
| | | :limitFileSize="10" |
| | | accept="jpg/jpeg,png,pdf" |
| | | ></ProFormUpload> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 |
| | | label="身份证号:" |
| | | prop="identity" |
| | | :check-rules="[{ message: '请输入身份证号', type: 'idCard' }]" |
| | | > |
| | | <ProFormText |
| | | placeholder="请输入身份证号" |
| | | v-model.trim="form.identity" |
| | | @blur="handleCalculateAge" |
| | | ></ProFormText> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 label="协议时间:" prop="contractTime"> |
| | | <ProFormDatePicker |
| | | v-model="form.contractTime" |
| | | type="daterange" |
| | | range-separator="至" |
| | | start-placeholder="起始日期" |
| | | end-placeholder="终止日期" |
| | | ></ProFormDatePicker> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 |
| | | label="手机号:" |
| | | prop="contactPhoneNumber" |
| | | :check-rules="[{ message: '请输入手机号', type: 'phone' }]" |
| | | > |
| | | <ProFormText |
| | | placeholder="请输入手机号" |
| | | v-model.trim="form.contactPhoneNumber" |
| | | ></ProFormText> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 |
| | | label="性别:" |
| | | prop="gender" |
| | | required |
| | | :check-rules="[{ message: '请选择性别' }]" |
| | | > |
| | | <ProFormRadio |
| | | v-model="form.gender" |
| | | :value-enum="EnumUserGenderTextForPerson" |
| | | :buttonStyle="false" |
| | | ></ProFormRadio> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 |
| | | label="年龄:" |
| | | prop="age" |
| | | :check-rules="[{ message: '请输入年龄', type: 'number' }]" |
| | | > |
| | | <ProFormInputNumber |
| | | v-model="form.age" |
| | | :controls="false" |
| | | :min="0" |
| | | :max="9999" |
| | | placeholder="请输入年龄" |
| | | unit="岁" |
| | | /> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | | <ProFormItemV2 |
| | | label="身份证正面:" |
| | | prop="identityImg" |
| | | :check-rules="[{ message: '请上传身份证正面', type: 'upload' }]" |
| | | > |
| | | <ProFormImageUpload |
| | | v-model:file-url="form.identityImg" |
| | | :limitFileSize="10" |
| | | :showTip="false" |
| | | > |
| | | </ProFormImageUpload> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 |
| | | label="身份证反面:" |
| | | prop="identityBackImg" |
| | | :check-rules="[{ message: '请上传身份证反面', type: 'upload' }]" |
| | | > |
| | | <ProFormImageUpload |
| | | v-model:file-url="form.identityBackImg" |
| | | :limitFileSize="10" |
| | | :showTip="false" |
| | | > |
| | | </ProFormImageUpload> |
| | | </ProFormItemV2> |
| | | </ProForm> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button type="primary" @click="handleConfirm">提交</el-button> |
| | | <el-button @click="emit('onCancel')">取消</el-button> |
| | | </span> |
| | | </template> |
| | | </ProDialog> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { FormInstance, ModelValueType } from 'element-plus'; |
| | | import { |
| | | ProDialog, |
| | | ProForm, |
| | | ProFormItemV2, |
| | | ProFormText, |
| | | UploadUserFile, |
| | | ProFormCol, |
| | | ProFormColItem, |
| | | ProFormImageUpload, |
| | | ProFormRadio, |
| | | ProFormUpload, |
| | | ProFormInputNumber, |
| | | ProFormDatePicker, |
| | | } from '@bole-core/components'; |
| | | import { calculateAge, deepClone, format } from '@/utils'; |
| | | import { EnumUserGender, EnumUserGenderTextForPerson } from '@/constants'; |
| | | import { BoleRegExp } from '@bole-core/core'; |
| | | |
| | | defineOptions({ |
| | | name: 'AddInternalStaffDialog', |
| | | }); |
| | | |
| | | type Form = { |
| | | title?: string; |
| | | id: string; |
| | | name: string; |
| | | identity: string; |
| | | contactPhoneNumber: string; |
| | | gender: EnumUserGender; |
| | | age: number; |
| | | identityImg: UploadUserFile[]; |
| | | identityBackImg: UploadUserFile[]; |
| | | contractUrl: UploadUserFile[]; |
| | | regiterTime: string; |
| | | userRealTime: string; |
| | | userSignContractTime: string; |
| | | |
| | | contractTime: ModelValueType; |
| | | }; |
| | | |
| | | const visible = defineModel({ type: Boolean }); |
| | | |
| | | const form = defineModel<Form>('form'); |
| | | let defaultForm: Form = null; |
| | | |
| | | watch( |
| | | visible, |
| | | (visible) => { |
| | | if (visible) { |
| | | defaultForm = deepClone(unref(form)); |
| | | } |
| | | }, |
| | | { |
| | | immediate: true, |
| | | } |
| | | ); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'onConfirm'): void; |
| | | (e: 'onCancel'): void; |
| | | }>(); |
| | | |
| | | const dialogForm = ref<FormInstance>(); |
| | | |
| | | function onDialogClose() { |
| | | if (!dialogForm.value) return; |
| | | dialogForm.value.resetFields(); |
| | | } |
| | | |
| | | function handleConfirm() { |
| | | if (!dialogForm.value) return; |
| | | dialogForm.value.validate((valid) => { |
| | | if (valid) { |
| | | emit('onConfirm'); |
| | | } else { |
| | | return; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function handleReset() { |
| | | form.value = { ...defaultForm }; |
| | | } |
| | | |
| | | function handleCalculateAge() { |
| | | form.value.age = calculateAge(form.value.identity); |
| | | } |
| | | </script> |
| | |
| | | const column = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'enterpriseName', |
| | | enCode: 'sourceName', |
| | | name: '所属客户', |
| | | }, |
| | | { |
| | |
| | | enCode: 'contactPhoneNumber', |
| | | name: '手机号', |
| | | }, |
| | | { |
| | | id: '8', |
| | | enCode: 'hireStatus', |
| | | name: '录用状态', |
| | | }, |
| | | // { |
| | | // id: '8', |
| | | // enCode: 'hireStatus', |
| | | // name: '录用状态', |
| | | // }, |
| | | { |
| | | id: '9', |
| | | enCode: 'userIsReal', |
| | |
| | | enCode: 'userSignContractStatus', |
| | | name: '灵工签约状态', |
| | | }, |
| | | { |
| | | id: '11', |
| | | enCode: 'hireTime', |
| | | name: '录用时间', |
| | | }, |
| | | { |
| | | id: '12', |
| | | enCode: 'userRealTime', |
| | | name: '实名时间', |
| | | }, |
| | | { |
| | | id: '13', |
| | | enCode: 'userSignContractTime', |
| | | name: '签约时间', |
| | | }, |
| | | // { |
| | | // id: '11', |
| | | // enCode: 'hireTime', |
| | | // name: '录用时间', |
| | | // }, |
| | | // { |
| | | // id: '12', |
| | | // enCode: 'userRealTime', |
| | | // name: '实名时间', |
| | | // }, |
| | | // { |
| | | // id: '13', |
| | | // enCode: 'userSignContractTime', |
| | | // name: '签约时间', |
| | | // }, |
| | | { |
| | | id: '14', |
| | | enCode: 'enterpriseSignContractStatus', |
| | | name: '企业签约状态', |
| | | }, |
| | | // { |
| | | // id: '15', |
| | | // enCode: 'enterpriseSignContractTime', |
| | | // name: '企业签约时间', |
| | | // }, |
| | | { |
| | | id: '15', |
| | | enCode: 'enterpriseSignContractTime', |
| | | name: '企业签约时间', |
| | | id: '16', |
| | | enCode: 'a', |
| | | name: '协议起始', |
| | | }, |
| | | { |
| | | id: '17', |
| | | enCode: 'a', |
| | | name: '协议终止', |
| | | }, |
| | | { |
| | | id: '18', |
| | | enCode: 'a', |
| | | name: '灵工来源', |
| | | }, |
| | | ]); |
| New file |
| | |
| | | import { format } from '@/utils'; |
| | | import { useTable } from '@bole-core/components'; |
| | | import * as enterpriseEmployeeServices from '@/services/api/enterpriseEmployee'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | |
| | | export function getEnterpriseEmployeesHooks() { |
| | | const { |
| | | getDataSource: getList, |
| | | proTableProps, |
| | | paginationState, |
| | | extraParamState, |
| | | reset, |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetEnterpriseEmployeesQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | keywords: extraParamState.searchWord, |
| | | createdTimeStart: format(extraParamState.createdTime?.[0] ?? '', 'YYYY-MM-DD 00:00:00'), |
| | | createdTimeEnd: format(extraParamState.createdTime?.[1] ?? '', 'YYYY-MM-DD 23:59:59'), |
| | | userRealTimeStart: format(extraParamState.userRealTime?.[0] ?? '', 'YYYY-MM-DD 00:00:00'), |
| | | userRealTimeEnd: format(extraParamState.userRealTime?.[1] ?? '', 'YYYY-MM-DD 23:59:59'), |
| | | signContractTimeStart: format( |
| | | extraParamState.signContractTime?.[0] ?? '', |
| | | 'YYYY-MM-DD 00:00:00' |
| | | ), |
| | | signContractTimeEnd: format( |
| | | extraParamState.signContractTime?.[1] ?? '', |
| | | 'YYYY-MM-DD 23:59:59' |
| | | ), |
| | | userSignContractTimeStart: format( |
| | | extraParamState.userSignContractTime?.[0] ?? '', |
| | | 'YYYY-MM-DD 00:00:00' |
| | | ), |
| | | userSignContractTimeEnd: format( |
| | | extraParamState.userSignContractTime?.[1] ?? '', |
| | | 'YYYY-MM-DD 23:59:59' |
| | | ), |
| | | hireStatus: extraParamState.hireStatus, |
| | | isReal: extraParamState.isReal, |
| | | userSignContractStatus: extraParamState.userSignContractStatus, |
| | | enterpriseSignContractStatus: extraParamState.enterpriseSignContractStatus, |
| | | |
| | | source: extraParamState.source, |
| | | }; |
| | | |
| | | let res = await enterpriseEmployeeServices.getEnterpriseEmployees(params); |
| | | return res; |
| | | } catch (error) { |
| | | console.log('error: ', error); |
| | | } |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | searchWord: '', |
| | | orderInput: [{ property: 'createdTime', order: EnumPagedListOrder.Desc }], |
| | | createdTime: [] as unknown as ModelValueType, |
| | | signContractTime: [] as unknown as ModelValueType, |
| | | userSignContractTime: [] as unknown as ModelValueType, |
| | | userRealTime: [] as unknown as ModelValueType, |
| | | hireStatus: '' as any as EnumTaskUserHireStatus, |
| | | isReal: null as any as boolean, |
| | | userSignContractStatus: '' as any as EnumTaskUserSignContractStatus, |
| | | enterpriseSignContractStatus: '' as any as EnumTaskUserSignContractStatus, |
| | | source: '' as any as EnumEnterpriseEmployeeSource, |
| | | }, |
| | | queryKey: ['enterpriseEmployeeServices/getEnterpriseEmployees'], |
| | | columnsRenderProps: { |
| | | gender: { type: 'enum', valueEnum: EnumUserGenderTextForPerson }, |
| | | hireStatus: { type: 'enum', valueEnum: EnumTaskUserHireStatusText }, |
| | | userIsReal: { |
| | | formatter: (row: API.GetEnterpriseEmployeesQueryResultItem) => { |
| | | return row.userIsReal ? '已实名' : '未实名'; |
| | | }, |
| | | }, |
| | | userSignContractStatus: { type: 'enum', valueEnum: EnumTaskUserSignContractStatusText }, |
| | | hireTime: { type: 'date' }, |
| | | userRealTime: { type: 'date' }, |
| | | userSignContractTime: { type: 'date' }, |
| | | enterpriseSignContractStatus: { |
| | | type: 'enum', |
| | | valueEnum: EnumTaskUserSignContractStatusText, |
| | | }, |
| | | enterpriseSignContractTime: { type: 'date' }, |
| | | contractBegin: { type: 'date' }, |
| | | contractEnd: { type: 'date' }, |
| | | source: { type: 'enum', valueEnum: EnumEnterpriseEmployeeSourceText }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | | return { |
| | | getList, |
| | | proTableProps, |
| | | paginationState, |
| | | extraParamState, |
| | | reset, |
| | | }; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <LoadingLayout :loading="state.loading"> |
| | | <AppContainer> |
| | | <ProTableQueryFilterBar @on-reset="reset"> |
| | | <template #query> |
| | | <QueryFilterItem> |
| | | <SearchInput |
| | | v-model="extraParamState.queryCondition" |
| | | style="width: 200px" |
| | | placeholder="角色名称" |
| | | @on-click-search="getList" |
| | | @keyup.enter="getList()" |
| | | > |
| | | </SearchInput> |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn> |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'addBtn')" |
| | | @click="openDialog()" |
| | | icon="Plus" |
| | | type="primary" |
| | | >新增</el-button |
| | | > |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | <AddOrEditRoleDialog v-bind="dialogProps" /> |
| | | <DialogAuthorizeV2 v-bind="dialogAuthorizeProps" authorizeType="Role" /> |
| | | <!-- <DialogMember v-model:visibleId="rowState.setMemberRoleId" /> --> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { |
| | | ProTableQueryFilterBar, |
| | | OperationBtnType, |
| | | ProTableV2, |
| | | SearchInput, |
| | | LoadingLayout, |
| | | AppContainer, |
| | | QueryFilterItem, |
| | | useTable, |
| | | useFormDialog, |
| | | FieldRadio, |
| | | } from '@bole-core/components'; |
| | | import { useAccess } from '@/hooks'; |
| | | import { Message } from '@bole-core/core'; |
| | | import AddOrEditRoleDialog from './components/AddOrEditRoleDialog.vue'; |
| | | import { EnumUserType } from '@/constants'; |
| | | import DialogAuthorizeV2 from './components/dialogAuthorizeV2.vue'; |
| | | import * as roleServices from '@/services/api/role'; |
| | | import { useQueryClient } from '@tanstack/vue-query'; |
| | | |
| | | defineOptions({ |
| | | name: 'RoleManage', |
| | | }); |
| | | |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | editBtn: { |
| | | emits: { onClick: (role) => openDialog(role) }, |
| | | extraProps: { |
| | | hide: (role: API.GetRolesQueryResultItem) => role.isPublic, |
| | | }, |
| | | }, |
| | | delBtn: { |
| | | emits: { onClick: (role) => handleDeleteRole(role) }, |
| | | props: { type: 'danger' }, |
| | | extraProps: { |
| | | hide: (role: API.GetRolesQueryResultItem) => role.isPublic, |
| | | }, |
| | | }, |
| | | authorize: { |
| | | emits: { onClick: (role) => openAuthorizeDialog(role) }, |
| | | extraProps: { |
| | | hide: (role: API.GetRolesQueryResultItem) => role.isPublic, |
| | | }, |
| | | }, |
| | | // member: { emits: { onClick: (role) => openMemberDialog(role) } }, |
| | | disabledBtn: { |
| | | emits: { onClick: (role) => roleEnableOrForbid(role) }, |
| | | props: { type: 'danger' }, |
| | | extraProps: { |
| | | hide: (row: API.GetRolesQueryResultItem) => !(!row.isPublic && !row.isDisabled), |
| | | }, |
| | | }, |
| | | enableBtn: { |
| | | emits: { onClick: (role) => roleEnableOrForbid(role) }, |
| | | extraProps: { |
| | | hide: (row: API.GetRolesQueryResultItem) => !(row.isDisabled && !row.isPublic), |
| | | }, |
| | | }, |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | 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.GetRolesQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | userType: AppLocalConfig.userType, |
| | | clientType: AppLocalConfig.clientType, |
| | | enterpriseType: AppLocalConfig.enterpriseType, |
| | | keywords: extraParamState.queryCondition, |
| | | }; |
| | | let res = await roleServices.getRoles(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | return res; |
| | | } catch (error) {} |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | queryCondition: '', |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | }, |
| | | queryKey: ['roleServices/getRoles'], |
| | | columnsRenderProps: { |
| | | dataPower: { type: 'enum', valueEnum: EnumRoleWebApiDataPowerText }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | | async function openDialog(row?: API.GetRolesQueryResultItem) { |
| | | try { |
| | | if (row) { |
| | | const detail = await roleServices.getRole({ id: row.id }); |
| | | handleEdit({ |
| | | id: row.id, |
| | | name: row.name, |
| | | remark: row.remark, |
| | | userType: row.userType, |
| | | clientType: row.clientType, |
| | | dataRange: row.dataPower, |
| | | detail: detail, |
| | | minLevel: row.minLevel, |
| | | enterpriseType: row.enterpriseType, |
| | | }); |
| | | } else { |
| | | handleAdd({ |
| | | userType: AppLocalConfig.userType, |
| | | clientType: AppLocalConfig.clientType, |
| | | }); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | const { dialogProps, handleAdd, handleEdit, editForm, dialogState } = useFormDialog({ |
| | | onConfirm: handleAddOrEdit, |
| | | defaultFormParams: { |
| | | id: '', |
| | | name: '', |
| | | remark: '', |
| | | userType: AppLocalConfig.userType, |
| | | clientType: AppLocalConfig.clientType, |
| | | dataRange: EnumRoleWebApiDataPower.All, |
| | | detail: null as API.GetRoleQueryResult, |
| | | minLevel: 1, |
| | | enterpriseType: AppLocalConfig.enterpriseType, |
| | | }, |
| | | }); |
| | | |
| | | const queryClient = useQueryClient(); |
| | | |
| | | async function handleAddOrEdit() { |
| | | try { |
| | | const isEdit = editForm.id; |
| | | let params: API.SaveRoleCommand = { |
| | | name: editForm.name, |
| | | remark: editForm.remark, |
| | | dataPower: editForm.dataRange, |
| | | userType: editForm.userType, |
| | | clientType: editForm.clientType, |
| | | minLevel: editForm.minLevel, |
| | | }; |
| | | if (editForm.userType === EnumUserType.Enterprise) { |
| | | params.enterpriseType = editForm.enterpriseType; |
| | | } |
| | | if (isEdit) { |
| | | params = { |
| | | ...editForm.detail, |
| | | ...params, |
| | | }; |
| | | } |
| | | let res = await roleServices.saveRole(params); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(isEdit ? paginationState.pageIndex : 1); |
| | | queryClient.invalidateQueries(['userServices/getUserInfoRoles']); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleDeleteRole(row: API.GetRolesQueryResultItem) { |
| | | try { |
| | | await Message.deleteMessage(); |
| | | let params: API.DeleteRoleCommand = { |
| | | ids: [row.id], |
| | | }; |
| | | let res = await roleServices.deleteRole(params); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | queryClient.invalidateQueries(['userServices/getUserInfoRoles']); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function roleEnableOrForbid(row: API.GetRolesQueryResultItem) { |
| | | try { |
| | | await Message.tipMessage(`是否${row.isDisabled ? '启用' : '禁用'}角色`); |
| | | let res = await roleServices.setRoleIsDisabled({ |
| | | ids: [row.id], |
| | | isDisabled: !row.isDisabled, |
| | | }); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | queryClient.invalidateQueries(['userServices/getUserInfoRoles']); |
| | | return !!res; |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | const rowState = reactive({ |
| | | authorizeId: '', |
| | | setMemberRoleId: '', |
| | | }); |
| | | |
| | | const { |
| | | dialogProps: dialogAuthorizeProps, |
| | | handleAdd: handleAuthorizeAdd, |
| | | editForm: authorizeForm, |
| | | } = useFormDialog({ |
| | | onConfirm: handleAuthorize, |
| | | defaultFormParams: { |
| | | detail: null as API.GetRoleQueryResult, |
| | | }, |
| | | }); |
| | | |
| | | async function openAuthorizeDialog(row: API.GetRolesQueryResultItem) { |
| | | try { |
| | | const detail = await roleServices.getRole({ id: row.id }); |
| | | handleAuthorizeAdd({ |
| | | detail: detail, |
| | | }); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleAuthorize(selectedMenuIds: string[]) { |
| | | console.log('selectedMenuIds: ', selectedMenuIds); |
| | | try { |
| | | let params: API.SaveRoleCommand = { |
| | | ...authorizeForm.detail, |
| | | menuIds: selectedMenuIds, |
| | | // resources: resourceIds.map((x) => ({ |
| | | // resourceId: x, |
| | | // dataPower: EnumRoleWebApiDataPower.All, |
| | | // })), |
| | | }; |
| | | let res = await roleServices.saveRole(params); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | // function openMemberDialog(row: API.IdentityRoleDto) { |
| | | // rowState.setMemberRoleId = row.id; |
| | | // } |
| | | </script> |
| New file |
| | |
| | | <template> |
| | | <ProDialog |
| | | :title="innerForm.title" |
| | | v-model="innerVisible" |
| | | @close="onDialogClose" |
| | | destroy-on-close |
| | | draggable |
| | | > |
| | | <ProForm :rules="rules" :model="innerForm" ref="dialogForm" label-width="110px"> |
| | | <ProFormItemV2 label="角色名称" prop="name"> |
| | | <ProFormText placeholder="请输入角色名称" v-model.trim="innerForm.name"></ProFormText> |
| | | </ProFormItemV2> |
| | | <!-- <ProFormItemV2 label="等级" prop="minLevel"> |
| | | <ProFormInputNumber |
| | | v-model="innerForm.minLevel" |
| | | :min="1" |
| | | :max="100" |
| | | :controls="false" |
| | | ></ProFormInputNumber> |
| | | </ProFormItemV2> --> |
| | | <!-- <ProFormItemV2 |
| | | label="企业类型" |
| | | prop="enterpriseType" |
| | | v-if="form.userType === EnumUserType.Enterprise" |
| | | > |
| | | <ProFormRadio |
| | | v-model="form.enterpriseType" |
| | | :value-enum="EnumEnterpriseTypeText" |
| | | :buttonStyle="false" |
| | | ></ProFormRadio> |
| | | </ProFormItemV2> --> |
| | | <!-- <ProFormItemV2 label="数据可见范围" prop="dataRange"> |
| | | <ProFormRadio |
| | | v-model="form.dataRange" |
| | | :value-enum="EnumRoleWebApiDataPowerTextForFilter" |
| | | :buttonStyle="false" |
| | | ></ProFormRadio> |
| | | </ProFormItemV2> --> |
| | | <ProFormItemV2 label="备注:" prop="remark"> |
| | | <ProFormTextArea |
| | | v-model="innerForm.remark" |
| | | placeholder="请输入备注" |
| | | show-word-limit |
| | | :maxlength="2000" |
| | | ></ProFormTextArea> |
| | | </ProFormItemV2> |
| | | </ProForm> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="emit('onCancel')">取 消</el-button> |
| | | <el-button type="primary" @click="handleConfirm">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </ProDialog> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { FormRules, FormInstance } from 'element-plus'; |
| | | import { |
| | | ProDialog, |
| | | ProForm, |
| | | ProFormItemV2, |
| | | ProFormText, |
| | | ProFormRadio, |
| | | ProFormTextArea, |
| | | ProFormInputNumber, |
| | | } from '@bole-core/components'; |
| | | import { |
| | | EnumRoleWebApiDataPowerTextForFilter, |
| | | EnumEnterpriseTypeText, |
| | | EnumUserType, |
| | | } from '@/constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'AddOrEditRoleDialog', |
| | | }); |
| | | |
| | | type Props = { |
| | | modelValue: boolean; |
| | | form: { |
| | | id: string; |
| | | title?: string; |
| | | name: string; |
| | | remark: string; |
| | | dataRange: EnumRoleWebApiDataPower; |
| | | minLevel: number; |
| | | enterpriseType: EnumEnterpriseType; |
| | | userType: EnumUserType; |
| | | }; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | | modelValue: false, |
| | | }); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'update:modelValue', value: boolean): void; |
| | | (e: 'update:form', value: Props['form']): void; |
| | | (e: 'onConfirm'): void; |
| | | (e: 'onCancel'): void; |
| | | }>(); |
| | | |
| | | const dialogForm = ref<FormInstance>(); |
| | | |
| | | const innerVisible = computed({ |
| | | get() { |
| | | return props.modelValue; |
| | | }, |
| | | set(val) { |
| | | emit('update:modelValue', val); |
| | | }, |
| | | }); |
| | | |
| | | const innerForm = computed({ |
| | | get() { |
| | | return props.form; |
| | | }, |
| | | set(val) { |
| | | emit('update:form', val); |
| | | }, |
| | | }); |
| | | |
| | | const rules = reactive<FormRules>({ |
| | | name: [{ required: true, message: '请输入名称', trigger: 'blur' }], |
| | | }); |
| | | |
| | | function onDialogClose() { |
| | | if (!dialogForm.value) return; |
| | | dialogForm.value.resetFields(); |
| | | } |
| | | |
| | | function handleConfirm() { |
| | | if (!dialogForm.value) return; |
| | | dialogForm.value.validate((valid) => { |
| | | if (valid) { |
| | | emit('onConfirm'); |
| | | } else { |
| | | return; |
| | | } |
| | | }); |
| | | } |
| | | </script> |
| New file |
| | |
| | | <template> |
| | | <ProDialog |
| | | class="custom-dialog" |
| | | width="55%" |
| | | :title="dialogTitle" |
| | | v-model="visible" |
| | | :top="'10vh'" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | > |
| | | <div class="authorize-wrapper"> |
| | | <div class="container-wrapper left-wrapper"> |
| | | <el-scrollbar> |
| | | <el-tree |
| | | class="companyTree" |
| | | :data="menusTree" |
| | | :props="{ |
| | | children: 'children', |
| | | label: 'name', |
| | | }" |
| | | node-key="id" |
| | | :expand-on-click-node="false" |
| | | :highlight-current="true" |
| | | check-strictly |
| | | default-expand-all |
| | | show-checkbox |
| | | ref="moduleTree" |
| | | :default-checked-keys="defaultCheckedKeys" |
| | | @check="handleModuleCheck" |
| | | > |
| | | <template #default="{ node }"> |
| | | <div class="custom-tree-node"> |
| | | <type-tip :isMenu="node.data.type === EnumMenuType.Menu" /> |
| | | <div class="node-text" @click="handleSelectModule(node.data)"> |
| | | {{ node.label }} |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </el-tree> |
| | | </el-scrollbar> |
| | | </div> |
| | | |
| | | <div class="container-wrapper"> |
| | | <div class="type-wrapper"> |
| | | {{ SubModuleTitle[SubModuleType.PageButton] }} |
| | | </div> |
| | | <el-scrollbar> |
| | | <el-tree |
| | | v-show="!!state.currentMenuId" |
| | | :data="[ |
| | | { |
| | | name: '全选', |
| | | id: 'pageButtonAll', |
| | | children: menuPageButtons, |
| | | }, |
| | | ]" |
| | | :props="{ |
| | | children: 'children', |
| | | label: 'name', |
| | | }" |
| | | node-key="id" |
| | | :expand-on-click-node="false" |
| | | :highlight-current="true" |
| | | default-expand-all |
| | | show-checkbox |
| | | ref="pageButtonTree" |
| | | :default-checked-keys="defaultCheckedKeys" |
| | | @check="handlePageButtonCheck" |
| | | > |
| | | <template #default="{ node }"> |
| | | <div class="custom-tree-node"> |
| | | <span>{{ node.label }}</span> |
| | | </div> |
| | | </template> |
| | | </el-tree> |
| | | </el-scrollbar> |
| | | </div> |
| | | |
| | | <div class="container-wrapper"> |
| | | <div class="type-wrapper"> |
| | | {{ SubModuleTitle[SubModuleType.DataButton] }} |
| | | </div> |
| | | <el-scrollbar> |
| | | <el-tree |
| | | v-show="!!state.currentMenuId" |
| | | :data="[ |
| | | { |
| | | name: '全选', |
| | | id: 'dataButtonAll', |
| | | children: menuDataButtons, |
| | | }, |
| | | ]" |
| | | :props="{ |
| | | children: 'children', |
| | | label: 'name', |
| | | }" |
| | | node-key="id" |
| | | :expand-on-click-node="false" |
| | | :highlight-current="true" |
| | | default-expand-all |
| | | show-checkbox |
| | | ref="dataButtonTree" |
| | | :default-checked-keys="defaultCheckedKeys" |
| | | @check="handleDataButtonCheck" |
| | | > |
| | | <template #default="{ node }"> |
| | | <div class="custom-tree-node"> |
| | | <span>{{ node.label }}</span> |
| | | </div> |
| | | </template> |
| | | </el-tree> |
| | | </el-scrollbar> |
| | | </div> |
| | | |
| | | <div class="container-wrapper"> |
| | | <div class="type-wrapper"> |
| | | {{ SubModuleTitle[SubModuleType.Column] }} |
| | | </div> |
| | | <el-scrollbar> |
| | | <el-tree |
| | | v-show="!!state.currentMenuId" |
| | | :data="[ |
| | | { |
| | | name: '全选', |
| | | id: 'dataColumnAll', |
| | | children: menuFields, |
| | | }, |
| | | ]" |
| | | :props="{ |
| | | children: 'children', |
| | | label: 'name', |
| | | }" |
| | | node-key="id" |
| | | :expand-on-click-node="false" |
| | | :highlight-current="true" |
| | | default-expand-all |
| | | show-checkbox |
| | | ref="dataColumnTree" |
| | | :default-checked-keys="defaultCheckedKeys" |
| | | @check="handleDataColumnCheck" |
| | | > |
| | | <template #default="{ node }"> |
| | | <div class="custom-tree-node"> |
| | | <span>{{ node.label }}</span> |
| | | </div> |
| | | </template> |
| | | </el-tree> |
| | | </el-scrollbar> |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="visible = false">取消</el-button> |
| | | <el-button type="primary" @click="handleConfirm" class="btn-submit"> 确定 </el-button> |
| | | </span> |
| | | </template> |
| | | </ProDialog> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { Message } from '@bole-core/core'; |
| | | import { SubModuleType, SubModuleTitle, EnumMenuType } from '@/constants'; |
| | | import { getTree, treeEach } from '@/utils'; |
| | | import { TreeInstance } from 'element-plus'; |
| | | import { ProDialog } from '@bole-core/components'; |
| | | import { useMenus, useMenu } from '@/hooks'; |
| | | import data from '@iconify-icons/ep/tickets'; |
| | | |
| | | const TypeTip = defineComponent({ |
| | | name: 'TypeTip', |
| | | props: ['isMenu'], |
| | | render() { |
| | | const { isMenu } = this; |
| | | const tipText = isMenu ? `菜单` : '页面'; |
| | | return h( |
| | | 'span', |
| | | { |
| | | class: 'tip-text', |
| | | style: { |
| | | color: '#EB6100', |
| | | }, |
| | | }, |
| | | '[' + tipText + ']' |
| | | ); |
| | | }, |
| | | }); |
| | | |
| | | type Props = { |
| | | authorizeType: 'Role' | 'User'; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), {}); |
| | | |
| | | const visible = defineModel({ type: Boolean }); |
| | | |
| | | type Form = { |
| | | title?: string; |
| | | detail: API.GetRoleQueryResult; |
| | | }; |
| | | |
| | | const form = defineModel<Form>('form'); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'onConfirm', selectedMenuIds: string[]): void; |
| | | (e: 'onCancel'): void; |
| | | }>(); |
| | | |
| | | type CheckedResourceItem = { |
| | | resourceId: string; |
| | | menuId: string; |
| | | resourceType: SubModuleType; |
| | | }; |
| | | |
| | | const state = reactive({ |
| | | currentMenuId: '', |
| | | selectedMenuIds: [] as string[], |
| | | }); |
| | | |
| | | const defaultCheckedKeys = computed(() => Array.from(state.selectedMenuIds)); |
| | | |
| | | watch(visible, (newVal) => { |
| | | if (newVal) { |
| | | state.currentMenuId = ''; |
| | | const menuIds = form.value.detail?.menuIds ?? []; |
| | | // menuIds.forEach((id) => state.selectedMenuIds.add(id)); |
| | | state.selectedMenuIds = [...menuIds]; |
| | | } |
| | | }); |
| | | |
| | | const dialogTitle = computed(() => |
| | | props.authorizeType === 'Role' ? '角色功能授权' : '账号功能授权' |
| | | ); |
| | | |
| | | const moduleTree = useTemplateRef<TreeInstance>('moduleTree'); |
| | | const pageButtonTree = useTemplateRef<TreeInstance>('pageButtonTree'); |
| | | const dataButtonTree = useTemplateRef<TreeInstance>('dataButtonTree'); |
| | | const dataColumnTree = useTemplateRef<TreeInstance>('dataColumnTree'); |
| | | |
| | | type TreeRef = ReturnType<typeof useTemplateRef<TreeInstance>>; |
| | | |
| | | const { menusTree, getMenuById } = useMenus({ |
| | | params: computed(() => ({ |
| | | userType: form.value.detail?.userType, |
| | | clientType: form.value.detail?.clientType, |
| | | enterpriseType: form.value.detail?.enterpriseType, |
| | | roleId: form.value.detail?.id, |
| | | })), |
| | | enabled: computed(() => !!form.value.detail?.id), |
| | | }); |
| | | |
| | | const { menuFields, menuPageButtons, menuDataButtons } = useMenu({ |
| | | params: computed(() => ({ |
| | | id: state.currentMenuId, |
| | | roleId: form.value.detail?.id, |
| | | })), |
| | | enabled: computed(() => !!state.currentMenuId), |
| | | }); |
| | | |
| | | function handleSelectModule(menu: API.GetMenusQueryResultItem) { |
| | | state.currentMenuId = menu.id; |
| | | } |
| | | |
| | | function handleModuleCheck(data, params) { |
| | | handleCheck(data, params, moduleTree); |
| | | } |
| | | |
| | | function handlePageButtonCheck(data, params) { |
| | | handleCheck(data, params, pageButtonTree); |
| | | } |
| | | |
| | | function handleDataButtonCheck(data, params) { |
| | | handleCheck(data, params, dataButtonTree); |
| | | } |
| | | |
| | | function handleDataColumnCheck(data, params) { |
| | | handleCheck(data, params, dataColumnTree); |
| | | } |
| | | |
| | | function handleCheck(data, params, treeRef: TreeRef) { |
| | | const dataMap = {}; |
| | | treeEach( |
| | | [treeRef.value.store.root], |
| | | (node) => (dataMap[node.key] = node), |
| | | (node) => node.childNodes |
| | | ); |
| | | |
| | | const uncachedCheckedKeys = params.checkedKeys.filter( |
| | | (item) => !['pageButtonAll', 'dataButtonAll', 'dataColumnAll'].includes(item) |
| | | ); |
| | | const cachedKeys = state.selectedMenuIds.filter( |
| | | (item) => !(item in dataMap) && !uncachedCheckedKeys.includes(item) |
| | | ); |
| | | state.selectedMenuIds = cachedKeys.concat(uncachedCheckedKeys); |
| | | } |
| | | |
| | | function handleConfirm() { |
| | | emit('onConfirm', state.selectedMenuIds); |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | :deep(.custom-dialog) { |
| | | min-width: 900px; |
| | | } |
| | | |
| | | .authorize-wrapper { |
| | | display: flex; |
| | | |
| | | height: 500px; |
| | | border-bottom: 2px solid #f5f5f5; |
| | | background: #dddddd; |
| | | |
| | | .container-wrapper { |
| | | width: calc(25%); |
| | | border-right: 2px solid #f5f5f5; |
| | | // margin-right: 7px; |
| | | background: #ffffff; |
| | | |
| | | .type-wrapper { |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | padding: 10px 16px; |
| | | border-bottom: 2px solid #f5f5f5; |
| | | color: #333333; |
| | | } |
| | | |
| | | &:last-of-type { |
| | | margin-right: 0px; |
| | | } |
| | | |
| | | &.left-wrapper { |
| | | margin-right: 7px; |
| | | padding-top: 10px; |
| | | width: calc(35% - 7px); |
| | | |
| | | :deep(.el-scrollbar) { |
| | | width: 100%; |
| | | height: 98%; |
| | | } |
| | | } |
| | | |
| | | :deep(.el-scrollbar) { |
| | | width: 100%; |
| | | height: calc(98% - 43px); |
| | | |
| | | .el-scrollbar__wrap { |
| | | overflow: auto; |
| | | |
| | | .custom-tree-node { |
| | | display: flex; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | </QueryFilterItem> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="BalanceManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | <BalanceDetailDialog v-bind="dialogProps" /> |
| | |
| | | } from '@bole-core/components'; |
| | | import * as userServices from '@/services/api/user'; |
| | | import BalanceDetailDialog from './components/BalanceDetailDialog.vue'; |
| | | import { BalanceManageColumns } from './constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'WithdrawManageList', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '明细', |
| | | }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | detailBtn: { |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | }, |
| | | ]); |
| | | }; |
| | | const { column, operationBtns, checkSubModuleItemShow } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const router = useRouter(); |
| | | const BaseState = { |
| | |
| | | > |
| | | <el-button text type="primary" class="pro-table-operation-btn">导入</el-button> |
| | | </BlFileUpload> --> |
| | | <el-button type="primary" link @click="handleExport()">导出</el-button> |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'exportBtn')" |
| | | type="primary" |
| | | link |
| | | @click="handleExport()" |
| | | >导出</el-button |
| | | > |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="SettlementListColumns" |
| | | :columns="column" |
| | | :operationBtns="operationBtns" |
| | | :auto-height="false" |
| | | ref="proTable" |
| | |
| | | </ProTableV2> |
| | | <div class="chuck-add-or-edit-actions"> |
| | | <el-button class="chuck-add-or-edit-actions" @click="handleBack">取消</el-button> |
| | | <!-- <el-button |
| | | <el-button |
| | | v-if=" |
| | | isSettlement && |
| | | (!form.auditStatus || form.auditStatus !== EnumTaskSettlementAuditStatus.Pass) |
| | | " |
| | | class="chuck-add-or-edit-actions" |
| | | type="primary" |
| | | @click="handleSubmit()" |
| | | >结算申请</el-button |
| | | > --> |
| | | @click="handleSubmit('confirm')" |
| | | >结算确认</el-button |
| | | > |
| | | <el-button |
| | | v-if="isSettlement" |
| | | v-if="isSettlement && form.auditStatus === EnumTaskSettlementAuditStatus.Pass" |
| | | class="chuck-add-or-edit-actions" |
| | | type="primary" |
| | | @click="handleSubmit()" |
| | | @click="handleSubmit('submit')" |
| | | >提交结算</el-button |
| | | > |
| | | </div> |
| | |
| | | BlFileUpload, |
| | | UploadUserFile, |
| | | } from '@bole-core/components'; |
| | | import { SettlementListColumns } from './constants'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import * as taskServices from '@/services/api/task'; |
| | | import * as taskUserServices from '@/services/api/taskUser'; |
| | |
| | | |
| | | const { closeViewPush } = useRouteView(); |
| | | const eventContext = useGlobalEventContext(); |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'editBtn', |
| | | name: '编辑', |
| | | }, |
| | | |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | editBtn: { |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetSettlementTaskUsersQueryResultItem) => |
| | | row.settlementReceiveStatus !== SettlementReceiveStatus.Refunded, |
| | | !( |
| | | (row.settlementReceiveStatus === SettlementReceiveStatus.Refunded && |
| | | form.auditStatus === EnumTaskSettlementAuditStatus.Pass) || |
| | | form.auditStatus === EnumTaskSettlementAuditStatus.Wait |
| | | ), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'editBtn', |
| | | name: '重新结算', |
| | | }, |
| | | reSettleBtn: { |
| | | emits: { |
| | | onClick: (role) => againSureTaskSettlementOrderRoster(role), |
| | | }, |
| | |
| | | row.settlementReceiveStatus !== SettlementReceiveStatus.Refunded, |
| | | }, |
| | | }, |
| | | ]); |
| | | }; |
| | | const { column, operationBtns, checkSubModuleItemShow } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const route = useRoute(); |
| | | const id = (route.params.id as string) ?? ''; |
| | | const settlement = (route.query.settlement as string) ?? ''; |
| | |
| | | } |
| | | } |
| | | |
| | | function handleSubmit() { |
| | | function handleSubmit(submitStatus: string) { |
| | | let actualList = form.settlementTaskUsers.filter((x) => x.actualSettlementAmount > 0); |
| | | const actualSettlementAmount = actualList.reduce( |
| | | (pre, cur) => pre + cur.actualSettlementAmount, |
| | |
| | | id: id, |
| | | name: form.name, |
| | | code: form.code, |
| | | submitStatus: submitStatus, |
| | | settlementUserCount: actualList.length, |
| | | actualSettlementAmount: actualSettlementAmount, |
| | | settlementAmount: settlementAmount, |
| | |
| | | id: '', |
| | | name: '', |
| | | code: '', |
| | | submitStatus: '', |
| | | settlementUserCount: 0, |
| | | settlementAmount: 0, |
| | | actualSettlementAmount: 0, |
| | |
| | | }); |
| | | |
| | | async function handleSettle() { |
| | | sureTaskSettlementOrder(); |
| | | if (settleEditForm.submitStatus === 'confirm') { |
| | | auditTaskSettlement(); |
| | | } |
| | | if (settleEditForm.submitStatus === 'submit') { |
| | | sureTaskSettlementOrder(); |
| | | } |
| | | } |
| | | |
| | | async function auditTaskSettlement() { |
| | | try { |
| | | let params: API.AuditTaskSettlementCommand = { |
| | | id: id, |
| | | auditStatus: EnumTaskSettlementAuditStatus.Pass, |
| | | rosters: form.settlementTaskUsers.map((item) => ({ |
| | | id: item.id, |
| | | serviceFee: item.serviceFee, |
| | | timeoutHours: item.timeoutHours, |
| | | timeoutFee: item.timeoutFee, |
| | | otherFee: item.otherFee, |
| | | remark: item.remark, |
| | | settlementAmount: item.settlementAmount, |
| | | })), |
| | | }; |
| | | let res = await taskServices.auditTaskSettlement(params); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | // eventContext.emit('sureTaskSettlementOrder'); |
| | | // handleBack(); |
| | | refetch(); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function sureTaskSettlementOrder() { |
| File was renamed from src/views/ServiceChargeManage/ServiceChargeManage.vue |
| | |
| | | <template #btn> |
| | | <!-- <el-button type="primary" link @click="handleDownloadTemplate()">结算单模板</el-button> --> |
| | | <!-- <el-button type="primary" @click="handleAdd()">上传结算单</el-button> --> |
| | | <el-button type="primary" @click="handleExport()">导出</el-button> |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'exportBtn')" |
| | | type="primary" |
| | | @click="handleExport()" |
| | | >导出</el-button |
| | | > |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="ServiceChargeManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | <!-- <template #operationBtn-uploadBtn="{ row }"> |
| | | <BlFileUpload |
| | | v-model:file-url="editForm.settlementUrl" |
| | |
| | | UploadUserFile, |
| | | BlFileUpload, |
| | | } from '@bole-core/components'; |
| | | import { ServiceChargeManageColumns } from './constants'; |
| | | import { |
| | | EnumTaskSettlementStatusText, |
| | | EnumTaskSettlementOrderStatusText, |
| | |
| | | name: 'ServiceChargeManageList', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | // { |
| | | // data: { |
| | | // enCode: 'uploadBtn', |
| | | // name: '上传', |
| | | // }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | // uploadBtn: { |
| | | // extraProps: { |
| | | // hide: (row: API.GetSettlementTasksQueryResultItem) => |
| | | // row.settlementOrderStatus !== EnumTaskSettlementOrderStatus.Wait, |
| | | // }, |
| | | // }, |
| | | // { |
| | | // data: { |
| | | // enCode: 'reUploadBtn', |
| | | // name: '重新上传', |
| | | // }, |
| | | // reUploadBtn: { |
| | | // extraProps: { |
| | | // hide: (row: API.GetSettlementTasksQueryResultItem) => |
| | | // !( |
| | |
| | | // ), |
| | | // }, |
| | | // }, |
| | | { |
| | | data: { |
| | | enCode: 'settleBtn', |
| | | name: '结算', |
| | | }, |
| | | settleBtn: { |
| | | emits: { |
| | | onClick: (role: API.GetSettlementTasksQueryResultItem) => openSettleMethodDialog(role), |
| | | }, |
| | |
| | | role.settlementStatus !== EnumTaskSettlementStatus.Wait, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'recallBtn', |
| | | name: '撤回', |
| | | }, |
| | | recallBtn: { |
| | | emits: { |
| | | onClick: (role) => handleRecall(role), |
| | | }, |
| | |
| | | role.settlementStatus !== EnumTaskSettlementStatus.InProcess, |
| | | }, |
| | | }, |
| | | // { |
| | | // data: { |
| | | // enCode: 'settleAuditBtn', |
| | | // name: '结算审核', |
| | | // }, |
| | | // settleAuditBtn: { |
| | | // emits: { |
| | | // onClick: (role: API.GetSettlementTasksQueryResultItem) => goDetail(role.id, 'settlement'), |
| | | // }, |
| | |
| | | // hide: (role: API.GetSettlementTasksQueryResultItem) => role.auditStatus !== null, |
| | | // }, |
| | | // }, |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '详情', |
| | | }, |
| | | detailBtn: { |
| | | emits: { |
| | | onClick: (role: API.GetSettlementTasksQueryResultItem) => goDetail(role.id), |
| | | }, |
| | |
| | | // role.settlementOrderStatus === EnumTaskSettlementOrderStatus.Wait, |
| | | // }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'exportBtn', |
| | | name: '导出', |
| | | }, |
| | | exportBtn: { |
| | | emits: { |
| | | onClick: (role) => handleRowExport(role), |
| | | }, |
| | |
| | | ), |
| | | }, |
| | | }, |
| | | ]); |
| | | }; |
| | | |
| | | const { column, operationBtns, checkSubModuleItemShow } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const router = useRouter(); |
| | | |
| | |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn> |
| | | <el-button @click="openDialog()" icon="Plus" type="primary">新增</el-button> |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'addBtn')" |
| | | @click="openDialog()" |
| | | icon="Plus" |
| | | type="primary" |
| | | >新增</el-button |
| | | > |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="UserManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | <template #status="{ row }"> |
| | | <FieldSwitch |
| | | v-model="row.status" |
| | |
| | | QueryFilterItem, |
| | | useTable, |
| | | useFormDialog, |
| | | defineOperationBtns, |
| | | FieldSwitch, |
| | | } from '@bole-core/components'; |
| | | import * as userServices from '@/services/api/user'; |
| | | import { UserManageColumns } from './constants'; |
| | | import { EnumUserStatus, EnumUserStatusText } from '@/constants'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import { Message } from '@bole-core/core'; |
| | |
| | | name: 'UserManageList', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'editBtn', |
| | | name: '编辑', |
| | | }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | editBtn: { |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'resetPasswordBtn', |
| | | name: '重置密码', |
| | | }, |
| | | resetPasswordBtn: { |
| | | props: { |
| | | type: 'danger', |
| | | }, |
| | |
| | | onClick: (role) => openResetPasswordDialog(role), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'resetOperatorPasswordBtn', |
| | | name: '重置操作密码', |
| | | }, |
| | | resetOperatorPasswordBtn: { |
| | | props: { |
| | | type: 'danger', |
| | | }, |
| | |
| | | onClick: (role) => openResetOperatorPasswordDialog(role), |
| | | }, |
| | | }, |
| | | ]); |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const router = useRouter(); |
| | | const BaseState = { |
| | |
| | | label="操作密码" |
| | | prop="operatorPassword" |
| | | :check-rules="[ |
| | | { message: '请输入操作密码' }, |
| | | { |
| | | required: false, |
| | | message: '请输入6位数字', |
| | | pattern: /\b\d{6}\b/, |
| | | }, |