支持跳过知情同意书
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user