实现企微原生材料预览(07-27-yang-jun-reimbursement-readiness)
ci-e2e / e2e (push) Canceled after 0s
ci-minimal / check-minimal (push) Canceled after 0s

这个提交包含在:
2026-07-31 18:57:34 +08:00
父节点 e123d50f86
当前提交 410d8cd71b
共修改 23 个文件,包含 1352 行新增和 69 行删除
+19
查看文件
@@ -175,6 +175,8 @@ export type ReimbursementDetail = {
sellerName: string | null;
totalAmount: string | null;
originalName: string | null;
mimeType: string | null;
fileSize: number | null;
linkedItemId: string | null;
}>;
attachments: Array<{
@@ -525,6 +527,23 @@ export async function downloadReimbursementAttachment(reimbursementId: string, a
return apiRequestBlob(buildAttachmentFileUrl(reimbursementAttachmentFileUrl(reimbursementId, attachmentId), reason));
}
export async function fetchReimbursementAttachmentPreviewUrl(
reimbursementId: string,
attachmentId: string,
reason?: string,
) {
return apiRequestData<{
signedUrl: string;
expiresAt: string;
originalName: string;
mimeType: string;
fileSize: number;
}>(`/api/reimbursements/${reimbursementId}/attachments/${attachmentId}/preview-url`, {
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`, {