feat(client): 完成 F34 票据中心增强\n\n- 补齐人工修正/手工归档/解绑/重试 OCR/判重例外等入口\n- 补充 data-testid 并与后端错误码映射保持一致\n- 更新 P5 蓝图 v3 中 F34 状态为 DONE
这个提交包含在:
@@ -46,21 +46,35 @@ export type InvoicePoolListResponse = {
|
||||
export type InvoicePoolDetail = {
|
||||
id: string;
|
||||
status: InvoicePoolStatus;
|
||||
archivedReason: string | null;
|
||||
archivedAt: string | null;
|
||||
ownerEmployeeId: string;
|
||||
uploadedByEmployeeId: string;
|
||||
originalName: string | null;
|
||||
mimeType: string | null;
|
||||
fileSize: number | null;
|
||||
fileSha256: string | null;
|
||||
remarks: string | null;
|
||||
ocrType: string;
|
||||
ocrProvider: string;
|
||||
ocrAttempts: number;
|
||||
ocrLastRequestedAt: string | null;
|
||||
ocrLastError: string | null;
|
||||
ocrCompletedAt: string | null;
|
||||
invoiceCode: string | null;
|
||||
invoiceNumber: string | null;
|
||||
invoiceDate: string | null;
|
||||
sellerName: string | null;
|
||||
buyerName: string | null;
|
||||
amount: string | null;
|
||||
taxAmount: string | null;
|
||||
totalAmount: string | null;
|
||||
linkedReimbursementId: string | null;
|
||||
linkedItemId: string | null;
|
||||
isDuplicateOverride: boolean;
|
||||
overrideRefFormNumber: string | null;
|
||||
overrideReason: string | null;
|
||||
overriddenBy: string | null;
|
||||
createdAt: string | null;
|
||||
updatedAt: string | null;
|
||||
};
|
||||
@@ -131,3 +145,51 @@ export async function fetchInvoiceSignedUrl(invoiceId: string) {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
export type InvoicePatchPayload = Partial<{
|
||||
status: "available";
|
||||
remarks: string | null;
|
||||
invoiceCode: string | null;
|
||||
invoiceNumber: string | null;
|
||||
invoiceDate: string | null;
|
||||
sellerName: string | null;
|
||||
buyerName: string | null;
|
||||
amount: string | null;
|
||||
taxAmount: string | null;
|
||||
totalAmount: string | null;
|
||||
}>;
|
||||
|
||||
export async function patchInvoice(invoiceId: string, payload: InvoicePatchPayload) {
|
||||
return apiRequestData<InvoicePoolDetail>(`/api/invoice-pool/${invoiceId}`, {
|
||||
method: "PATCH",
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
}
|
||||
|
||||
export async function archiveInvoice(invoiceId: string) {
|
||||
return apiRequestData<InvoicePoolDetail>(`/api/invoice-pool/${invoiceId}/archive`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({}),
|
||||
});
|
||||
}
|
||||
|
||||
export async function unbindInvoice(invoiceId: string) {
|
||||
return apiRequestData<InvoicePoolDetail>(`/api/invoice-pool/${invoiceId}/unbind`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({}),
|
||||
});
|
||||
}
|
||||
|
||||
export async function retryInvoiceOcr(invoiceId: string) {
|
||||
return apiRequestData<InvoicePoolDetail>(`/api/invoice-pool/${invoiceId}/retry-ocr`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({}),
|
||||
});
|
||||
}
|
||||
|
||||
export async function overrideInvoiceDuplicate(invoiceId: string, payload: { refFormNumber: string; reason: string }) {
|
||||
return apiRequestData<InvoicePoolDetail>(`/api/invoice-pool/${invoiceId}/override-duplicate`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户