diff --git a/src/components/exam/ExamAddonPanel.tsx b/src/components/exam/ExamAddonPanel.tsx index 9766b22..5905a95 100644 --- a/src/components/exam/ExamAddonPanel.tsx +++ b/src/components/exam/ExamAddonPanel.tsx @@ -254,9 +254,7 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => { currentPrice: item.actual_received_amount !== undefined && item.actual_received_amount !== null ? Number(item.actual_received_amount).toFixed(2) - : item.original_price !== undefined && item.original_price !== null - ? Number(item.original_price).toFixed(2) - : '0.00', + : '0.00', combinationItemCode: item.combination_item_code ?? null, isEnjoyDiscount: item.is_enjoy_discount ?? null, discount_name: item.discount_rate ?? null, @@ -1077,10 +1075,13 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {
{origPrice >= 0 && origPrice >= currPrice && ( - ¥{origPrice.toFixed(2)} + 原价:¥{origPrice.toFixed(2)} )} + + 折扣价:¥{currPrice.toFixed(2)} +
- ¥{currPrice.toFixed(2)} + {getDiscountText(item)} @@ -1140,7 +1141,7 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => { : 'bg-blue-600 hover:bg-blue-700' )} > - 自定义结算 + 申请自定义结算
)} @@ -1378,36 +1379,32 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => { {customSettlementType === 1 ? (
- - {customDiscountRatio / 10}折 + + + {(customDiscountRatio / 10).toFixed(1)}折 +
-
- + { - setCustomDiscountRatio(Number(e.target.value)); - }} - className='w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-blue-600' - style={{ - background: `linear-gradient(to right, #3b82f6 0%, #3b82f6 ${((customDiscountRatio - 10) / (100 - 10)) * 100}%, #e5e7eb ${((customDiscountRatio - 10) / (100 - 10)) * 100}%, #e5e7eb 100%)` + const val = Number(e.target.value); + if (Number.isNaN(val)) return; + if (val < 10) { + setCustomDiscountRatio(10); + } else if (val > 100) { + setCustomDiscountRatio(100); + } else { + setCustomDiscountRatio(val); + } }} + className='w-28 text-sm' /> - {/* 刻度标记 */} -
- {[10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100].map((value) => ( - - {value / 10} - - ))} -
+ 10-100,100 表示不打折
最终结算价: ¥{(totalCurrent * (customDiscountRatio / 100)).toFixed(2)}