Index: ssts-web/src/main/webapp/disinfectsystem/packing/historyPackingView.js =================================================================== diff -u -r39068 -r39347 --- ssts-web/src/main/webapp/disinfectsystem/packing/historyPackingView.js (.../historyPackingView.js) (revision 39068) +++ ssts-web/src/main/webapp/disinfectsystem/packing/historyPackingView.js (.../historyPackingView.js) (revision 39347) @@ -70,19 +70,6 @@ } } -//定时器,查询后导出 -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 { - timeOut(); - } - }, 1000); -} - Ext.onReady(function() { Ext.QuickTips.init(); Ext.apply(Ext.QuickTips.getQuickTip(), { @@ -123,7 +110,19 @@ }); Ext.BLANK_IMAGE_URL = WWWROOT + '/ext/resources/images/default/s.gif'; - function reloadReport(){ + //定时器,查询后导出 + 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 { + timeOut(); + } + }, 1000); + } + function reloadReport(ids){ myMask = new Ext.LoadMask(Ext.getBody(), { msg: '正在加载,请稍候!', removeMask: true @@ -159,6 +158,7 @@ orgUnit: orgUnit, tousseBarcode: barcode, packer: packer, + packingRecordIds:ids || '', packerNumber: packerNumber, startTimeSearch: startDate, endTimeSearch: endDate, @@ -302,10 +302,26 @@ xtype:'button', text : '导出excel', id:"exportPackingRecordsToexcel", - handler: function(){ - reloadReport(); - timeOut(); - } + menu: new Ext.menu.Menu({ + items: [ + { + text: '导出已勾选', handler: function(){ + var ids = recordGrid.getSelectedValues(); + if(ids == ''){ + showResult('操作失败,未勾选任何记录。'); + return + } + reloadReport(ids); + timeOut(); + } + }, + { + text: '导出全部', handler: function () { + reloadReport(); + timeOut(); + } + }] + }) },{ xtype:'button', text : '生成代理灭菌单', @@ -349,6 +365,9 @@ failure : function(){myMask.hide();} }); } + },'->',{ + id:'totalCountOfTousseInstance', + text : '' }], frame : false, border : false @@ -820,5 +839,8 @@ return; } recordGrid.dwrReload(); + recordGrid.dwrAfterLoad(function(record){ + Ext.getCmp('totalCountOfTousseInstance').setText('装配总包数为'+record.totalCountOfTousseInstance); + }) } }); \ No newline at end of file Index: ssts-web/src/main/webapp/ext/grid/ForgonGrid.js =================================================================== diff -u -r37918 -r39347 --- ssts-web/src/main/webapp/ext/grid/ForgonGrid.js (.../ForgonGrid.js) (revision 37918) +++ ssts-web/src/main/webapp/ext/grid/ForgonGrid.js (.../ForgonGrid.js) (revision 39347) @@ -576,6 +576,12 @@ //this.getSelectionModel().clearSelections(); dwrProxyStore.load(dwrProxyStore.lastOptions); }, + + dwrAfterLoad: function(toCallback){ + dwrProxyStore.on('load',function(store){ + toCallback(store.reader.jsonData) + }) + }, dwrFilterReload : function(){ var store = this.store;