Index: ssts-web/src/main/webapp/homepage/supplyRoomsUnfinishedWork.js =================================================================== diff -u -r28683 -r28758 --- ssts-web/src/main/webapp/homepage/supplyRoomsUnfinishedWork.js (.../supplyRoomsUnfinishedWork.js) (revision 28683) +++ ssts-web/src/main/webapp/homepage/supplyRoomsUnfinishedWork.js (.../supplyRoomsUnfinishedWork.js) (revision 28758) @@ -60,48 +60,81 @@ return "

" + status + "

"; } -function loadData(){ - +function loadData(gridId,pageSize){ + var newPageSize = pageSize || 10; var goodNmae ="";// $Id('goodsSearch').value; var tousseType = $Id('tousseType').value; var department = $Id('department').value; var orgUnitCoding = Ext.getCmp('querySupplyRoom').getValue(); if(orgUnitCoding.indexOf(ALL) == 0){ orgUnitCoding = ""; } - - applicationStore.baseParams['tousseName'] = goodNmae; - applicationStore.baseParams['tousseType'] = tousseType; - applicationStore.baseParams['department'] = department; - applicationStore.baseParams['orgUnitCoding'] = orgUnitCoding; - applicationStore.load({params:{start: 0, limit: 10}}); - - pendingBasketStore.baseParams['department'] = department; - pendingBasketStore.baseParams['orgUnitCoding'] = orgUnitCoding; - pendingBasketStore.load({params:{start: 0, limit: 10}}); - - packingStore.baseParams['tousseName'] = goodNmae; - packingStore.baseParams['tousseType'] = tousseType; - packingStore.baseParams['department'] = department; - packingStore.baseParams['orgUnitCoding'] = orgUnitCoding; - packingStore.load({params:{start: 0, limit: 10}}); - - reviewStore.baseParams['tousseName'] = goodNmae; - reviewStore.baseParams['tousseType'] = tousseType; - reviewStore.baseParams['orgUnitCoding'] = orgUnitCoding; - reviewStore.load({params:{start: 0, limit: 10}}); - - sterilizationStore.baseParams['tousseName'] = goodNmae; - sterilizationStore.baseParams['tousseType'] = tousseType; - sterilizationStore.baseParams['orgUnitCoding'] = orgUnitCoding; - sterilizationStore.load({params:{start: 0, limit: 10}}); - - invoicePlanStore.baseParams['tousseName'] = goodNmae; - invoicePlanStore.baseParams['tousseType'] = tousseType; - invoicePlanStore.baseParams['department'] = department; - invoicePlanStore.baseParams['orgUnitCoding'] = orgUnitCoding; - invoicePlanStore.load({params:{start: 0, limit: 10}}); - + + if(gridId == 'applicationGrid'){ + applicationStore.baseParams['tousseName'] = goodNmae; + applicationStore.baseParams['tousseType'] = tousseType; + applicationStore.baseParams['department'] = department; + applicationStore.baseParams['orgUnitCoding'] = orgUnitCoding; + applicationStore.load({params:{start: 0, limit: newPageSize}}); + }else if(gridId == 'pendingBasketGrid'){ + pendingBasketStore.baseParams['department'] = department; + pendingBasketStore.baseParams['orgUnitCoding'] = orgUnitCoding; + pendingBasketStore.load({params:{start: 0, limit: newPageSize}}); + }else if(gridId == 'packingGrid'){ + packingStore.baseParams['tousseName'] = goodNmae; + packingStore.baseParams['tousseType'] = tousseType; + packingStore.baseParams['department'] = department; + packingStore.baseParams['orgUnitCoding'] = orgUnitCoding; + packingStore.load({params:{start: 0, limit: newPageSize}}); + }else if(gridId == 'reviewGrid'){ + reviewStore.baseParams['tousseName'] = goodNmae; + reviewStore.baseParams['tousseType'] = tousseType; + reviewStore.baseParams['orgUnitCoding'] = orgUnitCoding; + reviewStore.load({params:{start: 0, limit: newPageSize}}); + }else if(gridId == 'sterilizationGrid'){ + sterilizationStore.baseParams['tousseName'] = goodNmae; + sterilizationStore.baseParams['tousseType'] = tousseType; + sterilizationStore.baseParams['orgUnitCoding'] = orgUnitCoding; + sterilizationStore.load({params:{start: 0, limit: newPageSize}}); + }else if(gridId == 'invoicePlanGrid'){ + invoicePlanStore.baseParams['tousseName'] = goodNmae; + invoicePlanStore.baseParams['tousseType'] = tousseType; + invoicePlanStore.baseParams['department'] = department; + invoicePlanStore.baseParams['orgUnitCoding'] = orgUnitCoding; + invoicePlanStore.load({params:{start: 0, limit: newPageSize}}); + }else { + applicationStore.baseParams['tousseName'] = goodNmae; + applicationStore.baseParams['tousseType'] = tousseType; + applicationStore.baseParams['department'] = department; + applicationStore.baseParams['orgUnitCoding'] = orgUnitCoding; + applicationStore.load({params:{start: 0, limit: 10}}); + + pendingBasketStore.baseParams['department'] = department; + pendingBasketStore.baseParams['orgUnitCoding'] = orgUnitCoding; + pendingBasketStore.load({params:{start: 0, limit: 10}}); + + packingStore.baseParams['tousseName'] = goodNmae; + packingStore.baseParams['tousseType'] = tousseType; + packingStore.baseParams['department'] = department; + packingStore.baseParams['orgUnitCoding'] = orgUnitCoding; + packingStore.load({params:{start: 0, limit: 10}}); + + reviewStore.baseParams['tousseName'] = goodNmae; + reviewStore.baseParams['tousseType'] = tousseType; + reviewStore.baseParams['orgUnitCoding'] = orgUnitCoding; + reviewStore.load({params:{start: 0, limit: 10}}); + + sterilizationStore.baseParams['tousseName'] = goodNmae; + sterilizationStore.baseParams['tousseType'] = tousseType; + sterilizationStore.baseParams['orgUnitCoding'] = orgUnitCoding; + sterilizationStore.load({params:{start: 0, limit: 10}}); + + invoicePlanStore.baseParams['tousseName'] = goodNmae; + invoicePlanStore.baseParams['tousseType'] = tousseType; + invoicePlanStore.baseParams['department'] = department; + invoicePlanStore.baseParams['orgUnitCoding'] = orgUnitCoding; + invoicePlanStore.load({params:{start: 0, limit: 10}}); + } } function add0(m){return m<10?'0'+m:m }; @@ -599,6 +632,7 @@ {header : "申请科室",width : 150,dataIndex : 'depart'}, {header : "申请单类型",width : 120,dataIndex : 'invoicePlanType'}, {header : "申请单编号",width : 120,dataIndex : 'serialNumberOfInovicePlan'}, + {header : "发货状态",width : 120,dataIndex : 'deliverStatus'}, {header : "申请时间",width : 130,dataIndex : 'applicationTime',sortable:true} ]); @@ -756,6 +790,7 @@ {name : 'applicationAmount'}, {name : 'depart'}, {name : 'invoicePlanType'}, + {name : 'deliverStatus'}, {name : 'serialNumberOfInovicePlan'}, {name : 'applicationTime'} ]) @@ -766,51 +801,116 @@ var totalInvoiceAmount = o.totalInvoiceAmount; var newTitle = "待发货器械包列表"+"(待发货器械包总数量:" + totalInvoiceAmount + ")"; Ext.getCmp('invoicePlanGrid').setTitle(newTitle); - }); + }); + + var pageSizeStore = new Ext.data.SimpleStore({ + fields: ['key', 'value'], + data: [ + ['10', '10'], + ['20', '20'], + ['30', '30'], + ['50', '50'], + ['100', '100'], + ['200', '200'], + ['300', '300'], + ['400', '400'], + ['500', '500'], + ['600', '600'], + ['700', '700'], + ['800', '800'], + ['900', '900'], + ['1000', '1000'] + ] + }); + + var pageSizeFun = function(gridId){ + var item = new Ext.form.ComboBox({ + fieldLabel: '', + id: gridId+'_pageSize', + width:50, + editable: false, + msgTarget: 'side', + store: pageSizeStore, + displayField:'value', + valueField: 'key', + value:'10', + typeAhead: true, + mode: 'local', + triggerAction: 'all', + selectOnFocus:true, + listeners:{ + select: function (store, record) { + var pageSize = record.data.value; + if(gridId == 'applicationGrid'){ + applicationPageBbar.pageSize = parseInt(pageSize); + }else if(gridId == 'pendingBasketGrid'){ + pendingBasketPageBbar.pageSize = parseInt(pageSize); + }else if(gridId == 'packingGrid'){ + packingPageBbar.pageSize = parseInt(pageSize); + }else if(gridId == 'reviewGrid'){ + reviewPageBbar.pageSize = parseInt(pageSize); + }else if(gridId == 'sterilizationGrid'){ + sterilizationPageBbar.pageSize = parseInt(pageSize); + }else if(gridId == 'invoicePlanGrid'){ + invoicePlanPageBbar.pageSize = parseInt(pageSize); + } + loadData(gridId,pageSize); + } + } + }) + + return ['-', item]; + } var applicationPageBbar = new Ext.PagingToolbar({ pageSize: 10,//指出每页显示的记录数 store :applicationStore, displayInfo: true, displayMsg: '当前显示记录: {0} - {1} 共计: {2}', - emptyMsg: "没有记录可以显示" + emptyMsg: "没有记录可以显示", + items: pageSizeFun('applicationGrid') }); var pendingBasketPageBbar = new Ext.PagingToolbar({ pageSize: 10,//指出每页显示的记录数 store :pendingBasketStore, displayInfo: true, displayMsg: '当前显示记录: {0} - {1} 共计: {2}', - emptyMsg: "没有记录可以显示" + emptyMsg: "没有记录可以显示", + items: pageSizeFun('pendingBasketGrid') }); var packingPageBbar = new Ext.PagingToolbar({ pageSize: 10,//指出每页显示的记录数 store :packingStore, displayInfo: true, displayMsg: '当前显示记录: {0} - {1} 共计: {2}', - emptyMsg: "没有记录可以显示" + emptyMsg: "没有记录可以显示", + items: pageSizeFun('packingGrid') }); var reviewPageBbar = new Ext.PagingToolbar({ pageSize: 10,//指出每页显示的记录数 store :reviewStore, displayInfo: true, displayMsg: '当前显示记录: {0} - {1} 共计: {2}', - emptyMsg: "没有记录可以显示" + emptyMsg: "没有记录可以显示", + items: pageSizeFun('reviewGrid') }); var sterilizationPageBbar = new Ext.PagingToolbar({ pageSize: 10,//指出每页显示的记录数 store :sterilizationStore, displayInfo: true, displayMsg: '当前显示记录: {0} - {1} 共计: {2}', - emptyMsg: "没有记录可以显示" + emptyMsg: "没有记录可以显示", + items: pageSizeFun('sterilizationGrid') }); var invoicePlanPageBbar = new Ext.PagingToolbar({ pageSize: 10,//指出每页显示的记录数 store :invoicePlanStore, displayInfo: true, displayMsg: '当前显示记录: {0} - {1} 共计: {2}', - emptyMsg: "没有记录可以显示" + emptyMsg: "没有记录可以显示", + items: pageSizeFun('invoicePlanGrid') }); var applicationTbar = [{ text: '删除', @@ -838,7 +938,7 @@ cm : applicationColumns, sm : applicationSm, tbar : applicationTbar, - bbar:applicationPageBbar, + bbar:applicationPageBbar, bodyStyle: "overflow:auto;" }); var pendingBasketGrid = new Ext.grid.GridPanel({