调整样式
This commit is contained in:
@@ -254,9 +254,7 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {
|
|||||||
currentPrice:
|
currentPrice:
|
||||||
item.actual_received_amount !== undefined && item.actual_received_amount !== null
|
item.actual_received_amount !== undefined && item.actual_received_amount !== null
|
||||||
? Number(item.actual_received_amount).toFixed(2)
|
? Number(item.actual_received_amount).toFixed(2)
|
||||||
: item.original_price !== undefined && item.original_price !== null
|
: '0.00',
|
||||||
? Number(item.original_price).toFixed(2)
|
|
||||||
: '0.00',
|
|
||||||
combinationItemCode: item.combination_item_code ?? null,
|
combinationItemCode: item.combination_item_code ?? null,
|
||||||
isEnjoyDiscount: item.is_enjoy_discount ?? null,
|
isEnjoyDiscount: item.is_enjoy_discount ?? null,
|
||||||
discount_name: item.discount_rate ?? null,
|
discount_name: item.discount_rate ?? null,
|
||||||
@@ -1077,10 +1075,13 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {
|
|||||||
<div className='mt-auto pt-1'>
|
<div className='mt-auto pt-1'>
|
||||||
<div className='flex flex-col'>
|
<div className='flex flex-col'>
|
||||||
{origPrice >= 0 && origPrice >= currPrice && (
|
{origPrice >= 0 && origPrice >= currPrice && (
|
||||||
<span className='text-xs text-gray-400 line-through'>¥{origPrice.toFixed(2)}</span>
|
<span className='text-xs text-gray-400 line-through'>原价:¥{origPrice.toFixed(2)}</span>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
<span className='text-[13px] font-bold text-red-600'>折扣价:¥{currPrice.toFixed(2)}</span>
|
||||||
|
|
||||||
<div className='flex items-center justify-between gap-2'>
|
<div className='flex items-center justify-between gap-2'>
|
||||||
<span className='text-[14px] font-bold text-red-600'>¥{currPrice.toFixed(2)}</span>
|
<span></span>
|
||||||
<span className={`text-[10px] px-2 rounded-full bg-[#EAFCF1] text-[#447955] whitespace-nowrap`}>
|
<span className={`text-[10px] px-2 rounded-full bg-[#EAFCF1] text-[#447955] whitespace-nowrap`}>
|
||||||
{getDiscountText(item)}
|
{getDiscountText(item)}
|
||||||
</span>
|
</span>
|
||||||
@@ -1140,7 +1141,7 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {
|
|||||||
: 'bg-blue-600 hover:bg-blue-700'
|
: 'bg-blue-600 hover:bg-blue-700'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
自定义结算
|
申请自定义结算
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -1378,36 +1379,32 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {
|
|||||||
{customSettlementType === 1 ? (
|
{customSettlementType === 1 ? (
|
||||||
<div className='space-y-3'>
|
<div className='space-y-3'>
|
||||||
<div className='flex items-center justify-between'>
|
<div className='flex items-center justify-between'>
|
||||||
<label className='text-sm text-gray-700 font-medium'>折扣比例</label>
|
<label className='text-sm text-gray-700 font-medium'>折扣比例 (%)</label>
|
||||||
<span className='text-sm font-semibold text-blue-600'>{customDiscountRatio / 10}折</span>
|
<span className='text-sm font-semibold text-blue-600'>
|
||||||
|
{(customDiscountRatio / 10).toFixed(1)}折
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className='relative'>
|
<div className='flex items-center gap-2'>
|
||||||
<input
|
<Input
|
||||||
type='range'
|
type='number'
|
||||||
min='10'
|
min='10'
|
||||||
max='100'
|
max='100'
|
||||||
step='5'
|
step='1'
|
||||||
value={customDiscountRatio}
|
value={customDiscountRatio}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setCustomDiscountRatio(Number(e.target.value));
|
const val = Number(e.target.value);
|
||||||
}}
|
if (Number.isNaN(val)) return;
|
||||||
className='w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-blue-600'
|
if (val < 10) {
|
||||||
style={{
|
setCustomDiscountRatio(10);
|
||||||
background: `linear-gradient(to right, #3b82f6 0%, #3b82f6 ${((customDiscountRatio - 10) / (100 - 10)) * 100}%, #e5e7eb ${((customDiscountRatio - 10) / (100 - 10)) * 100}%, #e5e7eb 100%)`
|
} else if (val > 100) {
|
||||||
|
setCustomDiscountRatio(100);
|
||||||
|
} else {
|
||||||
|
setCustomDiscountRatio(val);
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
|
className='w-28 text-sm'
|
||||||
/>
|
/>
|
||||||
{/* 刻度标记 */}
|
<span className='text-xs text-gray-500'>10-100,100 表示不打折</span>
|
||||||
<div className='flex justify-between mt-1 px-1'>
|
|
||||||
{[10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100].map((value) => (
|
|
||||||
<span
|
|
||||||
key={value}
|
|
||||||
className='text-[10px] text-gray-400'
|
|
||||||
style={{ width: '10px' }}
|
|
||||||
>
|
|
||||||
{value / 10}
|
|
||||||
</span>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div className='text-xs text-gray-500'>
|
<div className='text-xs text-gray-500'>
|
||||||
最终结算价: <span className='font-semibold text-red-600'>¥{(totalCurrent * (customDiscountRatio / 100)).toFixed(2)}</span>
|
最终结算价: <span className='font-semibold text-red-600'>¥{(totalCurrent * (customDiscountRatio / 100)).toFixed(2)}</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user