From 964faa1077a89713910063c39ebe08fac4e4c56e Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期四, 24 七月 2025 17:44:18 +0800
Subject: [PATCH] 企业维修适配修改

---
 pages/checkList/checkList.vue |  343 ++++++++++++++++++++++++++++++--------------------------
 1 files changed, 182 insertions(+), 161 deletions(-)

diff --git a/pages/checkList/checkList.vue b/pages/checkList/checkList.vue
index 5b30de1..2fbbd9d 100644
--- a/pages/checkList/checkList.vue
+++ b/pages/checkList/checkList.vue
@@ -2,7 +2,12 @@
 	<view class="container">
 		<cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask">
 			<block slot="backText">杩斿洖</block>
-			<block slot="content">鐐规鍒楄〃</block>
+			<block slot="content">寰呯偣妫�</block>
+			<block slot="right">
+				<view @click="search">
+					<image class="search" src="/static/icon/sear.png" style="width: 25px; height: 25px;" alt="" />
+				</view>
+			</block>
 		</cu-custom>
 
 		<view style="width: 100%;">
@@ -11,11 +16,14 @@
 					<!-- 鍩虹琛ㄥ崟鏍¢獙 -->
 					<uni-forms ref="form" :modelValue="formData" validate-trigger="bind" err-show-type="undertext">
 						<uni-group title="" top="0">
-							<uni-forms-item name="numbers" label="棰嗘枡鐢宠鍗曞彿:">
-								<uni-easyinput type="text" v-model="formData.num" placeholder="璇疯緭鍏ラ鏂欑敵璇峰崟鍙锋绱�" />
+							<uni-forms-item name="orderNum" label="宸ュ崟鍙�:">
+								<uni-easyinput type="text" v-model="formData.orderNum" placeholder="璇疯緭鍏ラ鏂欑敵璇峰崟鍙锋绱�" />
 							</uni-forms-item>
-							<uni-forms-item name="name" label="棰嗘枡浜у搧:">
-								<uni-easyinput v-model="formData.partNumNameModel" placeholder="璇疯緭鍏ラ鏂欎骇鍝�" />
+							<uni-forms-item name="name" label="璁惧缂栧彿:">
+								<zxz-uni-data-select :localdata="equipmentList" dataKey="text"
+									field="value as value, text as text, title as label" dataValue="value"
+									emptyTips="鏆傛棤鏁版嵁" :multiple="false" :filterable='true' @change="changeEquipmentList"
+									placeholder="璇烽�夋嫨璁惧缂栧彿:" :clear='true' />
 							</uni-forms-item>
 						</uni-group>
 					</uni-forms>
@@ -54,6 +62,18 @@
 							</view>
 						</view>
 						<view class="flex">
+							<view class="flex-sub text-light bg-white padding-xs margin-xs radius">璁惧鍚嶇О:</view>
+							<view class="flex-sub bg-white padding-xs margin-xs     radius text-right">
+								{{item.equipmentName}}
+							</view>
+						</view>
+						<view class="flex">
+							<view class="flex-sub text-light bg-white padding-xs margin-xs radius">瀹夎浣嶇疆:</view>
+							<view class="flex-sub bg-white padding-xs margin-xs     radius text-right">
+								{{item.installationPosition}}
+							</view>
+						</view>
+						<view class="flex">
 							<view class="flex-sub text-light bg-white padding-xs margin-xs radius">鐐规鏃ユ湡:</view>
 							<view class="flex-sub bg-white padding-xs margin-xs   text-blue   radius text-right">
 								{{item.inspectionDate}}
@@ -61,7 +81,7 @@
 						</view>
 						<view class="flex">
 							<view class="flex-sub text-light bg-white padding-xs margin-xs radius">鐐规杩囨湡鏃ユ湡:</view>
-							<view class="flex-sub bg-white padding-xs margin-xs   text-blue   radius text-right">
+							<view class="flex-sub bg-white padding-xs margin-xs   text-red   radius text-right">
 								{{item.expirationTime}}
 							</view>
 						</view>
