Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js =================================================================== diff -u -r40573 -r40575 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 40573) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 40575) @@ -86,30 +86,33 @@ } function getUserByBarcode(barcode,barcodeBox,fullNameBox,idBox){ - UserTableManager.getUserByBarcode(barcode,function(responseText){ - if(!isUndefinedOrNullOrEmpty(responseText)){ - var result = Ext4.JSON.decode(responseText); + var handleDepartCoding = top.Ext4.getCmp('handleDepartCoding').getValue(); + if(barcodeBox == 'applicantBarcode'){ + handleDepartCoding = ''; + } + Ext4.Ajax.request({ + url : WWWROOT + '/disinfectSystem/web/userController/getUserByBarcode.mhtml', + params : {barcode : barcode, orgUnitCode : handleDepartCoding}, + async : false, + success : function(response, options) { + var result = Ext4.JSON.decode(response.responseText); if(result.success){ top.Ext4.getCmp(barcodeBox).setValue(''); top.Ext4.getCmp(fullNameBox).setValue(result.fullName); if(idBox){ top.Ext4.getCmp(idBox).setValue(result.id); } }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); - } + if(result.message){ + showResult(result.message); }else { - showResult(result.message || '输入的条码有误!'); - return + showResult('找不到该条码所对应的人员信息'); } + top.Ext4.getCmp(barcodeBox).setValue(''); } - }else{ - showResult('找不到该条码所对应的人员信息'); - top.Ext4.getCmp(barcodeBox).setValue(''); + }, + failure : function(response, opts) { + showResult(response.responseText); } }); }