From 5e4b8e610be4a6e42c07c0104c95f5fe697d5412 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期一, 12 一月 2026 14:36:35 +0800
Subject: [PATCH] #

---
 pages/listing/matnrPalletising.vue |  102 +++++++++++++++++++++++++++++++++++++++++++++++++--
 pages/AGV/StartInTask.vue          |   14 +++++-
 2 files changed, 109 insertions(+), 7 deletions(-)

diff --git a/pages/AGV/StartInTask.vue b/pages/AGV/StartInTask.vue
index ebef7c2..7aa5ea7 100644
--- a/pages/AGV/StartInTask.vue
+++ b/pages/AGV/StartInTask.vue
@@ -3,7 +3,7 @@
 		<form>
 			<view class="cu-form-group margin-top">
 				<view class="title">鎺ラ┏绔欑偣</view>
-				<input placeholder="璇锋壂鎻忔帴椹崇珯鐐规潯鐮�" v-model="barcode" ></input>
+				<input placeholder="璇锋壂鎻忔帴椹崇珯鐐规潯鐮�" v-model="agvStation" ></input>
 				<!-- <text class='cuIcon-search text-blue' @click="search"></text> -->
 			</view>	
 			<view class="cu-form-group">
@@ -103,7 +103,8 @@
 				curCode: '',
 				whAreaId:'',
 				repeatClick: false,
-				buttonPermissions: [] // 鎸夐挳鏉冮檺鍒楄〃
+				buttonPermissions: [] ,// 鎸夐挳鏉冮檺鍒楄〃
+				agvStation:''
 				
 			}
 		},
