From 49e39f6f23ec7edf4b3fb2363ab2cf3e462fd5ce Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期三, 22 四月 2026 10:34:11 +0800
Subject: [PATCH] 阳光彩印web 营销台账修改销售合同号改销售订单号

---
 src/views/salesManagement/salesQuotation/index.vue |   45 +++++++++++++++++++--------------------------
 1 files changed, 19 insertions(+), 26 deletions(-)

diff --git a/src/views/salesManagement/salesQuotation/index.vue b/src/views/salesManagement/salesQuotation/index.vue
index ae87a9f..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">
@@ -103,18 +103,14 @@
             <el-row :gutter="24">
               <el-col :span="12">
                 <el-form-item label="瀹㈡埛鍚嶇О" prop="customer">
-                  <el-select v-model="form.customer" placeholder="璇烽�夋嫨瀹㈡埛" style="width: 100%" @change="handleCustomerChange" clearable>
-                    <el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.customerName">
-                      {{
-                        item.customerName + "鈥斺��" + item.taxpayerIdentificationNumber
-                      }}
-                    </el-option>
+                  <el-select v-model="form.customer" placeholder="璇烽�夋嫨瀹㈡埛" style="width: 100%" clearable filterable>
+                    <el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.id"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="涓氬姟鍛�" prop="salesperson">
-                  <el-select v-model="form.salesperson" placeholder="璇烽�夋嫨涓氬姟鍛�" style="width: 100%" clearable>
+                  <el-select v-model="form.salesperson" placeholder="璇烽�夋嫨涓氬姟鍛�" style="width: 100%" clearable filterable>
                     <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName"
                       :value="item.nickName" />
                   </el-select>
@@ -190,6 +186,7 @@
                         v-model="node.userId"
                         placeholder="閫夋嫨浜哄憳"
                         class="approver-select"
+												filterable
                         clearable
                       >
                         <el-option
@@ -275,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>
@@ -373,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>
       
@@ -385,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>
@@ -411,6 +408,7 @@
 import {userListNoPage} from "@/api/system/user.js";
 import { customerList } from "@/api/salesManagement/salesLedger.js";
 import {modelList, productTreeList} from "@/api/basicData/product.js";
+import {listCustomerPrivatePool} from "@/api/basicData/customerFile.js";
 import { getToken } from "@/utils/auth";
 import filePreview from "@/components/filePreview/index.vue";
 
@@ -570,13 +568,8 @@
     userName: item.userName || ''
   }));
 	getProductOptions();
-	customerList().then((res) => {
-		// 鍙鍒堕渶瑕佺殑瀛楁锛岄伩鍏嶅皢缁勪欢寮曠敤鏀惧叆鍝嶅簲寮忓璞�
-		customerOption.value = (Array.isArray(res) ? res : []).map(item => ({
-      id: item.id,
-      customerName: item.customerName || '',
-      taxpayerIdentificationNumber: item.taxpayerIdentificationNumber || ''
-    }))
+	listCustomerPrivatePool({current: -1,size:-1}).then((res) => {
+		customerOption.value = res.data.records;
 	});
 }
 const getProductOptions = () => {
@@ -861,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 = () => {
@@ -1030,12 +1028,7 @@
     }
   })
 	customerList().then((res) => {
-		// 鍙鍒堕渶瑕佺殑瀛楁锛岄伩鍏嶅皢缁勪欢寮曠敤鏀惧叆鍝嶅簲寮忓璞�
-		customerOption.value = (Array.isArray(res) ? res : []).map(item => ({
-      id: item.id,
-      customerName: item.customerName || '',
-      taxpayerIdentificationNumber: item.taxpayerIdentificationNumber || ''
-    }))
+		customerOption.value = res;
 	});
 }
 

--
Gitblit v1.9.3