From a2019ade7b884799e639150021c3cdeef27eea72 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期六, 09 十一月 2024 11:40:52 +0800
Subject: [PATCH] 增加工号ui修改

---
 pages/project/jmAGV/home.vue |   72 +++++++++++++++++++++++------------
 1 files changed, 47 insertions(+), 25 deletions(-)

diff --git a/pages/project/jmAGV/home.vue b/pages/project/jmAGV/home.vue
index af0fc69..77e5bfb 100644
--- a/pages/project/jmAGV/home.vue
+++ b/pages/project/jmAGV/home.vue
@@ -41,13 +41,15 @@
 
 		<view>
 			<uni-popup ref="upPalletPopup" type="dialog">
-				<view class="popup2">
+				<scroll-view scroll-y="true" style="height: 100%;background: #eee;border-radius: 10rpx;padding: 0 1vw;">
 					<view class="popup3-input-title">鐩樺ご涓婃灦</view>
 					<view class="popup3-input-box">
-						<uni-data-select v-model="chooseCacheSite" :localdata="chooseCacheSiteList" placeholder="璇烽�夋嫨绔欑偣"></uni-data-select>
+						<uni-data-select v-model="chooseCacheSite" :localdata="chooseCacheSiteList"
+							placeholder="璇烽�夋嫨绔欑偣"></uni-data-select>
 					</view>
 					<view class="popup3-input-box">
-						<uni-data-select v-model="chooseMat" :localdata="emptyMatList" placeholder="璇烽�夋嫨鐗╂枡"></uni-data-select>
+						<uni-data-select v-model="chooseMat" :localdata="emptyMatList"
+							placeholder="璇烽�夋嫨鐗╂枡"></uni-data-select>
 					</view>
 					<view class="popup3-input-box">
 						<text>璁㈠崟鍙�:</text>
@@ -61,13 +63,19 @@
 							<input type="text" v-model="meter" />
 						</view>
 					</view>
+					<view class="popup3-input-box">
+						<text>宸ュ彿:</text>
+						<view style="margin-left: 3rpx;">
+							<input type="text" v-model="workNumber" />
+						</view>
+					</view>
 					<view class="button-nk" @click="goUp(2)">2涓�</view>
 					<view class="button-nk" @click="goUp(4)">4涓�</view>
-				</view>
+				</scroll-view>
 			</uni-popup>
 		</view>
-		
-		
+
+
 	</view>
 </template>
 
@@ -216,14 +224,25 @@
 				meterShow: '',
 				desc: '',
 				tipsTitle: '',
+				workNumber: ''
 			}
 		},
 		onShow() {
 			let network = uni.getStorageSync('Network')
 			this.baseUrl = `http://${network[0].ip}:${network[0].port}/${network[0].address}`
 			this.token = uni.getStorageSync('token');
-			
+
 			this.getEmptyMatList()
+
+			uni.onNetworkStatusChange(function(res) {
+				if (!res.isConnected) {
+					uni.showLoading({
+						title: '缃戠粶鏂紑...'
+					});
+				} else {
+					uni.hideLoading();
+				}
+			});
 		},
 		methods: {
 			jump() {
@@ -245,7 +264,9 @@
 				let that = this
 				uni.request({
 					url: `${that.baseUrl}/agv/getEmptyMat`,
-					header: { 'token': uni.getStorageSync('token') },
+					header: {
+						'token': uni.getStorageSync('token')
+					},
 					method: 'GET',
 					success(res) {
 						res = res.data
@@ -296,8 +317,8 @@
 			},
 			goUp(num) {
 				let data = {}
-				
-				if(this.chooseCacheSite == ''){
+
+				if (this.chooseCacheSite == '') {
 					uni.showToast({
 						title: '璇烽�夋嫨绔欑偣',
 						icon: "none",
@@ -305,8 +326,8 @@
 					})
 					return;
 				}
-				
-				if(this.chooseMat == ''){
+
+				if (this.chooseMat == '') {
 					uni.showToast({
 						title: '璇烽�夋嫨鐗╂枡',
 						icon: "none",
@@ -314,8 +335,8 @@
 					})
 					return;
 				}
-				
-				if(this.code == ''){
+
+				if (this.code == '') {
 					uni.showToast({
 						title: '璇疯緭鍏ヨ鍗曞彿',
 						icon: "none",
@@ -323,8 +344,8 @@
 					})
 					return;
 				}
-				
-				if(this.meter == ''){
+
+				if (this.meter == '') {
 					uni.showToast({
 						title: '璇疯緭鍏ョ背鏁�',
 						icon: "none",
@@ -332,7 +353,7 @@
 					})
 					return;
 				}
-				
+
 				data = {
 					originLocal: this.item.code,
 					targetLocal: this.chooseCacheSite,
@@ -340,21 +361,22 @@
 					anfme: num,
 					matnr: this.chooseMat,
 					orderNo: this.code,
-					meter: this.meter
+					meter: this.meter,
+					workNumber: this.workNumber,
 				}
 				this.webServer(data)
-				setTimeout(()=>{
+				setTimeout(() => {
 					this.$refs.upPalletPopup.close()
 					this.chooseMat = ''
 					this.code = ''
 					this.meter = ''
 					this.chooseCacheSite = ''
-				},300)
+				}, 300)
 			},
 			goDown(num) {
 				let data = {}
-				
-				if(this.groundSite == ''){
+
+				if (this.groundSite == '') {
 					uni.showToast({
 						title: '璇烽�夋嫨绔欑偣',
 						icon: "none",
@@ -362,7 +384,7 @@
 					})
 					return;
 				}
-				
+
 				data = {
 					originLocal: this.item.code,
 					targetLocal: this.groundSite,
@@ -370,9 +392,9 @@
 					anfme: num,
 				}
 				this.webServer(data)
-				setTimeout(()=>{
+				setTimeout(() => {
 					this.$refs.downPalletPopup.close()
-				},300)
+				}, 300)
 			},
 			// 鎵�鏈夋湇鍔�
 			webServer(data) {

--
Gitblit v1.9.1