| | |
| | | <template #query> |
| | | <QueryFilterItem tip-content="实名状态"> |
| | | <FieldRadio |
| | | v-model="extraParamState.realVerifyStatus" |
| | | v-model="extraParamState.isReal" |
| | | :value-enum="[ |
| | | { |
| | | value: false, |
| | | label: '未实名', |
| | | }, |
| | | { |
| | | value: true, |
| | | label: '已实名', |
| | | }, |
| | | { label: '已实名', value: true }, |
| | | { label: '未实名', value: false }, |
| | | ]" |
| | | buttonStyle |
| | | showAllBtn |
| | | :all-btn-value="null" |
| | | @change="getList()" |
| | | /> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem tip-content="最近录用时间"> |
| | | <FieldDatePicker |
| | | v-model="extraParamState.nearlyHireDateTime" |
| | | v-model="extraParamState.hireTime" |
| | | type="daterange" |
| | | range-separator="~" |
| | | start-placeholder="开始时间" |
| | |
| | | </QueryFilterItem> |
| | | <QueryFilterItem tip-content="最近签约时间"> |
| | | <FieldDatePicker |
| | | v-model="extraParamState.nearlySignDateTime" |
| | | v-model="extraParamState.signContractTime" |
| | | type="daterange" |
| | | range-separator="~" |
| | | start-placeholder="开始时间" |
| | |
| | | </QueryFilterItem> |
| | | <QueryFilterItem> |
| | | <SearchInput |
| | | v-model="extraParamState.searchKeys" |
| | | v-model="extraParamState.keywords" |
| | | style="width: 300px" |
| | | placeholder="姓名/手机/身份证号/客户" |
| | | @on-click-search="getList" |
| | |
| | | UploadUserFile, |
| | | } from '@bole-core/components'; |
| | | import { useAccess, useGlobalEventContext } from '@/hooks'; |
| | | import { Gender } from '@/constants'; |
| | | import CPersonDetailDialog from './components/CPersonDetailDialog.vue'; |
| | | import { convertApi2FormUrlOnlyOne, format } from '@/utils'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import * as userServices from '@/services/api/user'; |
| | | |
| | | defineOptions({ |
| | | name: 'CPersonManageList', |
| | |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetUserClientForBackInput = { |
| | | let params: API.GetPersonalUserInfosQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | searchKeys: extraParamState.searchKeys, |
| | | nearlyHireDateTimeBegin: format( |
| | | extraParamState.nearlyHireDateTime?.[0] ?? '', |
| | | keywords: extraParamState.keywords, |
| | | hireTimeBegin: format(extraParamState.hireTime?.[0] ?? '', 'YYYY-MM-DD 00:00:00'), |
| | | hireTimeEnd: format(extraParamState.hireTime?.[1] ?? '', 'YYYY-MM-DD 23:59:59'), |
| | | signContractBegin: format( |
| | | extraParamState.signContractTime?.[0] ?? '', |
| | | 'YYYY-MM-DD 00:00:00' |
| | | ), |
| | | nearlyHireDateTimeEnd: format( |
| | | extraParamState.nearlyHireDateTime?.[1] ?? '', |
| | | 'YYYY-MM-DD 23:59:59' |
| | | ), |
| | | nearlySignDateTimeBegin: format( |
| | | extraParamState.nearlySignDateTime?.[0] ?? '', |
| | | 'YYYY-MM-DD 00:00:00' |
| | | ), |
| | | nearlySignDateTimeEnd: format( |
| | | extraParamState.nearlySignDateTime?.[1] ?? '', |
| | | 'YYYY-MM-DD 23:59:59' |
| | | ), |
| | | realVerifyStatus: extraParamState.realVerifyStatus, |
| | | signContractEnd: format(extraParamState.signContractTime?.[1] ?? '', 'YYYY-MM-DD 23:59:59'), |
| | | isReal: extraParamState.isReal, |
| | | }; |
| | | |
| | | let res = await flexEnterpriseWokerServices.getUserClientList(params, { |
| | | let res = await userServices.getPersonalUserInfos(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | return res; |
| | |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | searchKeys: '', |
| | | realVerifyStatus: '' as any as boolean, |
| | | nearlyHireDateTime: [] as unknown as ModelValueType, |
| | | nearlySignDateTime: [] as unknown as ModelValueType, |
| | | orderInput: [{ property: 'userId', order: EnumPagedListOrder.Desc }], |
| | | keywords: '', |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | hireTime: [] as unknown as ModelValueType, |
| | | signContractTime: [] as unknown as ModelValueType, |
| | | isReal: null as any as boolean, |
| | | }, |
| | | queryKey: ['flexEnterpriseWokerServices/getUserClientList'], |
| | | queryKey: ['userServices/getPersonalUserInfos'], |
| | | columnsRenderProps: { |
| | | realVerifyStatus: { |
| | | type: 'enum', |
| | | valueEnum: [ |
| | | { label: '已实名', value: true }, |
| | | { label: '未实名', value: false }, |
| | | ], |
| | | gender: { type: 'enum', valueEnum: EnumUserGenderTextForPerson }, |
| | | isReal: { |
| | | formatter: (row: API.GetPersonalUserInfosQueryResultItem) => { |
| | | return row.isReal ? '已实名' : '未实名'; |
| | | }, |
| | | }, |
| | | realVerifyTime: { type: 'date' }, |
| | | hireTime: { type: 'date' }, |
| | | realTime: { type: 'date' }, |
| | | signContractTime: { type: 'date' }, |
| | | enterprises: { |
| | | formatter: (row: API.GetPersonalUserInfosQueryResultItem) => { |
| | | return row.enterprises ? row.enterprises.map((x) => x).join(',') : ''; |
| | | }, |
| | | }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | | async function openDialog(row?: API.GetUserClientForBackOutput) { |
| | | const res = await getUserDetailForBack('98ac4c01-3598-ebf3-fa7d-3a189bb6b587'); |
| | | async function openDialog(row?: API.GetPersonalUserInfosQueryResultItem) { |
| | | handleEdit({ |
| | | userId: row.userId ?? '98ac4c01-3598-ebf3-fa7d-3a189bb6b587', |
| | | name: res.name, |
| | | idNumber: res.idNumber, |
| | | contactPhone: res.contactPhone, |
| | | age: res.age, |
| | | certificateFrontImgUrl: res.certificateFrontImgUrl |
| | | ? convertApi2FormUrlOnlyOne(res.certificateFrontImgUrl) |
| | | : [], |
| | | certificateBackImgUrl: res.certificateBackImgUrl |
| | | ? convertApi2FormUrlOnlyOne(res.certificateBackImgUrl) |
| | | : [], |
| | | id: row.id ?? '', |
| | | name: row.name ?? '', |
| | | identity: row.identity ?? '', |
| | | contactPhoneNumber: row.contactPhoneNumber, |
| | | age: row.age ?? ('' as any as number), |
| | | identityImg: row.identityImg ? convertApi2FormUrlOnlyOne(row.identityImg) : [], |
| | | identityBackImg: row.identityBackImg ? convertApi2FormUrlOnlyOne(row.identityBackImg) : [], |
| | | |
| | | genderType: Gender.Female, |
| | | gender: row.gender, |
| | | tabType: 'user', |
| | | }); |
| | | } |
| | | |
| | | const { dialogProps, handleEdit } = useFormDialog({ |
| | | defaultFormParams: { |
| | | userId: '', |
| | | id: '', |
| | | name: '', |
| | | idNumber: '', |
| | | contactPhone: '', |
| | | identity: '', |
| | | contactPhoneNumber: '', |
| | | age: 0, |
| | | genderType: '' as any as Gender, |
| | | certificateFrontImgUrl: [] as UploadUserFile[], |
| | | certificateBackImgUrl: [] as UploadUserFile[], |
| | | gender: '' as any as EnumUserGender, |
| | | identityImg: [] as UploadUserFile[], |
| | | identityBackImg: [] as UploadUserFile[], |
| | | |
| | | tabType: '', |
| | | }, |
| | | }); |
| | | |
| | | async function getUserDetailForBack(userId: string) { |
| | | async function getPersonalUserInfoSignContracts(id: string) { |
| | | try { |
| | | return await flexEnterpriseWokerServices.getUserDetailForBack({ userId: userId }); |
| | | return await userServices.getPersonalUserInfoSignContracts({ id: id }); |
| | | } catch (error) {} |
| | | } |
| | | </script> |