Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyView.js =================================================================== diff -u -r35478 -r35484 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyView.js (.../departmentMonthlyView.js) (revision 35478) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyView.js (.../departmentMonthlyView.js) (revision 35484) @@ -736,8 +736,16 @@ params: params, success: function (response) { doGetLodop(); + var html = ''; + if(document.getElementById('thisIframe').contentWindow.document.getElementById('Main')){ + html = document.getElementById('thisIframe').contentWindow.document.getElementById('Main').innerHTML; + }else { + showResult('打印物品时请先查询再打印。'); + myMask.hide(); + return; + } LODOP.SET_PRINT_PAGESIZE(1, '21.8cm', '14cm', ''); - LODOP.ADD_PRINT_HTM(0, 0, '21.8cm', '14cm', response.responseText); + LODOP.ADD_PRINT_HTM(0, 0, '21.8cm', '14cm', html); LODOP.SET_PRINT_STYLEA(0, "Vorient", 3); LODOP.PRINT(); myMask.hide();