From 169d64d8ac756e5dde85afc5673cf17aa890c8ce Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期五, 31 十月 2025 17:39:04 +0800
Subject: [PATCH] fix: bug

---
 packages/hooks/enterprise.ts |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/packages/hooks/enterprise.ts b/packages/hooks/enterprise.ts
index 308786e..a4bacd2 100644
--- a/packages/hooks/enterprise.ts
+++ b/packages/hooks/enterprise.ts
@@ -1,17 +1,19 @@
 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';
 
 type UseEnterpriseDetailOptions = {
   id: MaybeRef<string>;
+  supplierEnterpriseId?: MaybeRef<string>;
 };
 
-export function useEnterpriseDetail({ id }: UseEnterpriseDetailOptions) {
+export function useEnterpriseDetail({ id, supplierEnterpriseId }: UseEnterpriseDetailOptions) {
   const { data, refetch, isLoading, isError } = useQuery({
     queryKey: ['taskServices/getTaskEnterprise', id],
     queryFn: async () => {
       return await taskServices.getTaskEnterprise(
-        { id: unref(id) },
+        { id: unref(id), supplierEnterpriseId: unref(supplierEnterpriseId) },
         {
           showLoading: false,
         }
@@ -27,3 +29,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