| | |
| | | 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: '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'); |
| | |
| | | let index = obj.tr.attr("data-index"); |
| | | let data = locDetlData[index]; |
| | | let modify = true; |
| | | if (obj.field === 'count'){ |
| | | let vle = Number(obj.value); |
| | | if (isNaN(vle)) { |
| | | layer.msg("请输入数字", {icon: 2}); |
| | | modify = false; |
| | | } else { |
| | | if (vle <= 0) { |
| | | layer.msg("数量必须大于零", {icon: 2}); |
| | | modify = false; |
| | | } |
| | | if (vle > Number(data.anfme)) { |
| | | layer.msg("出库数量不得大于库存数量", {icon: 2}); |
| | | modify = false; |
| | | } |
| | | } |
| | | } |
| | | // if (obj.field === 'count'){ |
| | | // let vle = Number(obj.value); |
| | | // if (isNaN(vle)) { |
| | | // layer.msg("请输入数字", {icon: 2}); |
| | | // modify = false; |
| | | // } else { |
| | | // if (vle <= 0) { |
| | | // layer.msg("数量必须大于零", {icon: 2}); |
| | | // modify = false; |
| | | // } |
| | | // if (vle > Number(data.anfme)) { |
| | | // layer.msg("出库数量不得大于库存数量", {icon: 2}); |
| | | // modify = false; |
| | | // } |
| | | // } |
| | | // } |
| | | if (modify) { |
| | | data[obj.field] = obj.value; |
| | | } |
| | |
| | | for (var i=0;i<locDetlData.length;i++){ |
| | | locDetlData[i]["orderNo"]=orderNo |
| | | } |
| | | console.log(locDetlData) |
| | | console.log(locDetlData[0]) |
| | | let param = { |
| | | orderNo: orderNo, |
| | | locDetls: locDetlData |