From 5a15fa73d5f6a39917013871a65eb11a8c013391 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期三, 05 十一月 2025 17:30:56 +0800
Subject: [PATCH] 1

---
 项目代码/PDA/pages/task/Outbound.vue |  238 ++++++++++++++++++++++++++++++++---------------------------
 1 files changed, 130 insertions(+), 108 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/task/Outbound.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/task/Outbound.vue"
index 4f75041..43c2595 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/task/Outbound.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/task/Outbound.vue"
@@ -1,48 +1,47 @@
 <template>
 	<view>
-		<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem">
-		</uni-segmented-control>
-		<view v-show="current === 0">
-			<view style="padding: 5%;">
-				<uni-forms label-width="120">
-					<uni-forms-item label="鎵樼洏缂栫爜">
-						<uni-easyinput type="text" :focus="!istrue" @input="carNoInputChange" v-model="PalletCode"
-							placeholder="璇疯緭鍏ユ墭鐩樼紪鐮�" ref='midInput' />
-					</uni-forms-item>
-					<uni-forms-item label="鎼繍璧风偣">
-						<uni-easyinput type="text" :focus="istrue" v-model="SourceAddress"
-							placeholder="璇疯緭鍏GV鎼繍璧风偣" ref='midInput' />
-					</uni-forms-item>
-					<uni-forms-item label="鎼繍缁堢偣">
-						<uni-easyinput type="text" :focus="!istrue" @input="carNoInputChange" v-model="TargetAddress"
-							placeholder="璇疯緭鍏GV鎼繍缁堢偣" ref='midInput' />
-					</uni-forms-item>
-				</uni-forms>
-				<button @click="InboundTask" type="primary" size="default" style="margin-top: 2%;">鎼繍</button>
-				<u-toast ref="InboundTaskluToast" />
+		<u-sticky>
+			<view style="background-color: #ffffff;">
+				<uni-search-bar @confirm="search" v-model="searchValue"></uni-search-bar>
 			</view>
-		</view>
-		<view v-show="current === 1">
-			<view style="padding: 5%;">
-				<uni-forms label-width="120">
-					<uni-forms-item label="鎵� 鐩� 缂� 鐮�">
-						<uni-easyinput type="text" :focus="barcodefocus" @input="inputChangebarcode" v-model="Barcode"
-							placeholder="璇疯緭鍏ユ墭鐩樼紪鐮�" ref='midInput' />
-					</uni-forms-item>
-					<uni-forms-item label="璺ㄦゼ灞傝捣鐐�">
-						<uni-easyinput type="text" :focus="barcodefocus" v-model="StartAddress"
-							placeholder="璇疯緭鍏ヨ法妤煎眰璧风偣" ref='midInput' />
-					</uni-forms-item>
-					<uni-forms-item label="璺ㄦゼ灞傜粓鐐�">
-						<uni-easyinput type="text" :focus="barcodefocus" v-model="EndAddress"
-							placeholder="璇疯緭鍏ヨ法妤煎眰缁堢偣" ref='midInput' />
-					</uni-forms-item>
-				</uni-forms>
-				<button @click="OutboundTask" type="primary" size="default" style="margin-top: 2%;">涓嬪彂浠诲姟</button>
-				<u-toast ref="OutboundTaskluToast" />
-			</view>
-		</view>
-	</view>
+		</u-sticky>
+		<uni-list :border="true">
+			<uni-list-item direction="column" clickable
+				v-for="item in allReceivingOrders" :key="item.id">
+				<template v-slot:body>
+					<uni-group margin-top="20">
+						<view class="flex-row">
+							<view class="label">鎵樼洏鏉$爜:</view>
+							<view class="value">{{item.palletCode}}</view>
+						</view>
+						<view class="flex-row">
+							<view class="label">璐т綅缂栫爜:</view>
+							<view class="value">{{item.locationCode}}</view>
+						</view>
+						<view class="flex-row">
+							<view class="label">鐗╂枡缂栫爜:</view>
+							<view class="value">{{item.materielCode}}</view>
+						</view>
+						<view class="flex-row">
+							<view class="label">鐗╂枡鍚嶇О:</view>
+							<view class="value">{{item.materielName}}</view>
+						</view>
+						<view class="flex-row">
+							<view class="label">搴撳瓨鏁伴噺:</view>
+							<view class="value">{{item.quantity}}</view>
+						</view>
+						<view>
+							<button @click="Outbound(item.palletCode)" type="primary" size="default" style="margin-top: 2%;">鍑哄簱</button>
+						</view>
+					</uni-group>
+				</template>
+			</uni-list-item>
+
+		</uni-list>
+		<!-- <uni-load-more :status="status" v-if="loadVisible"></uni-load-more>
+
+		<u-back-top :scroll-top="scrollTop" top="400"></u-back-top> -->
+		<u-toast ref="luToast" />
 	</view>
 </template>
 
