更新需求
This commit is contained in:
@@ -76,6 +76,16 @@ export const ExamModal = ({ client, tab, onTabChange, onClose }: ExamModalProps)
|
||||
.finally(() => setDetailLoading(false));
|
||||
}, [client.id]);
|
||||
|
||||
const refetchDetail = () => {
|
||||
const physical_exam_id = Number(client.id);
|
||||
if (!physical_exam_id) return;
|
||||
getCustomerDetail({ physical_exam_id }).then((detailRes) => {
|
||||
setCustomerInfo(detailRes.Data?.customerInfo ?? null);
|
||||
setAppointmentInfo(detailRes.Data?.appointmentInfo ?? null);
|
||||
setAddItemInfoList(detailRes.Data?.addItemInfoList ?? null);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
className='fixed inset-0 z-40 flex items-center justify-center bg-black/50'
|
||||
@@ -153,6 +163,7 @@ export const ExamModal = ({ client, tab, onTabChange, onClose }: ExamModalProps)
|
||||
addItemInfoList={addItemInfoList}
|
||||
progressList={progressList}
|
||||
loading={detailLoading}
|
||||
onCustomerUpdated={refetchDetail}
|
||||
/>
|
||||
)}
|
||||
{tab === 'sign' && <ExamSignPanel examId={Number(client.id)} onBusyChange={setSignBusy} />}
|
||||
|
||||
Reference in New Issue
Block a user