From 76b08b437e41cb6a3118c87636bc1777a110185a Mon Sep 17 00:00:00 2001
From: chengsc <11752@DESKTOP-DS49RCP>
Date: 星期六, 18 一月 2025 11:44:06 +0800
Subject: [PATCH] 修改异常问题

---
 Pda/View/SoSetting/productOut.html |   56 ++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 48 insertions(+), 8 deletions(-)

diff --git a/Pda/View/SoSetting/productOut.html b/Pda/View/SoSetting/productOut.html
index e1326d7..4e781fd 100644
--- a/Pda/View/SoSetting/productOut.html
+++ b/Pda/View/SoSetting/productOut.html
@@ -303,8 +303,8 @@
 										<div class="layui-form-item layout-input" style="margin-top: 6px;">
 											<label class="layui-form-label lableWidth">鎷h揣鏁伴噺锛�</label>
 											<div class="layui-input-block">
-												<input id="pickQty1" type="number" placeholder="璇疯緭鍏ユ嫞璐ф暟閲�"autocomplete="off" 
-													class="layui-input" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')">
+												<input id="pickQty1" type="text" placeholder="璇疯緭鍏ユ嫞璐ф暟閲�"autocomplete="off" 
+													class="layui-input" >
 											</div>
 										</div>
 									</td>
@@ -509,9 +509,9 @@
 											<label class="layui-form-label lableWidth" >鎷h揣鏁伴噺锛�</label>
 											<div id="" class="local-input">
 												<div class="layui-input-block">
-													<input id="pickQty2" type="number" placeholder="璇疯緭鍏ユ嫞璐ф暟閲�"
+													<input id="pickQty2" type="text" placeholder="璇疯緭鍏ユ嫞璐ф暟閲�"
 														autocomplete="off" class="layui-input" style="padding-left:0.1rem;"
-														oninput="value=value.replace(/^(0+)|[^\d]+/g,'')">
+														>
 												</div>
 											</div>
 											<div id="" class="local-ok">
@@ -677,7 +677,7 @@
 
 			//妫�鏌ユ墭鐩樼姸鎬�
 			function checkPalletState() {
-
+				
 				var param = {
 					"PalletNo": $("#palletNo").val()
 				}
@@ -845,6 +845,10 @@
 						$('#pickQty').val(res.data.PickQty);
 						$('#pickedQty').val(res.data.PickedQty);
 					} else { //涓嶆垚鍔�
+						if($("#planQty").val() == $("#finishQty").val() || $('#pickQty').val() == $('#pickedQty').val())
+						{
+							return;
+						}
 						layer.msg(res.msg, {
 							icon: 2,
 							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
@@ -901,6 +905,10 @@
 
 			//鑾峰彇鎵樼洏鐗╂枡鍚嶇粏
 			function GetBoxInfo() { 
+				if ($('#pickQty').val() == $('#pickedQty').val())
+				{
+					return;
+				}
 				let param2 = {
 					"SoDetailId": $("#skuLotNo").val(),
 					"PalletNo": $("#palletNo").val(),
@@ -913,6 +921,10 @@
 
 						refreshTable(tableData)
 					} else {
+						// $("#planQty").val();  //璁″垝鏁伴噺
+						// $("#finishQty").val();//瀹屾垚鏁伴噺
+						// console.info($("#planQty").val(),$("#finishQty").val())
+						
 						layer.msg(res.msg, {
 							icon: 2,
 							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
@@ -963,7 +975,7 @@
 						});
 						return;
 					}
-					if($('#pickQty1').val() != "" && $('#pickQty1').val()>parseInt($('#pickQty').val())){
+					if($('#pickQty1').val() != "" && $('#pickQty1').val()>parseFloat($('#pickQty').val())){
 						layer.msg("鎷h揣鏁伴噺涓嶈兘澶т簬寰呮嫞鏁伴噺锛�", {
 							icon: 2,
 							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
@@ -997,6 +1009,16 @@
 
 			//纭鎷h揣 
 			function reqPickScatter() {
+				if($('#pickQty1').val()!= "" && $('#pickQty1').val()!= undefined){
+					var reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,4})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
+					if (!reg.test($("#pickQty1").val())) {
+						layer.msg("鏁伴噺蹇呴』澶т簬0(鍙繚鐣�4浣嶅皬鏁�)", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						});
+						return -1;
+					}
+				}
 				var param = {
 					"SoNo": $("#bar").val(),
 					"SoDetailId": $("#skuLotNo").val(),
@@ -1347,6 +1369,10 @@
 						$('#pickQty2').val(res.data.PickQty - res.data.PickedQty);
 						$('#pickedQty2').val(res.data.PickedQty);
 					} else { //涓嶆垚鍔�
+						if($("#planQty").val() == $("#finishQty").val() || $('#pickQty').val() == $('#pickedQty').val())
+						{
+							return;
+						}
 						layer.msg(res.msg, {
 							icon: 2,
 							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
@@ -1358,6 +1384,10 @@
 
 			//鑾峰彇鎵樼洏鐗╂枡鍚嶇粏
 			function GetDataInfo() { 
+				if ($("#planQty").val() == $("#finishQty").val())
+				{
+					return;
+				}
 				let param2 = {
 					"SoDetailId": $("#skuLotNo2").val(),
 					"PalletNo": $("#palletNo2").val(),
@@ -1443,8 +1473,8 @@
 						time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
 					}); return;
 				}			
-				let pickedQty = parseInt($('#pickedQty2').val()) //宸叉嫞鏁伴噺
-				let pickQty = parseInt($('#pickQty2').val())  //鎷h揣鏁伴噺
+				let pickedQty = parseFloat($('#pickedQty2').val()) //宸叉嫞鏁伴噺
+				let pickQty = parseFloat($('#pickQty2').val())  //鎷h揣鏁伴噺
 				if (pickQty <= 0) {
 					layer.msg("鎷h揣鏁伴噺闇�澶т簬0", {
 						icon: 2,
@@ -1469,6 +1499,16 @@
 
 			//纭鎷h揣 
 			function reqPickScatter2() {
+				if($('#pickQty2').val()!= "" && $('#pickQty2').val()!= undefined){
+					var reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,4})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
+					if (!reg.test($("#pickQty2").val())) {
+						layer.msg("鏁伴噺蹇呴』澶т簬0(鍙繚鐣�4浣嶅皬鏁�)", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						});
+						return -1;
+					}
+				}
 				var param = {
 					"SoNo": $("#bar2").val(),
 					"SoDetailId": $("#skuLotNo2").val(),

--
Gitblit v1.8.0