From f8957ba7f0ade842553bd37254cf31da639a1925 Mon Sep 17 00:00:00 2001
From: chengsc <Demo@DESKTOP-CPA90BF>
Date: 星期日, 20 十月 2024 17:41:36 +0800
Subject: [PATCH] 修改问题

---
 HTML/views/SOSetting/ExportNoticeEditFrom.html |   67 +++++++++++++++++++--------------
 1 files changed, 38 insertions(+), 29 deletions(-)

diff --git a/HTML/views/SOSetting/ExportNoticeEditFrom.html b/HTML/views/SOSetting/ExportNoticeEditFrom.html
index cd22bba..7b76a6c 100644
--- a/HTML/views/SOSetting/ExportNoticeEditFrom.html
+++ b/HTML/views/SOSetting/ExportNoticeEditFrom.html
@@ -333,6 +333,7 @@
 					}
 					var DataList = [];
 					console.log(infoOptions.data);
+					var reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,4})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
 					for (var i in infoOptions.data) {
 						var exQty = infoOptions.data[i].ExQty+"";
 						console.log(exQty);
@@ -345,39 +346,47 @@
 							return;
 						}
 						
-						if(exQty.indexOf('.')>=0){
-							layer.msg("鍑哄簱鏁伴噺蹇呴』鏄ぇ浜�0鐨勬暣鏁�", {
+						if (!reg.test(exQty)) {
+							layer.msg("鍑哄簱鏁伴噺蹇呴』澶т簬0(鍙繚鐣�4浣嶅皬鏁�)", {
 								icon: 2,
 								time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-							}, function() {});
+							});
 							isrun = 0;
-							return;
+							return ;
 						}
-						if(exQty.indexOf('-')>=0){
-							layer.msg("鍑哄簱鏁伴噺蹇呴』鏄ぇ浜�0鐨勬暣鏁�", {
-								icon: 2,
-								time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-							}, function() {});
-							isrun = 0;
-							return;
-						}
-						if(exQty.charAt(0)=='0'){
-							layer.msg("鍑哄簱鏁伴噺蹇呴』鏄ぇ浜�0鐨勬暣鏁�", {
-								icon: 2,
-								time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-							}, function() {});
-							isrun = 0;
-							return;
-						}
+						// if(exQty.indexOf('.')>=0){
+						// 	layer.msg("鍑哄簱鏁伴噺蹇呴』鏄ぇ浜�0鐨勬暣鏁�", {
+						// 		icon: 2,
+						// 		time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						// 	}, function() {});
+						// 	isrun = 0;
+						// 	return;
+						// }
+						// if(exQty.indexOf('-')>=0){
+						// 	layer.msg("鍑哄簱鏁伴噺蹇呴』鏄ぇ浜�0鐨勬暣鏁�", {
+						// 		icon: 2,
+						// 		time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						// 	}, function() {});
+						// 	isrun = 0;
+						// 	return;
+						// }
+						// if(exQty.charAt(0)=='0'){
+						// 	layer.msg("鍑哄簱鏁伴噺蹇呴』鏄ぇ浜�0鐨勬暣鏁�", {
+						// 		icon: 2,
+						// 		time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						// 	}, function() {});
+						// 	isrun = 0;
+						// 	return;
+						// }
 						
-						if (exQty <= 0) {
-							layer.msg("鍑哄簱鏁伴噺蹇呴』澶т簬0锛�", {
-								icon: 2,
-								time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-							}, function() {});
-							isrun = 0;
-							return;
-						}
+						// if (exQty <= 0) {
+						// 	layer.msg("鍑哄簱鏁伴噺蹇呴』澶т簬0锛�", {
+						// 		icon: 2,
+						// 		time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						// 	}, function() {});
+						// 	isrun = 0;
+						// 	return;
+						// }
 						if (exQty > infoOptions.data[i].Qty) {
 							layer.msg("鍑哄簱鏁伴噺涓嶈兘澶т簬搴撳瓨鏁伴噺锛�", {
 								icon: 2,
@@ -389,7 +398,7 @@
 						var item = {
 							SkuNo: infoOptions.data[i].SkuNo,
 							LotNo: infoOptions.data[i].LotNo,
-							Qty: parseInt(exQty),
+							Qty: parseFloat(exQty),
 							IsBale:infoOptions.data[i].IsBale,
 							IsBelt:infoOptions.data[i].IsBelt,
 						};

--
Gitblit v1.8.0