| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>编辑出库单</title> |
| | |
| | | content="width=device-width, initial-scale=1.0, minExum-scale=1.0, maxExum-scale=1.0, user-scalable=0"> |
| | | <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> |
| | | </head> |
| | | |
| | | <body> |
| | | |
| | | <div class="layui-form" style="padding: 20px 0 0 0;"> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">出库仓库</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="WarehouseId" id="WarehouseId" lay-filter="WarehouseId" lay-verify="required" disabled lay-search> |
| | | <select name="WarehouseId" id="WarehouseId" lay-filter="WarehouseId" lay-verify="required" disabled |
| | | lay-search> |
| | | <option value=""></option> |
| | | </select> |
| | | </div> |
| | |
| | | console.log(infoOptions.data); |
| | | for (var i in infoOptions.data) { |
| | | var exQty = infoOptions.data[i].ExQty+""; |
| | | console.log(exQty); |
| | | console.log("出库数量:" + exQty); |
| | | if (exQty== "" ) { |
| | | layer.msg("请输入出库数量!", { |
| | | icon: 2, |
| | |
| | | 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.indexOf('-')>=0){ |
| | | layer.msg("出库数量必须是大于0的整数", { |
| | | icon: 2, |
| | |
| | | isrun = 0; |
| | | return; |
| | | } |
| | | if(exQty.charAt(0)=='0'){ |
| | | layer.msg("出库数量必须是大于0的整数", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {}); |
| | | isrun = 0; |
| | | return; |
| | | } |
| | | // if (exQty.charAt(0) == '0') { |
| | | // layer.msg("出库数量必须是大于0的整数,charAt(0)", { |
| | | // icon: 2, |
| | | // time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | // }, function () { }); |
| | | // isrun = 0; |
| | | // return; |
| | | // } |
| | | |
| | | if (exQty <= 0) { |
| | | layer.msg("出库数量必须大于0!", { |
| | |
| | | if (res.code == 0) { //成功 |
| | | var TypeNum = 0; |
| | | |
| | | switch($("#Type").val()) |
| | | { |
| | | switch ($("#Type").val()) { |
| | | case "0": //成品出库 |
| | | TypeNum = 0; |
| | | console.log(TypeNum) |
| | |
| | | $("#CustomerNo").append('<option value =""></option>'); |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | //判断单据类型 |
| | | if (TypeNum == 0) |
| | | { |
| | | if (res.data[i].Type == 0) |
| | | { |
| | | if (TypeNum == 0) { |
| | | if (res.data[i].Type == 0) { |
| | | $("#CustomerNamep").html("客户"); |
| | | $("#CustomerNo").append('<option value =' + res.data[i].CustomerNo + '>' + |
| | | res.data[i].CustomerName + '</option>'); |
| | | } |
| | | } |
| | | else if (TypeNum == 1) |
| | | { |
| | | if (res.data[i].Type == 1) |
| | | { |
| | | else if (TypeNum == 1) { |
| | | if (res.data[i].Type == 1) { |
| | | $("#CustomerNamep").html("供应商"); |
| | | $("#CustomerNo").append('<option value =' + res.data[i].CustomerNo + '>' + |
| | | res.data[i].CustomerName + '</option>'); |
| | | } |
| | | } |
| | | else if (TypeNum == 2) |
| | | { |
| | | if (res.data[i].Type == 2) |
| | | { |
| | | else if (TypeNum == 2) { |
| | | if (res.data[i].Type == 2) { |
| | | $("#CustomerNamep").html("货主"); |
| | | $("#CustomerNo").append('<option value =' + res.data[i].CustomerNo + '>' + |
| | | res.data[i].CustomerName + '</option>'); |
| | |
| | | }) |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |