实现报销材料合并预览与差旅概要(07-27-yang-jun-reimbursement-readiness)
这个提交包含在:
@@ -137,6 +137,13 @@ export type ReimbursementDetail = {
|
||||
reimbursementDate: string | null;
|
||||
totalAmount: string | null;
|
||||
description: string | null;
|
||||
travelSummary: {
|
||||
isTravel: boolean;
|
||||
purpose: string | null;
|
||||
location: string | null;
|
||||
startDate: string | null;
|
||||
endDate: string | null;
|
||||
};
|
||||
payment: {
|
||||
paymentVoucherNo: string | null;
|
||||
paymentDate: string | null;
|
||||
@@ -276,6 +283,17 @@ export type ReimbursementCreatePayload = {
|
||||
description?: string;
|
||||
templateId?: string;
|
||||
linkedTravelRequestId?: string;
|
||||
travelPurpose?: string;
|
||||
travelLocation?: string;
|
||||
travelStartDate?: string;
|
||||
travelEndDate?: string;
|
||||
};
|
||||
|
||||
export type ReimbursementTravelSummaryPayload = {
|
||||
travelPurpose: string | null;
|
||||
travelLocation: string | null;
|
||||
travelStartDate: string | null;
|
||||
travelEndDate: string | null;
|
||||
};
|
||||
|
||||
export type ReimbursementCreateResponse = {
|
||||
@@ -459,6 +477,16 @@ export async function deleteReimbursement(reimbursementId: string) {
|
||||
});
|
||||
}
|
||||
|
||||
export async function updateReimbursementTravelSummary(
|
||||
reimbursementId: string,
|
||||
payload: ReimbursementTravelSummaryPayload,
|
||||
) {
|
||||
return apiRequestData<{ travelSummary: Omit<ReimbursementDetail["travelSummary"], "isTravel"> }>(
|
||||
`/api/reimbursements/${reimbursementId}`,
|
||||
{ method: "PATCH", body: JSON.stringify(payload) },
|
||||
);
|
||||
}
|
||||
|
||||
export async function createReimbursementItem(
|
||||
reimbursementId: string,
|
||||
payload: ReimbursementItemPayload,
|
||||
@@ -549,12 +577,11 @@ export async function fetchReimbursementAttachmentPreviewUrl(
|
||||
|
||||
export type ReimbursementMaterialPreviewBundle = {
|
||||
expiresAt: string;
|
||||
pages: Array<{
|
||||
url: string;
|
||||
materialType: "invoice" | "attachment";
|
||||
materialIndex: number;
|
||||
pageNumber: number;
|
||||
}>;
|
||||
signedUrl: string;
|
||||
originalName: string;
|
||||
mimeType: "application/pdf";
|
||||
fileSize: number;
|
||||
pageCount: number;
|
||||
};
|
||||
|
||||
export async function fetchReimbursementMaterialPreviewBundle(
|
||||
|
||||
在新工单中引用
屏蔽一个用户