From 7c2192a2f000d94add173b77b6bd4c8c4fc6a5e4 Mon Sep 17 00:00:00 2001 From: xwt <2740516069@qq.com> Date: 星期三, 17 九月 2025 09:41:47 +0800 Subject: [PATCH] SJ穴模数 --- pages/QC/SJ/List.vue | 47 ++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 38 insertions(+), 9 deletions(-) diff --git a/pages/QC/SJ/List.vue b/pages/QC/SJ/List.vue index 6202f58..8268a6e 100644 --- a/pages/QC/SJ/List.vue +++ b/pages/QC/SJ/List.vue @@ -22,10 +22,10 @@ <!-- 鐘舵�佸垏鎹㈡爣绛� --> <view class="status-tabs"> <button :class="['tab-button', current === 0 ? 'active' : '']" @click="onClickItem({currentIndex: 0})"> - {{items[0]}} + 鏈畬鎴�({{uncheckedCount}}) </button> <button :class="['tab-button', current === 1 ? 'active' : '']" @click="onClickItem({currentIndex: 1})"> - {{items[1]}} + {{checkedCount}} </button> </view> </view> @@ -36,11 +36,19 @@ <!-- 妫�楠屽崟鍗$墖 --> <view class="inspection-card" v-for="item in data" :key="item.id" @click="navigateToDetail(item)"> <view class="card-header"> - <text class="badge normal" v-if="item.SJ_MJ">{{item.SJ_MJ}}</text> - <text class="card-title">妫�楠屽崟鍙�: {{item.billNo}}</text> - <text class="status pass" v-if="item.result === '鍚堟牸'">鍚堟牸</text> - <text class="status unqualified" v-if="item.result === '涓嶅悎鏍�'">涓嶅悎鏍�</text> - <text class="status pending" v-if="!item.result">寰呮楠�</text> + <view class="header-left"> + <text class="badge normal" v-if="item.SJ_MJ">{{item.SJ_MJ}}</text> + <text class="card-title">妫�楠屽崟鍙�: {{item.billNo}}</text> + </view> + <view class="header-right"> + <!-- 鏈畬鎴愭爣绛鹃〉鐨勭姸鎬佹樉绀� --> + <text class="status pending" v-if="current === 0 && (!item.result || item.result === '鏈畬鎴�')">寰呮楠�</text> + <text class="status pass" v-if="current === 0 && item.result === '鍚堟牸'">鍚堟牸</text> + <text class="status unqualified" v-if="current === 0 && item.result === '涓嶅悎鏍�'">涓嶅悎鏍�</text> + <!-- 宸插畬鎴愭爣绛鹃〉鐨勭姸鎬佹樉绀� --> + <text class="status pass" v-if="current === 1 && item.result === '鍚堟牸'">鍚堟牸</text> + <text class="status unqualified" v-if="current === 1 && item.result === '涓嶅悎鏍�'">涓嶅悎鏍�</text> + </view> </view> <view class="card-body"> @@ -124,7 +132,10 @@ // ===== 鏂板鎼滅储鍔熻兘鐩稿叧鏁版嵁 ===== optionsIndex: 0, // 褰撳墠閫夋嫨鐨勬煡璇㈡潯浠剁储寮� options: ['宸ュ崟', '妫�楠屽崟鍙�', '浜х嚎', '鐗╂枡缂栫爜', '鐗╂枡鍚嶇О'], // 鏌ヨ鏉′欢閫夐」 - selectedField: 'daa001' // 褰撳墠閫夋嫨鐨勬煡璇㈠瓧娈碉紝榛樿涓哄伐鍗� + selectedField: 'daa001', // 褰撳墠閫夋嫨鐨勬煡璇㈠瓧娈碉紝榛樿涓哄伐鍗� + // ===== 鏂板鏁伴噺缁熻鍙橀噺 ===== + uncheckedCount: 0, // 鏈畬鎴愭暟閲� + checkedCount: '宸叉楠�' // 宸插畬鎴愭暟閲忔樉绀烘枃鏈� }; }, onLoad() { @@ -175,6 +186,12 @@ } }).then(res => { this.data = res.data.tbBillList; + // 璁剧疆鏁伴噺缁熻 + if (this.current === 1) { + this.checkedCount = '宸叉楠岋紙' + res.totalCount + '锛�'; + } else { + this.uncheckedCount = res.totalCount; + } }) }, handleFabClick() { @@ -329,12 +346,24 @@ border-bottom: 1px solid #eee; display: flex; align-items: center; + justify-content: space-between; + position: relative; +} + +.header-left { + display: flex; + align-items: center; + flex: 1; +} + +.header-right { + display: flex; + align-items: center; } .card-title { font-size: 16px; font-weight: 600; - flex: 1; margin: 0 8px; } -- Gitblit v1.9.3