From 67d42a761ea34624cfb2de3cbb38f37a319d2631 Mon Sep 17 00:00:00 2001
From: xwt <2740516069@qq.com>
Date: 星期四, 25 九月 2025 19:16:23 +0800
Subject: [PATCH] SJ,XJ,RKJ优化

---
 pages/QC/XJ/List.vue |  111 +++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 103 insertions(+), 8 deletions(-)

diff --git a/pages/QC/XJ/List.vue b/pages/QC/XJ/List.vue
index b5328b0..1bf9656 100644
--- a/pages/QC/XJ/List.vue
+++ b/pages/QC/XJ/List.vue
@@ -6,13 +6,26 @@
     <!-- 椤堕儴绛涢�夊尯 -->
     <view class="filter-section">
       <view class="filter-controls">
+        <!-- 鏌ヨ鏉′欢閫夋嫨鍣� -->
+        <view class="dropdown-filter">
+          <picker @change="onOptionsChange" :value="optionsIndex" :range="options">
+            <view class="picker">{{options[optionsIndex]}}</view>
+          </picker>
+        </view>
+        
+        <!-- 鎼滅储妗� -->
+        <view class="search-container">
+          <input class="search-input" v-model="searchValue" :placeholder="'璇疯緭鍏�'+options[optionsIndex]" @confirm="btnclicked" />
+          <button class="search-button" @click="btnclicked">鎼滅储</button>
+        </view>
+        
         <!-- 鐘舵�佸垏鎹㈡爣绛� -->
         <view class="status-tabs">
           <button :class="['tab-button', current === 0 ? 'active' : '']" @click="onClickItem({currentIndex: 0})">
-            {{items[0]}}
+            鏈彁浜�({{unsubmittedCount}})
           </button>
           <button :class="['tab-button', current === 1 ? 'active' : '']" @click="onClickItem({currentIndex: 1})">
-            {{items[1]}}
+            宸叉彁浜�({{submittedCount}})
           </button>
         </view>
       </view>
@@ -98,7 +111,15 @@
       items: ['鏈彁浜�', '宸叉彁浜�'],
       current: 0,
       data: [],
-      tipShow: false // 鏄惁鏄剧ず椤堕儴鎻愮ず妗�
+      tipShow: false, // 鏄惁鏄剧ず椤堕儴鎻愮ず妗�
+      searchValue: '',
+      // ===== 鏂板鎼滅储鍔熻兘鐩稿叧鏁版嵁 =====
+      optionsIndex: 0, // 褰撳墠閫夋嫨鐨勬煡璇㈡潯浠剁储寮�
+      options: ['宸ュ崟', '妫�楠屽崟鍙�', '浜х嚎', '鐗╂枡缂栫爜', '鐗╂枡鍚嶇О'], // 鏌ヨ鏉′欢閫夐」
+      selectedField: 'billNo', // 褰撳墠閫夋嫨鐨勬煡璇㈠瓧娈碉紝榛樿涓哄伐鍗�
+      // ===== 鏂板鏁伴噺缁熻鍙橀噺 =====
+      unsubmittedCount: 0, // 鏈彁浜ゆ暟閲�
+      submittedCount: 0 // 宸叉彁浜ゆ暟閲�
     };
   },
   onLoad() {
@@ -106,8 +127,29 @@
     this.init();
   },
   methods: {
+    // ===== 鏂板鏌ヨ鏉′欢閫夋嫨鏂规硶 =====
+    onOptionsChange(e) {
+      this.optionsIndex = e.detail.value;
+      // 鏍规嵁閫夋嫨鐨勯�夐」璁剧疆鎼滅储瀛楁
+      const fieldMap = {
+        0: 'billNo',     // 宸ュ崟
+        1: 'releaseNo',  // 妫�楠屽崟鍙�
+        2: 'daa020',     // 浜х嚎
+        3: 'itemNo',     // 鐗╂枡缂栫爜
+        4: 'itemName'    // 鐗╂枡鍚嶇О
+      };
+      this.selectedField = fieldMap[this.optionsIndex];
+    },
+    
+    //鎼滅储妗嗙偣鍑讳簨浠�
+    btnclicked() {
+      this.init();
+    },
+    
     init() {
-
+      //鑾峰彇鎼滅储鏉′欢鍐呭
+      let SearchValue = this.searchValue;
+      
       let result = "鏈畬鎴�";
       if (this.current === 1) {
         result = "宸插畬鎴�";
@@ -120,10 +162,19 @@
           pageIndex: 1,
           limit: 20,
           createUser: this.$loginInfo.account,
-          result: result
+          result: result,
+          SearchValue: SearchValue,
+          selectedIndex: this.optionsIndex, // 鏂板锛氭悳绱㈡潯浠剁储寮�
+          searchField: this.selectedField   // 鏂板锛氭悳绱㈠瓧娈靛悕
         }
       }).then(res => {
         this.data = res.data.tbBillList;
+        // 璁剧疆鏁伴噺缁熻
+        if (this.current === 1) {
+          this.submittedCount = res.totalCount;
+        } else {
+          this.unsubmittedCount = res.totalCount;
+        }
       })
     },
     handleFabClick() {
@@ -186,8 +237,51 @@
 
 .filter-controls {
   display: flex;
-  justify-content: center;
-  align-items: center;
+  flex-wrap: wrap;
+  gap: 10px;
+}
+
+/* 鏌ヨ鏉′欢閫夋嫨鍣� */
+.dropdown-filter {
+  min-width: 80px;
+  margin-right: 10px;
+}
+
+.picker {
+  padding: 8px 12px;
+  border: 1px solid #ddd;
+  border-radius: 4px;
+  background-color: white;
+  font-size: 14px;
+  min-width: 80px;
+}
+
+/* 鎼滅储妗嗘牱寮� */
+.search-container {
+  display: flex;
+  flex: 1;
+  margin-right: 10px;
+  height: 36px;
+  min-width: 200px;
+}
+
+.search-input {
+  flex: 1;
+  padding: 8px 12px;
+  border: 1px solid #ddd;
+  border-radius: 4px 0 0 4px;
+  font-size: 14px;
+  background-color: white;
+}
+
+.search-button {
+  padding: 0 12px;
+  border: 1px solid #3498db;
+  border-radius: 0 4px 4px 0;
+  background-color: #3498db;
+  color: white;
+  font-size: 14px;
+  margin: 0;
 }
 
 .status-tabs {
@@ -195,7 +289,8 @@
   border-radius: 4px;
   overflow: hidden;
   background-color: #ecf0f1;
-  width: 300px;
+  flex: 1;
+  min-width: 200px;
 }
 
 .tab-button {

--
Gitblit v1.9.3