fix: 优化报销制单下载与付款进度(09-08-reimbursement-payment-closeout)
这个提交包含在:
@@ -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;
|
||||
|
||||
@@ -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({}),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户