From 32530fa4e41323504cee7c1fbabab869ab5719dd Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期一, 03 十一月 2025 16:36:05 +0800
Subject: [PATCH] release: @12333/bMiniApp v1.1.11
---
packages/hooks/enterprise.ts | 31 ++++++++++++++++++++++++++-----
1 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/packages/hooks/enterprise.ts b/packages/hooks/enterprise.ts
index 3217a6b..a4bacd2 100644
--- a/packages/hooks/enterprise.ts
+++ b/packages/hooks/enterprise.ts
@@ -1,23 +1,25 @@
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: ['enterpriseServices/getEnterprise', id],
+ queryKey: ['taskServices/getTaskEnterprise', id],
queryFn: async () => {
- return await enterpriseServices.getEnterprise(
- { id: unref(id) },
+ return await taskServices.getTaskEnterprise(
+ { id: unref(id), supplierEnterpriseId: unref(supplierEnterpriseId) },
{
showLoading: false,
}
);
},
- placeholderData: () => ({} as API.GetEnterpriseQueryResult),
+ placeholderData: () => ({} as API.GetTaskEnterpriseQueryResult),
});
return {
@@ -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