zhengyiming
12 小时以前 472f504e9c29cd592ee2e25b023892bfa17e4143
fix: 签约
1个文件已添加
8个文件已修改
237 ■■■■ 已修改文件
.eslintrc-auto-import.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
auto-imports.d.ts 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/constants/apiEnum.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/hooks/electronSign.ts 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/hooks/index.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/electronSign.ts 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/enterpriseEmployee.ts 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/index.ts 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/typings.d.ts 133 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.eslintrc-auto-import.json
@@ -221,6 +221,7 @@
    "useCssModule": true,
    "useCssVars": true,
    "useDictionaryDataSelect": true,
    "useEnabledElectronSignSettings": true,
    "useGetDictionaryCategorySelect": true,
    "useGlobalEventContext": true,
    "useGlobalEventProvide": true,
auto-imports.d.ts
@@ -222,6 +222,7 @@
  const toValue: typeof import('vue')['toValue']
  const triggerRef: typeof import('vue')['triggerRef']
  const unref: typeof import('vue')['unref']
  const useAA: typeof import('./src/hooks/electronSign')['useAA']
  const useAccess: typeof import('./src/hooks/useAccess')['useAccess']
  const useAllAreaList: typeof import('./src/hooks/dic')['useAllAreaList']
  const useAllRoleList: typeof import('./src/hooks/useUser')['useAllRoleList']
@@ -233,6 +234,7 @@
  const useCssModule: typeof import('vue')['useCssModule']
  const useCssVars: typeof import('vue')['useCssVars']
  const useDictionaryDataSelect: typeof import('./src/hooks/dic')['useDictionaryDataSelect']
  const useEnabledElectronSignSettings: typeof import('./src/hooks/electronSign')['useEnabledElectronSignSettings']
  const useGetDictionaryCategorySelect: typeof import('./src/hooks/dic')['useGetDictionaryCategorySelect']
  const useGlobalEventContext: typeof import('./src/hooks/useEvent')['useGlobalEventContext']
  const useGlobalEventProvide: typeof import('./src/hooks/useEvent')['useGlobalEventProvide']
@@ -511,6 +513,7 @@
    readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
    readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
    readonly useDictionaryDataSelect: UnwrapRef<typeof import('./src/hooks/dic')['useDictionaryDataSelect']>
    readonly useEnabledElectronSignSettings: UnwrapRef<typeof import('./src/hooks/electronSign')['useEnabledElectronSignSettings']>
    readonly useGetDictionaryCategorySelect: UnwrapRef<typeof import('./src/hooks/dic')['useGetDictionaryCategorySelect']>
    readonly useGlobalEventContext: UnwrapRef<typeof import('./src/hooks/useEvent')['useGlobalEventContext']>
    readonly useGlobalEventProvide: UnwrapRef<typeof import('./src/hooks/useEvent')['useGlobalEventProvide']>
