Index: ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordCompleteForm.js =================================================================== diff -u -r22520 -r36667 --- ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordCompleteForm.js (.../sterilizationRecordCompleteForm.js) (revision 22520) +++ ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordCompleteForm.js (.../sterilizationRecordCompleteForm.js) (revision 36667) @@ -1,6 +1,17 @@ var sterileCompleteWin = null; var sterileCompleteFormPanel; var _isClickDel = false; +//物品卸载统计 +var tousseItemCountPanel; +var tousseItemCountJsonStore; +var tousseItemCountRecord = new top.Ext.data.Record.create([{ + name: 'tousseName' +}, { + name: 'type' +}, { + name: 'count', + type: 'int' +}]); function cancelSterileRecordComplete() { sterileCompleteWin.close(); @@ -172,7 +183,7 @@ rootVisible:false, autoScroll:true, containerScroll : true, - height: 325, + height: 525, width : 320, title:'灭菌卸载物品列表', frame : false, @@ -185,6 +196,7 @@ completeColumnTree.on("beforeclick",function(clickNode,eObj){ if(_isClickDel){ setIsClickDel1(0); + statisticsTousse(clickNode.attributes.name,clickNode.attributes.type,'remove'); clickNode.remove(); } }); @@ -203,7 +215,7 @@ rootVisible:false, autoScroll:true, containerScroll : true, - height: 325, + height: 275, width : 320, title:'没通过检测器械包列表', frame : false, @@ -219,13 +231,56 @@ clickNode.remove(); } }); + + tousseItemCountJsonStore = new top.Ext.data.Store({ + autoLoad: false, + reader: new top.Ext.data.JsonReader({ + fields: [{ + name: 'tousseName' + }, { + name: 'count' + }] + }) + }); + + var tousseItemCountPanel = new top.Ext.grid.GridPanel({ + id: 'tousseItemCountPanel', + height: 250, + frame: false, + border: true, + tbar: [{ + xtype: 'button', + text: '已扫描物品卸载统计' + }, "->",{ + xtype: 'button', + id: 'totalAmount', + text: '已卸载总数量:0' + }], + bbar: [{ + xtype: 'button', + id: "typeTotalAmount", + text: '器械包:0,敷料包:0,外来器械包:0,代理灭菌包:0' + }], + viewConfig: { + forceFit: true + }, + store: tousseItemCountJsonStore, + cm: new top.Ext.grid.ColumnModel([ + { header: "器械包名称统计", width: 150, menuDisabled: true, dataIndex: 'tousseName' }, + { id: 'count', header: "数量", width: 40, menuDisabled: true, dataIndex: 'count' } + ]), + stripeRows: true, + autoExpandColumn: 'count', + bodyStyle: 'border:1px solid #afd7af' + }) + sterileCompleteFormPanel = new top.Ext.FormPanel({ id : 'completeSterilizationRecordForm1', frame : true, labelSeparator : ':', bodyStyle : 'padding:5px 5px 0px 5px', width : 900, - height : 500, + height : 700, labelAlign : 'right', buttonAlign : 'center', autoScroll : true, @@ -281,7 +336,7 @@ var data = top.Ext.decode(result); if(data.success){ //将扫描条码对应的器械包加载到表格中 - addColumnTreeNode(completeColumnTree,data.tousseName,data.barcode); + addColumnTreeNode(completeColumnTree,data.tousseName,data.barcode,data.type); }else{ showResult(data.msg); top.Ext.getCmp('completeTousseInsBarcode').focus(); @@ -349,10 +404,19 @@ items : [completeColumnTree] },{ columnWidth : .5, - autoScroll:true, - containerScroll : true, - id : 'sterilizationColumnTree', - items : [tousseColumnTree] + items:[{ + autoScroll:true, + containerScroll : true, + height:275, + id : 'sterilizationColumnTree', + items : [tousseColumnTree] + },{ + autoScroll:true, + containerScroll : true, + height:250, + id : 'tousseItemCount', + items : [tousseItemCountPanel] + }] }] }], buttons : [{ @@ -442,8 +506,62 @@ _isClickDel = (v==1?true:false); } +//ZSYY-339:增加统计信息 +function statisticsTousse(name,type,addOrRemove){ + var statisticsAmount = {'器械包': 0, '敷料包': 0, '外来器械包': 0, '代理灭菌包': 0, '已卸载总数量': 0}; + if(tousseItemCountJsonStore.getCount() == 0){ + tousseItemCountJsonStore.add(new tousseItemCountRecord({ + tousseName: name, + type: type, + count: 1 + })); + }else { + var hasTousse = false; + for(var i=0;i