From 688505dded0a49ee685abcb980bd0dc521df4241 Mon Sep 17 00:00:00 2001
From: xwt <2740516069@qq.com>
Date: 星期四, 18 九月 2025 22:57:36 +0800
Subject: [PATCH] SJ,XJ,RKJ
---
pages/QC/XJ/List.vue | 136 +++++++++++++++++++++++++++++----------------
1 files changed, 87 insertions(+), 49 deletions(-)
diff --git a/pages/QC/XJ/List.vue b/pages/QC/XJ/List.vue
index df74017..8e19351 100644
--- a/pages/QC/XJ/List.vue
+++ b/pages/QC/XJ/List.vue
@@ -15,8 +15,18 @@
</view>
<view class="filter-controls" style="margin-bottom: 5px;">
+ <view class="dropdown-filter">
+ <picker @change="onLineChange" :value="lineIndex" :range="lineOptions">
+ <view class="picker">{{lineOptions[lineIndex]}}</view>
+ </picker>
+ </view>
+ <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="璇疯緭鍏ユ楠屽崟鍙锋垨鐗╂枡缂栫爜"
+ <input class="search-input" v-model="searchValue" :placeholder="'璇疯緭鍏�'+options[optionsIndex]"
@confirm="handleSearch" />
<button class="search-button" @click="handleSearch">鎼滅储</button>
</view>
@@ -30,8 +40,8 @@
@click="navigateToDetail(item)">
<view class="card-header">
<view class="card-title">妫�楠屽崟鍙�: {{item.releaseNo}}</view>
- <view class="status" :class="{'status-pending': current === 0, 'status-pass': current === 1 && item.fcheckResu === '鍚堟牸', 'status-fail': current === 1 && item.fcheckResu === '涓嶅悎鏍�'}">
- {{current === 0 ? '鏈彁浜�' : (item.fcheckResu ? item.fcheckResu : '宸叉彁浜�')}}
+ <view class="status" :class="{'status-pending': item.fsubmit === 0 || item.fsubmit == null, 'status-pass': item.fsubmit === 1 && item.fcheckResu === '鍚堟牸', 'status-fail': item.fsubmit === 1 && item.fcheckResu === '涓嶅悎鏍�'}">
+ {{(item.fsubmit === 0 || item.fsubmit == null) ? '鏈彁浜�' : (item.fcheckResu ? item.fcheckResu : '宸叉彁浜�')}}
</view>
</view>
@@ -73,15 +83,12 @@
</view>
<view class="card-actions">
- <button class="primary">{{current === 0 ? '缁х画妫�楠�' : '鏌ョ湅璇︽儏'}}</button>
+ <button class="primary">{{(item.fsubmit === 0 || item.fsubmit == null) ? '缁х画妫�楠�' : '鏌ョ湅璇︽儏'}}</button>
</view>
</view>
</view>
- <!-- 娣诲姞鎸夐挳 -->
- <view class="plus-button" @click="handleFabClick" v-if="current === 0">
- <view class="plus-icon">+</view>
- </view>
+ <!-- 娣诲姞鎸夐挳 - 宸查殣钘� -->
</view>
</template>
@@ -102,46 +109,91 @@
tipShow: false, // 鏄惁鏄剧ず椤堕儴鎻愮ず妗�
searchValue: '',
uncheckedCount: 0,
- checkedCount: 0
+ checkedCount: '宸插畬鎴�',
+ optionsIndex: 0,
+ options: ['鐗╂枡缂栧彿', '鐗╂枡鍚嶇О', '妫�楠屽崟鍙�'],
+ lineIndex: 0,
+ lineOptions: ['鍏ㄩ儴浜х嚎'],
+ lineData: []
};
},
onLoad() {
//椤甸潰鍔犺浇鏃惰皟鐢ㄧ殑浜嬩欢
+ this.loadLineData();
this.init();
},
methods: {
+ //鍔犺浇浜х嚎鏁版嵁
+ loadLineData() {
+ this.$post({
+ url: "/XJ/getLineAll",
+ data: {}
+ }).then(res => {
+ if (res.data && res.data.tbBillList) {
+ this.lineData = res.data.tbBillList;
+ this.lineOptions = ['鍏ㄩ儴浜х嚎', ...res.data.tbBillList.map(item => item.lineName)];
+ }
+ }).catch(error => {
+ console.error('鍔犺浇浜х嚎鏁版嵁澶辫触:', error);
+ });
+ },
+ //浜х嚎閫夋嫨鍙樺寲
+ onLineChange(e) {
+ this.lineIndex = e.detail.value;
+ this.pageIndex = 1;
+ this.data = [];
+ this.init();
+ },
+ //鎼滅储閫夐」鍙樺寲
+ onOptionsChange(e) {
+ this.optionsIndex = e.detail.value;
+ // 鏍规嵁閫夋嫨鐨勯�夐」璁剧疆鎼滅储瀛楁
+ const fieldMap = {
+ 0: 'itemNo', // 鐗╂枡缂栧彿
+ 1: 'itemName', // 鐗╂枡鍚嶇О
+ 2: 'releaseNo' // 妫�楠屽崟鍙�
+ };
+ this.selectedField = fieldMap[this.optionsIndex];
+ },
handleSearch() {
this.pageIndex = 1;
this.data = [];
this.init();
},
init() {
- let result = "鏈畬鎴�";
- if (this.current === 1) {
- result = "宸插畬鎴�";
+ let fsubmit = null;
+ if (this.current === 0) {
+ fsubmit = 0; // 鏈彁浜�
+ } else if (this.current === 1) {
+ fsubmit = 1; // 宸叉彁浜�
}
if (this.isLoading) return; // 濡傛灉姝e湪鍔犺浇鍒欎笉缁х画鎵ц
this.isLoading = true;
- //鑾峰彇褰撳墠鐧诲綍鐨勭敤鎴�
- let userName = this.$loginInfo.account;
-
- //椤甸潰鍔犺浇鏃惰皟鐢ㄧ殑浜嬩欢
+ //椤甸潰鍔犺浇鏃惰皟鐢ㄧ殑浜嬩欢 - 鍙栨秷鐢ㄦ埛鏉冮檺鎺у埗鍜屼骇绾胯繃婊わ紝鎵�鏈変汉閮藉彲浠ョ湅鍒版墍鏈夎〃鍗�
this.$post({
url: "/XJ/GetPage",
data: {
pageIndex: this.pageIndex,
limit: this.limit,
- createUser: userName,
- result: result,
- searchValue: this.searchValue
+ fsubmit: fsubmit,
+ searchValue: this.searchValue,
+ SelectedIndex: this.optionsIndex
}
}).then(res => {
+ console.log('API鍝嶅簲鏁版嵁:', res);
+ console.log('褰撳墠鏍囩椤�:', this.current, 'FSUBMIT鍙傛暟:', fsubmit);
+
if (this.pageIndex === 1) {
// 濡傛灉鏄涓�椤碉紝鐩存帴瑕嗙洊鍘熸暟鎹�
this.data = res.data.tbBillList;
+ console.log('鍔犺浇鐨勬暟鎹�:', this.data);
+ // 鎵撳嵃姣忔潯鏁版嵁鐨凢SUBMIT鐘舵��
+ this.data.forEach((item, index) => {
+ console.log(`鏁版嵁${index}: ID=${item.id}, FSUBMIT=${item.fsubmit}, FcheckResu=${item.fcheckResu}`);
+ });
} else {
if (res.data.tbBillList.length > 0) {
// 濡傛灉鏄笅涓�椤碉紝杩藉姞鏂版暟鎹�
@@ -154,9 +206,9 @@
this.noData = this.pageIndex >= this.totalPage;
this.isLoading = false; // 缁撴潫鍔犺浇
- // 鏇存柊璁℃暟
+ // 鏇存柊璁℃暟 - 鍙傝�僑J鐨勫疄鐜版柟寮�
if (this.current === 1) {
- this.checkedCount = this.totalCount;
+ this.checkedCount = '宸插畬鎴愶紙' + this.totalCount + '锛�';
} else {
this.uncheckedCount = this.totalCount;
}
@@ -225,7 +277,7 @@
/* 椤堕儴绛涢�夊尯 */
.filter-section {
- /* margin-bottom: 24px; */
+ margin-bottom: 0;
}
/* 鎼滅储妗嗘牱寮� */
@@ -271,6 +323,19 @@
display: flex;
flex-wrap: wrap;
gap: 5px;
+}
+
+.dropdown-filter {
+ min-width: 70px;
+}
+
+.picker {
+ padding: 8px 12px;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ background-color: white;
+ font-size: 14px;
+ min-width: 120px;
}
.status-tabs {
@@ -443,33 +508,6 @@
transform: translateY(0);
}
-/* 娣诲姞鎸夐挳鏍峰紡 */
-.plus-button {
- position: fixed;
- bottom: 20px;
- right: 20px;
- width: 60px;
- height: 60px;
- border-radius: 50%;
- background: linear-gradient(135deg, #3498db, #2980b9);
- color: #ffffff;
- text-align: center;
- line-height: 59px;
- font-size: 24px;
- cursor: pointer;
- z-index: 1000;
- box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
- transition: all 0.3s ease;
-}
-
-.plus-button:hover {
- transform: translateY(-2px);
- box-shadow: 0 6px 16px rgba(52, 152, 219, 0.5);
-}
-
-.plus-button:active {
- transform: translateY(0);
-}
/* 鍝嶅簲寮忚璁� */
@media (min-width: 768px) {
--
Gitblit v1.9.3