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);
|
||||
|
||||
@@ -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[];
|
||||
};
|
||||
|
||||
在新工单中引用
屏蔽一个用户