Index: ssts-web/src/main/webapp/disinfectsystem/packing/printRecyclingDetailWin.js =================================================================== diff -u -r32065 -r32072 --- ssts-web/src/main/webapp/disinfectsystem/packing/printRecyclingDetailWin.js (.../printRecyclingDetailWin.js) (revision 32065) +++ ssts-web/src/main/webapp/disinfectsystem/packing/printRecyclingDetailWin.js (.../printRecyclingDetailWin.js) (revision 32072) @@ -310,20 +310,36 @@ var endDateTime = ""; /*************** DGSETYY-12 start *****************/ + var testRecord = Ext.data.Record.create([ + {name: 'taskGroupName',mapping : 'name', type: 'string'} + ]); //任务组数据源 var taskGroupStore = new Ext.data.Store({ proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/taskGroupAction!loadTaskGroupStore.do', + url : WWWROOT + '/disinfectSystem/baseData/taskGroupAction!getTaskGroupList.do', method : 'POST' }), reader : new Ext.data.JsonReader({ root : 'data', totalProperty: 'totalCount' },[ - {name : 'id',mapping : 'valueField'}, - {name : 'taskGroupName',mapping : 'displayField'} + {name : 'taskGroupName',mapping : 'name'} ] - ) + ), + listeners : { + beforeload:function(){ + var depart = Ext.getCmp('depart').getValue() || ''; + if(depart !== ''){ + taskGroupStore.baseParams["departCoding"] = depart; + } + }, + load:function(){ + if(taskGroupStore.getCount() > 0){ + taskGroupStore.insert(0 , new testRecord({'taskGroupName':'全部'})); + } + taskGroupItem.selectAll(); //全选 + } + } }); //任务组 @@ -345,10 +361,6 @@ } }) - taskGroupStore.on('load', function () { - taskGroupItem.selectAll(); //全选 - }); - //器械包分组数据源 var tousseGroupStore = new Ext.data.JsonStore({ url : WWWROOT + '/disinfectSystem/baseData/tousseGroupAction!getAllTousseGroup.do', @@ -428,10 +440,6 @@ } }); - taskGroupStore.load(); - tousseGroupStore.load(); - deptGroupStore.load(); - /*************** DGSETYY-12 end *****************/ DWREngine.setAsync(false); @@ -486,7 +494,7 @@ layout : 'form', items : [{ xtype : 'combo', - fieldLabel : '所属科室', + fieldLabel : '选择供应室', id : 'depart', name : 'depart', width : 110, @@ -498,17 +506,14 @@ editable:false, triggerAction : 'all', allowBlank : false, - anchor : '95%' + anchor : '95%', + listeners:{ + select: function (combo, record, index) { + taskGroupStore.reload(); + } + } }] },{ - xtype:'hidden', - id:'', - name:'' - },{ - xtype:'hidden', - id:'', - name:'' - },{ columnWidth : 0.5, layout : 'form', items : [taskGroupItem] @@ -562,6 +567,11 @@ else{ supplyRoomStore.reload(); } + tousseGroupStore.reload(); + deptGroupStore.reload(); + setTimeout(function(){ + taskGroupStore.reload(); + }, 200); }