From f2232657e8109b0ed4f76b3913e0d4b9713e2af6 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 18 三月 2024 07:54:56 +0800
Subject: [PATCH] #

---
 pages/project/jmAGV/home.vue |   70 +++++++++++++++++++++++++++++++++-
 1 files changed, 67 insertions(+), 3 deletions(-)

diff --git a/pages/project/jmAGV/home.vue b/pages/project/jmAGV/home.vue
index 8e39df4..61a83ab 100644
--- a/pages/project/jmAGV/home.vue
+++ b/pages/project/jmAGV/home.vue
@@ -1,5 +1,6 @@
 <template>
 	<view class="container">
+		<uni-icons type="bars" size="30" color="#b1b3b8" class="select" @click="jump()"></uni-icons>
 		<!-- 宸� -->
 		<view class="zcard">
 			<view class="zcard-flex">
@@ -12,6 +13,7 @@
 				<view class="button-nk" style="background-color: brown;" v-for="item in traySiteList" @click="click(item,'right')">{{item.name}}</view>
 			</view>
 		</view>
+		
 		
 		<view>
 			<uni-popup ref="revise" type="dialog">
@@ -38,7 +40,13 @@
 			<uni-popup ref="inputPopup" type="dialog">
 				<view class="popup3">
 					<view class="popup3-input-title">{{tipsTitle}}</view>
-					<view class="popup3-input-box">
+					<view class="popup3-input-box2"  :class="item.chose" 
+						v-if="!meterShow" v-for="item in emptyMatList" @click="chose(item.matnr)">
+						<view>
+							{{item.maktx}}
+						</view>
+					</view>
+					<view class="popup3-input-box" v-if="meterShow">
 						<text>{{desc}}:</text>
 						<view style="margin-left: 3rpx;">
 							<input type="text" v-model="code"/>
@@ -89,6 +97,7 @@
 					{name: '9鍙锋墭鐩樼珯',code:'KW-9',type: 'tray'},
 					{name: '10鍙锋墭鐩樼珯',code:'KW-10',type: 'tray'}
 				],
+				emptyMatList: [],
 				item: '',
 				text: '',
 				btnTitle1: '',
@@ -103,7 +112,7 @@
 				meter: '',
 				meterShow: '',
 				desc: '',
-				tipsTitle: ''
+				tipsTitle: '',
 			}
 		},
 		onShow() {
@@ -112,6 +121,11 @@
 			this.token = uni.getStorageSync('token');
 		},
 		methods: {
+			jump() {
+				uni.redirectTo({
+					url: '/pages/project/jmAGV/floorOne'
+				})
+			},
 			click(item,type) {
 				this.item = item
 				this.text = item.name
@@ -126,6 +140,17 @@
 					this.btnTitle3 = '浠撳簱-婊℃墭鐩�(鍑哄簱)'
 				}
 				this.$refs.revise.open(type)
+			},
+			chose(matnr) {
+				for (let k of this.emptyMatList) {
+					if (k.matnr == matnr) {
+						k.chose = 'chosed'
+					} else {
+						k.chose = ''
+					}
+					this.$forceUpdate() // 寮哄埗鍒锋柊
+				}
+				this.code = matnr
 			},
 			// 鍦伴潰绔欎笂鏋� / 鎵樼洏绔欏叆搴撴寜閽�
 			upTray() {
@@ -176,10 +201,25 @@
 					this.tipsTitle = '绌烘墭鐩樺嚭搴�'
 					this.desc = '鐗╂枡鐮�'
 					this.meterShow = false
+					let that = this
+					uni.request({
+						url: `${that.baseUrl}/agv/getEmptyMat`,
+						header: { 'token': uni.getStorageSync('token') },
+						method: 'GET',
+						success(res) {
+							res = res.data
+							if (res.code === 200) {
+								res.data['chose'] = ''
+								that.emptyMatList = res.data
+								
+							}
+						}
+					})
 				} else {
 					this.tipsTitle = '婊℃墭鐩樺嚭搴�'
 					this.desc = '璁㈠崟鍙�'
 					this.meterShow = true
+					this.$refs.inputPopup.open('center')
 				}
 				this.$refs.inputPopup.open('center')
 			},
@@ -265,6 +305,7 @@
 		/* background-color: aqua; */
 		display: grid;
 		grid-template-columns: 50% 50%;
+		width: 100%;
 
 	}
 	.btn-box {
@@ -290,7 +331,7 @@
 		margin: 10rpx 0rpx;
 		/* padding: 20rpx 70rpx; */
 		/* background-color: azure; */
-		min-width: 150rpx;
+		min-width: 100rpx;
 		/* margin: 0 auto; */
 		height: 50rpx;
 		text-align: center;
@@ -330,6 +371,7 @@
 	}
 	.popup3 {
 		background-color: #eee;
+		max-height: 80vw;
 		width: 50vw;
 		padding: 0 10vw;
 		display: flex;
@@ -351,4 +393,26 @@
 		padding: 2rpx 10rpx;
 		margin: 20rpx;
 	}
+	.popup3-input-box2 {
+		display: flex;
+		border: 1px solid #cecece;
+		border-radius: 5rpx;
+		padding: 2rpx 10rpx;
+		margin: 10rpx;
+		background-color: #FFF;
+	}
+	.chosed {
+		background-color: #67C23A;
+		color: #e8e8e8;
+	}
+	.select {
+		position: absolute;
+		bottom: 12px;
+		right: 16px;
+		border-radius: 10px;
+		padding: 4px 10px;
+		box-shadow: inset 2px 2px 2px rgba(0, 0, 0, .3),
+			inset -2px -2px 2px rgba(255, 255, 255, .7),
+			-2px -2px 2px rgba(0, 0, 0, .4);
+	}
 </style>

--
Gitblit v1.9.1