From 93b04dfa60b2128273cd070269d8eaaeb14e15e8 Mon Sep 17 00:00:00 2001
From: fcx <2246384483@qq.com>
Date: 星期六, 06 十二月 2025 11:47:35 +0800
Subject: [PATCH] 新加首检搜索框

---
 pages/QC/SJ/List.vue |   48 +++++++++++++++++++++++++++++++++---------------
 1 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/pages/QC/SJ/List.vue b/pages/QC/SJ/List.vue
index 9abec1a..00e0167 100644
--- a/pages/QC/SJ/List.vue
+++ b/pages/QC/SJ/List.vue
@@ -11,15 +11,22 @@
                   @click="onClickItem({currentIndex: 0})">鏈畬鎴�({{ uncheckedCount }})
           </button>
           <button :class="['tab-button', current === 1 ? 'active' : '']"
-                  @click="onClickItem({currentIndex: 1})">{{ checkedCount }}
+                  @click="onClickItem({currentIndex: 1})">宸叉彁浜�({{ checkedCount }})
           </button>
         </view>
       </view>
-
+      
+      <!-- 娣诲姞鎼滅储绛涢�夊尯鍩� -->
       <view class="filter-controls" style="margin-bottom: 5px;">
+        <view class="dropdown-filter">
+          <picker @change="onOptionsChange" :value="optionsIndex" :range="options">
+            <view class="picker">{{options[optionsIndex]}}</view>
+          </picker>
+        </view>
+        <!-- 鎼滅储妗嗗拰鎸夐挳 -->
         <view class="search-container">
-          <input v-model="searchValue" class="search-input" placeholder="璇疯緭鍏ユ楠屽崟鍙锋垨鐗╂枡缂栫爜"
-                 @confirm="handleSearch"/>
+          <input class="search-input" v-model="searchValue" :placeholder="'璇疯緭鍏�'+options[optionsIndex]"
+                 @confirm="handleSearch" />
           <button class="search-button" @click="handleSearch">鎼滅储</button>
         </view>
       </view>
@@ -142,9 +149,11 @@
       tipShow: false,
       searchValue: '',
       uncheckedCount: 0,
-      checkedCount: '宸插畬鎴�',
+      checkedCount: 0,
       IQCJL: 0, // IQC 妫�楠屽憳鏍囪瘑
-	  userId:""
+	  userId:"",
+      optionsIndex: 0, // 鏂板锛氫笅鎷夐�夐」绱㈠紩
+      options: ['椤圭洰', '绾夸綋', '宸ュ崟鍙�', '鐗╂枡鍙�', '鐗╂枡鍚�'] // 鏂板锛氭悳绱㈤�夐」
     };
   },
 
@@ -176,6 +185,18 @@
   },
 
   methods: {
+    // 鏂板锛氭悳绱㈤�夐」鏀瑰彉浜嬩欢
+    onOptionsChange(e) {
+      this.optionsIndex = e.detail.value;
+    },
+    
+    // 鏂板锛氭悳绱㈡寜閽偣鍑讳簨浠�
+    handleSearch() {
+      this.pageIndex = 1;
+      this.data = [];
+      this.init();
+    },
+
     async init() {
       let result = this.current === 1 ? "宸插畬鎴�" : "鏈畬鎴�";
       if (this.isLoading) return;
@@ -191,7 +212,8 @@
             limit: this.limit,
             statusUser: userName,
             result: result,
-            searchValue: this.searchValue
+            searchValue: this.searchValue,
+            selectedIndex: this.optionsIndex // 鏂板锛氫紶閫掓悳绱㈤�夐」绱㈠紩
           }
         });
 
@@ -207,7 +229,7 @@
         this.noData = this.pageIndex >= this.totalPage;
 
         if (this.current === 1) {
-          this.checkedCount = '宸插畬鎴愶紙' + this.totalCount + '锛�';
+          this.checkedCount = this.totalCount;
         } else {
           this.uncheckedCount = this.totalCount;
         }
@@ -219,19 +241,15 @@
       }
     },
 
-    // 鎼滅储
-    handleSearch() {
-      this.pageIndex = 1;
-      this.data = [];
-      this.init();
-    },
-
     // Tab 鍒囨崲
     onClickItem(index) {
       if (this.current !== index.currentIndex) {
         this.current = index.currentIndex;
         this.data = [];
         this.pageIndex = 1;
+        // 閲嶇疆绛涢�夋潯浠�
+        this.optionsIndex = 0;
+        this.searchValue = '';
         this.init();
       }
     },

--
Gitblit v1.9.3