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);