| | |
| | | case 'comb': |
| | | // 判断是否存在物料 |
| | | if (matCodeData.length === 0) { |
| | | layer.msg("请先添加物料"); |
| | | layer.msg("请先提取商品", {icon: 2}); |
| | | return; |
| | | } |
| | | // 判断物料数量是否存在异常 |
| | | for (var i=0;i<matCodeData.length;i++){ |
| | | if (isNaN(matCodeData[i].anfme)) { |
| | | layer.msg("请输入数字"); |
| | | layer.msg("请输入数字", {icon: 2}); |
| | | return; |
| | | } |
| | | if (matCodeData[i].anfme === 0){ |
| | | layer.msg("数量不能为零"); |
| | | if (matCodeData[i].anfme <= 0){ |
| | | layer.msg("数量必须大于零", {icon: 2}); |
| | | return; |
| | | } |
| | | } |
| | |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.msg("入库启动成功,目标库位:" + res.data); |
| | | layer.msg("入库启动成功,目标库位:" + res.data, {icon: 1}); |
| | | matCodeData = []; |
| | | $('#focusMatByMat').val(""); |
| | | tableIns.reload({data: matCodeData,done:function (res) { limit(); getInBound();}}); |
| | |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |