fix: 优化报销制单下载与付款进度(09-08-reimbursement-payment-closeout)
ci-e2e / e2e (push) Canceled after 0s
ci-minimal / check-minimal (push) Canceled after 0s

这个提交包含在:
2026-09-10 16:39:01 +08:00
父节点 73fcd5a65a
当前提交 fe025e65cf
共修改 15 个文件,包含 364 行新增和 42 行删除
+9
查看文件
@@ -165,6 +165,15 @@ function parseFilenameFromContentDisposition(headerValue: string | null): string
}
const parts = headerValue.split(";").map((part) => part.trim());
const encodedPart = parts.find((part) => part.toLowerCase().startsWith("filename*="));
const encodedValue = encodedPart?.slice("filename*=".length).trim().replace(/^"|"$/g, "");
const utf8Value = encodedValue?.match(/^UTF-8'[^']*'(.*)$/i);
if (utf8Value) {
try {
const decoded = decodeURIComponent(utf8Value[1]);
if (decoded) return decoded;
} catch {}
}
const filenamePart = parts.find((part) => part.toLowerCase().startsWith("filename="));
if (!filenamePart) {
return null;
+2 -2
查看文件
@@ -215,11 +215,11 @@ export async function cancelPaymentBatch(batchId: string, reason: string) {
});
}
export async function downloadPaymentOrder(batchId: string, reason: string): Promise<ApiBlobResponse> {
export async function downloadPaymentOrder(batchId: string): Promise<ApiBlobResponse> {
return apiRequestBlob(`/api/payment-batches/${batchId}/payment-order`, {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ reason }),
body: JSON.stringify({}),
});
}