肠本
This commit is contained in:
@@ -550,6 +550,8 @@ export interface InputPhysicalExamAddItem {
|
|||||||
item_name?: string;
|
item_name?: string;
|
||||||
/** 折扣率 */
|
/** 折扣率 */
|
||||||
discount_rate?: number | null;
|
discount_rate?: number | null;
|
||||||
|
/** 是否肠本 (1-是 0-否) */
|
||||||
|
is_intestinal?: number | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {
|
|||||||
const debounceTimerRef = useRef<number | null>(null);
|
const debounceTimerRef = useRef<number | null>(null);
|
||||||
const [addonLoading, setAddonLoading] = useState(false);
|
const [addonLoading, setAddonLoading] = useState(false);
|
||||||
const [addonError, setAddonError] = useState<string | null>(null);
|
const [addonError, setAddonError] = useState<string | null>(null);
|
||||||
|
const [isIntestinal, setIsIntestinal] = useState<1 | 0>(1);
|
||||||
// 折扣比例(1 = 100%)
|
// 折扣比例(1 = 100%)
|
||||||
const [discountRatio, setDiscountRatio] = useState<number>(1);
|
const [discountRatio, setDiscountRatio] = useState<number>(1);
|
||||||
// 渠道折扣列表
|
// 渠道折扣列表
|
||||||
@@ -292,6 +293,7 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {
|
|||||||
scrm_account_name: customerInfo?.scrm_account_name || null,
|
scrm_account_name: customerInfo?.scrm_account_name || null,
|
||||||
item_name: debouncedAddonSearch.trim() || "",
|
item_name: debouncedAddonSearch.trim() || "",
|
||||||
discount_rate: discountRate,
|
discount_rate: discountRate,
|
||||||
|
is_intestinal: isIntestinal,
|
||||||
});
|
});
|
||||||
if (res.Status === 200 && Array.isArray(res.Data)) {
|
if (res.Status === 200 && Array.isArray(res.Data)) {
|
||||||
const list: AddonItem[] = res.Data.map((item) => ({
|
const list: AddonItem[] = res.Data.map((item) => ({
|
||||||
@@ -326,7 +328,7 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
fetchList();
|
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 maxSelect = 15;
|
||||||
const selectedCount = selectedIds.size;
|
const selectedCount = selectedIds.size;
|
||||||
@@ -1120,6 +1122,16 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<label className='w-[260px] flex items-center gap-2 text-xs text-gray-700 cursor-pointer select-none'>
|
||||||
|
<input
|
||||||
|
type='checkbox'
|
||||||
|
className='w-4 h-4'
|
||||||
|
checked={isIntestinal === 1}
|
||||||
|
onChange={() => setIsIntestinal(prev => (prev === 1 ? 0 : 1))}
|
||||||
|
/>
|
||||||
|
<span>肠本</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
<div className='w-[260px] flex items-center gap-2'>
|
<div className='w-[260px] flex items-center gap-2'>
|
||||||
<Input
|
<Input
|
||||||
placeholder='搜索 加项名称'
|
placeholder='搜索 加项名称'
|
||||||
|
|||||||
@@ -1644,18 +1644,26 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 检查所有文档是否都已签名
|
|
||||||
const checkAllSigned = () => {
|
const checkAllSigned = () => {
|
||||||
// 检查所有知情同意书是否都已签名
|
|
||||||
const allConsentsSigned = consentList.every((item) => {
|
const allConsentsSigned = consentList.every((item) => {
|
||||||
if (item.combination_code === undefined || item.combination_code === null) return true;
|
if (item.combination_code === undefined || item.combination_code === null) return true;
|
||||||
return signedCombinationCodes.includes(Number(item.combination_code));
|
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;
|
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 (
|
return (
|
||||||
<div className='grid grid-cols-2 gap-4 text-sm'>
|
<div className='grid grid-cols-2 gap-4 text-sm pb-3'>
|
||||||
<div className='p-4 rounded-2xl border bg-gray-50/60 flex flex-col gap-3'>
|
<div className='p-4 rounded-2xl border bg-gray-50/60 flex flex-col gap-3'>
|
||||||
<div className='font-medium'>身份证拍照与签到</div>
|
<div className='font-medium'>身份证拍照与签到</div>
|
||||||
<div className='text-xs text-gray-500'>拍照身份证后点击签到按钮完成签到。</div>
|
<div className='text-xs text-gray-500'>拍照身份证后点击签到按钮完成签到。</div>
|
||||||
@@ -2042,7 +2050,7 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{/* <div className='text-xs text-gray-500'>点击后弹出知情同意书全文及签名区域,签署完成后回到签到页面。</div> */}
|
{/* <div className='text-xs text-gray-500'>点击后弹出知情同意书全文及签名区域,签署完成后回到签到页面。</div> */}
|
||||||
<div className='flex flex-col gap-2 max-h-96 overflow-y-auto custom-scroll'>
|
<div className='flex flex-col gap-2 max-h-96 overflow-y-auto custom-scroll pb-4'>
|
||||||
{consentLoading && <div className='text-xs text-gray-500'>加载中...</div>}
|
{consentLoading && <div className='text-xs text-gray-500'>加载中...</div>}
|
||||||
{/* {!consentLoading && consentMessage && <div className='text-xs text-amber-600'>{consentMessage}</div>} */}
|
{/* {!consentLoading && consentMessage && <div className='text-xs text-amber-600'>{consentMessage}</div>} */}
|
||||||
{!consentLoading && (consentList.length > 0 || true) && (
|
{!consentLoading && (consentList.length > 0 || true) && (
|
||||||
|
|||||||
Reference in New Issue
Block a user