添加挂账公司清除按钮
This commit is contained in:
@@ -316,6 +316,13 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {
|
||||
setIsAccountCompanyDropdownOpen(false);
|
||||
};
|
||||
|
||||
// 清空挂账公司
|
||||
const handleClearAccountCompany = () => {
|
||||
setAccountCompany('');
|
||||
setAccountCompanySearch('');
|
||||
setIsAccountCompanyDropdownOpen(false);
|
||||
};
|
||||
|
||||
// 结算方式选项
|
||||
const paymentMethodOptions: Array<{ value: 'self' | 'account'; label: string }> = [
|
||||
{ value: 'self', label: '自费' },
|
||||
@@ -838,10 +845,25 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {
|
||||
}}
|
||||
placeholder={'请输入公司名称'}
|
||||
className='w-full outline-none text-xs bg-transparent'
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
/>
|
||||
<span className={cls('text-gray-400 transition-transform text-[10px]', isAccountCompanyDropdownOpen && 'rotate-180')}>
|
||||
▼
|
||||
</span>
|
||||
<div className='flex items-center gap-1'>
|
||||
{accountCompanySearch && (
|
||||
<button
|
||||
type='button'
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
handleClearAccountCompany();
|
||||
}}
|
||||
className='text-gray-400 hover:text-gray-600 transition-colors text-sm leading-none w-4 h-4 flex items-center justify-center'
|
||||
>
|
||||
×
|
||||
</button>
|
||||
)}
|
||||
<span className={cls('text-gray-400 transition-transform text-[10px]', isAccountCompanyDropdownOpen && 'rotate-180')}>
|
||||
▼
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{isAccountCompanyDropdownOpen && (
|
||||
<div className='absolute z-50 w-full bottom-full mb-1 bg-white border border-gray-300 rounded-lg shadow-lg overflow-hidden max-h-[320px] overflow-y-auto'>
|
||||
|
||||
Reference in New Issue
Block a user