更新报告寄送位置
This commit is contained in:
@@ -16,17 +16,20 @@ export const ExamModal = ({ client, tab, onTabChange, onClose }: ExamModalProps)
|
||||
{ key: 'sign', label: '签到' },
|
||||
{ key: 'addon', label: '加项' },
|
||||
{ key: 'print', label: '打印导检单' },
|
||||
{ key: 'delivery', label: '报告寄送' },
|
||||
];
|
||||
|
||||
const signDone = client.signStatus === '已登记' || client.checkedItems.includes('签到');
|
||||
const addonDone = (client.addonCount || 0) > 0;
|
||||
const printDone = !!client.guidePrinted;
|
||||
const deliveryDone = !!client.deliveryDone;
|
||||
|
||||
const tabDone: Record<ExamModalTab, boolean> = {
|
||||
detail: false,
|
||||
sign: signDone,
|
||||
addon: addonDone,
|
||||
print: printDone,
|
||||
delivery: deliveryDone,
|
||||
};
|
||||
|
||||
const handleDoubleClick = (e: React.MouseEvent) => {
|
||||
@@ -122,6 +125,7 @@ export const ExamModal = ({ client, tab, onTabChange, onClose }: ExamModalProps)
|
||||
{tab === 'sign' && <ExamSignPanel />}
|
||||
{tab === 'addon' && <ExamAddonPanel client={client} />}
|
||||
{tab === 'print' && <ExamPrintPanel client={client} />}
|
||||
{tab === 'delivery' && <ExamDeliveryPanel client={client} />}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -519,6 +523,41 @@ const ExamDetailInfo = ({ client }: { client: ExamClient }) => {
|
||||
);
|
||||
};
|
||||
|
||||
const ExamDeliveryPanel = ({ client }: { client: ExamClient }) => (
|
||||
<div className='flex justify-center'>
|
||||
<div className='w-full rounded-2xl border shadow-sm px-6 py-4 text-xs text-gray-800'>
|
||||
<div className='text-lg font-semibold text-gray-900 mb-3'>报告寄送</div>
|
||||
<div className='grid grid-cols-2 gap-3 mb-3'>
|
||||
<div>
|
||||
收件人姓名
|
||||
<Input placeholder='请输入收件人姓名' className='mt-1' />
|
||||
</div>
|
||||
<div>
|
||||
联系电话
|
||||
<Input placeholder='用于快递联系' className='mt-1' />
|
||||
</div>
|
||||
<div className='col-span-2'>
|
||||
寄送地址
|
||||
<Input placeholder='请输入详细寄送地址' className='mt-1' />
|
||||
</div>
|
||||
</div>
|
||||
<div className='space-y-2'>‘
|
||||
<div>备注说明</div>
|
||||
<textarea
|
||||
className='w-full rounded-2xl border px-3 py-2 text-xs outline-none focus:ring-2 focus:ring-gray-200 min-h-[80px]'
|
||||
placeholder='如需多份报告、加急寄送等,请在此备注'
|
||||
/>
|
||||
</div>
|
||||
<div className='mt-4 flex items-center justify-between text-[11px] text-gray-500'>
|
||||
<div>
|
||||
当前客户:<span className='font-medium text-gray-800'>{client.name}</span>(体检号:{client.id})
|
||||
</div>
|
||||
<Button className='px-4 py-1.5 text-xs'>保存寄送信息</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
const ExamPrintPanel = ({ client }: { client: ExamClient }) => (
|
||||
<div className='flex justify-center'>
|
||||
<div className='w-[520px] max-w-[95%] bg-white rounded-2xl border shadow-sm px-6 py-4 text-xs text-gray-800'>
|
||||
|
||||
@@ -118,6 +118,17 @@ export const ExamSection = ({
|
||||
<span>打印导检单</span>
|
||||
{printDone && <span>✅</span>}
|
||||
</button>
|
||||
<button
|
||||
type='button'
|
||||
className='px-2 py-0.5 rounded-2xl border bg-white hover:bg-gray-100 flex items-center gap-1'
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
openModal('delivery');
|
||||
}}
|
||||
>
|
||||
<span>报告寄送</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
|
||||
@@ -45,17 +45,30 @@ export const Sidebar = ({ active, onNavigate, onQuickAction }: SidebarProps) =>
|
||||
<section className='mt-2 p-3 rounded-2xl border bg-gray-50/50'>
|
||||
<div className='text-sm text-gray-700 mb-2'>快捷操作</div>
|
||||
<div className='grid grid-cols-2 gap-2 text-xs'>
|
||||
<Button className='justify-center py-1.5' onClick={() => onQuickAction('meal')}>
|
||||
用餐登记
|
||||
<Button
|
||||
className='min-h-[52px] justify-center py-2 bg-white border-gray-200 hover:bg-gray-50'
|
||||
onClick={() => onQuickAction('meal')}
|
||||
>
|
||||
<div className='flex flex-col leading-tight text-sm text-gray-800'>
|
||||
<span>用餐</span>
|
||||
<span>登记</span>
|
||||
</div>
|
||||
</Button>
|
||||
<Button className='justify-center py-1.5' onClick={() => onQuickAction('vip')}>
|
||||
太平VIP认证
|
||||
<Button
|
||||
className='min-h-[52px] justify-center py-2 bg-white border-gray-200 hover:bg-gray-50'
|
||||
onClick={() => onQuickAction('note')}
|
||||
>
|
||||
<div className='flex flex-col leading-tight text-sm text-gray-800'>
|
||||
<span>备注窗</span>
|
||||
</div>
|
||||
</Button>
|
||||
<Button className='justify-center py-1.5' onClick={() => onQuickAction('delivery')}>
|
||||
报告寄送
|
||||
</Button>
|
||||
<Button className='justify-center py-1.5' onClick={() => onQuickAction('note')}>
|
||||
备注窗
|
||||
<Button
|
||||
className='min-h-[52px] col-span-2 justify-center py-2 bg-white border-gray-200 hover:bg-gray-50'
|
||||
onClick={() => onQuickAction('vip')}
|
||||
>
|
||||
<div className='flex flex-col leading-tight text-sm text-gray-800'>
|
||||
<span>太平VIP认证</span>
|
||||
</div>
|
||||
</Button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { ExamClient, QuickActionType } from '../../data/mockData';
|
||||
import { EXAM_CLIENTS } from '../../data/mockData';
|
||||
import { Button, InfoCard, Input } from '../ui';
|
||||
import { InfoCard } from '../ui';
|
||||
import vipQr from '../../assets/image/vip-qr.png';
|
||||
interface QuickActionModalProps {
|
||||
action: QuickActionType;
|
||||
@@ -28,7 +28,6 @@ export const QuickActionModal = ({
|
||||
const titleMap: Record<Exclude<QuickActionType, 'none'>, string> = {
|
||||
meal: '用餐登记',
|
||||
vip: '太平 VIP 认证说明',
|
||||
delivery: '报告寄送登记',
|
||||
note: '备注窗',
|
||||
};
|
||||
|
||||
@@ -92,35 +91,6 @@ export const QuickActionModal = ({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{action === 'delivery' && (
|
||||
<div className='space-y-3 text-xs text-gray-700'>
|
||||
<div className='grid grid-cols-2 gap-3'>
|
||||
<div>
|
||||
收件人姓名
|
||||
<Input placeholder='请输入收件人姓名' className='mt-1' />
|
||||
</div>
|
||||
<div>
|
||||
联系电话
|
||||
<Input placeholder='用于快递联系' className='mt-1' />
|
||||
</div>
|
||||
<div className='col-span-2'>
|
||||
寄送地址
|
||||
<Input placeholder='请输入详细寄送地址' className='mt-1' />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
备注说明
|
||||
<textarea
|
||||
className='w-full mt-1 rounded-2xl border px-3 py-2 text-xs outline-none focus:ring-2 focus:ring-gray-200 min-h-[72px]'
|
||||
placeholder='如需多份报告、加急寄送等,请在此备注'
|
||||
/>
|
||||
</div>
|
||||
<div className='text-right'>
|
||||
<Button>保存寄送信息</Button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{action === 'note' && (
|
||||
<div className='space-y-3 text-xs text-gray-700'>
|
||||
<div>体检客户服务备注(仅内部可见)</div>
|
||||
|
||||
@@ -18,8 +18,8 @@ export interface ExamClient {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export type ExamModalTab = 'detail' | 'sign' | 'addon' | 'print';
|
||||
export type QuickActionType = 'none' | 'meal' | 'vip' | 'delivery' | 'note';
|
||||
export type ExamModalTab = 'detail' | 'sign' | 'addon' | 'print' | 'delivery';
|
||||
export type QuickActionType = 'none' | 'meal' | 'vip' | 'note';
|
||||
|
||||
export const HOME_STATS: [string, number][] = [
|
||||
['今日预约', 80],
|
||||
|
||||
Reference in New Issue
Block a user