| | |
| | | var matCodeLayerIdx; |
| | | function getCol() { |
| | | var cols = [ |
| | | {fixed: 'left', field: 'count', title: '实际数量', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'batch', align: 'center',title: '序列码(编辑)', edit: true, style: 'font-weight:bold'} |
| | | // {fixed: 'left', field: 'count', title: '实际数量', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, |
| | | {field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'batch', align: 'center',title: '箱号(编辑)', edit: true, style: 'font-weight:bold'} |
| | | ]; |
| | | arrRemove(detlCols, "field", "anfme"); |
| | | arrRemove(detlCols, "field", "batch"); |
| | |
| | | let index = obj.tr.attr("data-index"); |
| | | let data = matCodeData[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 (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 (modify) { |
| | | data[obj.field] = obj.value; |
| | | } |