From b9f7560cbe0e562a40e9515a0559a3e951f0fee6 Mon Sep 17 00:00:00 2001 From: zhaowc <526854230@qq.com> Date: 星期一, 07 四月 2025 09:16:01 +0800 Subject: [PATCH] 问题修改 --- HTML/views/SOSetting/ExportNoticeAddFrom.html | 91 +++++++++++++++++++++++++++------------------ 1 files changed, 55 insertions(+), 36 deletions(-) diff --git a/HTML/views/SOSetting/ExportNoticeAddFrom.html b/HTML/views/SOSetting/ExportNoticeAddFrom.html index 62b4982..0c26517 100644 --- a/HTML/views/SOSetting/ExportNoticeAddFrom.html +++ b/HTML/views/SOSetting/ExportNoticeAddFrom.html @@ -41,7 +41,7 @@ <option value="4">涓嶅悎鏍煎搧鍑哄簱</option> <option value="5">涓棿鍝佸嚭搴�</option> <option value="6">浠e偍鍑哄簱</option> - <option value="7">鍏朵粬鍑哄簱</option> + <option value="7">鍏跺畠鍑哄簱</option> <option value="8">瀵勫瓨鍑哄簱</option> <!-- 09 --> <!-- <option value="0">鏍囧噯閿�鍞嚭搴�</option> @@ -274,10 +274,21 @@ },function() {}); return; } + if($("#Type").val()=='6'){ + if($("#CustomerNo").val()==''){ + layer.msg("浠e偍鍗曟嵁璇烽�夋嫨璐т富锛�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + + }); + return; + } + } layer.open({ type: 2, title: '閫夋嫨鐗╁搧淇℃伅', - content: 'ExportSelectSkuFrom.html?Type='+$("#Type").val(), + content: 'ExportSelectSkuFrom.html?Type='+$("#Type").val()+'&OwnerNo='+$("#CustomerNo").val(), maxmin: true, area: ['950px', '90%'], fixed: false, @@ -351,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 == "") { @@ -361,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, @@ -406,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