| | |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | // var exportData = {}; |
| | | // $.each($('#search-box [name]').serializeArray(), function() { |
| | | // exportData[this.name] = this.value; |
| | | // }); |
| | | // var param = { |
| | | // 'wrkMast': exportData, |
| | | // 'fields': fields |
| | | // }; |
| | | var param = '?'; |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | param += this.name + '=' + this.value + '&'; |
| | | }); |
| | | var param = { |
| | | 'wrkMast': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMast/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | window.location.href = baseUrl + "/report/download/wrkMastLog" + param; |
| | | layer.closeAll(); |
| | | // $.ajax({ |
| | | // url: baseUrl+"/wrkMast/export/auth", |
| | | // headers: {'token': localStorage.getItem('token')}, |
| | | // data: JSON.stringify(param), |
| | | // dataType:'json', |
| | | // contentType:'application/json;charset=UTF-8', |
| | | // method: 'POST', |
| | | // success: function (res) { |
| | | // layer.closeAll(); |
| | | // if (res.code === 200) { |
| | | // table.exportFile(titles,res.data,'xls'); |
| | | // } else if (res.code === 403) { |
| | | // top.location.href = baseUrl+"/"; |
| | | // } else { |
| | | // layer.msg(res.msg) |
| | | // } |
| | | // } |
| | | // }); |
| | | }); |
| | | break; |
| | | } |
| | |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'wrkDetlLog.html', |
| | | content: 'wrkLog.html', |
| | | success: function(layero, index){ |
| | | } |
| | | }); |