R58 A1-A6:报销详情页内嵌发票绑定与单据打印
这个提交包含在:
@@ -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);
|
||||
|
||||
在新工单中引用
屏蔽一个用户