Index: ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js =================================================================== diff -u -r31304 -r31355 --- ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js (.../useRecordForm.js) (revision 31304) +++ ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js (.../useRecordForm.js) (revision 31355) @@ -2,6 +2,7 @@ var currentUseRecordId; //录入使用记录的表单面板 var formObj; +var iskeypress = false; //使用记录的手术间是否允许为空 var useRecordOperationRoomAllowBlank = true; @@ -686,6 +687,35 @@ } } +// 根据住院号或者诊疗号加载病人信息 +function loadPatientInfoByValAndType(jsonStr) { + if (jsonStr != '') { + DataSynchronizationTableManager.getPatientInfoByNumberAndType(jsonStr, { + callback:function(responseText){ + var result = JSON.parse(responseText); + iskeypress = false; + if (result.success){ + var patientInfo = result.patientInfo; + if(patientInfo){ + showPatientInfo(patientInfo); + }else{ + showResult('找不到该号码所对应的病人信息!'); + validPatientInfo(); + } + } + else{ + showResult(result.msg); + } + + }, + timeout:45000, + errorHandler:function(msg){ + showResult('网络加载异常,请稍候重试!
 异常信息:' + msg); + } + }); + } +} + /** * 将病人显示到对应使用记录的表单上 * @param patientInfo 病人信息json对象 @@ -790,6 +820,7 @@ if(patientInfo.operationScheduleId){ top.Ext.getCmp('operationScheduleId').setValue(patientInfo.operationScheduleId); } + validPatientInfo(); } } @@ -1952,6 +1983,7 @@ render : function(c){ c.getEl().on('keypress',function(e,thiz){ if(e.getKey() == 13){ + iskeypress = true; var jsonStr = "{\"patientNum\":\"" + thiz.value + "\",\"numType\":\""+thiz.id+"\",\"sourcePage\":\"" + sourcePage_useRecord + "\"}"; @@ -1968,7 +2000,9 @@ }); }, blur:function(){ - validPatientInfo(); + if(!iskeypress){ + validPatientInfo(); + } } }, anchor : '96%' @@ -1990,6 +2024,7 @@ render : function(c){ c.getEl().on('keypress',function(e,thiz){ if(e.getKey() == 13){ + iskeypress = true; var jsonStr = "{\"patientNum\":\"" + thiz.value + "\",\"numType\":\""+thiz.id+"\",\"sourcePage\":\"" + sourcePage_useRecord + "\"}"; @@ -2006,7 +2041,9 @@ }); }, blur:function(){ - validPatientInfo(); + if(!iskeypress){ + validPatientInfo(); + } } }, anchor : '96%'