From 62cb247da5cc1cc097c5afea402aabee05260431 Mon Sep 17 00:00:00 2001
From: xwt <2740516069@qq.com>
Date: 星期四, 14 八月 2025 19:56:50 +0800
Subject: [PATCH] 首检巡检来料检入库检

---
 pages/QC/LLJ/List.vue |   34 ++++++++++++++++++++++++++++++----
 1 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/pages/QC/LLJ/List.vue b/pages/QC/LLJ/List.vue
index d02936a..4b8dc8f 100644
--- a/pages/QC/LLJ/List.vue
+++ b/pages/QC/LLJ/List.vue
@@ -43,7 +43,7 @@
 					<text class="card-title">妫�楠屽崟鍙�: {{item.releaseNo}}</text>
 					<view v-if="item.userName == null && item.activeTab == 0">
 					        <text class="status pending" :class="{ 'emergency-pending': item.lotNo1 === '绱ф�ユ斁琛岋紝璇峰嬁楠岄��!' }">
-					        {{ item.lotNo1 === '绱ф�ユ斁琛岋紝璇峰嬁楠岄��!' ? '绱ф�ユ斁琛�/寰呭垎閰�' : '寰呭垎閰�' }}
+					        {{ item.lotNo1 === '绱ф�ユ斁琛岋紝璇峰嬁楠岄��!' ? '绱ф�ユ斁琛�/' + getStatusText(item) : getStatusText(item) }}
 					        </text>
 					        
 					    </view>
@@ -185,9 +185,12 @@
 						emergency:this.meergency,
 					}
 				}).then(res => {
+					// 鍘婚噸澶勭悊 - 鏍规嵁 releaseNo 鍘婚噸
+					const uniqueList = this.removeDuplicatesByReleaseNo(res.data.tbBillList);
+					
 					if (this.pageIndex === 1) {
 						// 濡傛灉鏄涓�椤碉紝鐩存帴瑕嗙洊鍘熸暟鎹�
-						this.inspectionList = res.data.tbBillList;
+						this.inspectionList = uniqueList;
 						//娣诲姞Tab淇℃伅锛屽垽鏂槸宸叉杩樻槸鏈鏁版嵁
 						this.inspectionList.forEach((item, index) => {
 							this.$set(item, 'activeTab', this.activeTab);
@@ -196,9 +199,9 @@
 						});
 					} else {
 
-						if (res.data.tbBillList.length > 0) {
+						if (uniqueList.length > 0) {
 							// 濡傛灉鏄笅涓�椤碉紝杩藉姞鏂版暟鎹�
-							this.inspectionList = [...this.inspectionList, ...res.data.tbBillList];
+							this.inspectionList = [...this.inspectionList, ...uniqueList];
 							//娣诲姞Tab淇℃伅锛屽垽鏂槸宸叉杩樻槸鏈鏁版嵁
 							this.inspectionList.forEach((item, index) => {
 								this.$set(item, 'activeTab', this.activeTab);
@@ -323,6 +326,29 @@
 				}
 				await this.init(); // 鑷畾涔夌殑鍒锋柊鍑芥暟
 
+			},
+			
+			// 鏍规嵁 releaseNo 鍘婚噸鐨勬柟娉�
+			removeDuplicatesByReleaseNo(array) {
+				const seen = new Set();
+				return array.filter(item => {
+					const releaseNo = item.releaseNo;
+					if (seen.has(releaseNo)) {
+						return false;
+					}
+					seen.add(releaseNo);
+					return true;
+				});
+			},
+			
+			// 鏍规嵁妫�楠岄」鐩暟閲忚幏鍙栫姸鎬佹枃鏈�
+			getStatusText(item) {
+				// 濡傛灉娌℃湁妫�楠岄」鐩紝鏄剧ず"鏈淮鎶�"
+				if (!item.inspectionItemCount || item.inspectionItemCount === 0) {
+					return '鏈淮鎶�';
+				}
+				// 濡傛灉鏈夋楠岄」鐩紝鏄剧ず"寰呮楠�"
+				return '寰呮楠�';
 			}
 		}
 	}

--
Gitblit v1.9.3