@@ -178,13 +179,20 @@
 			},
 
 			async confirm() {				
-				if(this.barcode === '' || this.barcode ===null){
+				if(this.agvStation === '' || this.agvStation ===null){
 					uni.showToast({
 						title: "鎺ラ┏绔欑偣涓嶈兘涓虹┖",
 						icon: "none",
 					})
 					return ;
 				}
+				if(this.barcode === '' || this.barcode ===null){
+					uni.showToast({
+						title: "瀹瑰櫒鍙蜂笉鑳戒负绌�",
+						icon: "none",
+					})
+					return ;
+				}
 				if(this.whAreaId === '' || this.whAreaId ===null){
 					uni.showToast({
 						title: "鐩爣搴撳尯涓嶈兘涓虹┖",
diff --git a/pages/listing/matnrPalletising.vue b/pages/listing/matnrPalletising.vue
index 215aaea..3c5896b 100644
--- a/pages/listing/matnrPalletising.vue
+++ b/pages/listing/matnrPalletising.vue
@@ -145,8 +145,22 @@
 					<text class="modal-title">杈撳叆AGV绔欑偣</text>
 				</view>
 				<view class="modal-body">
-					<view class="input-wrapper">
-						<input class="agv-input" type="text" v-model="agvStationInput" placeholder="璇疯緭鍏GV绔欑偣缂栧彿" />
+					<view class="form-item">
+						<text class="form-label">AGV绔欑偣</text>
+						<view class="input-wrapper">
+							<input class="agv-input" type="text" v-model="agvStationInput" placeholder="璇疯緭鍏GV绔欑偣缂栧彿" />
+						</view>
+					</view>
+					<view class="form-item">
+						<text class="form-label">鐩爣搴撳尯</text>
+						<view class="input-wrapper picker-wrapper">
+							<picker mode="selector" :range="rangeText" @change="pickerChange">
+								<view class="picker-view">
+									<text>{{ whAreaId ? selectedText : '璇烽�夋嫨搴撳尯' }}</text>
+									<text class="cuIcon-right picker-arrow"></text>
+								</view>
+							</picker>
+						</view>
 					</view>
 				</view>
 				<view class="modal-footer">
@@ -171,6 +185,7 @@
 	export default {
 		data() {
 			return {
+				whAreaId:'',
 				barcode: '',
 				container: '',
 				megreQty: '',
@@ -191,14 +206,27 @@
 			...mapState('user', ['dynamicFields']),
 			allCount() {
 				return this.list.reduce((acc, row) => +row.anfme + acc, 0) || 0
+			},
+			rangeText() {
+				return this.range.map(item => item.text)
+			},
+			selectedText() {
+				const found = this.range.find(item => item.value === this.whAreaId)
+				return found ? found.text : '璇烽�夋嫨搴撳尯'
 			}
 		},
 		mounted() {
+			this.getRece()
 			// 鑾峰彇鎸夐挳鏉冮檺
 			this.buttonPermissions = uni.getStorageSync('buttonPermissions') || [];
 			console.log('褰撳墠椤甸潰鎸夐挳鏉冮檺:', this.buttonPermissions);
 		},
 		methods: {
+			pickerChange(e) {
+				const index = e.detail.value
+				this.whAreaId = this.range[index].value
+				uni.setStorageSync('whAreaId', this.whAreaId)
+			},
 			// 妫�鏌ユ寜閽潈闄�
 			hasButtonPermission(route) {
 				return this.buttonPermissions.includes(route);
@@ -410,6 +438,7 @@
 			},
 			// 閫夋嫨涓嶉渶瑕丄GV
 			handleAgvNo() {
+				
 				this.showAgvModal = false;
 				this.submitConfirm('');
 			},
@@ -429,6 +458,14 @@
 				if (this.agvStationInput.trim() === '') {
 					uni.showToast({
 						title: "AGV绔欑偣涓嶈兘涓虹┖",
+						icon: "none",
+						position: 'top'
+					});
+					return;
+				}
+				if (this.whAreaId.trim() === '') {
+					uni.showToast({
+						title: "鐩爣搴撳尯涓嶈兘涓虹┖",
 						icon: "none",
 						position: 'top'
 					});
@@ -457,6 +494,7 @@
 			if (agvStation) {
 				requestData.staNo = agvStation;
 				requestData.agvSign = 1;
+				requestData.area = this.whAreaId;
 			}else{
 				requestData.agvSign = 0;
 			}
@@ -482,6 +520,19 @@
 				})
 			}
 			this.repeatClick = false
+		},
+		async getRece() {
+			const {
+				code,
+				data,
+				msg
+			} = await request('/areas/receipt', {}, 'get')
+			if (code === 200) {
+				this.range = data.map(item => ({
+					value: item.id,
+					text: item.warehouseId$ + "-- " + item.name
+				}));
+			}
 		},
 		}
 	}
@@ -557,7 +608,24 @@
 	
 	/* 寮圭獥鍐呭 */
 	.modal-body {
-		padding: 40rpx 30rpx;
+		padding: 30rpx;
+	}
+	
+	.form-item {
+		margin-bottom: 24rpx;
+	}
+	
+	.form-item:last-child {
+		margin-bottom: 0;
+	}
+	
+	.form-label {
+		display: block;
+		font-size: 28rpx;
+		color: #333;
+		font-weight: 500;
+		margin-bottom: 12rpx;
+		padding-left: 4rpx;
 	}
 	
 	.modal-message {
@@ -571,8 +639,18 @@
 	.input-wrapper {
 		background-color: #f5f7fa;
 		border-radius: 12rpx;
-		padding: 20rpx;
+		padding: 10rpx;
 		border: 2rpx solid #e4e7ed;
+		transition: border-color 0.2s;
+	}
+	
+	.input-wrapper:focus-within {
+		border-color: #0081ff;
+	}
+	
+	.picker-wrapper {
+		display: flex;
+		align-items: center;
 	}
 	
 	.agv-input {
@@ -583,6 +661,22 @@
 		background-color: transparent;
 	}
 	
+	.picker-view {
+		width: 100%;
+		height: 70rpx;
+		line-height: 70rpx;
+		font-size: 30rpx;
+		color: #333;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+	}
+	
+	.picker-arrow {
+		color: #999;
+		font-size: 28rpx;
+	}
+	
 	/* 寮圭獥搴曢儴鎸夐挳 */
 	.modal-footer {
 		display: flex;

--
Gitblit v1.9.1