diff --git a/src/api/types.ts b/src/api/types.ts
index edeb89a..4cf3c8d 100644
--- a/src/api/types.ts
+++ b/src/api/types.ts
@@ -162,6 +162,7 @@ export interface OutputPhysicalExamCustomerListItem {
is_sign_in?: number | null;
is_print?: number | null;
appointment_remarks?: string | null;
+ time_spent?: string | null;
}
/**
@@ -205,6 +206,8 @@ export interface CustomerInfo {
patient_marital_status_name?: string | null;
family_doctor_name?: string | null;
customer_type?: number | null;
+ age?: string | null;
+ card_number?: string | null;
}
/**
diff --git a/src/components/exam/ExamDetailPanel.tsx b/src/components/exam/ExamDetailPanel.tsx
index edb0de4..a01d499 100644
--- a/src/components/exam/ExamDetailPanel.tsx
+++ b/src/components/exam/ExamDetailPanel.tsx
@@ -202,6 +202,8 @@ export const ExamDetailPanel = ({
证件号:{loading ? '' : (customerInfo?.id_no || '—')}
+
+ 卡号:{loading ? '' : (customerInfo?.card_number || '—')}
手机号:
@@ -244,7 +246,7 @@ export const ExamDetailPanel = ({
性别/年龄:
- {customerInfo?.gender_name || client.gender} / {client.age}
+ {customerInfo?.gender_name || client.gender} / {customerInfo?.age || client.age}
diff --git a/src/pages/ExamPage.tsx b/src/pages/ExamPage.tsx
index 2c08940..bcd299f 100644
--- a/src/pages/ExamPage.tsx
+++ b/src/pages/ExamPage.tsx
@@ -64,28 +64,8 @@ export const ExamPage = () => {
const customerType: ExamClient['customerType'] = item.customer_type === 1 ? '团客' : '散客';
const vipType: ExamClient['vipType'] = item.is_vip === 1 ? '高客' : '普客';
- let elapsed = '00:00';
- // 计算耗时:体检完成时间 - 体检时间
- if (item.physical_exam_time && item.physical_exam_complete_time) {
- try {
- const startTime = new Date(item.physical_exam_time).getTime();
- const completeTime = new Date(item.physical_exam_complete_time).getTime();
-
- // 检查时间是否有效
- if (!isNaN(startTime) && !isNaN(completeTime) && completeTime >= startTime) {
- const diffMs = completeTime - startTime;
- const diffMinutes = Math.floor(diffMs / 1000 / 60);
- const hours = Math.floor(diffMinutes / 60);
- const minutes = diffMinutes % 60;
- elapsed = `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;
- }
- } catch (err) {
- console.error('计算体检耗时失败', err, {
- physical_exam_time: item.physical_exam_time,
- physical_exam_complete_time: item.physical_exam_complete_time,
- });
- }
- }
+ // 直接使用接口返回的耗时
+ const elapsed = item.time_spent || '00:00';
return {
id: String(item.physical_exam_id ?? ''),