From 388e286dc8a5b3b8c4717cc74bf128c807eba6b7 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期一, 20 四月 2026 14:07:58 +0800
Subject: [PATCH] fix: 阳光彩印-修复总价计算中的数值处理并调整税率验证逻辑

---
 src/views/salesManagement/salesQuotation/index.vue |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/views/salesManagement/salesQuotation/index.vue b/src/views/salesManagement/salesQuotation/index.vue
index d77045b..bf13ec6 100644
--- a/src/views/salesManagement/salesQuotation/index.vue
+++ b/src/views/salesManagement/salesQuotation/index.vue
@@ -854,8 +854,13 @@
 }
 
 const calculateTotal = () => {
-  form.discountAmount = form.subtotal * (form.discountRate / 100)
-  form.totalAmount = form.subtotal + form.freight + form.otherFee - form.discountAmount
+  const rate = Number(form.discountRate)
+  const hasRate = Number.isFinite(rate) && rate > 0
+  const subtotal = Number(form.subtotal) || 0
+  const freight = Number(form.freight) || 0
+  const otherFee = Number(form.otherFee) || 0
+  form.discountAmount = hasRate ? subtotal * (rate / 100) : 0
+  form.totalAmount = subtotal + freight + otherFee - form.discountAmount
 }
 
 const handleCustomerChange = () => {

--
Gitblit v1.9.3