From e279e6f4dd7c4c5278dbd0a00bfaccbc48022936 Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期五, 06 二月 2026 10:55:15 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev

---
 pages/MJGL/SBMJReport/Sb_EquipMaintainTaskReport.vue |  339 ++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 209 insertions(+), 130 deletions(-)

diff --git a/pages/MJGL/mujubaoyangjiludan/mouldMaintainRecordBillList.vue b/pages/MJGL/SBMJReport/Sb_EquipMaintainTaskReport.vue
similarity index 60%
copy from pages/MJGL/mujubaoyangjiludan/mouldMaintainRecordBillList.vue
copy to pages/MJGL/SBMJReport/Sb_EquipMaintainTaskReport.vue
index 19b1b9a..d23b2f2 100644
--- a/pages/MJGL/mujubaoyangjiludan/mouldMaintainRecordBillList.vue
+++ b/pages/MJGL/SBMJReport/Sb_EquipMaintainTaskReport.vue
@@ -34,45 +34,65 @@
 					</uni-datetime-picker>
 				</view>
 			</view>
-			<view class="search-item">
-				<view class="left">鍗曟嵁鍙�</view>
-				<view class="right">
-					<input type="text" auto-focus v-model="HBillNo" />
-				</view>
-			</view>
 
 			<view class="button-groups">
-				<button type="default" size="mini" class="btn-b" @tap.stop="onAddClickHandler">鏂板</button>
 				<button type="default" size="mini" class="btn-c" @tap.stop="onSearchClickHandler">鏌ヨ</button>
 				<button type="default" size="mini" class="btn-a" @tap.stop="onResetClickHandler">閲嶇疆</button>
 			</view>
 		</view>
+
+		<!-- 椤电鍖哄煙 -->
+		<view class="tab-container">
+			<view class="tab-list">
+				<view v-for="(tab, index) in tabs" :key="index" :class="['tab-item', { 'active': activeTab === index }]"
+					@tap="switchTab(index)">
+					<text>{{ tab.label }}</text>
+					<text v-if="tab.count > 0" class="tab-count">{{ tab.count }}</text>
+				</view>
+			</view>
+		</view>
+
 		<view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
-		<scroll-view id="pageContent" scroll-y class="page-content" :style="{height: pageContentHeight + 'px'}">
-			<view v-for="(item,index) in listData" :key="index">
-				<uni-card :title="item.浜у搧妯″叿" :extra="item.鍗曟嵁鍙�" style="margin: 10px;"
-					@tap="showDetail = showDetail==index?-1:index">
+
+		<!-- 椤电鍐呭鍖哄煙 -->
+		<scroll-view v-for="(tab, tabIndex) in tabs" :key="tabIndex" v-show="activeTab === tabIndex" id="pageContent"
+			scroll-y class="page-content" :style="{height: pageContentHeight + 'px'}">
+			<view class="list" v-for="(item,index) in tab.listData" :key="index">
+				<uni-card :title="item.璁惧浠g爜" :extra="item.璁惧淇濆吇璁″垝鍗曞彿" style="margin: 10px;"
+					@tap="showDetail = showDetail==item.hmainid?-1:item.hmainid">
 					<view class="card-detail">
-						<view class="detail" v-if="item.浜у搧妯″叿缂栫爜">
-							<text>浜у搧妯″叿缂栫爜锛�</text>{{item.浜у搧妯″叿缂栫爜}}
+						<view class="detail" v-if="item.璁惧鍚嶇О">
+							<text>璁惧鍚嶇О锛�</text>{{item.璁惧鍚嶇О}}
 						</view>
-						<view class="detail" v-if="item.淇濆吇璁″垝缂栧彿">
-							<text>淇濆吇璁″垝缂栧彿锛�</text>{{item.淇濆吇璁″垝缂栧彿}}
+						<view class="detail" v-if="item.璁惧瑙勬牸">
+							<text>璁惧瑙勬牸锛�</text>{{item.璁惧瑙勬牸}}
 						</view>
-						<view class="detail" v-if="item.淇濆吇瑙勭▼缂栧彿">
-							<text>淇濆吇瑙勭▼缂栧彿锛�</text>{{item.淇濆吇瑙勭▼缂栧彿}}
+						<view class="detail" v-if="item.璁惧鍨嬪彿">
+							<text>璁惧鍨嬪彿锛�</text>{{item.璁惧鍨嬪彿}}
 						</view>
