Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js =================================================================== diff -u -r34447 -r34464 --- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 34447) +++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 34464) @@ -639,11 +639,15 @@ //定时器,查询后导出 function timeOut() { var time = setTimeout(function () { - var html = document.getElementById('thisIframe').contentWindow.document.body.innerHTML; - if (html.indexOf('table') > -1) { - clearTimeout(time); - location.href = WWWROOT + "/jasperRtp/exportReport.jsp"; - } else { + if(document.getElementById('thisIframe')){ + var html = document.getElementById('thisIframe').contentWindow.document.body.innerHTML; + if (html.indexOf('table') > -1) { + clearTimeout(time); + location.href = WWWROOT + "/jasperRtp/exportReport.jsp"; + } else { + timeOut(); + } + }else { timeOut(); } }, 1000);