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/RKJ/List.vue |  115 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 107 insertions(+), 8 deletions(-)

diff --git a/pages/QC/RKJ/List.vue b/pages/QC/RKJ/List.vue
index 05350a0..6f84ac2 100644
--- a/pages/QC/RKJ/List.vue
+++ b/pages/QC/RKJ/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>
@@ -115,7 +128,15 @@
         totalCount: 0,
         noData: false, // 娌℃湁鏇村鏁版嵁浜�
         isLoading: false, // 鏄惁姝e湪鍔犺浇
-        tipShow: false
+        tipShow: false,
+        searchValue: '',
+        // ===== 鏂板鎼滅储鍔熻兘鐩稿叧鏁版嵁 =====
+        optionsIndex: 0, // 褰撳墠閫夋嫨鐨勬煡璇㈡潯浠剁储寮�
+        options: ['宸ュ崟', '妫�楠屽崟鍙�', '浜х嚎', '鐗╂枡缂栫爜', '鐗╂枡鍚嶇О'], // 鏌ヨ鏉′欢閫夐」
+        selectedField: 'billNo', // 褰撳墠閫夋嫨鐨勬煡璇㈠瓧娈碉紝榛樿涓哄伐鍗�
+        // ===== 鏂板鏁伴噺缁熻鍙橀噺 =====
+        unsubmittedCount: 0, // 鏈彁浜ゆ暟閲�
+        submittedCount: 0 // 宸叉彁浜ゆ暟閲�
       };
     },
     onLoad() {
@@ -123,7 +144,30 @@
       this.init();
     },
     methods: {
-            init() {
+      // ===== 鏂板鏌ヨ鏉′欢閫夋嫨鏂规硶 =====
+      onOptionsChange(e) {
+        this.optionsIndex = e.detail.value;
+        // 鏍规嵁閫夋嫨鐨勯�夐」璁剧疆鎼滅储瀛楁
+        const fieldMap = {
+          0: 'billNo',     // 宸ュ崟
+          1: 'releaseNo',  // 妫�楠屽崟鍙�
+          2: 'daa015',     // 浜х嚎
+          3: 'itemNo',     // 鐗╂枡缂栫爜
+          4: 'itemName'    // 鐗╂枡鍚嶇О
+        };
+        this.selectedField = fieldMap[this.optionsIndex];
+      },
+      
+      //鎼滅储妗嗙偣鍑讳簨浠�
+      btnclicked() {
+        this.pageIndex = 1;
+        this.data = [];
+        this.init();
+      },
+      
+      init() {
+        //鑾峰彇鎼滅储鏉′欢鍐呭
+        let SearchValue = this.searchValue;
 
         let fsubmit = null; // 榛樿鏌ヨ鎵�鏈夋湭鎻愪氦鐨勮褰曪紙鍖呮嫭fsubmit = 0鍜宖submit涓虹┖锛�
         if (this.current == 1) {
@@ -141,7 +185,10 @@
             pageIndex: this.pageIndex,
             limit: this.limit,
             createUser: this.$loginInfo.account,
-            fsubmit: fsubmit
+            fsubmit: fsubmit,
+            SearchValue: SearchValue,
+            selectedIndex: this.optionsIndex, // 鏂板锛氭悳绱㈡潯浠剁储寮�
+            searchField: this.selectedField   // 鏂板锛氭悳绱㈠瓧娈靛悕
           }
         }).then(res => {
           if (this.pageIndex === 1) {
@@ -157,6 +204,13 @@
           }
           this.totalCount = res.data.totalCount;
           this.totalPage = Math.ceil(this.totalCount / this.limit);
+          
+          // 璁剧疆鏁伴噺缁熻 - 鍙傝�僗J鐨勫疄鐜版柟寮�
+          if (this.current === 1) {
+            this.submittedCount = res.data.totalCount;
+          } else {
+            this.unsubmittedCount = res.data.totalCount;
+          }
   
           this.noData = this.pageIndex >= this.totalPage;
           this.isLoading = false; // 缁撴潫鍔犺浇
@@ -164,6 +218,7 @@
           this.isLoading = false; // 鍑虹幇閿欒鏃剁粨鏉熷姞杞�
         });
       },
+      
       handleFabClick() {
         uni.navigateTo({
           url: 'Add?id'
@@ -231,8 +286,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 {
@@ -240,7 +338,8 @@
     border-radius: 4px;
     overflow: hidden;
     background-color: #ecf0f1;
-    width: 300px;
+    flex: 1;
+    min-width: 200px;
   }
   
   .tab-button {

--
Gitblit v1.9.3