| | |
| | | <option value="4">不合格品出库</option> |
| | | <option value="5">中间品出库</option> |
| | | <option value="6">代储出库</option> |
| | | <option value="7">其他出库</option> |
| | | <option value="7">其它出库</option> |
| | | <option value="8">寄存出库</option> |
| | | <!-- 09 --> |
| | | <!-- <option value="0">标准销售出库</option> |
| | |
| | | } |
| | | 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 == "") { |
| | |
| | | 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, |
| | |
| | | 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, |
| | | }; |