From 92b51e47eb0e53e1e8e13aa0f9135603e1bb03a0 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期日, 19 十月 2025 14:38:36 +0800
Subject: [PATCH] fix: 验收管理
---
packages/hooks/setting.ts | 80 +++++++++++++++++++++++-----------------
1 files changed, 46 insertions(+), 34 deletions(-)
diff --git a/packages/hooks/setting.ts b/packages/hooks/setting.ts
index 3d6925c..8830255 100644
--- a/packages/hooks/setting.ts
+++ b/packages/hooks/setting.ts
@@ -1,6 +1,5 @@
-import * as settingServices from '@12333/services/api/Setting';
import { useQuery } from '@tanstack/vue-query';
-import { MaybeRef, Ref, unref } from 'vue';
+import { MaybeRef, Ref, unref, ref } from 'vue';
import { BusinessSettingType, TempFolderPath } from '@12333/constants';
type UseBusinessSettingByTypeOptions<T extends object = object, TData = T> = {
@@ -8,30 +7,30 @@
select?: (data: T) => TData;
};
-export function useBusinessSettingByType<T extends object = object, TData = T>(
- options: UseBusinessSettingByTypeOptions = {}
-) {
- const { type, select } = options;
+// export function useBusinessSettingByType<T extends object = object, TData = T>(
+// options: UseBusinessSettingByTypeOptions = {}
+// ) {
+// const { type, select } = options;
- const { data: businessSetting } = useQuery({
- queryKey: ['settingServices/getBusinessSettingByType', type],
- queryFn: async () => {
- return await settingServices.getBusinessSettingByType(
- {
- type: unref(type),
- },
- { showLoading: false }
- );
- },
- placeholderData: () => ({} as T),
- staleTime: Infinity,
- select,
- });
+// const { data: businessSetting } = useQuery({
+// queryKey: ['settingServices/getBusinessSettingByType', type],
+// queryFn: async () => {
+// return await settingServices.getBusinessSettingByType(
+// {
+// type: unref(type),
+// },
+// { showLoading: false }
+// );
+// },
+// placeholderData: () => ({} as T),
+// staleTime: Infinity,
+// select,
+// });
- return {
- businessSetting: businessSetting as Ref<TData>,
- };
-}
+// return {
+// businessSetting: businessSetting as Ref<TData>,
+// };
+// }
type UserCertificationSetting = {
enterprisePowerAttorneyTempPath: string;
@@ -46,17 +45,30 @@
};
export function useUserCertificationSetting() {
- const { businessSetting } = useBusinessSettingByType<UserCertificationSetting>({
- type: BusinessSettingType.UserCertification,
- select(data: any) {
- return {
- ...data,
- enterprisePowerAttorneyTempPath: `${TempFolderPath}${data.enterprisePowerAttorneyTempPath}`,
- idPhoteTempPath: `${TempFolderPath}${data.idPhoteTempPath}`,
- payAmount: data.userCertificationAmount,
- };
- },
+ // const { businessSetting } = useBusinessSettingByType<UserCertificationSetting>({
+ // type: BusinessSettingType.UserCertification,
+ // select(data: any) {
+ // return {
+ // ...data,
+ // enterprisePowerAttorneyTempPath: `${TempFolderPath}${data.enterprisePowerAttorneyTempPath}`,
+ // idPhoteTempPath: `${TempFolderPath}${data.idPhoteTempPath}`,
+ // payAmount: data.userCertificationAmount,
+ // };
+ // },
+ // });
+
+ const businessSetting = ref({
+ authenticationHelpUrl: '',
+ receivingAccount: '',
+ receivingCompanyName: '',
+ receivingBankName: '',
+ offlinePayEndTime: '',
+ offlinePayEndDays: 1,
+ enterprisePowerAttorneyTempPath: `${TempFolderPath}`,
+ idPhoteTempPath: `${TempFolderPath}`,
+ payAmount: 123,
});
+
return {
userCertificationSetting: businessSetting,
};
--
Gitblit v1.9.1