From 51b8b88c6b092ec58258aea26cdee416dd03eb99 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期三, 22 四月 2026 11:11:57 +0800
Subject: [PATCH] 阳光彩印web 生产核算删除工资字段

---
 src/views/salesManagement/salesQuotation/index.vue |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/views/salesManagement/salesQuotation/index.vue b/src/views/salesManagement/salesQuotation/index.vue
index d77045b..e25f111 100644
--- a/src/views/salesManagement/salesQuotation/index.vue
+++ b/src/views/salesManagement/salesQuotation/index.vue
@@ -65,7 +65,7 @@
         </el-table-column>
         <el-table-column prop="totalAmount" label="鎶ヤ环閲戦" width="120">
           <template #default="scope">
-            楼{{ scope.row.totalAmount.toFixed(2) }}
+            楼{{ scope.row.totalAmount.toFixed(3) }}
           </template>
         </el-table-column>
         <el-table-column label="鎿嶄綔" width="200" fixed="right" align="center">
@@ -272,7 +272,7 @@
             <el-table-column prop="unitPrice" label="鍗曚环">
               <template #default="scope">
                 <el-form-item :prop="`products.${scope.$index}.unitPrice`" class="product-table-form-item">
-                  <el-input-number v-model="scope.row.unitPrice" :min="0" :precision="2" style="width: 100%" />
+                  <el-input-number v-model="scope.row.unitPrice" :min="0" :precision="3" style="width: 100%" />
                 </el-form-item>
               </template>
             </el-table-column>
@@ -370,7 +370,7 @@
 <!--          <el-tag :type="getStatusType(currentQuotation.status)">{{ currentQuotation.status }}</el-tag>-->
 <!--        </el-descriptions-item>-->
         <el-descriptions-item label="鎶ヤ环鎬婚" :span="2">
-          <span style="font-size: 18px; color: #e6a23c; font-weight: bold;">楼{{ currentQuotation.totalAmount?.toFixed(2) }}</span>
+          <span style="font-size: 18px; color: #e6a23c; font-weight: bold;">楼{{ currentQuotation.totalAmount?.toFixed(3) }}</span>
         </el-descriptions-item>
       </el-descriptions>
       
@@ -382,7 +382,7 @@
           <el-table-column prop="unit" label="鍗曚綅" />
           <el-table-column prop="unitPrice" label="鍗曚环">
             <template #default="scope">
-              楼{{ scope.row.unitPrice.toFixed(2) }}
+              楼{{ scope.row.unitPrice.toFixed(3) }}
             </template>
           </el-table-column>
         </el-table>
@@ -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