Index: ssts-web/src/main/webapp/disinfectsystem/routineMonitoring/routineMonitoringView.js =================================================================== diff -u -r18669 -r18691 --- ssts-web/src/main/webapp/disinfectsystem/routineMonitoring/routineMonitoringView.js (.../routineMonitoringView.js) (revision 18669) +++ ssts-web/src/main/webapp/disinfectsystem/routineMonitoring/routineMonitoringView.js (.../routineMonitoringView.js) (revision 18691) @@ -685,7 +685,20 @@ {name : 'id'}, {name : 'name'} ] - ) + ), + listeners:{ + load:function(store,records) { + if(records.length>0) { + top.Ext.getCmp('formName2').setValue(records[0].data.name); + addQualityMonitoringItem(records[0].data.id,records[0].data.name); + top.Ext.getCmp("formDefinitionId2").setValue(records[0].data.id); + top.Ext.getCmp("name2").setValue(records[0].data.name); + }else{ + // 没有找到监测项 + top.Ext.getCmp('formName2').setValue(''); + } + } + } }); var formPanel = new top.Ext.FormPanel({ @@ -1047,6 +1060,7 @@ }else{ setStartDate(top.Ext, 'yyyy/MM/dd HH:mm', 'dateTime2'); //(设置抽检时间,取服务器时间 cjr) top.Ext.getCmp('amount2').setValue(1); + formDefinitionStore.load(); } } // 打开定期监测,加载包和材料的信息 @@ -1375,7 +1389,20 @@ {name : 'id'}, {name : 'name'} ] - ) + ), + listeners:{ + load:function(store,records) { + if(records.length>0) { + top.Ext.getCmp('formName').setValue(records[0].data.name); + addRoutineMonitoringItem(records[0].data.id); + top.Ext.getCmp("formDefinitionId").setValue(records[0].data.id); + top.Ext.getCmp("name").setValue(records[0].data.name); + }else{ + // 没有找到监测项 + top.Ext.getCmp('formName').setValue(''); + } + } + } }); var formPanel = new top.Ext.FormPanel({ @@ -1971,6 +1998,7 @@ setStartDate(top.Ext, 'yyyy/MM/dd HH:mm', 'dateTime'); //(设置监测时间,取服务器时间 cjr) top.Ext.getCmp('amount').setValue(1); disableRecycleAndRepacking(); + formDefinitionStore.load(); } }