From 7ca9651f81d7b84f054194d3d46fdbd1d9c8b922 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期三, 09 七月 2025 22:55:27 +0800
Subject: [PATCH] 增加质检出入库逻辑

---
 项目代码/芜湖三一PDA/pages/stash/raworderboxing.vue |   50 ++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 36 insertions(+), 14 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages/stash/raworderboxing.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages/stash/raworderboxing.vue"
index d64b741..3ee61b8 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages/stash/raworderboxing.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages/stash/raworderboxing.vue"
@@ -6,13 +6,18 @@
 			<view v-if="current === 0" class="headerstyle">
 				<view class="itemstyle">
 					<uni-forms label-width="180">
-						<uni-forms-item :label="orderNolabel">
-						</uni-forms-item>
 						<uni-forms-item :label="batchNolabel">
+						</uni-forms-item>
+						<uni-forms-item :label="orderQuantitylabel">
+						</uni-forms-item>
+						<uni-forms-item :label="receiptQuantitylabel">
 						</uni-forms-item>
 						<uni-forms-item label="鎵樼洏鏉$爜:">
 							<uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="!focus"
 								v-model="barcode" @input="barcodeInput" />
+						</uni-forms-item>
+						<uni-forms-item label="琚嬫暟:">
+							<uni-easyinput type="int" placeholder="璇疯緭鍏ヨ鏁�" ref='midInput' :focus="focus" v-model="qty" />
 						</uni-forms-item>
 						<!-- <uni-forms-item>
 							<checkbox checked="check">鏄惁婊$洏</checkbox>
@@ -21,7 +26,8 @@
 							<button @click="submit" type="primary" size="default" style="margin-top: 2%;">缁勭洏鍏ュ簱</button>
 						</uni-forms-item>
 						<uni-forms-item>
-							<button @click="ReleaseCompleted" type="primary" size="default" style="margin-top: 2%;">鏀捐揣瀹屾垚</button>
+							<button @click="ReleaseCompleted" type="primary" size="default"
+								style="margin-top: 2%;">鏀捐揣瀹屾垚</button>
 						</uni-forms-item>
 					</uni-forms>
 				</view>
@@ -38,10 +44,13 @@
 			return {
 				items: ['缁勭洏'], //, '鍏ュ簱', '鍗曟嵁淇℃伅', '瑙g洏'
 				current: 0,
-				orderNo: "",
 				batchNo: "",
-				orderNolabel: "",
+				receiptQuantity: 0,
+				orderQuantity: "",
+				orderQuantitylabel: "",
+				receiptQuantitylabel: "",
 				batchNolabel: "",
+				qty: 0,
 				orderInfo: [],
 				focus: false,
 				barcode: "",
@@ -49,10 +58,12 @@
 		},
 		onShow() {},
 		onLoad(res) {
-			this.orderNo = res.orderNo;
+			this.orderQuantity = res.orderQuantity;
+			this.orderQuantitylabel = "鍗曟嵁鏁伴噺锛�" + this.orderQuantity;
+			this.receiptQuantity = res.receiptQuantity;
+			this.receiptQuantitylabel = "缁勭洏鏁伴噺锛�" + this.receiptQuantity;
 			this.batchNo = res.batchNo;
-			this.orderNolabel = "鎵瑰彿锛�" + this.orderNo;
-			this.batchNolabel = "鏌滃彿锛�" + this.batchNo;
+			this.batchNolabel = "鎵瑰彿锛�" + this.batchNo;
 			// this.getData();
 		},
 		methods: {
@@ -123,7 +134,6 @@
 								title: "鏀捐揣瀹屾垚鎴愬姛",
 								type: "success"
 							})
-							this.qty = "";
 						} else {
 							this.$refs.uToast.show({
 								title: res.message,
@@ -140,22 +150,34 @@
 					})
 					return;
 				}
+				if (this.qty == 0) {
+					this.$refs.uToast.show({
+						title: "璇疯緭鍏ヨ鏁�",
+						type: 'error'
+					})
+					return;
+				}
 				this.$u.post('/api/PDA/InMateriel', {
 					MainData: {
 						"palletCode": this.barcode,
 						"orderNo": this.orderNo,
-						"batchNo":this.batchNo
+						"qty": this.qty,
+						"batchNo": this.batchNo
 					},
 					DelKeys: this.sns
 				}).then(res => {
 					this.Testcheck = false;
 					if (res.status) {
-						this.$refs.uToast.show({
-							title: "缁勭洏鎴愬姛",
-							type: "success"
-						})
+						// this.$refs.uToast.show({
+						// 	title: "缁勭洏鎴愬姛",
+						// 	type: "success"
+						// })
+						let sum = parseInt(this.receiptQuantity) + parseInt(this.qty);
+						this.receiptQuantity = sum;
 						this.focus = false;
 						this.barcode = "";
+						this.qty = 0;
+						this.receiptQuantitylabel = "缁勭洏鏁伴噺锛�" + this.receiptQuantity;
 					} else {
 						this.$refs.uToast.show({
 							title: res.message,

--
Gitblit v1.9.3