太平渠道显示
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
getExamOptionalItemList,
|
||||
removeOptionalPackage,
|
||||
getExamOptionRecordList,
|
||||
isTaipingVip,
|
||||
} from '../../api';
|
||||
import type { SignaturePadHandle } from '../ui';
|
||||
import { Button, SignaturePad } from '../ui';
|
||||
@@ -106,7 +107,7 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
||||
// 使用 ref 存储最新的可选项目状态,确保 refreshTijianPdfs 能读取到最新值
|
||||
const optionalItemListRef = useRef<OutputPhysicalExamItemInfo[]>([]);
|
||||
const optionalConfirmedRef = useRef<boolean>(false);
|
||||
|
||||
const [isTaipingVipAuth, setIsTaipingVipAuth] = useState<boolean>(false); // 是否是太平VIP客户
|
||||
const busy =
|
||||
signLoading ||
|
||||
submitLoading ||
|
||||
@@ -362,6 +363,16 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
||||
loadDaojiandan();
|
||||
};
|
||||
|
||||
// 检查太平VIP认证
|
||||
const checkTaipingVipAuth = async () => {
|
||||
const res = await isTaipingVip({ physical_exam_id: examId ?? 0 });
|
||||
if (res.Status === 200 && res.Data?.is_vip === 1) {
|
||||
setIsTaipingVipAuth(true);
|
||||
} else {
|
||||
setIsTaipingVipAuth(false);
|
||||
}
|
||||
};
|
||||
|
||||
// 初始化:先检查可选项
|
||||
useEffect(() => {
|
||||
if (!examId) {
|
||||
@@ -375,6 +386,8 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
||||
return;
|
||||
}
|
||||
|
||||
checkTaipingVipAuth();
|
||||
|
||||
// 先设置 loading 为 true
|
||||
setOptionalItemLoading(true);
|
||||
optionalItemListRef.current = [];
|
||||
@@ -1968,6 +1981,24 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
||||
)}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{/* 太平VIP认证 */}
|
||||
{isTaipingVipAuth && (
|
||||
<div className='px-4 py-4 bg-gray-50/60'>
|
||||
<div className='flex gap-4 items-center'>
|
||||
<div className='w-40 h-40 rounded-3xl bg-white flex items-center justify-center text-xs text-gray-500'>
|
||||
<img
|
||||
src='https://datacenter-open.oss-cn-hangzhou.aliyuncs.com/his/taiping-vip.jpg'
|
||||
alt='太平 VIP 认证二维码'
|
||||
className='w-full h-full object-cover'
|
||||
/>
|
||||
</div>
|
||||
<div className='flex-1 text-[13px] text-gray-700 space-y-2'>
|
||||
<p>打开微信扫码进行太平VIP认证</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{showImagePreview && previewImage && (
|
||||
<div className='fixed inset-0 z-[80] bg-black/90 flex items-center justify-center p-6' onClick={() => setShowImagePreview(false)}>
|
||||
|
||||
@@ -14,13 +14,13 @@ export const VipAuthModal = ({ onClose }: VipAuthModalProps) => {
|
||||
</div>
|
||||
<div className='px-4 py-4 bg-gray-50/60'>
|
||||
<div className='flex gap-4 items-center'>
|
||||
<div className='flex-1 text-xs text-gray-700 space-y-2'>
|
||||
<p>通过「太平 VIP 认证」二维码,可完成太平渠道客户的身份绑定与权益确认。</p>
|
||||
<ul className='list-disc ml-5 space-y-1'>
|
||||
<div className='flex-1 text-[13px] text-gray-700 space-y-2'>
|
||||
<p>打开微信扫码进行太平VIP认证</p>
|
||||
{/* <ul className='list-disc ml-5 space-y-1'>
|
||||
<li>客户出示太平 APP 内会员二维码,由工作人员扫码完成认证。</li>
|
||||
<li>认证成功后,系统会自动标记为「太平 VIP 客户」,并记录在体检档案中。</li>
|
||||
<li>支持后续报告寄送、复查预约等专属服务。</li>
|
||||
</ul>
|
||||
</ul> */}
|
||||
</div>
|
||||
<div className='w-40 h-40 rounded-3xl bg-white border flex items-center justify-center text-xs text-gray-500'>
|
||||
<img
|
||||
|
||||
Reference in New Issue
Block a user