wupengfei
5 天以前 8e9fdc197e808aa5748d9f0ddbb2f6a8df38cbb6
packages/hooks/enterprise.ts
@@ -1,5 +1,6 @@
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 = {
@@ -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 };
}