Index: ssts-web/src/main/webapp/disinfectsystem/config/dgshlyy/config.js =================================================================== diff -u -r35097 -r35546 --- ssts-web/src/main/webapp/disinfectsystem/config/dgshlyy/config.js (.../config.js) (revision 35097) +++ ssts-web/src/main/webapp/disinfectsystem/config/dgshlyy/config.js (.../config.js) (revision 35546) @@ -195,6 +195,8 @@ seperatePrintDetailedAccountingMonthlyReportByDept:true, //是否启用一次性物品的物资编码字段 enableInventorySerialNumber:true, + //启用器械包告警的排序功能 + enableTousseGoodsWarningSortingFunction:true, // 核算月报的报表类型。该配置项为一个JSON数组,可以定义报表格式下拉框的文本和对应的报表文件名字 patternOfAccountingMonthlyReport:[{'optionText':'横沥新格式','reportName':'东莞横沥医院的核算月报'}] } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/tousseGoods/tousseGoodsWarningView.js =================================================================== diff -u -r34935 -r35546 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/tousseGoods/tousseGoodsWarningView.js (.../tousseGoodsWarningView.js) (revision 34935) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/tousseGoods/tousseGoodsWarningView.js (.../tousseGoodsWarningView.js) (revision 35546) @@ -530,16 +530,22 @@ $Id('parm_s_type').value = warningType; $Id('parm_s_department').value = department; + + var sortable = false; + + if(sstsConfig.enableTousseGoodsWarningSortingFunction){ + sortable = true; + } var columns = [ - {header : "器械包名称",width : 200,dataIndex : 'tousseName',renderer:renderCallTousseInstanceInfoShowFun}, - {header : "条码",width : 150,dataIndex : 'barcode'}, - {header : "炉号",width : 150,dataIndex : 'sterilizerName'}, - {header : "炉次",width : 150,dataIndex : 'sterileFrequency'}, - {header : "灭菌程序",width : 100,dataIndex : 'sterilingType'}, - {header : "失效日期",width : 150,dataIndex : 'validUntil',renderer : myDateFormat}, - {header : "灭菌日期",width : 150,dataIndex : 'sterileEndTime',renderer : myDateFormat}, - {id : 'operationRemark',header : "位置",width : 50,dataIndex : 'locationForDisplay',renderer : function (v,p,record){ + {header : "器械包名称",width : 200,dataIndex : 'tousseName',sortable:sortable,renderer:renderCallTousseInstanceInfoShowFun}, + {header : "条码",width : 150,dataIndex : 'barcode',sortable:sortable}, + {header : "炉号",width : 150,dataIndex : 'sterilizerName',sortable:sortable}, + {header : "炉次",width : 150,dataIndex : 'sterileFrequency',sortable:sortable}, + {header : "灭菌程序",width : 100,dataIndex : 'sterilingType',sortable:sortable}, + {header : "失效日期",width : 150,dataIndex : 'validUntil',sortable:sortable,renderer : myDateFormat}, + {header : "灭菌日期",width : 150,dataIndex : 'sterileEndTime',sortable:sortable,renderer : myDateFormat}, + {id : 'operationRemark',header : "位置",width : 50,dataIndex : 'locationForDisplay',sortable:sortable,renderer : function (v,p,record){ //如果存在手术仪器管理的位置,则显示手术仪器管理的位置 if(record.data["location2"]){ return record.data["location2"]; @@ -756,14 +762,20 @@ iconCls : 'btn_ext_download', handler : function(){exportExcel(grid)} }]}); + + + var defaultSortField = ''; + if(sortable){ + defaultSortField = 'validUntil'; + } grid = new Ext.ux.ForgonPageGrid({ id:'warningGrid', title : '器械包物品告警列表', tbar : tbarForFirstRow, pageSize : 20, - defaultSortField : 'validUntil',//排序性能很慢,先去掉 - defaultSortDirection : 'ASC', + defaultSortField : defaultSortField,//排序性能很慢,先去掉 + defaultSortDirection : 'DESC', isCheckboxSelectionModel : true, rememberSelected : false, isShowSearchField : true,