实现企微原生材料预览(07-27-yang-jun-reimbursement-readiness)
这个提交包含在:
@@ -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`, {
|
||||
|
||||
在新工单中引用
屏蔽一个用户