From 786c5ca17012ff3a01faf466b751bdbe70629b97 Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期一, 25 八月 2025 15:25:46 +0800
Subject: [PATCH] 1

---
 代码管理/NEWCode/WIDESEAWCS_PDA/pages/叫料/负极叫料.vue |   98 ++++++++++++++++++++++--------------------------
 1 files changed, 45 insertions(+), 53 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_PDA/pages/\345\217\253\346\226\231/\350\264\237\346\236\201\345\217\253\346\226\231.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_PDA/pages/\345\217\253\346\226\231/\350\264\237\346\236\201\345\217\253\346\226\231.vue"
index a2fb588..39d2cce 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_PDA/pages/\345\217\253\346\226\231/\350\264\237\346\236\201\345\217\253\346\226\231.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_PDA/pages/\345\217\253\346\226\231/\350\264\237\346\236\201\345\217\253\346\226\231.vue"
@@ -36,6 +36,8 @@
 					<u-gap height="10"></u-gap>
 					<!-- 杈撳叆妗嗭紝浣跨敤 v-model 缁戝畾杈撳叆鍊� -->
 					<uni-easyinput v-model="inputValue" placeholder="璇疯緭鍏ュ彨鏂欑殑鐑樼儰璁惧" />
+					<u-gap height="10"></u-gap>
+					<uni-easyinput type="number" v-model="numberValue" placeholder="璇疯緭鍏ュ彨鏂欐暟閲�" />
 				</view>
 			</u-modal>
 			<!-- 浣跨敤 uni-popup 缁勪欢锛岃缃负瀵硅瘽妗嗙被鍨� -->
@@ -47,6 +49,8 @@
 					<view class="popup-content">{{ content }}</view>
 					<!-- 杈撳叆妗嗭紝浣跨敤 v-model 缁戝畾杈撳叆鍊� -->
 					<uni-easyinput v-model="inputValue" placeholder="璇疯緭鍏ュ唴瀹�" />
+					<u-gap height="10"></u-gap>
+					<uni-easyinput type="number" v-model="numberValue" placeholder="璇疯緭鍏ュ彨鏂欐暟閲�" />
 					<!-- 鎸夐挳缁� -->
 					<view class="button-group">
 						<!-- 鍏抽棴鎸夐挳 -->
@@ -79,7 +83,9 @@
 				content: '娆㈣繋浣跨敤 uni-popup!',
 				msgType: 'success',
 				value: '',
