Merge branch 'master' of http://120.26.58.240:8888/r/flexJobMiniApp
| | |
| | | :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 |
| | | @click="handleUnsign" |
| | | >解约</PageFooterBtn |
| | | > |
| | | <PageFooterBtn |
| | | type="primary" |
| | | @click="goToSign" |
| | | v-if=" |
| | | enterpriseEmployeeInfo.userSignContractStatus === EnumTaskUserSignContractStatus.Wait || |
| | | enterpriseEmployeeInfo.userSignContractStatus === EnumTaskUserSignContractStatus.Refuse |
| | | " |
| | | >签约</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'; |
| | | import { Message } from '@12333/utils'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | |
| | | enterpriseEmployeeId: enterpriseEmployeeId, |
| | | }); |
| | | |
| | | const { enterpriseEmployeeInfo } = useGetEnterpriseEmployee({ |
| | | id: enterpriseEmployeeId, |
| | | }); |
| | | |
| | | function goToSign() { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.flexJobSign}?enterpriseEmployeeId=${enterpriseEmployeeId}`, |
| | | }); |
| | | } |
| | | |
| | | async function handleUnsign() { |
| | | try { |
| | | await Message.confirm({ message: '确定要解约吗?' }); |
| | | } catch (error) {} |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | |
| | | class="flexJobManage-card-plain-button" |
| | | type="default" |
| | | plain |
| | | @click.stop="goDetail(item)" |
| | | @click.stop="handleUnsign(item)" |
| | | >解约</nut-button |
| | | > |
| | | <nut-button type="primary" @click.stop="checkContract">查看合约</nut-button> |
| | |
| | | Number(queryState.userSignContractStatus) === EnumTaskUserSignContractStatus.Refuse |
| | | " |
| | | type="primary" |
| | | @click.stop="goDetail(item)" |
| | | @click.stop="goFlexJobSign(item)" |
| | | >签约</nut-button |
| | | > |
| | | </template> |
| | |
| | | } from '@12333/constants'; |
| | | import * as enterpriseEmployeeServices from '@12333/services/apiV2/enterpriseEmployee'; |
| | | import Taro from '@tarojs/taro'; |
| | | import { Message } from '@12333/utils'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | |
| | | } |
| | | ); |
| | | |
| | | function checkContract() {} |
| | | |
| | | function goDetail(item: API.GetEnterpriseEmployeesQueryResultItem) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.flexJobDetailFromManage}?enterpriseEmployeeId=${item.id}`, |
| | | }); |
| | | } |
| | | |
| | | function checkContract() {} |
| | | function goSignContract(item: API.GetNewestWorkerListOutput) { |
| | | async function handleUnsign(item: API.GetEnterpriseEmployeesQueryResultItem) { |
| | | try { |
| | | await Message.confirm({ message: '确定要解约吗?' }); |
| | | } catch (error) {} |
| | | } |
| | | function goFlexJobSign(item: API.GetEnterpriseEmployeesQueryResultItem) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.flexJobSign}`, |
| | | url: `${RouterPath.flexJobSign}?enterpriseEmployeeId=${item.id}`, |
| | | }); |
| | | } |
| | | </script> |
| | |
| | | import { useSystemStore } from '@/stores/modules/system'; |
| | | import PageLayoutWithBg from '@/components/Layout/PageLayoutWithBg.vue'; |
| | | import { toThousand } from '@12333/utils'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import * as authServices from '@12333/services/apiV2/auth'; |
| | | |
| | | const { userDetail, isCertified, updateUserInfo } = useUser(); |
| | | const isLogin = useIsLogin(); |
| | |
| | | const { queryState, infiniteLoadingProps } = useCheckReceiveTasks(); |
| | | |
| | | function goSubmitTaskDetail(item: API.GetCheckReceiveTasksQueryResultItem) { |
| | | console.log('queryState.date: ', queryState.date); |
| | | if (Number(queryState.checkReceiveStatus) === EnumTaskCheckReceiveStatus.WaitSubmit) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.taskSubmitCheck}?id=${item.id}&date=${queryState.date}`, |
| | |
| | | </div> |
| | | </div> |
| | | <div class="task-card-time"> |
| | | {{ dayjs(beginTime).format('YYYY年MM月DD日') }}至{{ |
| | | dayjs(endTime).format('YYYY年MM月DD日') |
| | | }} |
| | | {{ dayjs(beginTime).format('YYYY年MM月D日') }}至{{ dayjs(endTime).format('YYYY年MM月D日') }} |
| | | </div> |
| | | </slot> |
| | | <div class="task-card-footer"> |
| | |
| | | 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 { |