-						<view class="detail" v-if="item.淇濆吇寮�濮嬫棩鏈�">
-							<text>淇濆吇寮�濮嬫棩鏈燂細</text>{{item.淇濆吇寮�濮嬫棩鏈�.substr(0,10)}}
+						<view class="detail" v-if="item.鐢熶骇璧勬簮">
+							<text>鐢熶骇璧勬簮锛�</text>{{item.瀵瑰簲鐢熶骇璧勬簮}}
 						</view>
-						<view class="detail" v-if="item.淇濆吇缁撴潫鏃ユ湡">
-							<text>淇濆吇缁撴潫鏃ユ湡锛�</text>{{item.淇濆吇缁撴潫鏃ユ湡.substr(0,10)}}
+						<view class="detail" v-if="item.淇濆吇鍛ㄦ湡">
+							<text>淇濆吇鍛ㄦ湡锛�</text>{{item.淇濆吇鍛ㄦ湡}}
 						</view>
-						<view class="detail" v-if="item.鏈�缁堢粨璁�">
-							<text>鏈�缁堢粨璁猴細</text>{{item.鏈�缁堢粨璁簘}
+						<view class="detail" v-if="item.鎽樿">
+							<text>鎽樿锛�</text>{{item.鎽樿}}
+						</view>
+						<view class="detail" v-if="item.淇濆吇璐熻矗浜�">
+							<text>淇濆吇璐熻矗浜猴細</text>{{item.淇濆吇璐熻矗浜簘}
+						</view>
+						<view class="detail" v-if="item.鏄惁淇濆吇">
+							<text>鏄惁淇濆吇锛�</text>{{item.鏄惁淇濆吇}}
+						</view>
+						<view class="detail" v-if="item.璁″垝寮�濮嬫椂闂寸偣">
+							<text>璁″垝寮�濮嬫椂闂寸偣锛�</text>{{item.璁″垝寮�濮嬫椂闂寸偣.substr(0,10)}}
+						</view>
+						<view class="detail" v-if="item.璁″垝缁撴潫鏃堕棿鐐�">
+							<text>璁″垝缁撴潫鏃堕棿鐐癸細</text>{{item.璁″垝缁撴潫鏃堕棿鐐�.substr(0,10)}}
 						</view>
 					</view>
-					<view class="card-detail" v-if="showDetail == index">
+					<view class="card-detail" v-if="showDetail == item.hmainid">
 						<view class="detail" v-if="item.鍒跺崟浜�">
 							<text>鍒跺崟浜猴細</text>{{item.鍒跺崟浜簘}
 						</view>
@@ -105,40 +125,39 @@
 						</view>
 					</view>
 
-
-					<view class="more" v-if="showDetail == index && operations != index">
+					<view class="more" v-if="showDetail == item.hmainid && operations != item.hmainid">
 						<view class="part" style="border-right: 1px solid #eee;">
 							<uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏀惰捣
 						</view>
-						<view class="part" @tap.stop="operations = operations==index?-1:index">
+						<view class="part" @tap.stop="operations = operations==item.hmainid?-1:item.hmainid">
 							<uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
 								size="14"></uni-icons>鎿嶄綔
 						</view>
 					</view>
-					<view class="more" v-if="showDetail != index && operations != index">
+					<view class="more" v-if="showDetail != item.hmainid && operations != item.hmainid">
 						<view class="part" style="border-right: 1px solid #eee;">
 							<uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏇村淇℃伅
 						</view>
-						<view class="part" @tap.stop="operations = operations==index?-1:index">
+						<view class="part" @tap.stop="operations = operations==item.hmainid?-1:item.hmainid">
 							<uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
 								size="14"></uni-icons>鎿嶄綔
 						</view>
 					</view>
 
-					<view class="op" v-if="operations == index">
-						<button class="op1" size="mini" plain @tap.stop="toSon(item)">瀛愯〃淇℃伅</button>
-						<button class="op3" size="mini" plain @tap.stop="edit(item)">缂栬緫</button>
-						<button class="op4" size="mini" plain @tap.stop="del(item)">鍒犻櫎</button>
+					<view class="op" v-if="operations == item.hmainid">
+                        <button class="op1" v-if="activeTab == 0" size="mini" plain @tap.stop="pushBill(0,item)">涓嬫帹淇濆吇鍗�</button>
 						<button class="op5" size="mini" plain @tap.stop="operations = -1">鍙栨秷鎿嶄綔</button>
 					</view>
 				</uni-card>
 			</view>
-			<view class="over" v-if="listData.length == 0">鏆傛棤鏁版嵁</view>
+			<view class="over" v-if="tabs[activeTab].listData.length == 0">鏆傛棤鏁版嵁</view>
 		</scroll-view>
+
 		<!-- 鍒嗛〉鍣� -->
 		<view class="page-footer">
-			<uni-pagination id="pagination" title="鏍囬鏂囧瓧" v-model="pageMeta.curPage" :pageSize="pageMeta.size"
-				:total="pageMeta.total" @change="onPageChangeHandler"></uni-pagination>
+			<uni-pagination id="pagination" title="鏍囬鏂囧瓧" v-model="tabs[activeTab].pageMeta.curPage"
+				:pageSize="tabs[activeTab].pageMeta.size" :total="tabs[activeTab].pageMeta.total"
+				@change="onPageChangeHandler"></uni-pagination>
 		</view>
 	</view>
 </template>
@@ -157,12 +176,45 @@
 				// 璁$畻鍗$墖鍒楄〃楂樺害
 				pagination_top: 0,
 				pageContent_top: 0,
-				// 鍒嗛〉鎺у埗
-				pageMeta: {
-					curPage: 1,
-					size: 50,
-					total: 0,
-				},
+
+				// 褰撳墠婵�娲荤殑椤电
+				activeTab: 0,
+
+				tabs: [{
+						label: '杩戞棩寰呬繚鍏�',
+						type: 0,
+						count: 0,
+						listData: [], // 娣诲姞杩欎釜
+						pageMeta: { // 娣诲姞杩欎釜
+							curPage: 1,
+							size: 50,
+							total: 0,
+						}
+					},
+					{
+						label: '杩戞棩宸蹭繚鍏�',
+						type: 1,
+						count: 0,
+						listData: [], // 娣诲姞杩欎釜
+						pageMeta: { // 娣诲姞杩欎釜
+							curPage: 1,
+							size: 50,
+							total: 0,
+						}
+					},
+					{
+						label: '杩戞棩鍏ㄩ儴浠诲姟',
+						type: 2,
+						count: 0,
+						listData: [], // 娣诲姞杩欎釜
+						pageMeta: { // 娣诲姞杩欎釜
+							curPage: 1,
+							size: 50,
+							total: 0,
+						}
+					}
+				],
+
 				// 婊氬姩鎺у埗
 				scrollTop: 0,
 				old: {
@@ -172,11 +224,10 @@
 				dateRangePicker: ["浠绘剰闂撮殧", "浠婂ぉ", "杩戜袱澶�", "杩戜笁澶�", "杩戝洓澶�", "杩戜簲澶�", "杩戝叚澶�", "杩戜竷澶�", "杩�30澶�"],
 				curDateGap: "杩戜竷澶�",
 				enableCustomDateRange: false,
-				startDate: dayjs(new Date()).subtract(7, 'day').format('YYYY-MM-DD'),
+				startDate: dayjs(new Date()).subtract(7, 'days').format('YYYY-MM-DD'),
 				endDate: dayjs(new Date()).format('YYYY-MM-DD'),
 				HBillNo: '',
 
-				listData: [],
 				showDetail: -1,
 				operations: -1,
 			}
@@ -216,9 +267,16 @@
 				})
 				.exec();
 			// #endif
-
 		},
 		methods: {
+            pushBill(currTab, item) {
+                let Query = `?operationType=4&HBarCode=${item['璁惧浠g爜']}`
+                if(currTab == 0) {
+                    uni.navigateTo({
+                        url: '/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill' + Query
+                    })
+                }
+            },
 			goTop: function(e) {
 				// 瑙e喅view灞備笉鍚屾鐨勯棶棰�
 				this.scrollTop = this.old.scrollTop
@@ -226,6 +284,14 @@
 					this.scrollTop = 0
 				});
 			},
