File was renamed from src/main/webapp/static/js/wrkMastExecute/wrkMastExecute.js |
| | |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#wrkMastExecute', |
| | | elem: '#agvWrkMast', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/wrkMastExecute/list/auth', |
| | | url: baseUrl+'/agvWrkMast/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(wrkMastExecute)', function (obj) { |
| | | table.on('sort(agvWrkMast)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(wrkMastExecute)', function (obj) { |
| | | table.on('toolbar(agvWrkMast)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'wrkMastExecute': exportData, |
| | | 'agvWrkMast': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMastExecute/export/auth", |
| | | url: baseUrl+"/agvWrkMast/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(wrkMastExecute)', function(obj){ |
| | | table.on('tool(agvWrkMast)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMastExecute/"+(mData?'update':'add')+"/auth", |
| | | url: baseUrl+"/agvWrkMast/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMastExecute/delete/auth", |
| | | url: baseUrl+"/agvWrkMast/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |