From 8f5681d1c103883b90d6b49d6ed4f00f8d6cac6c Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期二, 22 十月 2024 18:04:24 +0800
Subject: [PATCH] 代码初始化

---
 pda/pages/index/center.vue |   41 ++++++++++++++++++++++++++++-------------
 1 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/pda/pages/index/center.vue b/pda/pages/index/center.vue
index 478bfab..cba71b9 100644
--- a/pda/pages/index/center.vue
+++ b/pda/pages/index/center.vue
@@ -32,14 +32,15 @@
 					<view class="status" v-if="item.status == 4">鍙彿涓� {{ item.callDateTemp }}</view>
 					<view class="status scs" v-if="item.status == 5">宸蹭綔涓� {{ item.startDateTemp }}</view>
 				</view>
-				<view class="line" v-if="item.code">
+				<view class="line" v-if="item.billCode">
 					<text class="label">杩愯緭鍗曞彿</text>
-					<text class="value">{{ item.code }}</text>
+					<text class="value">{{ item.billCode }}</text>
 					<text class="primaryColor" @click="handleDetail(item)">杩愬崟璇︽儏</text>
 				</view>
 				<view class="line" v-else>
 					<text class="label">鍚堝悓鍗曞彿</text>
-					<text class="value">{{ item.contractNum }}</text>
+					<text class="value">{{ item.contractNum }}</text>
+					<text class="primaryColor" @click="subDetail(item)">棰勭害璇︽儏</text>
 				</view>
 				<view class="line">
 					<text class="label">椹鹃┒鍛�</text>
@@ -103,7 +104,8 @@
 							</view>
 							<view class="line" v-else>
 								<text class="label">鍚堝悓鍗曞彿</text>
-								<text class="value">{{ item.contractNum }}</text>
+								<text class="value">{{ item.contractNum }}</text>
+								<text class="primaryColor" @click="subDetail(item)">棰勭害璇︽儏</text>
 							</view>
 							<view class="line">
 								<text class="label">椹鹃┒鍛�</text>
@@ -244,27 +246,31 @@
 
 				transformPlatId: '', // 杞Щ璁板綍鏈堝彴id
 				transformId: '', // 杞Щ璁板綍浠诲姟id
-				wmsInfo: {}
+				wmsInfo: {},
+				timer: null
 			}
 		},
 		onLoad() {
 			this.getPlatformGroup()
-			setInterval(() => {
-				this.getPlatformGroup()
-			}, 1000 * 30)
+			// setInterval(() => {
+			// 	this.getPlatformGroup()
+			// }, 1000 * 30)
 		},
 		methods: {
 			getPlatformGroup() {
 				getPlatformGroupList({
 					queryData: 1,
-					queryType: 0
+					queryType: 1
 				}).then(res => {
 					this.platformGroupList = res.data || []
 					if (this.platformGroupList.length > 0) {
 						this.activePlatformGroup = this.platformGroupList[0]
 						if (this.activePlatformGroup.platformList && this.activePlatformGroup.platformList.length > 0) {
-							this.activePlatform = this.activePlatformGroup.platformList[0]
-							this.getPlatformTask()
+							this.activePlatform = this.activePlatformGroup.platformList[0]
+							this.getPlatformTask()
+							this.timer = setInterval(() => {	
+								this.getPlatformTask()
+							}, 60 * 1000)
 						}
 					}
 				})
@@ -309,8 +315,12 @@
 				const index = e.indexs[0]
 				this.activePlatformGroup = this.platformGroupList[index]
 				if (this.activePlatformGroup.platformList && this.activePlatformGroup.platformList.length > 0) {
-					this.activePlatform = this.activePlatformGroup.platformList[0]
-					this.getPlatformTask()
+					this.activePlatform = this.activePlatformGroup.platformList[0]
+					this.getPlatformTask()
+					clearInterval(this.timer)
+					this.timer = setInterval(() => {
+						this.getPlatformTask()
+					}, 60 * 1000)
 				}
 				this.showPlatformgroup = false
 			},
@@ -325,6 +335,11 @@
 					this.wmsInfo = res.data
 					this.showDetail = true
 				})
+			},
+			subDetail(item) {
+				uni.navigateTo({
+				  url: `/pages/index/SubDetail?id=${item.bookId}`
+				})
 			},
 			handleFinish(item) {
 				finishWork({

--
Gitblit v1.9.3