| | |
| | | :isCollapse="true" |
| | | > |
| | | <template #footer> |
| | | <PageFooterBtn v-if="userResumeInfo" type="primary" plain>解约</PageFooterBtn> |
| | | <PageFooterBtn type="primary" @click="goToSign">签约</PageFooterBtn> |
| | | <PageFooterBtn |
| | | v-if=" |
| | | enterpriseEmployeeInfo.userSignContractStatus === EnumTaskUserSignContractStatus.Pass |
| | | " |
| | | type="primary" |
| | | plain |
| | | >解约</PageFooterBtn |
| | | > |
| | | <PageFooterBtn |
| | | type="primary" |
| | | @click="goToSign" |
| | | v-if=" |
| | | enterpriseEmployeeInfo.userSignContractStatus === EnumTaskUserSignContractStatus.Wait |
| | | " |
| | | >签约</PageFooterBtn |
| | | > |
| | | </template> |
| | | </JobDetailContent> |
| | | </LoadingLayout> |
| | |
| | | |
| | | <script setup lang="ts"> |
| | | import Taro from '@tarojs/taro'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { useUserResume } from '@12333/hooks'; |
| | | import { EnumTaskUserSignContractStatus } from '@12333/constants'; |
| | | import { useGetEnterpriseEmployee, useUserResume } from '@12333/hooks'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | |
| | | enterpriseEmployeeId: enterpriseEmployeeId, |
| | | }); |
| | | |
| | | const { enterpriseEmployeeInfo } = useGetEnterpriseEmployee({ |
| | | id: enterpriseEmployeeId, |
| | | }); |
| | | |
| | | function goToSign() { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.flexJobSign}?enterpriseEmployeeId=${enterpriseEmployeeId}`, |
| | |
| | | import { MaybeRef, computed, unref } from 'vue'; |
| | | import * as userResumeServices from '@12333/services/apiV2/userResume'; |
| | | import * as enterpriseEmployeeServices from '@12333//services/apiV2/enterpriseEmployee'; |
| | | import { useQuery, useQueryClient } from '@tanstack/vue-query'; |
| | | |
| | | type UseUserResumeOptions = { |
| | |
| | | updateUserResume, |
| | | }; |
| | | } |
| | | |
| | | type UseGetEnterpriseEmployeeOptions = { |
| | | id?: MaybeRef<string>; |
| | | }; |
| | | |
| | | export function useGetEnterpriseEmployee(options: UseGetEnterpriseEmployeeOptions = {}) { |
| | | const { id } = options; |
| | | |
| | | const { data, refetch, isLoading, isError } = useQuery({ |
| | | queryKey: ['enterpriseEmployeeServices/getEnterpriseEmployee', id], |
| | | queryFn: async () => { |
| | | return await enterpriseEmployeeServices.getEnterpriseEmployee( |
| | | { id: unref(id) }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | placeholderData: () => ({} as API.GetEnterpriseEmployeeQueryResult), |
| | | enabled: computed(() => !!unref(id)), |
| | | }); |
| | | |
| | | return { |
| | | enterpriseEmployeeInfo: data, |
| | | refetch, |
| | | isLoading, |
| | | isError, |
| | | }; |
| | | } |
| | |
| | | enterpriseSignContractTime?: string; |
| | | /** 电子合同 */ |
| | | contractUrl?: string; |
| | | userSignContractStatus?: EnumTaskUserSignContractStatus; |
| | | } |
| | | |
| | | interface GetEnterpriseEmployeesQuery { |