R58 A1-A6:报销详情页内嵌发票绑定与单据打印

这个提交包含在:
2026-04-11 14:57:15 +08:00
父节点 88c987ae8f
当前提交 ba48e7d1d4
共修改 14 个文件,包含 1667 行新增和 12 行删除
+25
查看文件
@@ -115,6 +115,21 @@ export type InvoiceBindPayload =
travelOrderId: string;
};
export type BindableInvoiceSummary = {
id: string;
invoiceCode: string | null;
invoiceNumber: string | null;
invoiceDate: string | null;
sellerName: string | null;
totalAmount: string | null;
originalName: string | null;
createdAt: string | null;
};
export type BindableInvoiceListResponse = {
items: BindableInvoiceSummary[];
};
function toQueryString(query: Record<string, string | number | undefined>) {
const params = new URLSearchParams();
@@ -139,6 +154,16 @@ export async function fetchInvoicePoolDetail(invoiceId: string) {
return apiRequestData<InvoicePoolDetail>(`/api/invoice-pool/${invoiceId}`);
}
export async function fetchBindableInvoices(query: {
reimbursementId: string;
search?: string;
limit?: number;
}) {
return apiRequestData<BindableInvoiceListResponse>(
`/api/invoice-pool/bindable${toQueryString(query as Record<string, string | number | undefined>)}`,
);
}
export async function uploadInvoice(file: File, ocrType?: string, ownerEmployeeId?: string) {
const formData = new FormData();
formData.append("file", file);
+20
查看文件
@@ -111,13 +111,28 @@ export type ReimbursementWorkflowProgress = {
}>;
};
export type ReimbursementApprovalHistoryItem = {
id: string;
stepName: string | null;
action: string;
actorName: string;
comment: string | null;
createdAt: string | null;
};
export type ReimbursementDetail = {
id: string;
formNumber: string | null;
submitterId: string;
ownerId: string;
departmentId: string;
department: {
id: string;
name: string;
} | null;
status: ReimbursementStatus;
createdAt: string | null;
submittedAt: string | null;
reimbursementDate: string | null;
totalAmount: string | null;
description: string | null;
@@ -144,7 +159,11 @@ export type ReimbursementDetail = {
status: string;
invoiceCode: string | null;
invoiceNumber: string | null;
invoiceDate: string | null;
sellerName: string | null;
totalAmount: string | null;
originalName: string | null;
linkedItemId: string | null;
}>;
budgetHint: ReimbursementBudgetHint | null;
pendingWorkflow: {
@@ -158,6 +177,7 @@ export type ReimbursementDetail = {
} | null;
} | null;
workflowProgress: ReimbursementWorkflowProgress | null;
approvalHistory: ReimbursementApprovalHistoryItem[];
riskFlags: RiskFlag[];
items: ReimbursementItem[];
};