admin
9 小时以前 b31981d16e743aa396506b745b3fae17966949dc
HTML/views/SOSetting/ExportNoticeEditFrom.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>
   <head>
      <meta charset="utf-8">
      <title>编辑出库单</title>
@@ -9,6 +10,7 @@
         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;">
@@ -32,7 +34,8 @@
            <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>
@@ -322,7 +325,7 @@
               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,
@@ -332,14 +335,14 @@
                     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,
@@ -348,14 +351,14 @@
                     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!", {
@@ -486,8 +489,7 @@
                  if (res.code == 0) { //成功
                     var TypeNum = 0;
                        
                     switch($("#Type").val())
                     {
                  switch ($("#Type").val()) {
                        case "0": //成品出库
                           TypeNum = 0;
                           console.log(TypeNum)
@@ -508,28 +510,22 @@
                     $("#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>');
@@ -588,4 +584,5 @@
         })
      </script>
   </body>
</html>