+
+			// 鍒囨崲椤电
+			switchTab(index) {
+				this.activeTab = index
+				this.showDetail = -1
+				this.operations = -1
+			},
+
 			onDateRangePickerChangeHandler({
 				detail
 			}) {
@@ -265,39 +331,38 @@
 					this.enableCustomDateRange = true
 				}
 			},
+
 			onSearchClickHandler() {
 				let sWhere = ""
-				if (this.startDate) {
-					sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.startDate + "'";
+				// 鑾峰彇褰撳墠婵�娲荤殑椤电
+				const currentTab = this.tabs[this.activeTab]
+				sWhere = {
+					HBeginDate: this.startDate,
+					HEndDate: this.endDate
 				}
-				if (this.endDate) {
-					sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.endDate + "'";
-				}
-				if (this.HBillNo) {
-					sWhere += " and 鍗曟嵁鍙� like '%" + this.HBillNo + "%'";
-				}
-				this.get_DisplayPage(sWhere);
+				this.get_DisplayPage(JSON.stringify(sWhere), currentTab.type)
 			},
+
 			clear() {
-				this.curDateGap = "杩戜竷澶�"
+				this.curDateGap = "杩�7澶�"
 				this.enableCustomDateRange = false
-				this.startDate = dayjs(new Date()).subtract(7, 'day').format('YYYY-MM-DD')
+				this.startDate = dayjs(new Date()).subtract(7, 'days').format('YYYY-MM-DD')
 				this.endDate = dayjs(new Date()).format('YYYY-MM-DD')
 				this.HBillNo = ''
 			},
+
 			async onResetClickHandler() {
 				this.clear()
 				await this.$nextTick()
 				this.onSearchClickHandler()
 			},
-			get_DisplayPage(sWhere) {
+
+			get_DisplayPage(sWhere, tabType) {
 				CommonUtils.doRequest2({
-					url: '/Sc_MouldMaintainBill/GetMouldMaintainBillListPage',
+					url: '/Sb_EquipMaintainTaskReport/MaintainList_APP',
 					data: {
 						"sWhere": sWhere,
 						"user": getUserInfo()["Czymc"],
-						"page": this.pageMeta.curPage,
-						"size": this.pageMeta.size
 					},
 					resFunction: (res) => {
 						let {
@@ -305,82 +370,39 @@
 							Message,
 							count
 						} = res.data
-						console.log('res.data: ', res.data);
-						this.listData = data;
-						this.pageMeta.total = count
+						console.log('res.data: ', res.data)
+
+						if (data && data.h_p_Sb_EquipMaintainTaskReport_APP) {
+							// 鏇存柊寰呯鍒伴〉绛�
+							this.tabs[0].listData = data.h_p_Sb_EquipMaintainTaskReport_APP
+							this.tabs[0].pageMeta.total = data.h_p_Sb_EquipMaintainTaskReport_APP.length
+							this.tabs[0].count = data.h_p_Sb_EquipMaintainTaskReport_APP.length
+						}
+
+						if (data && data.h_p_Sb_EquipMaintainTaskReport_APP1) {
+							// 鏇存柊寰呭鐞嗛〉绛�
+							this.tabs[1].listData = data.h_p_Sb_EquipMaintainTaskReport_APP1
+							this.tabs[1].pageMeta.total = data.h_p_Sb_EquipMaintainTaskReport_APP1.length
+							this.tabs[1].count = data.h_p_Sb_EquipMaintainTaskReport_APP1.length
+						}
+
+						if (data && data.h_p_Sb_EquipMaintainTaskReport_APP2) {
+							// 鏇存柊寰呴獙鏀堕〉绛�
+							this.tabs[2].listData = data.h_p_Sb_EquipMaintainTaskReport_APP2
+							this.tabs[2].pageMeta.total = data.h_p_Sb_EquipMaintainTaskReport_APP2.length
+							this.tabs[2].count = data.h_p_Sb_EquipMaintainTaskReport_APP2.length
+						}
+
+						
 						uni.stopPullDownRefresh()
 					}
 				})
 			},
+
 			onPageChangeHandler() {
 				this.onSearchClickHandler()
 				this.goTop()
 			},
-			// 鏂板妯″叿淇濆吇璁板綍鍗�
-			onAddClickHandler() {
-				uni.navigateTo({
-					url: "/pages/MJGL/mujubaoyangjiludan/form"
-				})
-			},
-			//缂栬緫淇濆吇璁板綍鍗�
-			edit(item) {
-				console.log(item)
-				uni.navigateTo({
-					url: '/pages/MJGL/mujubaoyangjiludan/form?hmainid=' + item.hmainid
-				})
-			},
-			//鍒犻櫎淇濆吇璁板綍鍗�
-			del(item) {
-				uni.showModal({
-					title: '鍒犻櫎纭',
-					content: '纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠',
-					success: (res) => {
-						if (res.confirm) {
-							console.log('鐢ㄦ埛鐐瑰嚮纭畾');
-							CommonUtils.doRequest2({
-								url: '/Sc_MouldMaintainBill/DeltetSc_MouldMaintainBill',
-								data: {
-									HInterID: item['hmainid'],
-									user: getUserInfo()['Czymc']
-								},
-								resFunction: (res) => {
-									let {
-										data,
-										count,
-										Message
-									} = res.data
-									if (count == 1) {
-										uni.showToast({
-											icon: count === 1 ? 'success' : 'error',
-											title: Message,
-											duration: 2000
-										});
-
-										// 绛夊緟鎻愮ず鏄剧ず瀹屾垚鍐嶅埛鏂�
-										setTimeout(() => {
-											this.onSearchClickHandler();
-										}, 2000);
-									} else {
-										uni.showToast({
-											icon: 'none',
-											title: Message
-										})
-									}
-								}
-							})
-						} else if (res.cancel) {
-							console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
-						}
-					}
-				});
-			},
-			//瀛愯〃鏌ョ湅
-			toSon(item) {
-				uni.navigateTo({
-					url: '/pages/MJGL/mujubaoyangjiludan/mouldMaintainRecordBillList_son?HInterID=' + item.hmainid + '&浜у搧妯″叿=' + item
-						.浜у搧妯″叿 + '&浜у搧妯″叿浠g爜=' + item.浜у搧妯″叿浠g爜,
-				});
-			}
 		},
 	}
 </script>