@@ -50,88 +49,73 @@
 	export default {
 		data() {
 			return {
+				page: "/pages/Production/ProductionOutorderboxing?orderNo=",
+				loadVisible: false,
 				istrue: false,
-				barcodefocus: false,
-				range: [],
-				EndAddress: "",
-				StartAddress: "",
-				Barcode: "",
-				TargetAddress:"",
-				PalletCode: "",
-				SourceAddress: "",
-				items: ['鎼繍', '璺ㄦゼ灞�'],
-				current: 0
+				searchValue: "",
+				status: "more",
+				allReceivingOrders: [],
+				pageNo: 1,
+				scrollTop: 0
 			}
 		},
+		onLoad(res) {
+			this.getData();
+		},
+		onReachBottom() {
+			this.pageNo += 1;
+			this.getData();
+		},
+		onPageScroll(e) {
+			this.scrollTop = e.scrollTop;
+		},
 		methods: {
-			onClickItem(e) {
-				if (this.current != e.currentIndex) {
-					this.current = e.currentIndex;
-				}
+			search(res) {
+				this.getData();
 			},
-			InboundTask() {
-				if (this.PalletCode.length <= 0 && this.Point.length) {
-					this.$refs.InboundTaskluToast.show({
-						title: "鎵樼洏缂栫爜璺熺粦瀹氳揣浣嶄笉鑳戒负绌�",
-						type: "error"
-					})
-					return;
+			getData() {
+				var postData = {
+					materielCode: this.searchValue,
+					pageNo: this.pageNo
 				}
-				var param = {
-					"PalletCode": this.PalletCode,
-					"Position": this.SourceAddress,
-					"TargetAddress":this.TargetAddress
-				}
-				console.log(param);
-				this.$u.post('/api/Task/RequestAGVCarryTaskAsync', param).then(res => {
+				this.allReceivingOrders=[];
+				this.$u.post('/api/StockInfo/GetStockView', postData).then((res) => {
 					if (res.status) {
-						this.$refs.InboundTaskluToast.show({
+						if (this.searchValue == '') {
+							this.allReceivingOrders = res.data;
+							if (this.allReceivingOrders.length > 3) {
+								this.loadVisible = true;
+							} else {
+								this.loadVisible = false;
+							}
+						} else {
+							this.allReceivingOrders = res.data;
+							if (this.allReceivingOrders.length > 3) {
+								this.loadVisible = true;
+							} else {
+								this.loadVisible = false;
+							}
+						}
+					}
+				})
+			},
+			
+			Outbound(palletCode) {
+				this.$u.post('/api/Task/OutBoundTaskAsync?palletCode='+palletCode, "").then((res) => {
+					if (res.status) {
+					this.$refs.luToast.show({
 							title: res.message,
 							type: "success"
 						})
-						this.PalletCode = "";
-						this.SourceAddress = "";
-						this.TargetAddress="";
-						this.istrue = false;
+						this.getData();
 					} else {
-						this.$refs.InboundTaskluToast.show({
+						this.$refs.luToast.show({
 							title: res.message,
 							type: "error"
 						})
 					}
 				})
-			},
-			OutboundTask() {
-				if (this.EndAddress.length <= 0 && this.Barcode.length) {
-					this.$refs.OutboundTaskluToast.show({
-						title: "璇疯緭鍏ヨ捣鐐圭珯鍙�",
-						type: "error"
-					})
-					return;
-				}
-				var param = {
-					"PalletCode": this.Barcode,
-					"Position": this.StartAddress,
-					"TargetAddress":this.EndAddress
-				}
-				this.$u.post('/api/Task/RequestAcrossFloorTaskAsync', param).then(res => {
-					if (res.status) {
-						this.$refs.OutboundTaskluToast.show({
-							title: res.message,
-							type: "success"
-						})
-						this.Barcode = "";
-						this.EndAddress = "";
-						this.StartAddress="";
-						this.barcodefocus = false;
-					} else {
-						this.$refs.OutboundTaskluToast.show({
-							title: res.message,
-							type: "error"
-						})
-					}
-				})
-			},
+			}
 		}
 	}
 </script>
@@ -199,4 +183,42 @@
 		-webkit-line-clamp: 2;
 		-webkit-box-orient: vertical;
 	}
+
+	.customcss {
+		display: flex;
+		position: fixed;
+		width: 100%;
+		top: 10px;
+		text-align: center;
+		z-index: 999;
+		left: 30px;
+		height: 20%;
+	}
+
+	.footer {
+		padding-top: 50%;
+	}
+
+	.flex-row {
+		display: flex;
+		justify-content: space-between;
+		/* 宸﹀彸瀵归綈 */
+		align-items: center;
+		/* 鍨傜洿灞呬腑 */
+		padding: 10rpx 0;
+	}
+
+	.label {
+		color: #666;
+		width: 200rpx;
+		/* 鍥哄畾鏍囩瀹藉害 */
+		text-align: left;
+	}
+
+	.value {
+		flex: 1;
+		text-align: right;
+		color: #333;
+		font-weight: bold;
+	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3