|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <LoadingLayout :loading="isLoading" :error="isError" :loadError="refetch"> | 
|---|
|  |  |  | <JobDetailContent :isCollapse="true"> | 
|---|
|  |  |  | <JobDetailContent | 
|---|
|  |  |  | :avatar="userResumeInfo.avatar" | 
|---|
|  |  |  | :name="userResumeInfo.name" | 
|---|
|  |  |  | :age="userResumeInfo.age" | 
|---|
|  |  |  | :isReal="userResumeInfo.isReal" | 
|---|
|  |  |  | :gender="userResumeInfo.gender" | 
|---|
|  |  |  | :personalIdentityContent="userResumeInfo.personalIdentityContent" | 
|---|
|  |  |  | :educationalBackgroundContent="userResumeInfo.educationalBackgroundContent" | 
|---|
|  |  |  | :taskCount="userResumeInfo.taskCount" | 
|---|
|  |  |  | :contactPhoneNumber="userResumeInfo.contactPhoneNumber" | 
|---|
|  |  |  | :identity="userResumeInfo.identity" | 
|---|
|  |  |  | :userExpectJobs="userResumeInfo.userExpectJobs" | 
|---|
|  |  |  | :freeTime="userResumeInfo.freeTime" | 
|---|
|  |  |  | :jobSeekingStatus="userResumeInfo.jobSeekingStatus" | 
|---|
|  |  |  | :userCredentials="userResumeInfo.userCredentials" | 
|---|
|  |  |  | :workSeniority="userResumeInfo.workSeniority" | 
|---|
|  |  |  | :workExperience="userResumeInfo.workExperience" | 
|---|
|  |  |  | :photos="userResumeInfo.photos" | 
|---|
|  |  |  | :height="userResumeInfo.height" | 
|---|
|  |  |  | :weight="userResumeInfo.weight" | 
|---|
|  |  |  | :videos="userResumeInfo.videos" | 
|---|
|  |  |  | :taskInfoUsers="userResumeInfo.taskInfoUsers" | 
|---|
|  |  |  | :isCollapse="true" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <template #footer> | 
|---|
|  |  |  | <PageFooterBtn type="primary" plain>解约</PageFooterBtn> | 
|---|
|  |  |  | <PageFooterBtn type="primary">签约</PageFooterBtn> | 
|---|
|  |  |  | <PageFooterBtn | 
|---|
|  |  |  | v-if=" | 
|---|
|  |  |  | enterpriseEmployeeInfo.userSignContractStatus === EnumTaskUserSignContractStatus.Pass | 
|---|
|  |  |  | " | 
|---|
|  |  |  | type="primary" | 
|---|
|  |  |  | plain | 
|---|
|  |  |  | @click="handleUnsign" | 
|---|
|  |  |  | >解约</PageFooterBtn | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <PageFooterBtn | 
|---|
|  |  |  | type="primary" | 
|---|
|  |  |  | @click="goToSign" | 
|---|
|  |  |  | v-if=" | 
|---|
|  |  |  | enterpriseEmployeeInfo.userSignContractStatus === EnumTaskUserSignContractStatus.Wait || | 
|---|
|  |  |  | enterpriseEmployeeInfo.userSignContractStatus === EnumTaskUserSignContractStatus.Stop || | 
|---|
|  |  |  | !enterpriseEmployeeInfo.userSignContractStatus | 
|---|
|  |  |  | " | 
|---|
|  |  |  | >签约</PageFooterBtn | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </JobDetailContent> | 
|---|
|  |  |  | </LoadingLayout> | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script setup lang="ts"> | 
|---|
|  |  |  | import Taro from '@tarojs/taro'; | 
|---|
|  |  |  | import { useQuery } from '@tanstack/vue-query'; | 
|---|
|  |  |  | import * as orderServices from '@12333/services/api/Order'; | 
|---|
|  |  |  | import { EnumTaskUserSignContractStatus } from '@12333/constants'; | 
|---|
|  |  |  | import { useGetEnterpriseEmployee, useUserResume } from '@12333/hooks'; | 
|---|
|  |  |  | import * as enterpriseEmployeeServices from '@12333/services/apiV2/enterpriseEmployee'; | 
|---|
|  |  |  | import { Message } from '@12333/utils'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | defineOptions({ | 
|---|
|  |  |  | name: 'InnerPage', | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const router = Taro.useRouter(); | 
|---|
|  |  |  | const taskId = router.params?.id ?? ''; | 
|---|
|  |  |  | const enterpriseEmployeeId = router.params?.enterpriseEmployeeId ?? ''; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { | 
|---|
|  |  |  | isLoading, | 
|---|
|  |  |  | isError, | 
|---|
|  |  |  | data: detail, | 
|---|
|  |  |  | refetch, | 
|---|
|  |  |  | } = useQuery({ | 
|---|
|  |  |  | queryKey: ['orderServices/getOrdeForDetail', taskId], | 
|---|
|  |  |  | queryFn: async () => { | 
|---|
|  |  |  | return await orderServices.getOrdeForDetail( | 
|---|
|  |  |  | { id: taskId }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | showLoading: false, | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | placeholderData: () => ({} as API.OrderInfoDto), | 
|---|
|  |  |  | const { isLoading, isError, userResumeInfo, refetch } = useUserResume({ | 
|---|
|  |  |  | enterpriseEmployeeId: enterpriseEmployeeId, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { enterpriseEmployeeInfo } = useGetEnterpriseEmployee({ | 
|---|
|  |  |  | id: enterpriseEmployeeId, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function goToSign() { | 
|---|
|  |  |  | Taro.navigateTo({ | 
|---|
|  |  |  | url: `${RouterPath.flexJobSign}?enterpriseEmployeeId=${enterpriseEmployeeId}`, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | async function handleUnsign() { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | await Message.confirm({ message: '确定要解约吗?' }); | 
|---|
|  |  |  | let params: API.StopElectronSignCommand = { | 
|---|
|  |  |  | ids: [enterpriseEmployeeInfo.value?.id], | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | let res = await enterpriseEmployeeServices.stopElectronSign(params); | 
|---|
|  |  |  | if (res) { | 
|---|
|  |  |  | Message.success('解约成功'); | 
|---|
|  |  |  | refetch(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } catch (error) {} | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style lang="scss"> | 
|---|