Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js =================================================================== diff -u -r31939 -r31952 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 31939) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 31952) @@ -4714,11 +4714,30 @@ } } } - if (print && result.recyclingPrintData && result.recyclingPrintData.length > 0) { + //获取打印次数,打印完之后再关闭窗口 + var count = 0; + if (result.recyclingPrintData.length > 0) { printRecyclingDetail(result.recyclingPrintData); + var appType = $('#appType').val(); + for(var i = 0; i < result.recyclingPrintData.length;++i){ + var recyclingPrintData = result.recyclingPrintData[i]; + if(sstsConfig.recyclingPrintContent == 2 || (sstsConfig.showRecyclingSaveAndPrintActionButton && appType !== '外来器械包申请单')){ + if(recyclingPrintData && recyclingPrintData.pages && recyclingPrintData.pages.length > 0){ + for(var i = 0;i < recyclingPrintData.pages.length;i++){ + count++; + } + } + }else { + count++; + } + } } + if(count > 0){ + setTimeout("closeDiv()", 700*count); + }else { + setTimeout("closeDiv()", 1200); + } alertDiv(result.message, true); - setTimeout("closeDiv()", 1200); var voluntarilyUrgentItems = result.voluntarilyUrgentItems; var voluntarilyUrgentItemsString = ''; @@ -4738,7 +4757,13 @@ location.href = "recycleForTouchScreen.jsp?resolution=" + resolution + "&rememberRecycleUser=" + rememberRecycleUser; } } else { - location.href = encodeURI("awaitForRecycleList.jsp?resolution=" + resolution + "&voluntarilyUrgentItems=" + voluntarilyUrgentItemsString); + if(count > 0){ + setTimeout(function(){ + location.href = encodeURI("awaitForRecycleList.jsp?resolution=" + resolution + "&voluntarilyUrgentItems=" + voluntarilyUrgentItemsString); + }, 700*count); + }else { + location.href = encodeURI("awaitForRecycleList.jsp?resolution=" + resolution + "&voluntarilyUrgentItems=" + voluntarilyUrgentItemsString); + } } } else { if (result.versionNotMatch) {