From da245c6f1995c5668866184d8068794c27622f62 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期三, 24 九月 2025 11:05:20 +0800
Subject: [PATCH] 首检,巡检,入库检的数值判断
---
pages/QC/LLJ/List.vue | 161 +++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 135 insertions(+), 26 deletions(-)
diff --git a/pages/QC/LLJ/List.vue b/pages/QC/LLJ/List.vue
index 4626eb7..2efb071 100644
--- a/pages/QC/LLJ/List.vue
+++ b/pages/QC/LLJ/List.vue
@@ -2,13 +2,31 @@
<view class="inspection-app">
<!-- 椤堕儴绛涢�夊尯 -->
<view class="filter-section">
- <view class="filter-controls">
- <view class="dropdown-filter">
- <picker @change="onProjectChange" :value="projectIndex" :range="projects">
- <view class="picker">{{projects[projectIndex]}}</view>
- </picker>
-
+ <view class="filter-controls" style="margin-bottom: 5px;">
+ <view class="status-tabs">
+ <button :class="['tab-button', activeTab === 0 ? 'active' : '']"
+ @click="switchTab(0)">鏈楠�({{uncheckedCount}})</button>
+ <button :class="['tab-button', activeTab === 1 ? 'active' : '']"
+ @click="switchTab(1)">{{checkedCount}}</button>
+ </view>
+ </view>
+
+ <view class="filter-controls" style="margin-bottom: 5px;">
+ <view class="status-tabs" style="margin-right: 10px;">
+ <button :class="['tab-button', arrivalFilter === -1 ? 'active' : '']"
+ @click="switchArrivalFilter(-1)">鍏ㄩ儴</button>
+ <button :class="['tab-button', arrivalFilter === 1 ? 'active' : '']"
+ @click="switchArrivalFilter(1)">宸插埌杈�</button>
+ <button :class="['tab-button', arrivalFilter === 0 ? 'active' : '']"
+ @click="switchArrivalFilter(0)">鏈埌杈�</button>
</view>
+
+ <view class="dropdown-filter">
+ <picker @change="onProjectChange" :value="projectIndex" :range="projects">
+ <view class="picker">{{projects[projectIndex]}}</view>
+ </picker>
+
+ </view>
<view class="dropdown-filter">
<picker @change="onOptionsChange" :value="optionsIndex" :range="options">
<view class="picker">{{options[optionsIndex]}}</view>
@@ -21,14 +39,31 @@
<button class="search-button" @click="handleSearch">鎼滅储</button>
</view>
- <view class="status-tabs">
- <button :class="['tab-button', activeTab === 0 ? 'active' : '']"
- @click="switchTab(0)">鏈楠�({{uncheckedCount}})</button>
- <button :class="['tab-button', activeTab === 1 ? 'active' : '']"
- @click="switchTab(1)">{{checkedCount}}</button>
- </view>
+
</view>
+ </view>
+ <view class="filter-controls" style="margin-bottom: 5px;">
+
+
+ <view class="dropdown-filter" v-if="activeTab==1">
+ <picker @change="onStateChange" :value="stateIndex" :range="state">
+ <view class="picker">{{state[stateIndex]}}</view>
+ </picker>
+
+ </view>
+ <view class="dropdown-filter" v-if="activeTab==1">
+ <picker mode="date" :value="startDate" :end="endDate" @change="bindStartDate">
+ <view class="picker">{{startDate}}</view>
+ </picker>
+
+ </view>
+ <view class="dropdown-filter" v-if="activeTab==1">
+ <picker mode="date" :value="endDate" :start="startDate" @change="bindEndDate">
+ <view class="picker">{{endDate}}</view>
+ </picker>
+ </view>
+
</view>
<!-- 妫�楠屽崟鍒楄〃 -->
@@ -41,6 +76,8 @@
<text class="badge normal" v-if="item.ftype == 1">濮斿</text>
<text class="badge normal" v-if="item.first == 1">棣栨鏉ユ枡</text>
<text class="card-title">妫�楠屽崟鍙�: {{item.releaseNo}}</text>
+ <text class="status arrived" v-if="item.isArrival == 1">宸插埌杈�</text>
+ <text class="status not-arrived" v-if="item.isArrival == 0">鏈埌杈�</text>
<text class="status pending" v-if="item.userName==null && item.activeTab==0">寰呭垎閰�</text>
<text class="status assigned" v-if="item.userName!=null && item.activeTab==0">宸插垎閰�</text>
<text class="status pass" v-if="item.fcheckResu=='鍚堟牸' && item.activeTab==1">鍚堟牸</text>
@@ -56,11 +93,8 @@
</view>
+
<view class="info-row">
- <view class="info-item">
- <text class="info-label">渚涘簲鍟�</text>
- <text class="info-content">{{item.suppName}}</text>
- </view>
<view class="info-item">
<text class="info-label">椤圭洰</text>
<text class="info-content">{{item.projectCodes}}</text>
@@ -73,10 +107,16 @@
<text class="info-label">鏁伴噺</text>
<text class="info-content highlight">{{item.fcovertQty}}</text>
</view>
-
+ <view class="info-item">
+ <text class="info-label">鎶芥</text>
+ <text class="info-content highlight">{{item.maxCheckQyt}}</text>
+ </view>
</view>
<view class="info-row">
-
+ <view class="info-item">
+ <text class="info-label">渚涘簲鍟�</text>
+ <text class="info-content">{{item.suppName}}</text>
+ </view>
</view>
<view class="info-row">
<view class="info-item" v-if="item.newFngDesc!=null">
@@ -89,11 +129,24 @@
</view>
</view>
- <view class="meta-info">
+ <view class="meta-info" v-if="item.activeTab==0">
<text class="meta-item"><uni-icons type="calendar" size="14" color="#95a5a6"></uni-icons>
- {{item.createDate}}</text>
+ 鍒涘缓锛歿{item.createDate}}</text>
+
<text class="meta-item"><uni-icons type="person" size="14" color="#95a5a6"></uni-icons>
{{item.userName}}</text>
+ </view>
+ <view class="meta-info" v-if="item.activeTab==0 && item.arrivalDate!=null">
+ <text class="meta-item"><uni-icons type="calendar" size="14" color="#95a5a6"></uni-icons>
+ 鍒拌揪锛歿{item.arrivalDate}}</text>
+
+ </view>
+ <!-- 鏌ョ湅鏃舵樉绀烘楠屽畬鎴愮殑鏁版嵁 -->
+ <view class="meta-info" v-if="item.activeTab==1">
+ <text class="meta-item"><uni-icons type="calendar" size="14" color="#95a5a6"></uni-icons>
+ {{item.date01}}</text>
+ <text class="meta-item"><uni-icons type="person" size="14" color="#95a5a6"></uni-icons>
+ {{item.fcheckBy}}</text>
</view>
</view>
@@ -114,7 +167,9 @@
return {
projectIndex: 0,
optionsIndex: 0,
+ stateIndex: 0,
projects: ['褰撳墠', '鍏ㄩ儴'],
+ state:['鎵�鏈夌姸鎬�','鍚堟牸','涓嶅悎鏍�'],
activeTab: 0, // 0-鏈楠�, 1-宸叉楠�
uncheckedCount: 0,
checkedCount: '宸叉楠�',
@@ -123,13 +178,17 @@
limit: 20,
IQCJL: 0,
options: ['椤圭洰', '鐗╂枡缂栧彿', '鐗╂枡鍚嶇О', '渚涘簲鍟�', '閲囪喘鍛�'],
- searchValue: ''
-
+ searchValue: '',
+ startDate:new Date().toISOString().slice(0, 10),
+ endDate:new Date().toISOString().slice(0, 10),
+ arrivalFilter: -1,
}
},
onLoad() {
//椤甸潰鍔犺浇鏃惰皟鐢ㄧ殑浜嬩欢
this.init();
+
+
},
methods: {
//鎼滅储
@@ -145,8 +204,14 @@
};
this.selectedField = fieldMap[this.optionsIndex];
},
+ onStateChange(e) {
+ this.pageIndex=1;
+ this.stateIndex = e.detail.value;
+ this.init();
+ },
//鎼滅储鎸夐挳鐐瑰嚮浜嬩欢
handleSearch() {
+ this.pageIndex=1;
this.init();
},
init() {
@@ -174,7 +239,11 @@
result: result,
SearchValue: this.searchValue,
selectedIndex: this.optionsIndex, //涓嬫媺妗嗙瓫閫夋潯浠�
- userIndex: this.projectIndex
+ userIndex: this.projectIndex,
+ startDate:this.startDate,
+ endDate:this.endDate,
+ state:this.state[this.stateIndex],
+ arrivalFilter: this.arrivalFilter
}
}).then(res => {
if (this.pageIndex === 1) {
@@ -198,7 +267,7 @@
}
}
- console.log(this.inspectionList)
+ //console.log(this.inspectionList)
this.totalCount = res.data.totalCount;
this.totalPage = Math.ceil(this.totalCount / this.limit);
@@ -231,6 +300,13 @@
// })
},
+ bindEndDate(e){
+ this.endDate=e.detail.value
+ console.log(e.detail.value)
+ },
+ bindStartDate(e){
+ this.startDate=e.detail.value
+ },
switchTab(index) {
this.activeTab = index
// 杩欓噷鍙互娣诲姞鍒囨崲鏍囩椤电殑閫昏緫
@@ -250,6 +326,22 @@
url: 'Add?id=' + item.id + '&lotNo=' + item.lotNo + '&releaseNo=' + item.releaseNo +
'¤t=A'
})
+ // uni.showModal({
+ // title: '寮�濮嬫楠�',
+ // content: '寮�濮嬫楠屽皢璁板綍褰撳墠鏃堕棿涓哄紑濮嬫楠屾椂闂达紝纭畾寮�濮嬶紵',
+ // success: function(res) {
+ // if (res.confirm) {
+ // uni.navigateTo({
+ // url: 'Add?id=' + item.id + '&lotNo=' + item.lotNo + '&releaseNo=' + item.releaseNo +
+ // '¤t=A'
+ // })
+ // } else {
+
+ // }
+ // }
+ // })
+
+
}
},
@@ -304,6 +396,12 @@
}
await this.init(); // 鑷畾涔夌殑鍒锋柊鍑芥暟
+ },
+ switchArrivalFilter(filter) {
+ this.arrivalFilter = filter;
+ this.pageIndex = 1;
+ this.inspectionList = [];
+ this.init();
}
}
}
@@ -319,7 +417,7 @@
/* 椤堕儴绛涢�夊尯 */
.filter-section {
- margin-bottom: 24px;
+ /* margin-bottom: 24px; */
}
.filter-section h1 {
@@ -373,7 +471,7 @@
.filter-controls {
display: flex;
flex-wrap: wrap;
- gap: 10px;
+ gap: 5px;
}
.dropdown-filter {
@@ -473,6 +571,7 @@
padding: 4px 8px;
border-radius: 4px;
font-weight: 500;
+ margin-left: 8px;
}
.status.pending {
@@ -485,6 +584,16 @@
color: white;
}
+ .status.arrived {
+ background-color: #00cd00;
+ color: white;
+ }
+
+ .status.not-arrived {
+ background-color: #95a5a6;
+ color: white;
+ }
+
.status.pass {
background-color: #00cd00;
color: white;
--
Gitblit v1.9.3