| | |
| | | <template> |
| | | <ProTabs |
| | | v-model="queryState.mineHireType" |
| | | v-model="queryState.userSignContractStatus" |
| | | name="home-tab" |
| | | :showPaneContent="false" |
| | | class="home-tabs" |
| | |
| | | title-gutter="12" |
| | | title-scroll |
| | | > |
| | | <ProTabPane :title="`已签约`" :pane-key="FlexWorkerEleSignEnum.HasSign"></ProTabPane> |
| | | <ProTabPane :title="`待签约`" :pane-key="FlexWorkerEleSignEnum.WaitSign"></ProTabPane> |
| | | <ProTabPane :title="`已解约`" :pane-key="FlexWorkerEleSignEnum.CancelSign"></ProTabPane> |
| | | <ProTabPane :title="`已签约`" :pane-key="EnumTaskUserSignContractStatus.Pass"></ProTabPane> |
| | | <ProTabPane :title="`待签约`" :pane-key="EnumTaskUserSignContractStatus.Wait"></ProTabPane> |
| | | <ProTabPane :title="`已解约`" :pane-key="EnumTaskUserSignContractStatus.Refuse"></ProTabPane> |
| | | </ProTabs> |
| | | <InfiniteLoading |
| | | scrollViewClassName="common-infinite-scroll-list home-list" |
| | | v-bind="infiniteLoadingProps" |
| | | :key="queryState.mineHireType" |
| | | :key="queryState.userSignContractStatus" |
| | | > |
| | | <template #renderItem="{ item }"> |
| | | <FlexJobCard :show-done-detail="false" :show-footer-left="false" @click="goDetail(item)"> |
| | | <template #footerRight> |
| | | <template v-if="queryState.mineHireType === FlexWorkerEleSignEnum.HasSign"> |
| | | <span></span> |
| | | <!-- <template |
| | | v-if="queryState.userSignContractStatus === EnumTaskUserSignContractStatus.Pass" |
| | | > |
| | | <nut-button |
| | | class="flexJobManage-card-plain-button" |
| | | type="default" |
| | |
| | | > |
| | | <nut-button type="primary" @click.stop="checkContract">查看合约</nut-button> |
| | | </template> |
| | | <nut-button v-else type="primary" @click.stop="goSignContract(item)">签约</nut-button> |
| | | <nut-button |
| | | v-else-if="queryState.userSignContractStatus === EnumTaskUserSignContractStatus.Wait" |
| | | type="primary" |
| | | @click.stop="goSignContract(item)" |
| | | >签约</nut-button |
| | | > --> |
| | | </template> |
| | | </FlexJobCard> |
| | | </template> |
| | |
| | | import { FlexJobCard, ProTabs, ProTabPane } from '@12333/components'; |
| | | import { RouterPath } from '@/constants'; |
| | | import { useInfiniteLoading } from '@12333/hooks'; |
| | | import { OrderInputType } from '@12333/constants'; |
| | | import * as flexWorkerServices from '@12333/services/api/FlexWorker'; |
| | | import { FlexWorkerEleSignEnum } from '@12333/constants/task'; |
| | | import { |
| | | EnumTaskUserHireStatus, |
| | | EnumTaskUserSignContractStatus, |
| | | EnumPagedListOrder, |
| | | } from '@12333/constants'; |
| | | import * as enterpriseEmployeeServices from '@12333/services/apiV2/enterpriseEmployee'; |
| | | import Taro from '@tarojs/taro'; |
| | | |
| | | defineOptions({ |
| | |
| | | }); |
| | | |
| | | const queryState = reactive({ |
| | | mineHireType: FlexWorkerEleSignEnum.HasSign, |
| | | userSignContractStatus: EnumTaskUserSignContractStatus.Pass, |
| | | }); |
| | | |
| | | const { infiniteLoadingProps } = useInfiniteLoading( |
| | | ({ pageParam }) => { |
| | | let params: API.GetFlexSignWorkerListInput = { |
| | | signStatus: queryState.mineHireType, |
| | | let params: API.GetEnterpriseEmployeesQuery = { |
| | | pageModel: { |
| | | rows: 20, |
| | | page: pageParam, |
| | | orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }], |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | }, |
| | | hireStatus: EnumTaskUserHireStatus.Pass, |
| | | userSignContractStatus: queryState.userSignContractStatus, |
| | | }; |
| | | |
| | | return flexWorkerServices.getFlexSignWorkerList(params, { |
| | | return enterpriseEmployeeServices.getEnterpriseEmployees(params, { |
| | | showLoading: false, |
| | | }); |
| | | }, |
| | | { |
| | | queryKey: ['flexWorkerServices/getFlexSignWorkerList', queryState], |
| | | queryKey: ['enterpriseEmployeeServices/getEnterpriseEmployees', queryState], |
| | | } |
| | | ); |
| | | |
| | | function goDetail(item: API.GetNewestWorkerListOutput) { |
| | | function goDetail(item: API.GetEnterpriseEmployeesQueryResultItem) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.flexJobDetailFromManage}?userId=${item.userId}`, |
| | | url: `${RouterPath.flexJobDetailFromManage}?userId=${item.id}`, |
| | | }); |
| | | } |
| | | |