Index: ssts-web/src/main/webapp/disinfectsystem/invoice/customInvoiceForm.js =================================================================== diff -u -r16509 -r17484 --- ssts-web/src/main/webapp/disinfectsystem/invoice/customInvoiceForm.js (.../customInvoiceForm.js) (revision 16509) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/customInvoiceForm.js (.../customInvoiceForm.js) (revision 17484) @@ -575,6 +575,41 @@ labelWidth :70, columnWidth :.33, items : [{ + xtype : 'textfield', + fieldLabel : '科室条码', + maxLength : '16', + id : 'departBarcode', + name : 'departBarcode', + anchor : '99%', + listeners : { + render : function(p) { + p.getEl().on('keypress',function(e) { + if (e.getKey() == 13) {//回车键 + InvoiceTableManager.getOrgByBarcode( + 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); + top.Ext.getCmp('senderBarcode').focus(); + } + + }); + top.Ext.getCmp('departBarcode').setValue(""); + } + }); + } + } + }] + },{ + layout : 'form', + labelWidth :70, + columnWidth :.33, + items : [{ xtype : 'combo', fieldLabel : '科室', id : 'depart', @@ -593,8 +628,7 @@ anchor : '99%', listeners:{ select:function(combo, record, index){ - var deptName = top.Ext.getCmp("depart").getValue(); - var deptCoding = getDepartCoding(appDepartJsonStore,deptName); + var deptCoding = record.data.departCode; top.Ext.getCmp("orgUnitCoding").setValue(deptCoding); }, focus : function(thiz){ @@ -995,7 +1029,7 @@ layout : 'fit', title : '发货单', width : 1020, - height : 660, + height : 680, border : false, modal : true, plain : true, @@ -1008,8 +1042,8 @@ }); window.show(); - top.Ext.getCmp(defaultFocusedFieldOnInvoiceForm).focus(false, 100); -// top.Ext.getCmp('senderBarcode').focus(false, 100); +// top.Ext.getCmp(defaultFocusedFieldOnInvoiceForm).focus(false, 100); + top.Ext.getCmp('departBarcode').focus(false, 100); wareHouseStore.load(); }