| | |
| | | }); |
| | | }); |
| | | |
| | | var checkData; |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(matCode)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | checkData = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | layer.open({ |
| | |
| | | |
| | | // 导出excel |
| | | form.on('submit(exportDo)', function(data) { |
| | | debugger |
| | | // if (checkData.data.length === 0) { |
| | | // layer.msg('请选择数据'); |
| | | // } |
| | | layer.closeAll(); |
| | | layer.load(1, {shade: [0.1,'#fff']}); |
| | | location.href = baseUrl + "/matCode/export/auth?fileName="+$("#exportFileName").val()+"&rowCount="+$("#exportRowCount").val(); |
| | | |
| | | var ids = ""; |
| | | if(checkData.data.length>0) { |
| | | for (var i = 0; i < checkData.data.length; i++) { |
| | | ids = ids + "'" + checkData.data[i].matNo + "',"; |
| | | } |
| | | ids = ids.substring(0, ids.length - 1); |
| | | } |
| | | location.href = baseUrl + "/matCode/export/auth?fileName="+$("#exportFileName").val()+"&rowCount="+$("#exportRowCount").val()+"&ids=" + ids; |
| | | // location.href = baseUrl + "/matCode/export/auth?fileName="+$("#exportFileName").val()+"&rowCount="+$("#exportRowCount").val(); |
| | | layer.closeAll('loading'); |
| | | return false; |
| | | }); |