-				inputValue: ''
+				inputValue: '',
+				numberValue: '',
+				currentAvailableQuantity: 0
 			};
 		},
 		onLoad() {
@@ -92,6 +98,11 @@
 				}
 			},
 			submit(cb) {
+				this.$t.message.loading();
+				let formDataParam = {
+					current: this.current,
+					size: this.size
+				};
 				uni.getStorage({
 					key: 'storage_key_ipAddress',
 					success: (res) => {
@@ -101,7 +112,8 @@
 							size: this.size
 						};
 						// 浣跨敤鍒涙櫤瀹屾暣鎺ュ彛
-						this.$u.post(res.data.CZFJiP + '/api/PDA/AGVPage', null).then(res => {
+						// this.$u.post('http://192.168.31.240:9090/makerwit/selectKHWareType', null).then(res => {
+						this.$u.post(res.data.CZFJiP + '/makerwit/selectKHWareType', null).then(res => {
 							console.log(res);
 							this.$t.message.closeLoading();
 							cb && cb();
@@ -131,32 +143,45 @@
 				console.log(this.$refs);
 				// this.$refs.popup.open();
 				this.Modalshow = true;
-				this.content = `宸ュ崟锛�${orderNo}\n鍨嬪彿锛�${productCode}\n鍙彨鏁伴噺锛�${number}\n璇风‘璁ゆ槸鍚﹀彨浠诲姟(榛樿4涓�)`;
+				this.content = `宸ュ崟锛�${orderNo}\n鍨嬪彿锛�${productCode}\n鍙彨鏁伴噺锛�${number}\n璇风‘璁ゆ槸鍚﹀彨浠诲姟`;
+				this.currentAvailableQuantity = number;
+				// this.numberValue = number > 4 ? 4 : number; // 璁剧疆榛樿鍊间负4鎴栧彲鐢ㄦ暟閲�
 			},
 			confirmInput() {
 				this.$t.message.loading();
 
 				// 鎻愬彇杈撳叆妗嗙殑鍊�
 				const inputValue = this.inputValue;
+				const numberValue = parseInt(this.numberValue);
 				// 鎻愬彇宸ュ崟缂栧彿
 				const orderNo = this.content.match(/宸ュ崟锛�(.*)\n/)[1];
 				// 鎻愬彇鍨嬪彿
 				const productCode = this.content.match(/鍨嬪彿锛�(.*)\n/)[1];
-				// 鎻愬彇鍙彨鏁伴噺
-				const availableQuantity = this.content.match(/鍙彨鏁伴噺锛�(.*)\n/)[1];
+				
 				if (inputValue == "") {
 					this.$t.message.toast('璇疯緭鍏ョ儤鐑よ澶�');
 					return;
 				}
-				if (availableQuantity <= 0) {
-					this.$t.message.toast('鍙彨鏁伴噺涓�0锛屾棤娉曞彨浠诲姟');
+				if (numberValue <= 0) {
+					this.$t.message.toast('鍙枡鏁伴噺蹇呴』澶т簬0');
 					return;
 				}
+				if (numberValue > this.currentAvailableQuantity) {
+					this.$t.message.toast('鍙枡鏁伴噺涓嶈兘瓒呰繃鍙彨鏁伴噺');
+					return;
+				}
+				let guid =this.generateUUID()
 				let formDataParam = {
-					DTaskId: this.generateUUID(),
+					dTaskId: guid,
+					productCode: productCode,
+					orderNo: orderNo,
+					taskNo:2,
+					number: numberValue,
+					inputValue: inputValue,
+					DTaskId: guid,
 					ProductCode: productCode,
 					OrderNo: orderNo,
-					Number: availableQuantity > 4 ? 4 : availableQuantity,
+					Number: numberValue,
 					InputValue: inputValue,
 					TaskType: "璐熸瀬"
 					// ...鍏朵粬闇�瑕佷紶閫掔殑鍙傛暟
@@ -166,10 +191,12 @@
 					if (res.status) {
 						const value = uni.getStorageSync('storage_key_ipAddress');
 						// 浣跨敤鍒涙櫤瀹屾暣鎺ュ彛
-						this.$u.post(value.CZFJiP + '/api/PDA/insertTask', formDataParam).then(res => {
+						this.$u.post(value.CZFJiP + '/makerwit/insertTask', formDataParam).then(res => {
 							this.$t.message.closeLoading();
-							if (res.status) {
+							if (res.code == 200) {
 								this.$t.message.toast('鍛煎彨鎴愬姛');
+								this.inputValue="",
+								this.numberValue="",
 								this.$refs.popup.close();
 								// this.submit();
 							} else {
@@ -178,7 +205,12 @@
 						});
 						// this.submit();
 					} else {
-						this.$t.message.toast(res.msg);
+						this.$t.message.toast(res.message);
+						this.$u.post('/api/PDA/DeleteCZTask', formDataParam).then(res=>{
+							this.inputValue="",
+							this.numberValue="",
+							this.$refs.popup.close();
+						})
 					}
 				}).catch((err) => {
 					this.$t.message.toast(err.message);
@@ -262,44 +294,4 @@
 
 	.uni-ellipsis-1 {
 		overflow: hidden;
-		white-space: nowrap;
-		text-overflow: ellipsis;
-	}
-
-	.uni-ellipsis-2 {
-		overflow: hidden;
-		text-overflow: ellipsis;
-		display: -webkit-box;
-		-webkit-line-clamp: 2;
-		-webkit-box-orient: vertical;
-	}
-
-	.popup-container {
-		padding: 20px;
-		text-align: center;
-	}
-
-	.popup-content {
-		margin-bottom: 15px;
-		font-size: 16px;
-	}
-
-	.custom-button {
-		border: none;
-		border-radius: 5px;
-		font-size: 14px;
-		cursor: pointer;
-		transition: all 0.3s ease;
-		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
-	}
-
-	.confirm-button:hover {
-		background-color: #0056b3;
-	}
-
-	.slot-content {
-		font-size: 28rpx;
-		color: $u-content-color;
-		padding-left: 30rpx;
-	}
-</style>
\ No newline at end of file
+		white-space
\ No newline at end of file

--
Gitblit v1.9.3