fix(order-delivery-reply): 修改excel导出后命名中的时间显示为北京时间

This commit is contained in:
HTEWJ\26070045 committed 2026-10-13 10:31:42 +08:00
1 parent e181d4e9ec
commit 28b4a428ef
1 file changed
+4 -1
@@ -175,7 +175,10 @@ export async function exportOrderDeliveryLines(params: OrderDeliveryExportParams
const url = URL.createObjectURL(blob);
const link = document.createElement('a');
link.href = url;
link.download = `订单交期回复_${new Date().toISOString().slice(0, 10)}.xlsx`;
// 文件名日期取浏览器本地时区(toISOString 为 UTC,北京时间 0-8 点导出会差一天)
const now = new Date();
const localDate = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}`;
link.download = `订单交期回复_${localDate}.xlsx`;
document.body.appendChild(link);
link.click();
link.remove();