| | |
| | | arrRemove(detlCols, "field", "anfme"); |
| | | arrRemove(detlCols, "field", "batch"); |
| | | cols.push.apply(cols, detlCols); |
| | | cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:80}) |
| | | |
| | | return cols; |
| | | } |
| | | |
| | |
| | | // 页面修改 |
| | | table.on('edit(chooseData)', function (obj) { |
| | | let index = obj.tr.attr("data-index"); |
| | | console.log(index) |
| | | let data = matCodeData[index]; |
| | | let modify = true; |
| | | if (obj.field === 'count'){ |
| | |
| | | layer.msg("请输入数字", {icon: 2}); |
| | | modify = false; |
| | | } else { |
| | | if (vle <= 0) { |
| | | layer.msg("数量必须大于零", {icon: 2}); |
| | | modify = false; |
| | | } |
| | | // if (vle <= 0) { |
| | | // layer.msg("数量必须大于零", {icon: 2}); |
| | | // modify = false; |
| | | // } |
| | | } |
| | | } |
| | | if (obj.field === 'batch'){ |
| | | let vle = obj.value; |
| | | if (vle.length <= 0){ |
| | | layer.msg("批号不准为空", {icon: 2}); |
| | | modify = false; |
| | | } |
| | | } |
| | | if (modify) { |