From 7a854943c88e9eddcbb9614b95b2e4fc03286e1e Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期五, 31 十月 2025 13:52:12 +0800
Subject: [PATCH] fix: bug
---
packages/hooks/enterprise.ts | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/packages/hooks/enterprise.ts b/packages/hooks/enterprise.ts
index 3217a6b..d399944 100644
--- a/packages/hooks/enterprise.ts
+++ b/packages/hooks/enterprise.ts
@@ -1,4 +1,5 @@
import { useQuery, useQueryClient } from '@tanstack/vue-query';
+import * as taskServices from '@12333/services/apiV2/task';
import * as enterpriseServices from '@12333/services/apiV2/enterprise';
import { MaybeRef, unref } from 'vue';
@@ -8,16 +9,16 @@
export function useEnterpriseDetail({ id }: UseEnterpriseDetailOptions) {
const { data, refetch, isLoading, isError } = useQuery({
- queryKey: ['enterpriseServices/getEnterprise', id],
+ queryKey: ['taskServices/getTaskEnterprise', id],
queryFn: async () => {
- return await enterpriseServices.getEnterprise(
+ return await taskServices.getTaskEnterprise(
{ id: unref(id) },
{
showLoading: false,
}
);
},
- placeholderData: () => ({} as API.GetEnterpriseQueryResult),
+ placeholderData: () => ({} as API.GetTaskEnterpriseQueryResult),
});
return {
@@ -27,3 +28,22 @@
isError,
};
}
+
+export function useGetSupplierEnterpriseSelect() {
+ const queryClient = useQueryClient();
+
+ const { data: supplierEnterpriseSelect } = useQuery({
+ queryKey: ['enterpriseServices/getSupplierEnterpriseSelect'],
+ queryFn: () => {
+ return enterpriseServices.getSupplierEnterpriseSelect(
+ {},
+ {
+ showLoading: false,
+ }
+ );
+ },
+ placeholderData: () => [] as API.SelectOptionGuidGetSupplierEnterpriseSelectQueryOption[],
+ });
+
+ return { supplierEnterpriseSelect };
+}
--
Gitblit v1.9.1