| | |
| | | {fixed: 'left', field: 'count', title: '数量(必填)', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'} |
| | | ]; |
| | | cols.push.apply(cols, matCols); |
| | | cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:80}) |
| | | cols.push( |
| | | {field: 'memo', title:'备注', align: 'center'}, |
| | | {fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ) |
| | | return cols; |
| | | } |
| | | |
| | |
| | | // 监听行工具事件 |
| | | table.on('tool(chooseData)', function(obj){ |
| | | var data = obj.data; |
| | | |
| | | switch (obj.event) { |
| | | case 'remove': |
| | | for (var i = matCodeData.length - 1; i >= 0; i--) { |
| | |
| | | // 覆盖render方法的done |
| | | }}); |
| | | break; |
| | | case 'memo': |
| | | var memoLayer = layer.open({ |
| | | type: 2, |
| | | title: '备注', |
| | | maxmin: true, |
| | | area: ['400px', '215px'], |
| | | shadeClose: false, |
| | | content: 'matMemo.html', |
| | | btn: ['保存', '取消'], |
| | | style: 'text-algin: center', |
| | | yes: function(index, layero){ |
| | | var memo = layer.getChildFrame('body', index).find("#memo")[0].value; |
| | | matCodeData.map(function (item) { |
| | | if (item.matNo === data.matNo) { |
| | | item.memo = memo; |
| | | } |
| | | }); |
| | | // 重置表格数据 |
| | | tableIns.reload({data: matCodeData,done:function (res) { |
| | | limit(); |
| | | getInBound(); |
| | | layer.close(memoLayer); |
| | | }}); |
| | | }, |
| | | success: function(layero, index){ |
| | | |
| | | } |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |