| | |
| | | var locDetlData = []; |
| | | function getCol() { |
| | | var cols = [ |
| | | // {field: 'count', align: 'center',title: '出库数量', edit:'text', width: 130, style:'color: blue;font-weight: bold'} |
| | | {field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'locNo$', align: 'center',title: '库位号'} |
| | | {field: 'count', align: 'center',title: '出库数量', edit:'text', width: 130, style:'color: blue;font-weight: bold'} |
| | | ,{field: 'anfme', align: 'center',title: '原数量'} |
| | | ,{field: 'locNo', align: 'center',title: '库位号'} |
| | | ]; |
| | | arrRemove(detlCols, 'field', 'anfme'); |
| | | cols.push.apply(cols, detlCols); |
| | | // cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:80}) |
| | | cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:80}) |
| | | return cols; |
| | | } |
| | | |
| | |
| | | cols: [getCol()], |
| | | done: function(res, curr, count) { |
| | | limit(); |
| | | getOutBound(); |
| | | // getOutBound(); |
| | | } |
| | | }); |
| | | |
| | |
| | | if (data.length === 0){ |
| | | layer.msg('请先添加库位物料'); |
| | | } else { |
| | | var staNo = $("#staNoSelect").val(); |
| | | if (staNo === "" || staNo === null){ |
| | | layer.msg("请选择出库口"); |
| | | return; |
| | | } |
| | | // var staNo = $("#staNoSelect").val(); |
| | | // if (staNo === "" || staNo === null){ |
| | | // layer.msg("请选择出库口"); |
| | | // return; |
| | | // } |
| | | var locDetls = []; |
| | | data.forEach(function(elem) { |
| | | locDetls.push({locNo: elem.locNo, matnr: elem.matnr, count: elem.count}); |
| | |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | locDetlData = []; |
| | | tableIns.reload({data: locDetlData,done:function (res) {limit();getOutBound();}}); |
| | | tableIns.reload({data: locDetlData,done:function (res) { |
| | | limit(); |
| | | // getOutBound(); |
| | | }}); |
| | | layer.msg(res.msg); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | |
| | | locDetlData.splice(i, 1); |
| | | } |
| | | } |
| | | tableIns.reload({data: locDetlData,done:function (res) {limit();getOutBound();}}); |
| | | tableIns.reload({data: locDetlData,done:function (res) { |
| | | limit(); |
| | | // getOutBound(); |
| | | }}); |
| | | break; |
| | | } |
| | | }); |
| | |
| | | layer.msg("数量必须大于零"); |
| | | } |
| | | } |
| | | tableIns.reload({data: locDetlData,done:function (res) {limit(); getOutBound();}}); |
| | | tableIns.reload({data: locDetlData,done:function (res) { |
| | | limit(); |
| | | // getOutBound(); |
| | | }}); |
| | | } |
| | | |
| | | // 获取出库口 |
| | |
| | | for (var i=0;i<data.length;i++){ |
| | | let pass = false; |
| | | for (var j=0;j<locDetlData.length;j++){ |
| | | if (data[i].matnr === locDetlData[j].matnr && data[i].locNo$ === locDetlData[j].locNo$) { |
| | | if (data[i].matnr === locDetlData[j].matnr && data[i].locNo === locDetlData[j].locNo) { |
| | | pass = true; |
| | | break; |
| | | } |