Index: ssts-web/src/main/webapp/disinfectsystem/invoice/customInvoiceForm.js =================================================================== diff -u -r30069 -r30363 --- ssts-web/src/main/webapp/disinfectsystem/invoice/customInvoiceForm.js (.../customInvoiceForm.js) (revision 30069) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/customInvoiceForm.js (.../customInvoiceForm.js) (revision 30363) @@ -754,28 +754,49 @@ render : function(p) { p.getEl().on('keypress',function(e) { if (e.getKey() == 13) {//回车键 - InvoiceTableManager.getApplicationOrgByBarcode( - top.Ext.getCmp('departBarcode').getValue(),function(orgStr) { - if (orgStr != null) { - var result = top.Ext.decode(orgStr); - if(!result.success){ - showResult(result.message); - return; - } - top.Ext.getCmp("depart").setValue(result.name); - top.Ext.getCmp("orgUnitCoding").setValue(result.orgUnitCoding); - if(top.Ext.getCmp('assistantSenderBarcode_parent').isVisible()){ - top.Ext.getCmp('assistantSenderBarcode').focus(); - }else if(top.Ext.getCmp('personInChargeBarcode_parent').isVisible()){ - top.Ext.getCmp('personInChargeBarcode').focus(); - }else{ - top.Ext.getCmp('scanText').focus(); - } - + top.Ext.getBody().mask("正在加载中,请稍候..."); + InvoiceTableManager.getApplicationOrgByBarcode( + top.Ext.getCmp('departBarcode').getValue(),function(orgStr) { + if (orgStr != null) { + var result = top.Ext.decode(orgStr); + if(!result.success){ + showResult(result.message); + return; } - - }); - top.Ext.getCmp('departBarcode').setValue(""); + top.Ext.getCmp("depart").setValue(result.name); + top.Ext.getCmp("orgUnitCoding").setValue(result.orgUnitCoding); + if(top.Ext.getCmp('assistantSenderBarcode_parent').isVisible()){ + top.Ext.getCmp('assistantSenderBarcode').focus(); + }else if(top.Ext.getCmp('personInChargeBarcode_parent').isVisible()){ + top.Ext.getCmp('personInChargeBarcode').focus(); + }else{ + top.Ext.getCmp('scanText').focus(); + } + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getDefaultSettleAccountDepart.do', + params: { + orgUnitCode: result.orgUnitCoding + }, + success: function (response, options) { + var result = Ext.decode(response.responseText); + if (!result.success) { + showResult(resultObj.errMsg); + return; + } + top.Ext.getBody().unmask(); + var orgUnitCode = result.data.orgUnitCode || ''; + var name = result.data.name || ''; + top.Ext.getCmp('settleAccountsDepartCoding').setValue(orgUnitCode); + top.Ext.getCmp('settleAccountsDepart').setValue(name); + }, + failure:function(){ + top.Ext.getBody().unmask(); + } + }); + } + + }); + top.Ext.getCmp('departBarcode').setValue(""); } }); }