From fe3d2138f6b8f09544636295dac4b05dbfb5d7f9 Mon Sep 17 00:00:00 2001 From: xianyi Date: Wed, 31 Dec 2025 09:23:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=B7=B3=E8=BF=87=E7=9F=A5?= =?UTF-8?q?=E6=83=85=E5=90=8C=E6=84=8F=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/UI7/UI7.tsx | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/src/pages/UI7/UI7.tsx b/src/pages/UI7/UI7.tsx index ede4bd9..8ea3643 100644 --- a/src/pages/UI7/UI7.tsx +++ b/src/pages/UI7/UI7.tsx @@ -193,6 +193,23 @@ const UI7: React.FC = () => { ); window.electronAPI?.log("info", `[UI7] 规范化后PDF列表数量: ${normalizedList.length}`); + + if (normalizedList.length === 0) { + window.electronAPI?.log( + "info", + `[UI7] 没有获取到知情同意书,将只进行导检单签名` + ); + setPdfFiles([]); + setPdfInfoList([]); + setLoading(false); + setError(""); + window.electronAPI?.log( + "info", + `[UI7] PDF 获取完成,共 0 份知情同意书,总签名步骤: 1 (仅导检单)` + ); + return; + } + normalizedList.forEach((item, idx) => { window.electronAPI?.log( "info", @@ -200,10 +217,6 @@ const UI7: React.FC = () => { ); }); - if (!normalizedList.length) { - throw new Error("未获取到任何 PDF 链接"); - } - setLoading(true); setError(""); setPdfFiles([]); @@ -567,6 +580,21 @@ const UI7: React.FC = () => { "info", `[UI7] 导检单签名成功,PDF URL已保存: ${pdfUrl.substring(0, 80)}...` ); + + // 如果没有知情同意书,导检单签名完成后直接跳转 + if (pdfInfoList.length === 0) { + window.electronAPI?.log( + "info", + `[UI7] 没有知情同意书需要签名,导检单签名完成后直接跳转` + ); + window.electronAPI?.log( + "info", + `[UI7] ✓ 所有签名已完成!准备跳转到UI8(仅导检单)` + ); + sign(); + navigate("/UI8"); + return; + } } else { const meta = pdfInfoList[currentStep - 1]; if (!meta) {