From ef3aab90e71b07ff22ecc40a0a49236b371c04cd Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期三, 29 四月 2026 13:43:22 +0800
Subject: [PATCH] 优化营销客户相关

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

diff --git a/src/views/salesManagement/salesQuotation/index.vue b/src/views/salesManagement/salesQuotation/index.vue
index ee93e46..39cf160 100644
--- a/src/views/salesManagement/salesQuotation/index.vue
+++ b/src/views/salesManagement/salesQuotation/index.vue
@@ -16,8 +16,8 @@
           </el-input>
         </el-col>
         <el-col :span="8">
-          <el-select v-model="searchForm.customer" placeholder="璇烽�夋嫨瀹㈡埛" clearable>
-						<el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.customerName">
+          <el-select v-model="searchForm.customerId" placeholder="璇烽�夋嫨瀹㈡埛" clearable>
+						<el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.id">
 							{{
 								item.customerName + "鈥斺��" + item.taxpayerIdentificationNumber
 							}}
@@ -102,8 +102,8 @@
           <div class="form-content">
             <el-row :gutter="24">
               <el-col :span="12">
-                <el-form-item label="瀹㈡埛鍚嶇О" prop="customer">
-                  <el-select v-model="form.customer" placeholder="璇烽�夋嫨瀹㈡埛" style="width: 100%" clearable filterable>
+                <el-form-item label="瀹㈡埛鍚嶇О" prop="customerId">
+                  <el-select v-model="form.customerId" 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>
@@ -302,14 +302,14 @@
 import {getQuotationList,addQuotation,updateQuotation,deleteQuotation} from '@/api/salesManagement/salesQuotation.js'
 import {customerList} from "@/api/salesManagement/salesLedger.js";
 import {modelList, productTreeList} from "@/api/basicData/product.js";
-import {listCustomerPrivatePool} from "@/api/basicData/customerFile.js";
+import {listCustomer} from "@/api/basicData/customer.js";
 import { userListNoPage } from "@/api/system/user.js";
 
 // 鍝嶅簲寮忔暟鎹�
 const loading = ref(false)
 const searchForm = reactive({
   quotationNo: '',
-  customer: '',
+  customerId: '',
   status: ''
 })
 
@@ -328,7 +328,7 @@
 const dialogTitle = ref('鏂板鎶ヤ环')
 const form = reactive({
   quotationNo: '',
-  customer: '',
+  customerId: '',
   salesperson: '',
   quotationDate: '',
   validDate: '',
@@ -407,7 +407,7 @@
   resetForm()
   dialogVisible.value = true
   getProductOptions();
-  listCustomerPrivatePool({current: -1,size:-1}).then((res) => {
+  listCustomer({current: -1,size:-1, type: 0}).then((res) => {
     customerOption.value = res.data.records;
   });
 }
@@ -686,6 +686,7 @@
         return sum + price
       }, 0)
 
+      form.customer = customerOption.value.find(item => item.id === form.customerId)?.customerName || ''
       if (isEdit.value) {
         // 缂栬緫
         const index = quotationList.value.findIndex(item => item.id === editId.value)

--
Gitblit v1.9.3