Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js =================================================================== diff -u -r40568 -r40570 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 40568) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 40570) @@ -89,20 +89,34 @@ UserTableManager.getUserByBarcode(barcode,function(responseText){ if(!isUndefinedOrNullOrEmpty(responseText)){ var result = Ext4.JSON.decode(responseText); - if(!result.success){ - var msg = result.message || '输入的条码有误!'; - if(result.isNotSameOrgUnit){ - msg = "不允许登记非本科室人员,请扫描本科室人员条码" - } - showResult(msg); + if(result.success){ top.Ext4.getCmp(barcodeBox).setValue(''); - return; + top.Ext4.getCmp(fullNameBox).setValue(result.fullName); + if(idBox){ + top.Ext4.getCmp(idBox).setValue(result.id); + } + }else { + if(barcodeBox !== 'applicantBarcode'){ + if(result.isNotSameOrgUnit){ + showResult(result.message || '不允许登记非本科室人员,请扫描本科室人员条码'); + return + }else { + showResult(result.message || '输入的条码有误!'); + return + } + }else { + if(result.isNotSameOrgUnit){ + top.Ext4.getCmp(barcodeBox).setValue(''); + top.Ext4.getCmp(fullNameBox).setValue(result.fullName); + if(idBox){ + top.Ext4.getCmp(idBox).setValue(result.id); + } + }else { + showResult(result.message || '输入的条码有误!'); + return + } + } } - top.Ext4.getCmp(barcodeBox).setValue(''); - top.Ext4.getCmp(fullNameBox).setValue(result.fullName); - if(idBox){ - top.Ext4.getCmp(idBox).setValue(result.id); - } }else{ showResult('找不到该条码所对应的人员信息'); top.Ext4.getCmp(barcodeBox).setValue('');