签到状态判断优化
This commit is contained in:
@@ -127,9 +127,9 @@ export interface InputPhysicalExamCustomerList {
|
||||
is_high_customer: number;
|
||||
/** 是否普客 (1-是 0-否) */
|
||||
is_general_customer: number;
|
||||
/** 是否已登记 (1-是 0-否) */
|
||||
/** 是否已签到 (1-是 0-否) */
|
||||
is_registered: number;
|
||||
/** 是否未登记 (1-是 0-否) */
|
||||
/** 是否未签到 (1-是 0-否) */
|
||||
is_not_registered: number;
|
||||
/** 是否散客 (1-是 0-否) */
|
||||
is_individual_customer: number;
|
||||
|
||||
@@ -30,7 +30,7 @@ export const ExamModal = ({ client, tab, onTabChange, onClose }: ExamModalProps)
|
||||
const idCardSignInDone = isExamActionDone(client.id, 'idCardSignIn');
|
||||
const printSignDone = isExamActionDone(client.id, 'printSign');
|
||||
|
||||
const signDone = idCardSignInDone || client.signStatus === '已登记' || client.checkedItems.includes('签到');
|
||||
const signDone = ((client as any).is_sign_in === 1) || idCardSignInDone || client.signStatus === '已签到' || client.checkedItems.includes('签到');
|
||||
const addonDone = (client.addonCount || 0) > 0;
|
||||
const printDone = printSignDone || !!client.guidePrinted;
|
||||
const deliveryDone = !!client.deliveryDone;
|
||||
|
||||
@@ -219,11 +219,12 @@ export const ExamSection = ({
|
||||
const idCardSignInDone = isExamActionDone(client.id, 'idCardSignIn');
|
||||
const printSignDone = isExamActionDone(client.id, 'printSign');
|
||||
|
||||
const signDone = idCardSignInDone || client.signStatus === '已登记' || client.checkedItems.includes('签到');
|
||||
const signDone = idCardSignInDone || client.signStatus === '已签到' || client.checkedItems.includes('签到');
|
||||
const addonCount = client.addonCount || 0;
|
||||
const printDone = printSignDone || !!client.guidePrinted;
|
||||
const openModal = (tab: ExamModalTab) => onOpenModal(client.id, tab);
|
||||
|
||||
|
||||
return (
|
||||
<div
|
||||
key={client.id}
|
||||
@@ -266,7 +267,7 @@ export const ExamSection = ({
|
||||
}}
|
||||
>
|
||||
<span>签到</span>
|
||||
{(signDone && printDone) && <span>✅</span>}
|
||||
{((client as any).is_sign_in === 1) && <span>✅</span>}
|
||||
</button>
|
||||
<button
|
||||
type='button'
|
||||
|
||||
@@ -11,7 +11,7 @@ export interface ExamClient {
|
||||
pendingItems: string[];
|
||||
channel: string;
|
||||
vipType: '高客' | '普客';
|
||||
signStatus: '已登记' | '未登记';
|
||||
signStatus: '已签到' | '未签到';
|
||||
customerType: '团客' | '散客';
|
||||
guidePrinted?: boolean;
|
||||
addonCount?: number;
|
||||
@@ -22,7 +22,7 @@ export interface ExamClient {
|
||||
export type ExamModalTab = 'detail' | 'sign' | 'addon' | 'print' | 'delivery';
|
||||
export type QuickActionType = 'none' | 'meal' | 'vip' | 'note';
|
||||
|
||||
export const EXAM_TAGS = ['全部', '上午', '下午', '高客', '普客', '已登记', '未登记', '散客', '团客'] as const;
|
||||
export const EXAM_TAGS = ['全部', '上午', '下午', '高客', '普客', '已签到', '未签到', '散客', '团客'] as const;
|
||||
|
||||
export interface BookingDoctor {
|
||||
id: string;
|
||||
|
||||
@@ -51,8 +51,8 @@ export const ExamPage = () => {
|
||||
const is_afternoon = examFilterTags.has('下午') ? 1 : 0;
|
||||
const is_high_customer = examFilterTags.has('高客') ? 1 : 0;
|
||||
const is_general_customer = examFilterTags.has('普客') ? 1 : 0;
|
||||
const is_registered = examFilterTags.has('已登记') ? 1 : 0;
|
||||
const is_not_registered = examFilterTags.has('未登记') ? 1 : 0;
|
||||
const is_registered = examFilterTags.has('已签到') ? 1 : 0;
|
||||
const is_not_registered = examFilterTags.has('未签到') ? 1 : 0;
|
||||
const is_individual_customer = examFilterTags.has('散客') ? 1 : 0;
|
||||
const is_group_customer = examFilterTags.has('团客') ? 1 : 0;
|
||||
|
||||
@@ -85,7 +85,7 @@ export const ExamPage = () => {
|
||||
? '用餐'
|
||||
: '体检中';
|
||||
|
||||
const signStatus: ExamClient['signStatus'] = item.is_register === 1 ? '已登记' : '未登记';
|
||||
const signStatus: ExamClient['signStatus'] = item.is_register === 1 ? '已签到' : '未签到';
|
||||
const customerType: ExamClient['customerType'] = item.customer_type === 1 ? '团客' : '散客';
|
||||
const vipType: ExamClient['vipType'] = item.is_vip === 1 ? '高客' : '普客';
|
||||
|
||||
@@ -112,6 +112,7 @@ export const ExamPage = () => {
|
||||
addonCount: item.add_item_count ?? 0,
|
||||
appointmentRemarks: item.appointment_remarks || null,
|
||||
physical_exam_status_name: item.physical_exam_status_name || null,
|
||||
is_sign_in: item.is_sign_in ?? 0,
|
||||
};
|
||||
});
|
||||
setClients(mapped);
|
||||
|
||||
1352
圆和医疗_体检中心网页原型_2.jsx
1352
圆和医疗_体检中心网页原型_2.jsx
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user