From 2d3530a7c11557a40807ad7c0b9e302ce6ce3a9f Mon Sep 17 00:00:00 2001
From: hsy <1029150275@qq.com>
Date: 星期五, 28 八月 2026 10:16:32 +0800
Subject: [PATCH] feat: 综合业务模块页面重构与交互完善

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

diff --git a/src/views/salesManagement/salesQuotation/index.vue b/src/views/salesManagement/salesQuotation/index.vue
index fce764f..edd0102 100644
--- a/src/views/salesManagement/salesQuotation/index.vue
+++ b/src/views/salesManagement/salesQuotation/index.vue
@@ -3,7 +3,7 @@
     <el-card class="box-card">
       <!-- 鎼滅储鍖哄煙 -->
       <el-row :gutter="20" class="search-row">
-        <el-col :span="8">
+        <el-col :span="6">
           <el-input
             v-model="searchForm.quotationNo"
             placeholder="璇疯緭鍏ユ姤浠峰崟鍙�"
@@ -15,7 +15,7 @@
             </template>
           </el-input>
         </el-col>
-        <el-col :span="8">
+        <el-col :span="6">
           <el-select v-model="searchForm.customerId" placeholder="璇烽�夋嫨瀹㈡埛" clearable>
 						<el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.id">
 							{{
@@ -32,7 +32,12 @@
 <!--            <el-option label="宸茶繃鏈�" value="宸茶繃鏈�"></el-option>-->
 <!--          </el-select>-->
 <!--        </el-col>-->
-        <el-col :span="8">
+        <el-col :span="6">
+          <el-select v-model="searchForm.projectId" placeholder="璇烽�夋嫨椤圭洰鍚嶇О" clearable filterable>
+            <el-option v-for="item in projectOptions" :key="item.id" :label="item.no + ' - ' + item.title" :value="item.id" />
+          </el-select>
+        </el-col>
+        <el-col :span="6">
           <el-button type="primary" @click="handleSearch">鎼滅储</el-button>
           <el-button @click="resetSearch">閲嶇疆</el-button>
           <el-button style="float: right;" type="primary" @click="handleAdd">
@@ -52,6 +57,7 @@
       >
 				<el-table-column align="center" label="搴忓彿" type="index" width="60" />
         <el-table-column prop="quotationNo" label="鎶ヤ环鍗曞彿" />
+        <el-table-column prop="projectName" label="椤圭洰鍚嶇О" />
         <el-table-column prop="customer" label="瀹㈡埛鍚嶇О" />
         <el-table-column prop="salesperson" label="涓氬姟鍛�" width="100" />
         <el-table-column prop="quotationDate" label="鎶ヤ环鏃ユ湡" width="120" />
@@ -149,6 +155,13 @@
               <el-col :span="12">
                 <el-form-item label="浠樻鏂瑰紡" prop="paymentMethod">
                   <el-input v-model="form.paymentMethod" placeholder="璇疯緭鍏ヤ粯娆炬柟寮�" clearable />
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="椤圭洰鍚嶇О" prop="projectId">
+                  <el-select v-model="form.projectId" placeholder="璇烽�夋嫨椤圭洰鍚嶇О" style="width: 100%" clearable filterable>
+                    <el-option v-for="item in projectOptions" :key="item.id" :label="item.no + ' - ' + item.title" :value="item.id" />
+                  </el-select>
                 </el-form-item>
               </el-col>
             </el-row>
@@ -258,6 +271,7 @@
     <el-dialog v-model="viewDialogVisible" title="鎶ヤ环璇︽儏" width="800px">
       <el-descriptions :column="2" border>
         <el-descriptions-item label="鎶ヤ环鍗曞彿">{{ currentQuotation.quotationNo }}</el-descriptions-item>
+        <el-descriptions-item label="椤圭洰鍚嶇О">{{ currentQuotation.projectName }}</el-descriptions-item>
         <el-descriptions-item label="瀹㈡埛鍚嶇О">{{ currentQuotation.customer }}</el-descriptions-item>
         <el-descriptions-item label="涓氬姟鍛�">{{ currentQuotation.salesperson }}</el-descriptions-item>
         <el-descriptions-item label="鎶ヤ环鏃ユ湡">{{ currentQuotation.quotationDate }}</el-descriptions-item>
@@ -303,19 +317,22 @@
 import {modelList, productTreeList} from "@/api/basicData/product.js";
 import {listCustomer} from "@/api/basicData/customer.js";
 import { userListNoPage } from "@/api/system/user.js";
+import { listProject } from "@/api/projectManagement/project.js";
 
 // 鍝嶅簲寮忔暟鎹�
 const loading = ref(false)
 const searchForm = reactive({
   quotationNo: '',
   customerId: '',
-  status: ''
+  status: '',
+  projectId: undefined
 })
 
 const quotationList = ref([])
 const userList = ref([])
 const productOptions = ref([]);
 const modelOptions  = ref([]);
+const projectOptions = ref([]);
 const pagination = reactive({
   total: 3,
   currentPage: 1,
@@ -328,6 +345,7 @@
 const form = reactive({
   quotationNo: '',
   customerId: undefined,
+  projectId: undefined,
   customer: '',
   salesperson: '',
   quotationDate: '',
@@ -396,6 +414,7 @@
   searchForm.quotationNo = ''
   searchForm.customer = ''
   searchForm.status = ''
+  searchForm.projectId = undefined
   // 閲嶇疆鍒扮涓�椤靛苟閲嶆柊鏌ヨ
   pagination.currentPage = 1
   handleSearch()
@@ -407,7 +426,15 @@
   resetForm()
   dialogVisible.value = true
   getProductOptions();
-  fetchCustomerOptions()
+  fetchCustomerOptions();
+  fetchProjectOptions();
+}
+
+const fetchProjectOptions = () => {
+  if (projectOptions.value.length > 0) return
+  listProject({current: -1,size:-1}).then((res) => {
+    projectOptions.value = res.data.records;
+  });
 }
 
 const fetchCustomerOptions = () => {
@@ -530,7 +557,8 @@
       unitPrice: product.unitPrice || 0,
       amount: product.amount || 0
     })) : [],
-    totalAmount: row.totalAmount || 0
+    totalAmount: row.totalAmount || 0,
+    projectName: row.projectName || ''
   }
   viewDialogVisible.value = true
 }
@@ -543,11 +571,13 @@
   // 鍏堝姞杞戒骇鍝佹爲鏁版嵁锛屽惁鍒� el-tree-select 鏃犳硶鍙嶆樉浜у搧鍚嶇О
   await getProductOptions()
   await fetchCustomerOptions()
+  await fetchProjectOptions()
 
   // 鍙鍒堕渶瑕佺殑瀛楁锛岄伩鍏嶅皢缁勪欢寮曠敤鏀惧叆鍝嶅簲寮忓璞�
   form.quotationNo = row.quotationNo || ''
   form.customer = row.customer || ''
   form.customerId = row.customerId || undefined
+  form.projectId = row.projectId || undefined
   form.salesperson = row.salesperson || ''
   form.quotationDate = row.quotationDate || ''
   form.validDate = row.validDate || ''
@@ -629,6 +659,8 @@
 
 const resetForm = () => {
   form.customer = ''
+  form.customerId = undefined
+  form.projectId = undefined
   form.salesperson = ''
   form.quotationDate = ''
   form.validDate = ''
@@ -790,6 +822,7 @@
   getUserList()
   handleSearch()
   fetchCustomerOptions()
+  fetchProjectOptions()
 })
 </script>
 

--
Gitblit v1.9.3