chengsc
2024-10-20 f8957ba7f0ade842553bd37254cf31da639a1925
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,
                  };