@@ -87,17 +107,19 @@
 		mixins: [MescrollMixin], // 浣跨敤mixin
 		data() {
 			return {
+				equipmentList: [],
 				type: 'top',
 				scrollLeft: 0,
 				formData: {
 					num: '',
-					partNumNameModel: ''
+					orderNum: ''
 				},
 				NavBarColor: this.NavBarColor,
 				activeColor: '#5277A6',
 				url: {
 					stallList: "eam/eamInspectionOrder/list",
-					receive: "eam/eamInspectionOrder/receiveInspectionOrder"
+					receive: "eam/eamInspectionOrder/receiveInspectionOrder",
+					getEquipmentList: 'eam/equipment/list'
 				},
 				upOption: {
 					page: {
@@ -121,7 +143,8 @@
 				announcement1: [],
 				msg1Count: 0,
 				msg2Count: 0,
-				msg1Title: ""
+				msg1Title: "",
+				equipmentId: ''
 			}
 		},
 		computed: {
@@ -142,9 +165,45 @@
 				this.mescroll.resetUpScroll()
 			}
 		},
-
-		created() {},
+		onLoad: function(options) {
+			this.equipmentId = options.equipmentId ?
+				decodeURIComponent(options.equipmentId) :
+				'';
+		},
+		created() {
+			this.getEquipment()
+		},
 		methods: {
+			getEquipment() {
+				this.$http.get(this.url.getEquipmentList, {
+					params: {
+						pageNo: 1,
+						pageSize: 9999,
+						order: 'desc',
+						column: 'createTime'
+
+					},
+
+				}).then(res => {
+					//璁剧疆鍒楄〃鏁版嵁
+					if (res.data.success) {
+						this.equipmentList = res.data.result.records
+					} else {
+						uni.showToast({
+							icon: "error",
+							title: res.data.message,
+							duration: 2000
+						});
+
+					}
+				}).catch(() => {
+					this.$tip.error("鑱旂綉澶辫触")
+				})
+			},
+			changeEquipmentList(e) {
+				console.log(e.id)
+				this.formData.num = e.id;
+			},
 			/**
 			 * 棰嗗彇
 			 */
@@ -153,7 +212,7 @@
 				this.$tip.loading();
 				this.$http.get(this.url.receive, {
 					params: {
-							id: item.id,
+						id: item.id,
 					},
 				}).then(res => {
 					console.log(res)
@@ -186,32 +245,127 @@
 			 * @param {Object} item
 			 * 璇︽儏椤甸潰
 			 */
-			onClickProductionTask(item) {
-
+			onClickProductionTask(item, flag = 'task', from = 'detils') {
+				let url = '/pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure';
 				uni.navigateTo({
-					url: '/pages/checkList/checkListDetils/checkListDetils?item=' +
-						encodeURIComponent(JSON.stringify(item))
-
-				})
-
+					url: `${url}?item=${encodeURIComponent(JSON.stringify(item))}&flag=${flag}&from=${from}`
+				});
 			},
+			// onClickProductionTask(item) {
+
+			// 	uni.navigateTo({
+			// 		url: '/pages/checkList/checkListDetils/checkListDetils?item=' +
+			// 			encodeURIComponent(JSON.stringify(item))
+
+			// 	})
+
+			// },
 
 			search() {
 				this.$refs.popup.open();
 			},
-
-
 			upCallback(page) {
+				// 纭繚 equipmentId 濮嬬粓浣滀负鍙傛暟浼犻�掞紝鍊间负鏈夋晥瀛楃涓叉垨绌哄瓧绗︿覆
+				const params = {
+					pageNo: page.num,
+					pageSize: page.size,
+					order: 'desc',
+					column: 'createTime',
+					inspectionStatus: 'WAIT_INSPECTION',
+					equipmentId: this.equipmentId || '' 
+				};
+
+				this.$http.get(this.url.stallList, {
+						params
+					})
+					.then(res => {
+						if (!res.data.success) {
+							throw new Error('鑾峰彇鏁版嵁澶辫触: ' + res.data.message);
+						}
+
+						const records = res.data.result.records || [];
+						const total = res.data.result.total || 0;
+
+						// 鏇存柊娑堟伅璁℃暟鍜屾爣棰�
+						this.msg1Count = total;
+						this.msg1Title = `閫氱煡(${total})`;
+
+						// 鏇存柊鍒楄〃鏁版嵁
+						this.msgList = page.num === 1 ? [...records] : [...this.msgList, ...records];
+
+						// 缁撴潫鍔犺浇鐘舵��
+						this.mescroll.endSuccess(records.length);
+						console.log('璇锋眰鎴愬姛', res.data);
+					})
+					.catch(error => {
+						console.error('璇锋眰澶辫触', error);
+						this.mescroll.endErr();
+					});
+			},
+
+
+			// upCallback(page) {
+			// 	this.$http.get(this.url.stallList, {
+			// 		params: {
+			// 			pageNo: page.num,
+			// 			pageSize: page.size,
+			// 			order: 'desc',
+			// 			column: 'createTime',
+			// 			inspectionStatus: 'WAIT_INSPECTION',
+			// 			equipmentId:this.equipmentId || ''
+			// 		},
+
+			// 	}).then(res => {
+			// 		this.announcement1 = res.data.result.records
+			// 		this.mescroll.endSuccess(this.announcement1.length);
+			// 		console.log("url", res)
+			// 		//璁剧疆鍒楄〃鏁版嵁
+			// 		if (res.data.success) {
+			// 			console.log("res", res.data)
+			// 			this.msg1Count = res.data.result.total
+			// 			this.msg1Title = "閫氱煡(" + res.data.result.total + ")";
+			// 			for (let annItem of this.announcement1) {
+			// 				this.msgList.push(annItem)
+			// 			}
+			// 		}
+			// 		if (page.num == 1) {
+			// 			this.msgList = []; //濡傛灉鏄涓�椤甸渶鎵嬪姩鍒剁┖鍒楄〃
+			// 			this.msgList = this.msgList.concat(this.announcement1); //杩藉姞鏂版暟鎹�
+			// 		}
+
+			// 	}).catch(() => {
+			// 		//鑱旂綉澶辫触, 缁撴潫鍔犺浇
+			// 		this.mescroll.endErr();
+			// 	})
+
+			// },
+
+
+			resetTask() {
+				this.formData.orderNum = ''
+				this.formData.num = ''
+				this.$refs.popup.close();
+				this.mescroll.resetUpScroll()
+
+			},
+			/* 妫�绱� */
+			getSera() {
+				this.$refs.popup.close();
+				this.msgList = [];
 				this.$http.get(this.url.stallList, {
 					params: {
-						pageNo: page.num,
-						pageSize: page.size,
-						order: 'desc',
-						column: 'createTime',
-						inspectionStatus: 'WAIT_INSPECTION'
-					},
+						pageNo: 1,
+						pageSize: 999,
+						order: "desc",
+						column: "createTime",
+						inspectionStatus: 'WAIT_INSPECTION',
+						equipmentId: this.formData.num,
+						orderNum: this.formData.orderNum
 
+					}
 				}).then(res => {
+					//鑱旂綉鎴愬姛鐨勫洖璋�,闅愯棌涓嬫媺鍒锋柊鍜屼笂鎷夊姞杞界殑鐘舵��;
+
 					this.announcement1 = res.data.result.records
 					this.mescroll.endSuccess(this.announcement1.length);
 					console.log("url", res)
@@ -233,139 +387,6 @@
 					//鑱旂綉澶辫触, 缁撴潫鍔犺浇
 					this.mescroll.endErr();
 				})
-
-			},
-
-
-			resetTask() {
-				this.formData.num = ''
-				this.formData.partNumNameModel = ''
-				this.$refs.popup.close();
-				this.mescroll.resetUpScroll()
-
-			},
-			/* 妫�绱� */
-			getSera() {
-				this.$refs.popup.close();
-				let keyword = this.TabCur
-				this.msgList = [];
-
-				if (keyword == 0) {
-					this.$http.get(this.url.stallList, {
-						params: {
-							pageNo: 1,
-							pageSize: 999,
-							order: "desc",
-							column: "createTime",
-							num: '*' + this.formData.num + '*',
-							partNumNameModel: '*' + this.formData.partNumNameModel + '*',
-							status: 'published'
-						}
-					}).then(res => {
-						//鑱旂綉鎴愬姛鐨勫洖璋�,闅愯棌涓嬫媺鍒锋柊鍜屼笂鎷夊姞杞界殑鐘舵��;
-
-						this.announcement1 = res.data.result.records
-						this.mescroll.endSuccess(this.announcement1.length);
-						console.log("url", res)
-						//璁剧疆鍒楄〃鏁版嵁
-						if (res.data.success) {
-							console.log("res", res.data)
-							this.msg1Count = res.data.result.total
-							this.msg1Title = "閫氱煡(" + res.data.result.total + ")";
-							for (let annItem of this.announcement1) {
-								this.msgList.push(annItem)
-							}
-						}
-						if (page.num == 1) {
-							this.msgList = []; //濡傛灉鏄涓�椤甸渶鎵嬪姩鍒剁┖鍒楄〃
-							this.msgList = this.msgList.concat(this.announcement1); //杩藉姞鏂版暟鎹�
-						}
-
-					}).catch(() => {
-						//鑱旂綉澶辫触, 缁撴潫鍔犺浇
-						this.mescroll.endErr();
-					})
-
-				} else if (keyword == 1) {
-					this.$http.get(this.url.stallList, {
-						params: {
-							pageNo: 1,
-							pageSize: 999,
-							order: "desc",
-							column: "createTime",
-							status: 'training',
-							num: '*' + this.formData.num + '*',
-							partNumNameModel: '*' + this.formData.partNumNameModel + '*'
-
-						}
-					}).then(res => {
-						//鑱旂綉鎴愬姛鐨勫洖璋�,闅愯棌涓嬫媺鍒锋柊鍜屼笂鎷夊姞杞界殑鐘舵��;
-
-						this.announcement1 = res.data.result.records
-						this.mescroll.endSuccess(this.announcement1.length);
-						console.log("url", res)
-						//璁剧疆鍒楄〃鏁版嵁
-						if (res.data.success) {
-							console.log("res", res.data)
-							this.msg1Count = res.data.result.total
-							this.msg2Title = "閫氱煡(" + res.data.result.total + ")";
-							for (let annItem of this.announcement1) {
-								this.msgList.push(annItem)
-							}
-						}
-						if (page.num == 1) {
-							this.msgList = []; //濡傛灉鏄涓�椤甸渶鎵嬪姩鍒剁┖鍒楄〃
-							this.msgList = this.msgList.concat(this.announcement1); //杩藉姞鏂版暟鎹�
-						}
-
-					}).catch(() => {
-						//鑱旂綉澶辫触, 缁撴潫鍔犺浇
-						this.mescroll.endErr();
-					})
-
-				} else if (keyword == 2) {
-					this.$http.get(this.url.stallList, {
-						params: {
-							pageNo: 1,
-							pageSize: 999,
-							order: "desc",
-							column: "createTime",
-							status: 'completed',
-							num: '*' + this.formData.num + '*',
-							partNumNameModel: '*' + this.formData.partNumNameModel + '*'
-
-						}
-					}).then(res => {
-						//鑱旂綉鎴愬姛鐨勫洖璋�,闅愯棌涓嬫媺鍒锋柊鍜屼笂鎷夊姞杞界殑鐘舵��;
-
-						this.announcement1 = res.data.result.records
-						this.mescroll.endSuccess(this.announcement1.length);
-						console.log("url", res)
-						//璁剧疆鍒楄〃鏁版嵁
-						if (res.data.success) {
-							console.log("res", res.data)
-							this.msg3Count = res.data.result.total
-							this.msg1Title = "閫氱煡(" + res.data.result.total + ")";
-							for (let annItem of this.announcement1) {
-								this.msgList.push(annItem)
-							}
-						}
-						if (page.num == 1) {
-							this.msgList = []; //濡傛灉鏄涓�椤甸渶鎵嬪姩鍒剁┖鍒楄〃
-							this.msgList = this.msgList.concat(this.announcement1); //杩藉姞鏂版暟鎹�
-						}
-
-					}).catch(() => {
-						//鑱旂綉澶辫触, 缁撴潫鍔犺浇
-						this.mescroll.endErr();
-					})
-
-				}
-
-
-
-
-
 			},
 
 
@@ -396,7 +417,7 @@
 	}
 
 	.popupView {
-		margin-top: 85px;
+		margin-top: 45px;
 		height: auto;
 	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3