@@ -473,8 +495,55 @@
 		}
 	}
 
+	/* 椤电鏍峰紡 */
+	.tab-container {
+		background-color: #fff;
+	}
+
+	.tab-list {
+		display: flex;
+		flex-direction: row;
+		border-bottom: 1px solid #e5e5e5;
+	}
+
+	.tab-item {
+		flex: 1;
+		padding: 20rpx 0;
+		text-align: center;
+		font-size: 28rpx;
+		color: #666;
+		position: relative;
+
+		&.active {
+			color: #3a78ff;
+			font-weight: bold;
+
+			&::after {
+				content: '';
+				position: absolute;
+				bottom: 0;
+				left: 50%;
+				transform: translateX(-50%);
+				width: 80rpx;
+				height: 4rpx;
+				background-color: #3a78ff;
+			}
+		}
+
+		.tab-count {
+			display: inline-block;
+			margin-left: 10rpx;
+			padding: 0 12rpx;
+			background-color: #ff6b6b;
+			color: #fff;
+			border-radius: 20rpx;
+			font-size: 20rpx;
+			min-width: 30rpx;
+			text-align: center;
+		}
+	}
+
 	.page-content {
-		// height: 40vh;
 		box-sizing: border-box;
 		padding: 10rpx 0;
 
@@ -486,7 +555,6 @@
 			line-height: 120%;
 
 			.detail {
-				// width: 50%;
 				font-size: 26rpx;
 				margin-bottom: 12rpx;
 				color: #555;
@@ -521,6 +589,10 @@
 				padding: 0;
 				width: 150rpx;
 				font-size: 25rpx;
+
+				&:disabled {
+					opacity: 0.5;
+				}
 			}
 
 			.op1 {
@@ -550,6 +622,13 @@
 		}
 	}
 
+	.over {
+		text-align: center;
+		padding: 40rpx;
+		color: #999;
+		font-size: 28rpx;
+	}
+
 	.page-footer {
 		position: fixed;
 		bottom: 0;

--
Gitblit v1.9.1