|  |  |  | 
|---|
|  |  |  | tableIns = table.render({ | 
|---|
|  |  |  | elem: '#wrkMast', | 
|---|
|  |  |  | headers: {token: localStorage.getItem('token')}, | 
|---|
|  |  |  | url: baseUrl+'/wrkMastLog/list/auth', | 
|---|
|  |  |  | url: baseUrl+'/agv/wrkMastLog/list/auth', | 
|---|
|  |  |  | page: true, | 
|---|
|  |  |  | where: {manu_type : '手动'}, | 
|---|
|  |  |  | limit: 50, | 
|---|
|  |  |  | 
|---|
|  |  |  | ,{field: 'modiUser$', align: 'center',title: '操作人员'} | 
|---|
|  |  |  | ,{field: 'modiTime$', align: 'center',title: '操作时间'} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:100} | 
|---|
|  |  |  | //,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:100} | 
|---|
|  |  |  | ]], | 
|---|
|  |  |  | request: { | 
|---|
|  |  |  | pageName: 'curr', | 
|---|
|  |  |  | 
|---|
|  |  |  | switch(obj.event) { | 
|---|
|  |  |  | case 'exportData': | 
|---|
|  |  |  | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ | 
|---|
|  |  |  | layer.load(2, {time: 600*1000}); | 
|---|
|  |  |  | var titles=[]; | 
|---|
|  |  |  | var fields=[]; | 
|---|
|  |  |  | obj.config.cols[0].map(function (col) { | 
|---|
|  |  |  | 
|---|
|  |  |  | 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){ | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | 
|---|
|  |  |  | ,{field: 'werks', align: 'center',title: '工厂'} | 
|---|
|  |  |  | ,{field: 'anfme', align: 'center',title: '数量'} | 
|---|
|  |  |  | ,{field: 'altme', align: 'center',title: '单位'} | 
|---|
|  |  |  | ,{field: 'zpallet', align: 'center',title: '托盘条码'} | 
|---|
|  |  |  | ,{field: 'zpallet', align: 'center',title: '货架条码'} | 
|---|
|  |  |  | ,{field: 'bname', align: 'center',title: '用户ID'} | 
|---|
|  |  |  | ,{field: 'memo', align: 'center',title: '备注'} | 
|---|
|  |  |  |  | 
|---|