src/constants/apiEnum.ts
@@ -331,6 +331,10 @@
  Pass = 20,
  /**已拒签 */
  Refuse = 30,
  /**生效中 */
  Effect = 40,
  /**已终止 */
  Stop = 50,
}
/** 任务验收状态 */
src/hooks/electronSign.ts
New file
@@ -0,0 +1,19 @@
import { useQuery, useQueryClient } from '@tanstack/vue-query';
import * as electronSignServices from '@/services/api/electronSign';
export function useEnabledElectronSignSettings() {
  const { data } = useQuery({
    queryKey: ['electronSignServices/getEnabledElectronSignSettings'],
    queryFn: async () => {
      let res = await electronSignServices.getEnabledElectronSignSettings(
        {},
        { showLoading: false }
      );
      return res;
    },
    placeholderData: () => [] as API.GetEnabledElectronSignSettingsQueryResultItem[],
  });
  return {
    enabledElectronSignSettings: data,
  };
}
src/hooks/index.ts
@@ -9,3 +9,4 @@
export * from './dic';
export * from './menu';
export * from './portraitTable';
export * from './electronSign';
src/services/api/electronSign.ts
@@ -2,6 +2,21 @@
// @ts-ignore
import { request } from '@/utils/request';
/** 校验电子签通道是否启用 POST /api/user/electronSign/checkElectronSignAccessEnableds */
export async function checkElectronSignAccessEnableds(
  body: API.CheckElectronSignAccessEnabledsCommand,
  options?: API.RequestConfig
) {
  return request<boolean>('/api/user/electronSign/checkElectronSignAccessEnableds', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json-patch+json',
    },
    data: body,
    ...(options || {}),
  });
}
/** 电子签回传 POST /api/user/electronSign/electronSignCallback */
export async function electronSignCallback(
  body: API.ElectronSignCallbackCommand,
@@ -45,6 +60,26 @@
        'Content-Type': 'application/json-patch+json',
      },
      data: body,
      ...(options || {}),
    }
  );
}
/** 查询已启用的电子签配置 GET /api/user/electronSign/getEnabledElectronSignSettings */
export async function getEnabledElectronSignSettings(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.APIgetEnabledElectronSignSettingsParams,
  options?: API.RequestConfig
) {
  return request<API.GetEnabledElectronSignSettingsQueryResultItem[]>(
    '/api/user/electronSign/getEnabledElectronSignSettings',
    {
      method: 'GET',
      params: {
        ...params,
        request: undefined,
        ...params['request'],
      },
      ...(options || {}),
    }
  );
@@ -195,3 +230,18 @@
    ...(options || {}),
  });
}
/** 同步电子签配置 POST /api/user/electronSign/syncElectronSignSettings */
export async function syncElectronSignSettings(
  body: API.SyncElectronSignSettingsCommand,
  options?: API.RequestConfig
) {
  return request<boolean>('/api/user/electronSign/syncElectronSignSettings', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json-patch+json',
    },
    data: body,
    ...(options || {}),
  });
}
src/services/api/enterpriseEmployee.ts
@@ -35,6 +35,24 @@
  );
}
/** 查询个人用户签约列表 POST /api/user/enterpriseEmployee/getEnterpriseEmployeeElectronSigns */
export async function getEnterpriseEmployeeElectronSigns(
  body: API.GetEnterpriseEmployeeElectronSignsQuery,
  options?: API.RequestConfig
) {
  return request<API.GetEnterpriseEmployeeElectronSignsQueryResult>(
    '/api/user/enterpriseEmployee/getEnterpriseEmployeeElectronSigns',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json-patch+json',
      },
      data: body,
      ...(options || {}),
    }
  );
}
/** 查询灵工分页列表数据 POST /api/user/enterpriseEmployee/getEnterpriseEmployees */
export async function getEnterpriseEmployees(
  body: API.GetEnterpriseEmployeesQuery,
src/services/api/index.ts
@@ -5,16 +5,16 @@
import * as enterpriseEmployee from './enterpriseEmployee';
import * as user from './user';
import * as role from './role';
import * as ocrUtils from './ocrUtils';
import * as enterprise from './enterprise';
import * as electronSign from './electronSign';
import * as resource from './resource';
import * as task from './task';
import * as dictionary from './dictionary';
import * as electronSign from './electronSign';
import * as userResume from './userResume';
import * as auth from './auth';
import * as taskCheckReceive from './taskCheckReceive';
import * as taskUser from './taskUser';
import * as ocrUtils from './ocrUtils';
import * as menu from './menu';
import * as logRecords from './logRecords';
import * as fileUtils from './fileUtils';
@@ -22,16 +22,16 @@
  enterpriseEmployee,
  user,
  role,
  ocrUtils,
  enterprise,
  electronSign,
  resource,
  task,
  dictionary,
  electronSign,
  userResume,
  auth,
  taskCheckReceive,
  taskUser,
  ocrUtils,
  menu,
  logRecords,
  fileUtils,
src/services/api/typings.d.ts
@@ -66,6 +66,11 @@
    withChildren?: boolean;
  }
  interface APIgetEnabledElectronSignSettingsParams {
    /** 查询已启用的电子签配置 */
    request?: GetEnabledElectronSignSettingsQuery;
  }
  interface APIgetEnterpriseElectronSignSettingParams {
    /** Id */
    id?: string;
@@ -276,6 +281,11 @@
    phoneNumber: string;
    /** 验证码 */
    verifyCode: string;
  }
  interface CheckElectronSignAccessEnabledsCommand {
    /** 通道 */
    accesses?: EnumElectronSignAccess[];
  }
  type CheckHealthQuery = Record<string, any>;
