From bcf8a3b5770137f41d1b91c9b3c6e7241b1202a2 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期四, 15 五月 2025 13:29:41 +0800
Subject: [PATCH] #AGV入库

---
 pages/AGV/BindAndInTask.vue |   60 ++++++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 46 insertions(+), 14 deletions(-)

diff --git a/pages/AGV/BindAndInTask.vue b/pages/AGV/BindAndInTask.vue
index 737066d..eeb06ff 100644
--- a/pages/AGV/BindAndInTask.vue
+++ b/pages/AGV/BindAndInTask.vue
@@ -9,7 +9,7 @@
 			<view class="cu-form-group ">
 				<view class="title">瀹瑰櫒鐮�</view>
 				<input placeholder="璇锋壂鎻忓鍣ㄧ爜" v-model="container" ></input>
-				<text class='cuIcon-search text-blue' @click="search"></text>
+				<text class='cuIcon-search text-blue' @click="getList"></text>
 			</view>
 			<view class="cu-form-group">
 				<view class="title">鐩爣搴撳尯</view>
@@ -30,14 +30,20 @@
 							{{index+1}}
 						</view>
 						<view class="text-blue">
-							{{`${item.maktx}`}}
+							缂栫爜:
+							{{`${item.matnrCode}`}}
 						</view>
 					</view>
 					<!-- 	<view class="action" >
 						<text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
 					</view> -->
 				</view>
-
+				<view class="cu-item">
+					<view class="content">
+						<text class="text-black">鍚嶇О:</text>
+						<text class="text-grey ">{{item.maktx}}</text>
+					</view>					
+				</view>
 				<view class="cu-item">
 					<view class="content">
 						<text class="text-black">ASN:</text>
@@ -118,14 +124,10 @@
 					code,
 					data,
 					msg
-				} = await request('/staBind/list', {
-					sta: this.barcode
+				} = await request('/staMsg/select', {
+					sta: this.barcode					
 				})
-				if (code === 200) {	
-					if(data.list.length >0){
-						that.container = data.barcode						
-						that.list = data.list
-					}
+				if (code === 200) {						
 					that.range = data.warehouseAreasList.map(item => ({
 						value: item.id,
 						text: item.name
@@ -138,15 +140,37 @@
 					})
 				}
 			},
-
+			async getList() {
+				const {
+					code,
+					data,
+					msg
+				} = await request('/asnOrderItem/container', {
+					barcode: this.container,
+					type: 'unbind'
+				})
+				if (code === 200) {
+					for (var i = 0; i < data.length; i++) {
+						data[i].receiptQty = 0;						
+					}
+					this.list = data
+				} else {
+					uni.showToast({
+						title: msg,
+						icon: "none",
+						position: 'top'
+					})
+				}
+			},
 			remove(index) {
 				this.list.splice(index, 1);
 			},
 			clear() {
 				this.list = []
-				
+				this.range = []
 				this.container = ''
 				this.barcode = ''
+				this.whAreaId = ''
 			},
 
 			open() {
@@ -179,14 +203,22 @@
 					})
 					return ;
 				}
+				if(this.container === '' || this.container ===null){
+					uni.showToast({
+						title: "瀹瑰櫒鐮佷笉鑳戒负绌�",
+						icon: "none",
+					})
+					return ;
+				}
 				this.repeatClick = true
 				const {
 					code,
 					data,
 					msg
-				} = await request('/AGV/task/start',{						
+				} = await request('/AGV/bindAndIn/start',{						
 						sta: this.barcode,
-						area: this.whAreaId
+						area: this.whAreaId,
+						barcode : this.container
 					}
 				)
 				if (code === 200) {

--
Gitblit v1.9.1