Index: ssts-web/src/main/webapp/disinfectsystem/instrumentInstanceManager/instrumentInstanceView.js =================================================================== diff -u -r34705 -r35436 --- ssts-web/src/main/webapp/disinfectsystem/instrumentInstanceManager/instrumentInstanceView.js (.../instrumentInstanceView.js) (revision 34705) +++ ssts-web/src/main/webapp/disinfectsystem/instrumentInstanceManager/instrumentInstanceView.js (.../instrumentInstanceView.js) (revision 35436) @@ -56,6 +56,8 @@ } var data = { 'id': '', 'name': '全部器械' }; leftStore.insert(0, data); + leftGrid.getSelectionModel().select(records[0]); + params.materialDefinitonId = records[0].data.id; }, beforeload: function () { if (Ext4.getCmp('spell')) { @@ -309,7 +311,9 @@ } }); - listStore.load() + setTimeout(function () { + listStore.load() + }, 1000); instrumentGrid = new Ext4.grid.GridPanel({ title: '器械实例列表', @@ -497,10 +501,10 @@ Ext4.onReady(function () { Ext4.QuickTips.init(); - var instrumentGrid = loadInstrumentInstanceList(); - var leftGrid = leftGridPanel(); + var instrumentGrid = loadInstrumentInstanceList(); + var form = searchForm(); new Ext4.container.Viewport({ Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/instrumentConfig.js =================================================================== diff -u -r34714 -r35436 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/instrumentConfig.js (.../instrumentConfig.js) (revision 34714) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/instrumentConfig.js (.../instrumentConfig.js) (revision 35436) @@ -13,18 +13,53 @@ noBindIDCardInstance: true }, reader: new Ext.data.JsonReader({ + totalProperty: 'totalCount', root: 'data' }, [ { name: 'id' }, { name: 'materialDefinitionName' }, { name: 'udi' }, { name: 'instrumentBarcode' }, { name: 'isReceive' } - ]) + ]), + listeners: { + beforeload: function (thiz) { + if (top.Ext.getCmp('pagesize')) { + var pagesize = top.Ext.getCmp('pagesize').getValue(); + thiz.baseParams["limit"] = pagesize; + } + } + } }); InstrumentStore.load(); + var pageSizeStore = new top.Ext.data.SimpleStore({ + fields: ['value'], + data: [[10], [20], [30], [50], [100]] + }); + + var combo = new top.Ext.form.ComboBox({ + xtype: 'combo', + valueField: 'value', + displayField: 'value', + store: pageSizeStore, + mode: 'local', + id: 'pagesize', + name: 'pagesize', + forceSelection: true, + editable: false, + triggerAction: 'all', + value: 10, + width: 50, + listeners: { + select: function (combo, record, index) { + top.Ext.getCmp('pagingTool').pageSize = record.data.value + InstrumentStore.load(); + } + } + }) + var gridPanel = new top.Ext.grid.GridPanel({ id: 'InstrumentPanel', store: InstrumentStore, @@ -63,6 +98,15 @@ viewConfig: { forceFit: true }, + bbar: new top.Ext.PagingToolbar({ + id: 'pagingTool', + pageSize: 10, + store: InstrumentStore, + items: ['-', '每页显示', combo, '条'], + displayInfo: true, + displayMsg: '第 {0} 到 {1} 条数据 共 {2} 条', + emptyMsg: "没有数据" + }), autoExpandColumn: 'modifyField', bodyStyle: 'border:1px solid #afd7af', anchor: '100%', @@ -424,7 +468,7 @@ { header: "UDI码", dataIndex: 'udi', width: 70 }, { header: '器械条码', dataIndex: 'instrumentBarcode', width: 100 }, { - header: "操作",hidden:SSTS_InstrumentInstanceConfig_Update, width: 50, renderer: function (v, p, record) { + header: "操作", hidden: SSTS_InstrumentInstanceConfig_Update, width: 50, renderer: function (v, p, record) { var instrumentBarcode = record.get('instrumentBarcode') || ''; var materialDefinitionId = record.get('materialDefinitionId') || ''; var idCardInstanceId = record.get('idCardInstanceId') || '';