From e449a5408265e4bd1f6c66f5be28a42efac444ee Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期日, 20 九月 2026 15:22:46 +0800
Subject: [PATCH] 天津豹鸣app 1.需求修改

---
 src/pages/sales/salesQuotation/index.vue |   68 +++++++++++++++++++++++++++++++---
 1 files changed, 62 insertions(+), 6 deletions(-)

diff --git a/src/pages/sales/salesQuotation/index.vue b/src/pages/sales/salesQuotation/index.vue
index 4ecf910..a2b9703 100644
--- a/src/pages/sales/salesQuotation/index.vue
+++ b/src/pages/sales/salesQuotation/index.vue
@@ -6,14 +6,14 @@
       <view class="search-bar">
         <view class="search-input">
           <up-input class="search-text"
-                    v-model="quotationNo"
+                    v-model="query.quotationNo"
                     placeholder="璇疯緭鍏ユ姤浠峰崟鍙锋悳绱�"
                     clearable
                     @change="getList" />
         </view>
         <view class="filter-button"
-              @click="getList">
-          <up-icon name="search"
+              @click="showFilter = true">
+          <up-icon name="list"
                    size="24"
                    color="#999"></up-icon>
         </view>
@@ -49,6 +49,10 @@
           <view class="detail-row">
             <text class="detail-label">瀹㈡埛鍚嶇О</text>
             <text class="detail-value">{{ item.customer || "-" }}</text>
+          </view>
+          <view class="detail-row">
+            <text class="detail-label">鎵�灞為」鐩�</text>
+            <text class="detail-value">{{ item.projectName || "-" }}</text>
           </view>
           <view class="detail-row">
             <text class="detail-label">涓氬姟鍛�</text>
@@ -103,20 +107,50 @@
                size="28"
                color="#ffffff"></up-icon>
     </view>
+
+    <FilterPanel v-model:show="showFilter"
+                 :model-value="query"
+                 title="鎶ヤ环绛涢��"
+                 :fields="filterFields"
+                 @search="onFilterSearch"
+                 @reset="onFilterSearch" />
   </view>
 </template>
 
 <script setup>
-  import { reactive, ref } from "vue";
+  import { computed, reactive, ref } from "vue";
   import { onShow } from "@dcloudio/uni-app";
   import PageHeader from "@/components/PageHeader.vue";
+  import FilterPanel from "@/components/FilterPanel.vue";
   import {
     deleteQuotation,
     getQuotationList,
   } from "@/api/salesManagement/salesQuotation";
+  import { loadProjectOptions } from "@/utils/projectOptions";
 
-  const quotationNo = ref("");
   const quotationList = ref([]);
+  const showFilter = ref(false);
+  const projectOptions = ref([]);
+
+  const query = reactive({
+    quotationNo: "",
+    projectId: "",
+  });
+
+  const filterFields = computed(() => [
+    {
+      prop: "quotationNo",
+      label: "鎶ヤ环鍗曞彿",
+      type: "input",
+      placeholder: "璇疯緭鍏ユ姤浠峰崟鍙�",
+    },
+    {
+      prop: "projectId",
+      label: "鎵�灞為」鐩�",
+      type: "select",
+      options: projectOptions.value,
+    },
+  ]);
 
   const tabList = reactive([
     { name: "鍏ㄩ儴", value: "" },
@@ -183,7 +217,8 @@
     uni.showLoading({ title: "鍔犺浇涓�...", mask: true });
     getQuotationList({
       ...page,
-      quotationNo: quotationNo.value,
+      quotationNo: query.quotationNo,
+      projectId: query.projectId || undefined,
       status: getCurrentStatus(),
     })
       .then(res => {
@@ -195,6 +230,26 @@
       })
       .finally(() => {
         uni.hideLoading();
+      });
+  };
+
+  // FilterPanel 鍙洖鍚愮瓫閫夊�硷紝鍐欏洖 query 鍚庣粺涓�鏌ヨ
+  const onFilterSearch = values => {
+    Object.assign(query, values);
+    getList();
+  };
+
+  let projectsLoaded = false;
+
+  const loadProjects = () => {
+    if (projectsLoaded) return;
+    projectsLoaded = true;
+    loadProjectOptions()
+      .then(options => {
+        projectOptions.value = options;
+      })
+      .catch(() => {
+        projectsLoaded = false;
       });
   };
 
@@ -223,6 +278,7 @@
 
   onShow(() => {
     getList();
+    loadProjects();
   });
 </script>
 

--
Gitblit v1.9.3