From e6855dba6394116d65795e38848d317ea8f0deb0 Mon Sep 17 00:00:00 2001 From: shenyifei Date: Tue, 6 Jan 2026 13:21:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(delivery):=20=E4=BF=AE=E5=A4=8DExcel?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E9=80=BB=E8=BE=91=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?UI=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除Taro.downloadFile调用,直接使用URL设置临时文件路径 - 调整PDF查看按钮的图标颜色和类型样式 - 调整Excel查看按钮的图标颜色和类型样式 - 修复采购订单暂存跳转路径使用动态配置 - 添加空值检查避免访问undefined属性导致错误 - 移除档口信息中的冗余提示文本 - 更新Excel文件名格式化方式,移除分隔符 - 添加文件路径日志输出便于调试 --- .../src/components/delivery/Step3Success.tsx | 38 ++++++------------- .../components/order/module/MadeOption.tsx | 2 +- .../src/components/order/module/StallInfo.tsx | 18 +++------ .../components/order/module/SupplierInfo.tsx | 10 ++--- packages/app-client/src/constant/purchase.ts | 2 + .../app-client/src/pages/stall/create.tsx | 6 --- .../src/utils/functions/exportExcel.ts | 5 ++- 7 files changed, 28 insertions(+), 53 deletions(-) diff --git a/packages/app-client/src/components/delivery/Step3Success.tsx b/packages/app-client/src/components/delivery/Step3Success.tsx index afa1313..f9f46e9 100644 --- a/packages/app-client/src/components/delivery/Step3Success.tsx +++ b/packages/app-client/src/components/delivery/Step3Success.tsx @@ -190,28 +190,12 @@ export default function Step3Success(props: Step3SuccessProps) { icon: "success", }); } else { - try { - // 下载文件 - const downloadRes = await Taro.downloadFile({ - url: profitExcelUrl!, - }); - - if (downloadRes.tempFilePath) { - setExcelTempFilePath(downloadRes.tempFilePath); - Taro.showToast({ - title: "Excel下载成功", - icon: "success", - duration: 2000, - }); - } - } catch (error) { - console.error("下载Excel失败:", error); - Taro.showToast({ - title: "下载Excel失败", - icon: "none", - duration: 2000, - }); - } + setExcelTempFilePath(profitExcelUrl); + Taro.showToast({ + title: "Excel下载成功", + icon: "success", + duration: 2000, + }); } }; @@ -405,15 +389,15 @@ export default function Step3Success(props: Step3SuccessProps) { {tempFilePath && ( )} @@ -495,8 +479,8 @@ export default function Step3Success(props: Step3SuccessProps) { {excelTempFilePath && (