feat: 完成P6-P8前端能力闭环(V3,D2,D3,B3)
这个提交包含在:
@@ -59,6 +59,22 @@ export type ReimbursementListResponse = {
|
||||
items: ReimbursementListItem[];
|
||||
};
|
||||
|
||||
export type ReimbursementBudgetHint = {
|
||||
budgetId: string;
|
||||
budgetCode: string;
|
||||
budgetName: string;
|
||||
controlMode: "warn" | "block";
|
||||
warningThresholdPercent: number;
|
||||
allocatedAmount: string;
|
||||
usedAmount: string;
|
||||
remainingAmount: string;
|
||||
currentAmount: string;
|
||||
nextUsedAmount: string;
|
||||
nextUsagePercent: number;
|
||||
exceedsThreshold: boolean;
|
||||
exceedsBudget: boolean;
|
||||
};
|
||||
|
||||
export type ReimbursementDetail = {
|
||||
id: string;
|
||||
formNumber: string | null;
|
||||
@@ -86,6 +102,7 @@ export type ReimbursementDetail = {
|
||||
invoiceNumber: string | null;
|
||||
totalAmount: string | null;
|
||||
}>;
|
||||
budgetHint: ReimbursementBudgetHint | null;
|
||||
pendingWorkflow: {
|
||||
instanceId: string;
|
||||
stepId: string;
|
||||
@@ -135,6 +152,22 @@ export type ReimbursementItemDeleteResponse = {
|
||||
totalAmount: string;
|
||||
};
|
||||
|
||||
export type ReimbursementSubmitResponse = {
|
||||
reimbursementId: string;
|
||||
formNumber: string;
|
||||
workflowInstanceId: string;
|
||||
currentTaskId: string;
|
||||
status: "reviewing";
|
||||
budget: {
|
||||
budgetId: string;
|
||||
budgetCode: string;
|
||||
controlMode: "warn" | "block";
|
||||
usagePercent: number;
|
||||
exceededThreshold: boolean;
|
||||
exceededBudget: boolean;
|
||||
} | null;
|
||||
};
|
||||
|
||||
function toQueryString(query: Record<string, string | number | undefined>) {
|
||||
const params = new URLSearchParams();
|
||||
|
||||
@@ -171,7 +204,7 @@ export async function createReimbursement(payload: {
|
||||
}
|
||||
|
||||
export async function submitReimbursement(reimbursementId: string) {
|
||||
return apiRequestData<Record<string, unknown>>(`/api/reimbursements/${reimbursementId}/submit`, {
|
||||
return apiRequestData<ReimbursementSubmitResponse>(`/api/reimbursements/${reimbursementId}/submit`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({}),
|
||||
});
|
||||
|
||||
在新工单中引用
屏蔽一个用户