| | |
| | | @click="goToSign" |
| | | v-if=" |
| | | enterpriseEmployeeInfo.userSignContractStatus === EnumTaskUserSignContractStatus.Wait || |
| | | enterpriseEmployeeInfo.userSignContractStatus === EnumTaskUserSignContractStatus.Refuse |
| | | enterpriseEmployeeInfo.userSignContractStatus === |
| | | EnumTaskUserSignContractStatus.Refuse || |
| | | !enterpriseEmployeeInfo.userSignContractStatus |
| | | " |
| | | >签约</PageFooterBtn |
| | | > |
| | |
| | | import Taro from '@tarojs/taro'; |
| | | 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({ |
| | |
| | | async function handleUnsign() { |
| | | try { |
| | | await Message.confirm({ message: '确定要解约吗?' }); |
| | | let params: API.StopElectronSignCommand = { |
| | | id: enterpriseEmployeeInfo.value?.id, |
| | | }; |
| | | let res = await enterpriseEmployeeServices.stopElectronSign(params); |
| | | if (res) { |
| | | Message.success('解约成功'); |
| | | refetch(); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | </script> |
| | |
| | | > |
| | | <ProTabPane :title="`已签约`" :pane-key="EnumTaskUserSignContractStatus.Pass"></ProTabPane> |
| | | <ProTabPane :title="`待签约`" :pane-key="EnumTaskUserSignContractStatus.Wait"></ProTabPane> |
| | | <ProTabPane :title="`已解约`" :pane-key="EnumTaskUserSignContractStatus.Refuse"></ProTabPane> |
| | | <ProTabPane :title="`已解约`" :pane-key="EnumTaskUserSignContractStatus.Stop"></ProTabPane> |
| | | </ProTabs> |
| | | <InfiniteLoading |
| | | scrollViewClassName="common-infinite-scroll-list home-list" |
| | |
| | | <nut-button |
| | | v-else-if=" |
| | | Number(queryState.userSignContractStatus) === EnumTaskUserSignContractStatus.Wait || |
| | | Number(queryState.userSignContractStatus) === EnumTaskUserSignContractStatus.Refuse |
| | | Number(queryState.userSignContractStatus) === EnumTaskUserSignContractStatus.Stop |
| | | " |
| | | type="primary" |
| | | @click.stop="goFlexJobSign(item)" |
| | |
| | | }); |
| | | }, |
| | | { |
| | | queryKey: ['flexWorkerServices/getFlexTaskByArrange'], |
| | | queryKey: ['flexWorkerServices/getFlexTaskByArrange', queryState], |
| | | } |
| | | ); |
| | | |
| | |
| | | import * as userServices from '@12333/services/api/User'; |
| | | import * as electronSignServices from '@12333/services/apiV2/electronSign'; |
| | | import { useQuery, useQueryClient } from '@tanstack/vue-query'; |
| | | import { getUserCertificationFrontStatusAdapter } from '@12333/utils'; |
| | | import { UserCertificationFrontStatus } from '@12333/constants'; |
| | | import { useUser } from './user'; |
| | | |
| | | type UseMyCertificationAuditInfoOptions = { |
| | | onSuccess?: (data: API.MyCertificationAuditDto) => void; |
| | | onSuccess?: (data: API.GetPersonalUserRealResultQueryResult) => void; |
| | | }; |
| | | |
| | | export function useMyCertificationAuditInfo(options: UseMyCertificationAuditInfoOptions = {}) { |
| | |
| | | const queryClient = useQueryClient(); |
| | | |
| | | const { data, isLoading } = useQuery({ |
| | | queryKey: ['userServices/getMyCertificationAuditInfo'], |
| | | queryKey: ['electronSignServices/getPersonalUserRealResult'], |
| | | queryFn: async () => { |
| | | return await userServices.getMyCertificationAuditInfo({ showLoading: false }); |
| | | return await electronSignServices.getPersonalUserRealResult({}, { showLoading: false }); |
| | | }, |
| | | placeholderData: () => null as API.MyCertificationAuditDto, |
| | | placeholderData: () => null as API.GetPersonalUserRealResultQueryResult, |
| | | select(data) { |
| | | if (data) { |
| | | data.frontStatus = getUserCertificationFrontStatusAdapter(data.status, data.auditStatus); |
| | | } |
| | | return data; |
| | | }, |
| | | onSuccess(data) { |
| | |
| | | }, |
| | | }); |
| | | |
| | | /** |
| | | * 是否有审核单 |
| | | */ |
| | | const hasAduit = computed(() => { |
| | | return data && !!data.value?.currentUserCertificationAuditId; |
| | | }); |
| | | |
| | | const isCertified = computed( |
| | | () => data?.value?.frontStatus === UserCertificationFrontStatus.Certified |
| | | ); |
| | | const isExpired = computed( |
| | | () => data?.value?.frontStatus === UserCertificationFrontStatus.Expired |
| | | ); |
| | | |
| | | function invalidateCertificationAuditInfo() { |
| | | updateUserInfo(); |
| | | return queryClient.invalidateQueries({ |
| | | queryKey: ['userServices/getMyCertificationAuditInfo'], |
| | | queryKey: ['electronSignServices/getPersonalUserRealResult'], |
| | | }); |
| | | } |
| | | |
| | | function ensureCertificationAuditInfo() { |
| | | return queryClient.ensureQueryData({ |
| | | queryKey: ['userServices/getMyCertificationAuditInfo'], |
| | | queryKey: ['electronSignServices/getPersonalUserRealResult'], |
| | | }); |
| | | } |
| | | |
| | | return { |
| | | myCertificationAuditInfo: data, |
| | | isLoading, |
| | | hasAduit, |
| | | invalidateCertificationAuditInfo, |
| | | isCertified, |
| | | isExpired, |
| | | ensureCertificationAuditInfo, |
| | | }; |
| | | } |
| | |
| | | <template> |
| | | <LoadingLayout :loading="isLoading"> |
| | | <div |
| | | class="result-wrapper" |
| | | v-if="myCertificationAuditInfo?.frontStatus === UserCertificationFrontStatus.NotCertified" |
| | | > |
| | | <!-- <div class="result-wrapper" v-if="!myCertificationAuditInfo?.isReal"> |
| | | <div class="result-title">未认证</div> |
| | | </div> |
| | | <div |
| | | class="result-wrapper" |
| | | v-else-if="myCertificationAuditInfo?.frontStatus === UserCertificationFrontStatus.Certified" |
| | | > |
| | | </div> --> |
| | | <div class="result-wrapper" v-if="myCertificationAuditInfo?.isReal"> |
| | | <img class="result-icon" :src="IconSuccess" /> |
| | | <div class="result-title">认证成功</div> |
| | | <div class="result-subtitle">您的实名已认证成功</div> |
| | |
| | | >返回个人中心</PageFooterBtn |
| | | > |
| | | </div> |
| | | <div |
| | | class="result-wrapper" |
| | | v-else-if="myCertificationAuditInfo?.frontStatus === UserCertificationFrontStatus.Rejected" |
| | | > |
| | | <div class="result-wrapper" v-else> |
| | | <img class="result-icon" :src="IconError" /> |
| | | <div class="result-title">认证失败</div> |
| | | <div class="result-subtitle">您的实名认证失败</div> |
| | | <div class="result-subtitle">失败原因:{{ myCertificationAuditInfo?.auditNote ?? '' }}</div> |
| | | <div class="result-subtitle"> |
| | | 失败原因:{{ myCertificationAuditInfo?.realFailMessage ?? '' }} |
| | | </div> |
| | | <PageFooterBtn type="primary" class="result-btn" @click="goBack()" |
| | | >重新提交认证</PageFooterBtn |
| | | > |
| | |
| | | |
| | | <script setup lang="ts"> |
| | | import { useMyCertificationAuditInfo, useSwitchTab } from '@/hooks'; |
| | | import Taro from '@tarojs/taro'; |
| | | import { goBack } from '@/utils'; |
| | | import IconSuccess from '@/assets/authentication/icon-result-success.png'; |
| | | import IconError from '@/assets/authentication/icon-result-error.png'; |
| | | import { UserCertificationFrontStatus } from '@12333/constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | |
| | | class="authenticationResult-page-wrapper" |
| | | hasBorder |
| | | :backFn="handleBack" |
| | | developing |
| | | > |
| | | <InnerPage /> |
| | | </PageLayout> |
| | |
| | | > |
| | | <ProTabPane :title="`全部`" :pane-key="0"></ProTabPane> |
| | | <ProTabPane :title="`待签约`" :pane-key="EnumTaskUserSignContractStatus.Wait"></ProTabPane> |
| | | <ProTabPane :title="`生效中`" :pane-key="EnumTaskUserSignContractStatus.Effect"></ProTabPane> |
| | | <ProTabPane :title="`生效中`" :pane-key="EnumTaskUserSignContractStatus.Pass"></ProTabPane> |
| | | <ProTabPane :title="`已终止`" :pane-key="EnumTaskUserSignContractStatus.Stop"></ProTabPane> |
| | | </ProTabs> |
| | | <InfiniteLoading |
| | |
| | | name: 'InnerPage', |
| | | }); |
| | | |
| | | const { userDetail } = useUser(); |
| | | const router = Taro.useRouter(); |
| | | const id = router.params?.id; |
| | | const code = router.params?.code; |
| | |
| | | data: detail, |
| | | refetch, |
| | | } = useQuery({ |
| | | queryKey: ['enterpriseEmployeeServices/getTaskInfo', id, code], |
| | | queryKey: ['enterpriseEmployeeServices/getPersonalUserElectronSign', id, code], |
| | | queryFn: async () => { |
| | | return await enterpriseEmployeeServices.getPersonalUserElectronSign( |
| | | { id: id, code: code }, |
| | |
| | | }); |
| | | } |
| | | |
| | | const goToSign = useAccessReal(() => {}); |
| | | const goToSign = useAccessReal(async () => { |
| | | try { |
| | | let params: API.PersonalUserElectronSignCommand = { |
| | | id: id, |
| | | }; |
| | | let res = await enterpriseEmployeeServices.personalUserElectronSign(params); |
| | | if (res) { |
| | | const encodedUrl = encodeURIComponent(res.signContractLongUrl); |
| | | Taro.navigateTo({ url: `${RouterPath.extraPage}?url=${encodedUrl}` }); |
| | | } |
| | | } catch (error) {} |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import * as taskServices from '@12333/services/apiV2/task'; |
| | | import * as taskUserServices from '@12333/services/apiV2/taskUser'; |
| | | import * as enterpriseEmployeeServices from '@12333/services/apiV2/enterpriseEmployee'; |
| | | import { useToggle } from 'senin-mini/hooks'; |
| | | import { TaskPrice, TaskDetailWelfareItem } from '@12333/components'; |
| | | import IconAttention from '@/assets/task/icon-attention.png'; |
| | |
| | | /** |
| | | * TODO 缺少 投诉举报接口 |
| | | */ |
| | | |
| | | const { userDetail } = useUser(); |
| | | const router = Taro.useRouter(); |
| | | const id = router.params?.id ?? ''; |
| | | const from = router.params?.from ?? ''; |
| | |
| | | url: `${RouterPath.taskSubmitCheck}?id=${id}`, |
| | | }); |
| | | } |
| | | function handleSign() { |
| | | // Taro.navigateTo({ |
| | | // url: `${RouterPath}?id=${id}`, |
| | | // }); |
| | | } |
| | | const handleSign = useAccessReal(() => { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.mineAgreementSignDetail}?id=${detail.value?.enterpriseEmployeeId}`, |
| | | }); |
| | | }); |
| | | |
| | | function goMap() { |
| | | Taro.openLocation({ |
| | |
| | | AlipaySign = 20, |
| | | } |
| | | |
| | | /** 企业用量扣费状态 */ |
| | | export enum EnumEnterpriseCostStatus { |
| | | /**扣费成功 */ |
| | | Success = 10, |
| | | /**扣费失败 */ |
| | | Fail = 20, |
| | | } |
| | | |
| | | /** 企业用量类型 */ |
| | | export enum EnumEnterpriseCostType { |
| | | /**短信 */ |
| | | SMS = 10, |
| | | /**电子签 */ |
| | | ElectronSign = 20, |
| | | } |
| | | |
| | | /** 企业实名方式 */ |
| | | export enum EnumEnterpriseRealMethod { |
| | | /**企业三要素 */ |
| | |
| | | Pass = 20, |
| | | /**已拒签 */ |
| | | Refuse = 30, |
| | | /**生效中 */ |
| | | Effect = 40, |
| | | /**已终止 */ |
| | | Stop = 50, |
| | | } |
| | |
| | | [EnumTaskUserSignContractStatus.Wait]: '待签约', |
| | | [EnumTaskUserSignContractStatus.Pass]: '已签约', |
| | | [EnumTaskUserSignContractStatus.Refuse]: '已拒签', |
| | | [EnumTaskUserSignContractStatus.Effect]: '生效中', |
| | | [EnumTaskUserSignContractStatus.Stop]: '已终止', |
| | | [EnumTaskUserSignContractStatus.Stop]: '已解约', |
| | | }; |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 保存企业费用 POST /api/user/enterprise/saveEnterpriseCost */ |
| | | export async function saveEnterpriseCost( |
| | | body: API.SaveEnterpriseCostCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/user/enterprise/saveEnterpriseCost', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 设置企业电子签配置 PUT /api/user/enterprise/setEnterpriseElectronSignSetting */ |
| | | export async function setEnterpriseElectronSignSetting( |
| | | body: API.SetEnterpriseElectronSignSettingCommand, |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 企业用户签约 POST /api/user/enterpriseEmployee/enterpriseUserElectronSign */ |
| | | export async function enterpriseUserElectronSign( |
| | | body: API.EnterpriseUserElectronSignCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.EnterpriseUserElectronSignCommandResult>( |
| | | '/api/user/enterpriseEmployee/enterpriseUserElectronSign', |
| | | { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | } |
| | | |
| | | /** 查询灵工详情 GET /api/user/enterpriseEmployee/getEnterpriseEmployee */ |
| | | export async function getEnterpriseEmployee( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 个人用户签约 POST /api/user/enterpriseEmployee/personalUserElectronSign */ |
| | | export async function personalUserElectronSign( |
| | | body: API.PersonalUserElectronSignCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.PersonalUserElectronSignCommandResult>( |
| | | '/api/user/enterpriseEmployee/personalUserElectronSign', |
| | | { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | } |
| | | |
| | | /** 灵工解约 POST /api/user/enterpriseEmployee/stopElectronSign */ |
| | | export async function stopElectronSign( |
| | | body: API.StopElectronSignCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/user/enterpriseEmployee/stopElectronSign', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | data?: any; |
| | | } |
| | | |
| | | interface EnterpriseUserElectronSignCommand { |
| | | /** 灵工Id */ |
| | | id?: string; |
| | | } |
| | | |
| | | interface EnterpriseUserElectronSignCommandResult { |
| | | /** 签署合同短链接 */ |
| | | signContractShortUrl?: string; |
| | | /** 签署合同长链接 */ |
| | | signContractLongUrl?: string; |
| | | } |
| | | |
| | | enum EnumBillingMethod { |
| | | /**按月 */ |
| | | Month = 10, |
| | |
| | | BestSign = 10, |
| | | /**支付宝信任签 */ |
| | | AlipaySign = 20, |
| | | } |
| | | |
| | | enum EnumEnterpriseCostStatus { |
| | | /**扣费成功 */ |
| | | Success = 10, |
| | | /**扣费失败 */ |
| | | Fail = 20, |
| | | } |
| | | |
| | | enum EnumEnterpriseCostType { |
| | | /**短信 */ |
| | | SMS = 10, |
| | | /**电子签 */ |
| | | ElectronSign = 20, |
| | | } |
| | | |
| | | enum EnumEnterpriseRealMethod { |
| | |
| | | Pass = 20, |
| | | /**已拒签 */ |
| | | Refuse = 30, |
| | | /**生效中 */ |
| | | Effect = 40, |
| | | /**已终止 */ |
| | | Stop = 50, |
| | | } |
| | |
| | | errorCode?: string; |
| | | /** 数据 */ |
| | | data?: boolean; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultEnterpriseUserElectronSignCommandResult { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: EnterpriseUserElectronSignCommandResult; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultPersonalUserElectronSignCommandResult { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: PersonalUserElectronSignCommandResult; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultString { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | |
| | | /** 提交Id */ |
| | | id?: string; |
| | | enterpriseEmployeeUser?: GetCheckReceiveTaskUserSubmitsQueryResultObjectDataEnterpriseEmployeeUser; |
| | | /** 验收时间 */ |
| | | date?: string; |
| | | /** 提交时间 */ |
| | | createdTime?: string; |
| | | /** 验收照片 */ |
| | |
| | | interface GetCheckReceiveTaskUserSubmitsQueryResultItem { |
| | | /** 提交Id */ |
| | | id?: string; |
| | | /** 验收时间 */ |
| | | date?: string; |
| | | /** 提交时间 */ |
| | | createdTime?: string; |
| | | /** 验收照片 */ |
| | |
| | | status?: EnumTaskStatus; |
| | | releaseStatus?: EnumTaskReleaseStatus; |
| | | hireStatus?: EnumTaskUserHireStatus; |
| | | /** 灵工Id */ |
| | | enterpriseEmployeeId?: string; |
| | | applyButton?: GetTaskInfoQueryResultApplyButton; |
| | | hireButton?: GetTaskInfoQueryResultHireButton; |
| | | } |
| | |
| | | clientType?: EnumClientType; |
| | | } |
| | | |
| | | interface PersonalUserElectronSignCommand { |
| | | /** 灵工Id */ |
| | | id?: string; |
| | | } |
| | | |
| | | interface PersonalUserElectronSignCommandResult { |
| | | /** 签署合同短链接 */ |
| | | signContractShortUrl?: string; |
| | | /** 签署合同长链接 */ |
| | | signContractLongUrl?: string; |
| | | } |
| | | |
| | | interface PersonalUserFaceRealCommand { |
| | | /** 姓名 */ |
| | | name: string; |
| | |
| | | password?: string; |
| | | /** Id */ |
| | | id?: string; |
| | | } |
| | | |
| | | interface SaveEnterpriseCostCommand { |
| | | /** 企业Id */ |
| | | enterpriseId?: string; |
| | | type?: EnumEnterpriseCostType; |
| | | /** 合同模板Id */ |
| | | contractTemplateId?: string; |
| | | /** 灵工合同Id */ |
| | | enterpriseEmployeeContractId?: string; |
| | | status?: EnumEnterpriseCostStatus; |
| | | } |
| | | |
| | | interface SaveMenuButtonCommand { |
| | |
| | | clientType?: EnumClientType; |
| | | } |
| | | |
| | | interface StopElectronSignCommand { |
| | | /** 灵工Id */ |
| | | id?: string; |
| | | } |
| | | |
| | | interface SubmitCheckReceiveTaskCommand { |
| | | /** 任务Id */ |
| | | taskInfoId?: string; |