From 9e263d85631bb44574ca6750a101ad9ce96cab98 Mon Sep 17 00:00:00 2001
From: zjh <2207896513@qq.com>
Date: 星期二, 13 五月 2025 13:56:56 +0800
Subject: [PATCH] 来料检优化代码提交
---
pages/QC/LLJ/List.vue | 106 ++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 81 insertions(+), 25 deletions(-)
diff --git a/pages/QC/LLJ/List.vue b/pages/QC/LLJ/List.vue
index 4626eb7..aa4f94d 100644
--- a/pages/QC/LLJ/List.vue
+++ b/pages/QC/LLJ/List.vue
@@ -2,13 +2,23 @@
<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>
+ <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="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 +31,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>
<!-- 妫�楠屽崟鍒楄〃 -->
@@ -56,11 +83,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 +97,12 @@
<text class="info-label">鏁伴噺</text>
<text class="info-content highlight">{{item.fcovertQty}}</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 +115,18 @@
</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>
<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==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 +147,9 @@
return {
projectIndex: 0,
optionsIndex: 0,
+ stateIndex: 0,
projects: ['褰撳墠', '鍏ㄩ儴'],
+ state:['鎵�鏈夌姸鎬�','鍚堟牸','涓嶅悎鏍�'],
activeTab: 0, // 0-鏈楠�, 1-宸叉楠�
uncheckedCount: 0,
checkedCount: '宸叉楠�',
@@ -123,13 +158,18 @@
limit: 20,
IQCJL: 0,
options: ['椤圭洰', '鐗╂枡缂栧彿', '鐗╂枡鍚嶇О', '渚涘簲鍟�', '閲囪喘鍛�'],
- searchValue: ''
+ searchValue: '',
+ startDate:new Date().toISOString().slice(0, 10),
+ endDate:new Date().toISOString().slice(0, 10),
+
}
},
onLoad() {
//椤甸潰鍔犺浇鏃惰皟鐢ㄧ殑浜嬩欢
this.init();
+
+
},
methods: {
//鎼滅储
@@ -145,8 +185,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 +220,10 @@
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]
}
}).then(res => {
if (this.pageIndex === 1) {
@@ -198,7 +247,7 @@
}
}
- console.log(this.inspectionList)
+ //console.log(this.inspectionList)
this.totalCount = res.data.totalCount;
this.totalPage = Math.ceil(this.totalCount / this.limit);
@@ -230,6 +279,13 @@
// icon: 'none'
// })
+ },
+ bindEndDate(e){
+ this.endDate=e.detail.value
+ console.log(e.detail.value)
+ },
+ bindStartDate(e){
+ this.startDate=e.detail.value
},
switchTab(index) {
this.activeTab = index
@@ -319,7 +375,7 @@
/* 椤堕儴绛涢�夊尯 */
.filter-section {
- margin-bottom: 24px;
+ /* margin-bottom: 24px; */
}
.filter-section h1 {
@@ -373,7 +429,7 @@
.filter-controls {
display: flex;
flex-wrap: wrap;
- gap: 10px;
+ gap: 5px;
}
.dropdown-filter {
--
Gitblit v1.9.3