From 472f504e9c29cd592ee2e25b023892bfa17e4143 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期五, 22 八月 2025 14:22:55 +0800
Subject: [PATCH] fix: 签约

---
 src/services/api/enterpriseEmployee.ts |   18 ++++
 src/services/api/index.ts              |    8 +-
 .eslintrc-auto-import.json             |    1 
 src/services/api/electronSign.ts       |   50 ++++++++++++
 src/services/api/typings.d.ts          |  133 +++++++++++++++++++++++++++-----
 auto-imports.d.ts                      |    3 
 src/constants/apiEnum.ts               |    4 +
 src/hooks/electronSign.ts              |   19 ++++
 src/hooks/index.ts                     |    1 
 9 files changed, 211 insertions(+), 26 deletions(-)

diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json
index 4dc8632..4646e5b 100644
--- a/.eslintrc-auto-import.json
+++ b/.eslintrc-auto-import.json
@@ -221,6 +221,7 @@
     "useCssModule": true,
     "useCssVars": true,
     "useDictionaryDataSelect": true,
+    "useEnabledElectronSignSettings": true,
     "useGetDictionaryCategorySelect": true,
     "useGlobalEventContext": true,
     "useGlobalEventProvide": true,
diff --git a/auto-imports.d.ts b/auto-imports.d.ts
index 17e4ef2..b902105 100644
--- a/auto-imports.d.ts
+++ b/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']>
diff --git a/src/constants/apiEnum.ts b/src/constants/apiEnum.ts
index 687a584..bd799b6 100644
--- a/src/constants/apiEnum.ts
+++ b/src/constants/apiEnum.ts
@@ -331,6 +331,10 @@
   Pass = 20,
   /**宸叉嫆绛� */
   Refuse = 30,
+  /**鐢熸晥涓� */
+  Effect = 40,
+  /**宸茬粓姝� */
+  Stop = 50,
 }
 
 /** 浠诲姟楠屾敹鐘舵�� */
diff --git a/src/hooks/electronSign.ts b/src/hooks/electronSign.ts
new file mode 100644
index 0000000..e988868
--- /dev/null
+++ b/src/hooks/electronSign.ts
@@ -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,
+  };
+}
diff --git a/src/hooks/index.ts b/src/hooks/index.ts
index b4cd58c..90173c1 100644
--- a/src/hooks/index.ts
+++ b/src/hooks/index.ts
@@ -9,3 +9,4 @@
 export * from './dic';
 export * from './menu';
 export * from './portraitTable';
+export * from './electronSign';
diff --git a/src/services/api/electronSign.ts b/src/services/api/electronSign.ts
index 7e0325b..85afa6b 100644
--- a/src/services/api/electronSign.ts
+++ b/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(
+  // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟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 || {}),
+  });
+}
diff --git a/src/services/api/enterpriseEmployee.ts b/src/services/api/enterpriseEmployee.ts
index dfe7822..9127494 100644
--- a/src/services/api/enterpriseEmployee.ts
+++ b/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,
diff --git a/src/services/api/index.ts b/src/services/api/index.ts
index 2973753..7c7dd5e 100644
--- a/src/services/api/index.ts
+++ b/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,
diff --git a/src/services/api/typings.d.ts b/src/services/api/typings.d.ts
index b17cf14..4e3e2ad 100644
--- a/src/services/api/typings.d.ts
+++ b/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;
+    /** 涓�鍙d环 */
+    mergeSignCost?: number;
+  }
+
   interface GetEnterpriseContractTemplateLogsQuery {
     /** 妯℃澘Id */
     id?: string;
@@ -2435,13 +2498,27 @@
   interface GetEnterpriseElectronSignSettingQueryResult {
     /** Id */
     id?: string;
-    realAccess?: EnumRealAccess;
-    /** 瀹炲悕璐圭敤 */
-    realVerifyCost?: number;
-    /** 绛剧害璐圭敤 */
-    signCost?: number;
-    /** 涓�鍙d环 */
-    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;
-    /** 涓�鍙d环 */
-    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;
+    /** 涓�鍙d环 */
+    mergeSignCost?: number;
+  }
+
   interface SyncEnterpriseUserCommand {
     dataSource?: EnumDataSource;
     /** 鏁版嵁鏉ユ簮Id */
@@ -4553,13 +4642,9 @@
     bankCard?: string;
     /** 鏄惁宸叉牎楠岄摱琛岃处鎴� */
     isCheckedBankCard?: boolean;
+    /** 鐢靛瓙绛鹃�氶亾 */
+    electronSignAccesses?: EnumElectronSignAccess[];
     realAccess?: EnumRealAccess;
-    /** 瀹炲悕璐圭敤 */
-    realVerifyCost?: number;
-    /** 绛剧害璐圭敤 */
-    signCost?: number;
-    /** 涓�鍙d环 */
-    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>;

--
Gitblit v1.9.1