移除特殊费用模块

This commit is contained in:
Cheng Zhou
2026-05-12 10:15:18 +08:00
parent cd7e12ce1f
commit 6e90370a5f
30 changed files with 117 additions and 2819 deletions
-45
View File
@@ -1,45 +0,0 @@
import { apiDelete, apiGet, apiPatch, apiPost } from "./axios";
import type { FeeApiResponse } from "../types/api";
export interface SpecialExpensePayload {
project_id: string;
center_id?: string | null;
category: string;
amount: number;
happen_date?: string | null;
description?: string | null;
is_paid?: boolean;
paid_date?: string | null;
is_verified?: boolean;
verified_date?: string | null;
}
export interface SpecialExpenseUpdatePayload {
center_id?: string | null;
category?: string;
amount?: number;
happen_date?: string | null;
description?: string | null;
is_paid?: boolean;
paid_date?: string | null;
is_verified?: boolean;
verified_date?: string | null;
}
export const listSpecialExpenses = (params: {
projectId: string;
centerId?: string;
category?: string;
dateFrom?: string;
dateTo?: string;
}) => apiGet<FeeApiResponse<any[]>>("/api/v1/fees/special", { params });
export const getSpecialExpense = (expenseId: string) => apiGet<FeeApiResponse<any>>(`/api/v1/fees/special/${expenseId}`);
export const createSpecialExpense = (payload: SpecialExpensePayload) =>
apiPost<FeeApiResponse<any>>("/api/v1/fees/special", payload);
export const updateSpecialExpense = (expenseId: string, payload: SpecialExpenseUpdatePayload) =>
apiPatch<FeeApiResponse<any>>(`/api/v1/fees/special/${expenseId}`, payload);
export const deleteSpecialExpense = (expenseId: string) => apiDelete(`/api/v1/fees/special/${expenseId}`);
-16
View File
@@ -1,16 +0,0 @@
import { apiDelete, apiGet, apiPatch, apiPost } from "./axios";
export const listFinanceSpecials = (studyId: string, params?: Record<string, any>) =>
apiGet(`/api/v1/studies/${studyId}/finance/specials`, { params });
export const getFinanceSpecial = (studyId: string, specialId: string) =>
apiGet(`/api/v1/studies/${studyId}/finance/specials/${specialId}`);
export const createFinanceSpecial = (studyId: string, payload: Record<string, any>) =>
apiPost(`/api/v1/studies/${studyId}/finance/specials`, payload);
export const updateFinanceSpecial = (studyId: string, specialId: string, payload: Record<string, any>) =>
apiPatch(`/api/v1/studies/${studyId}/finance/specials/${specialId}`, payload);
export const deleteFinanceSpecial = (studyId: string, specialId: string) =>
apiDelete(`/api/v1/studies/${studyId}/finance/specials/${specialId}`);