From 7100396cd187ec7c34bfe8996204f872afc7db46 Mon Sep 17 00:00:00 2001 From: xx Date: Thu, 12 Mar 2026 17:17:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=82=A0=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/types.ts | 2 ++ src/components/exam/ExamAddonPanel.tsx | 14 +++++++++++++- src/components/exam/ExamSignPanel.tsx | 20 ++++++++++++++------ 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/api/types.ts b/src/api/types.ts index ce99d68..5da220d 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -550,6 +550,8 @@ export interface InputPhysicalExamAddItem { item_name?: string; /** 折扣率 */ discount_rate?: number | null; + /** 是否肠本 (1-是 0-否) */ + is_intestinal?: number | null; } /** diff --git a/src/components/exam/ExamAddonPanel.tsx b/src/components/exam/ExamAddonPanel.tsx index 541a421..f9a94ee 100644 --- a/src/components/exam/ExamAddonPanel.tsx +++ b/src/components/exam/ExamAddonPanel.tsx @@ -51,6 +51,7 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => { const debounceTimerRef = useRef(null); const [addonLoading, setAddonLoading] = useState(false); const [addonError, setAddonError] = useState(null); + const [isIntestinal, setIsIntestinal] = useState<1 | 0>(1); // 折扣比例(1 = 100%) const [discountRatio, setDiscountRatio] = useState(1); // 渠道折扣列表 @@ -292,6 +293,7 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => { scrm_account_name: customerInfo?.scrm_account_name || null, item_name: debouncedAddonSearch.trim() || "", discount_rate: discountRate, + is_intestinal: isIntestinal, }); if (res.Status === 200 && Array.isArray(res.Data)) { const list: AddonItem[] = res.Data.map((item) => ({ @@ -326,7 +328,7 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => { } }; fetchList(); - }, [debouncedAddonSearch, customerInfo?.scrm_account_id, customerInfo?.scrm_account_name, client.id, customerInfo, channelDiscounts, discountRatio]); + }, [debouncedAddonSearch, customerInfo?.scrm_account_id, customerInfo?.scrm_account_name, client.id, customerInfo, channelDiscounts, discountRatio, isIntestinal]); const maxSelect = 15; const selectedCount = selectedIds.size; @@ -1120,6 +1122,16 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => { + +
{ } }; - // 检查所有文档是否都已签名 const checkAllSigned = () => { - // 检查所有知情同意书是否都已签名 const allConsentsSigned = consentList.every((item) => { if (item.combination_code === undefined || item.combination_code === null) return true; return signedCombinationCodes.includes(Number(item.combination_code)); }); - // 检查导检单是否已签名(只有 localStorage 中的或签名后的才是已签名的) + consentList.filter((item) => { + if (item.combination_code === undefined || item.combination_code === null) return false; + return !signedCombinationCodes.includes(Number(item.combination_code)); + }); + + const allAddItemsSigned = addItemBillList.every((bill) => bill.is_signed === true); const daojiandanSigned = isDaojiandanSigned; - return allConsentsSigned && consentList.length > 0 && daojiandanSigned; + const result = + daojiandanSigned && + allAddItemsSigned && + (consentList.length === 0 || allConsentsSigned); + + return result; }; // 一键打印所有文档 @@ -1901,7 +1909,7 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => { return ( -
+
身份证拍照与签到
拍照身份证后点击签到按钮完成签到。
@@ -2042,7 +2050,7 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => { )}
{/*
点击后弹出知情同意书全文及签名区域,签署完成后回到签到页面。
*/} -
+
{consentLoading &&
加载中...
} {/* {!consentLoading && consentMessage &&
{consentMessage}
} */} {!consentLoading && (consentList.length > 0 || true) && (