@@ -660,6 +670,10 @@
    Pass = 20,
    /**已拒签 */
    Refuse = 30,
    /**生效中 */
    Effect = 40,
    /**已终止 */
    Stop = 50,
  }
  enum EnumTaskUserSubmitCheckReceiveStatus {
@@ -935,6 +949,24 @@
    /** 错误码 */
    errorCode?: string;
    data?: GetEnterpriseElectronSignSettingQueryResult;
    /** 执行成功 */
    success?: boolean;
    /** 错误信息 */
    msg?: any;
    /** 附加数据 */
    extras?: any;
    /** 时间戳 */
    timestamp?: number;
  }
  interface FriendlyResultGetEnterpriseEmployeeElectronSignsQueryResult {
    /** 跟踪Id */
    traceId?: string;
    /** 状态码 */
    code?: number;
    /** 错误码 */
    errorCode?: string;
    data?: GetEnterpriseEmployeeElectronSignsQueryResult;
    /** 执行成功 */
    success?: boolean;
    /** 错误信息 */
@@ -1586,6 +1618,25 @@
    errorCode?: string;
    /** 数据 */
    data?: GetAreaSelectQueryResultOption[];
    /** 执行成功 */
    success?: boolean;
    /** 错误信息 */
    msg?: any;
    /** 附加数据 */
    extras?: any;
    /** 时间戳 */
    timestamp?: number;
  }
  interface FriendlyResultListGetEnabledElectronSignSettingsQueryResultItem {
    /** 跟踪Id */
    traceId?: string;
    /** 状态码 */
    code?: number;
    /** 错误码 */
    errorCode?: string;
    /** 数据 */
    data?: GetEnabledElectronSignSettingsQueryResultItem[];
    /** 执行成功 */
    success?: boolean;
    /** 错误信息 */
@@ -2362,6 +2413,18 @@
    isDisabled?: boolean;
  }
  type GetEnabledElectronSignSettingsQuery = Record<string, any>;
  interface GetEnabledElectronSignSettingsQueryResultItem {
    access?: EnumElectronSignAccess;
    /** 实名费用 */
    realVerifyCost?: number;
    /** 签约费用 */
    signCost?: number;
    /** 一口价 */
    mergeSignCost?: number;
  }
  interface GetEnterpriseContractTemplateLogsQuery {
    /** 模板Id */
    id?: string;
@@ -2435,13 +2498,27 @@
  interface GetEnterpriseElectronSignSettingQueryResult {
    /** Id */
    id?: string;
    realAccess?: EnumRealAccess;
    /** 实名费用 */
    realVerifyCost?: number;
    /** 签约费用 */
    signCost?: number;
    /** 一口价 */
    mergeSignCost?: number;
    /** 电子签通道 */
    electronSignAccesses?: EnumElectronSignAccess[];
  }
  interface GetEnterpriseEmployeeElectronSignsQuery {
    userSignContractStatus?: EnumTaskUserSignContractStatus;
    pageModel?: PagedListQueryPageModel;
  }
  interface GetEnterpriseEmployeeElectronSignsQueryResult {
    pageModel?: PagedListQueryResultPageModel;
    /** 数据 */
    data?: GetEnterpriseEmployeeElectronSignsQueryResultItem[];
  }
  interface GetEnterpriseEmployeeElectronSignsQueryResultItem {
    /** Id */
    id?: string;
    /** 企业全称 */
    enterpriseName?: string;
    userSignContractStatus?: EnumTaskUserSignContractStatus;
  }
  interface GetEnterpriseEmployeeQueryResult {
@@ -4404,13 +4481,8 @@
  interface SetEnterpriseElectronSignSettingCommand {
    /** Id */
    id?: string;
    realAccess?: EnumRealAccess;
    /** 实名费用 */
    realVerifyCost?: number;
    /** 签约费用 */
    signCost?: number;
    /** 一口价 */
    mergeSignCost?: number;
    /** 电子签通道 */
    electronSignAccesses?: EnumElectronSignAccess[];
  }
  interface SetEnterpriseSmsSettingCommand {
@@ -4505,6 +4577,23 @@
    files?: string[];
  }
  interface SyncElectronSignSettingsCommand {
    /** 项 */
    items?: SyncElectronSignSettingsCommandItem[];
  }
  interface SyncElectronSignSettingsCommandItem {
    access?: EnumElectronSignAccess;
    /** 是否禁用 */
    isDisabled?: boolean;
    /** 实名费用 */
    realVerifyCost?: number;
    /** 签约费用 */
    signCost?: number;
    /** 一口价 */
    mergeSignCost?: number;
  }
  interface SyncEnterpriseUserCommand {
    dataSource?: EnumDataSource;
    /** 数据来源Id */
@@ -4553,13 +4642,9 @@
    bankCard?: string;
    /** 是否已校验银行账户 */
    isCheckedBankCard?: boolean;
    /** 电子签通道 */
    electronSignAccesses?: EnumElectronSignAccess[];
    realAccess?: EnumRealAccess;
    /** 实名费用 */
    realVerifyCost?: number;
    /** 签约费用 */
    signCost?: number;
    /** 一口价 */
    mergeSignCost?: number;
    /** 是否实名 */
    isReal?: boolean;
    enterpriseAuth?: SyncEnterpriseUserCommandEnterpriseAuth;
@@ -4568,6 +4653,10 @@
  interface SyncEnterpriseUserCommandEnterpriseAuth {
    enterpriseRealMethod?: EnumEnterpriseRealMethod;
    personalRealMethod?: EnumPersonalRealMethod;
    /** 法人姓名 */
    legalPerson?: string;
    /** 法人身份证号 */
    legalIdentity?: string;
    /** 法人或经办人姓名 */
    name?: string;
    /** 法人或经办人身份证号 */
@@ -4586,8 +4675,8 @@
    proxy?: boolean;
    /** 企业授权书 */
    proxyPowerAttorneyUrl?: string;
    /** 实名Id */
    realId?: string;
    /** 第三方实名通道账号 */
    certAccount?: string;
  }
  type SyncHumanResourcesAreaDictionaryDataCommand = Record<string, any>;