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/ExportNoticeAddFrom.html | 76 +++++++++++++++++++++----------------- 1 files changed, 42 insertions(+), 34 deletions(-) diff --git a/HTML/views/SOSetting/ExportNoticeAddFrom.html b/HTML/views/SOSetting/ExportNoticeAddFrom.html index c3808e1..1a8cd3e 100644 --- a/HTML/views/SOSetting/ExportNoticeAddFrom.html +++ b/HTML/views/SOSetting/ExportNoticeAddFrom.html @@ -362,6 +362,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) { console.log(infoOptions.data[i].ExQty); if (infoOptions.data[i].ExQty == "") { @@ -372,40 +373,47 @@ isrun = 0; return; } + if (!reg.test(infoOptions.data[i].ExQty)) { + layer.msg("鍑哄簱鏁伴噺蹇呴』澶т簬0(鍙繚鐣�4浣嶅皬鏁�)", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }); + isrun = 0; + return ; + } + // if(infoOptions.data[i].ExQty.indexOf('.')>=0){ + // layer.msg("鍑哄簱鏁伴噺蹇呴』鏄ぇ浜�0鐨勬暣鏁�", { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }, function() {}); + // isrun = 0; + // return; + // } + // if(infoOptions.data[i].ExQty.indexOf('-')>=0){ + // layer.msg("鍑哄簱鏁伴噺蹇呴』鏄ぇ浜�0鐨勬暣鏁�", { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }, function() {}); + // isrun = 0; + // return; + // } + // if(infoOptions.data[i].ExQty.charAt(0)=='0'){ + // layer.msg("鍑哄簱鏁伴噺蹇呴』鏄ぇ浜�0鐨勬暣鏁�", { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }, function() {}); + // isrun = 0; + // return; + // } - if(infoOptions.data[i].ExQty.indexOf('.')>=0){ - layer.msg("鍑哄簱鏁伴噺蹇呴』鏄ぇ浜�0鐨勬暣鏁�", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - isrun = 0; - return; - } - if(infoOptions.data[i].ExQty.indexOf('-')>=0){ - layer.msg("鍑哄簱鏁伴噺蹇呴』鏄ぇ浜�0鐨勬暣鏁�", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - isrun = 0; - return; - } - if(infoOptions.data[i].ExQty.charAt(0)=='0'){ - layer.msg("鍑哄簱鏁伴噺蹇呴』鏄ぇ浜�0鐨勬暣鏁�", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - isrun = 0; - return; - } - - if (infoOptions.data[i].ExQty <= 0) { - layer.msg("鍑哄簱鏁伴噺蹇呴』澶т簬0锛�", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - isrun = 0; - return; - } + // if (infoOptions.data[i].ExQty <= 0) { + // layer.msg("鍑哄簱鏁伴噺蹇呴』澶т簬0锛�", { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }, function() {}); + // isrun = 0; + // return; + // } if (infoOptions.data[i].ExQty > infoOptions.data[i].Qty) { layer.msg("鍑哄簱鏁伴噺涓嶈兘澶т簬搴撳瓨鏁伴噺锛�", { icon: 2, @@ -417,7 +425,7 @@ var item = { SkuNo: infoOptions.data[i].SkuNo, LotNo: infoOptions.data[i].LotNo, - Qty: parseInt(infoOptions.data[i].ExQty), + Qty: parseFloat(infoOptions.data[i].ExQty), IsBale:infoOptions.data[i].IsBale, IsBelt:infoOptions.data[i].IsBelt, }; -- Gitblit v1.8.0