实现报销材料连续预览(07-27-yang-jun-reimbursement-readiness)
这个提交包含在:
@@ -28,6 +28,8 @@ export type InvoicePoolListItem = {
|
||||
ocrAttempts: number;
|
||||
ocrLastError: string | null;
|
||||
ocrCompletedAt: string | null;
|
||||
documentCategory: string | null;
|
||||
documentSubtype: string | null;
|
||||
invoiceCode: string | null;
|
||||
invoiceNumber: string | null;
|
||||
invoiceDate: string | null;
|
||||
@@ -94,6 +96,8 @@ export type InvoicePoolDetail = {
|
||||
ocrLastRequestedAt: string | null;
|
||||
ocrLastError: string | null;
|
||||
ocrCompletedAt: string | null;
|
||||
documentCategory: string | null;
|
||||
documentSubtype: string | null;
|
||||
invoiceCode: string | null;
|
||||
invoiceNumber: string | null;
|
||||
invoiceDate: string | null;
|
||||
@@ -136,6 +140,9 @@ export type BindableInvoiceSummary = {
|
||||
invoiceNumber: string | null;
|
||||
invoiceDate: string | null;
|
||||
sellerName: string | null;
|
||||
buyerName: string | null;
|
||||
documentCategory: string | null;
|
||||
documentSubtype: string | null;
|
||||
totalAmount: string | null;
|
||||
originalName: string | null;
|
||||
createdAt: string | null;
|
||||
@@ -156,6 +163,9 @@ export type InvoiceStatusItem = {
|
||||
invoiceNumber: string | null;
|
||||
invoiceDate: string | null;
|
||||
sellerName: string | null;
|
||||
buyerName: string | null;
|
||||
documentCategory: string | null;
|
||||
documentSubtype: string | null;
|
||||
totalAmount: string | null;
|
||||
originalName: string | null;
|
||||
linkedReimbursementId: string | null;
|
||||
|
||||
@@ -173,6 +173,9 @@ export type ReimbursementDetail = {
|
||||
invoiceNumber: string | null;
|
||||
invoiceDate: string | null;
|
||||
sellerName: string | null;
|
||||
buyerName: string | null;
|
||||
documentCategory: string | null;
|
||||
documentSubtype: string | null;
|
||||
totalAmount: string | null;
|
||||
originalName: string | null;
|
||||
mimeType: string | null;
|
||||
@@ -544,6 +547,29 @@ export async function fetchReimbursementAttachmentPreviewUrl(
|
||||
});
|
||||
}
|
||||
|
||||
export type ReimbursementMaterialPreviewBundle = {
|
||||
expiresAt: string;
|
||||
pages: Array<{
|
||||
url: string;
|
||||
materialType: "invoice" | "attachment";
|
||||
materialIndex: number;
|
||||
pageNumber: number;
|
||||
}>;
|
||||
};
|
||||
|
||||
export async function fetchReimbursementMaterialPreviewBundle(
|
||||
reimbursementId: string,
|
||||
reason?: string,
|
||||
) {
|
||||
return apiRequestData<ReimbursementMaterialPreviewBundle>(
|
||||
`/api/reimbursements/${reimbursementId}/materials/preview-bundle`,
|
||||
{
|
||||
method: "POST",
|
||||
body: JSON.stringify(reason ? { reason } : {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
export async function linkReimbursementProject(reimbursementId: string, projectId: string | null) {
|
||||
return apiRequestData<{ projectId: string | null; project: { id: string; projectNo: string; name: string } | null }>(`/api/reimbursements/${reimbursementId}/link-project`, {
|
||||
|
||||
在新工单中引用
屏蔽一个用户