Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js =================================================================== diff -u -r21117 -r21119 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 21117) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 21119) @@ -1654,7 +1654,7 @@ ] },{ xtype : 'container', - width : 850, + width : 730, layout : 'hbox', flex : 1, items : [ @@ -1668,7 +1668,6 @@ }, { xtype : 'datefield', fieldLabel : '手术时间', - width : 200, id : 'operationTime', name : 'operationTime', selectOnFocus :true, @@ -1677,17 +1676,16 @@ flex : 1 },{ fieldLabel : '医生', - xtype : 'combo', + xtype : 'combo', id : 'doctor', name : 'doctor', flex : 1, queryParam : 'spell', minChars : 0, //valueField : 'doctorName', displayField : 'doctor', - width : 300, - pageSize : 100, - listConfig: {width: 300}, + pageSize : 0, + listConfig: {width: 300}, forceSelection : true, lazyInit : true, triggerAction : 'all', Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/commonlyUsedDoctor/comUsedDoctorForm.js =================================================================== diff -u -r21117 -r21119 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/commonlyUsedDoctor/comUsedDoctorForm.js (.../comUsedDoctorForm.js) (revision 21117) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/commonlyUsedDoctor/comUsedDoctorForm.js (.../comUsedDoctorForm.js) (revision 21119) @@ -32,7 +32,26 @@ allowBlank : false, id : "doctorName", name : "doctorName", - anchor : '95%' + anchor : '95%', + listeners:{ + blur:function(p){ + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/baseData/commonlyUsedDoctorAction!getPinYinCode.do', + method : 'GET', + params : { + doctorName : p.getValue() + }, + success : function(response, options) { + var result = Ext.util.JSON.decode(response.responseText); + top.Ext.getCmp('pinYinCode').setValue(result.data.pinYinCode); + }, + + failure : function() { + alert("自动转换拼音码失败") + } + }); + } + } }] },{ columnWidth : 0.33, Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/commonlyUsedDoctor/comUsedDoctorView.js =================================================================== diff -u -r21117 -r21119 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/commonlyUsedDoctor/comUsedDoctorView.js (.../comUsedDoctorView.js) (revision 21117) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/commonlyUsedDoctor/comUsedDoctorView.js (.../comUsedDoctorView.js) (revision 21119) @@ -101,9 +101,10 @@ }; var cm = new Ext.grid.ColumnModel( [ { + header : "序号", id : 'id', dataIndex : 'id', - hidden :true + hidden :false },{ id : 'doctorName', dataIndex : 'doctorName', Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/basedatamanager/commonlyUsedDoctor/action/CommonlyUsedDoctorAction.java =================================================================== diff -u -r21117 -r21119 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/basedatamanager/commonlyUsedDoctor/action/CommonlyUsedDoctorAction.java (.../CommonlyUsedDoctorAction.java) (revision 21117) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/basedatamanager/commonlyUsedDoctor/action/CommonlyUsedDoctorAction.java (.../CommonlyUsedDoctorAction.java) (revision 21119) @@ -15,6 +15,7 @@ import com.forgon.disinfectsystem.basedatamanager.commonlyUsedDoctor.service.CommonlyUsedDoctorManager; import com.forgon.disinfectsystem.entity.commonlyUsedDoctor.CommonlyUsedDoctor; +import com.forgon.tools.GB2Alpha; import com.forgon.tools.StrutsParamUtils; import com.forgon.tools.StrutsResponseUtils; import com.forgon.tools.hibernate.ObjectDao; @@ -84,7 +85,9 @@ } } - + /** + * 通过医生Id获取一条数据 + */ public void getByIdCommonlyUsedDoctor(){ try{ String idStr = StrutsParamUtils.getPraramValue("id", null); @@ -157,6 +160,30 @@ List> list = commonlyUsedDoctorManager.getDoctorBykeyWord(spell); PageUtil.outPutResult(PageUtil.getPagePara(), list); } + + /** + * 根据医生名自动转换成拼音码 + */ + public void getPinYinCode(){ + try{ + String doctorName = StrutsParamUtils.getPraramValue("doctorName", null); + Map map = new HashMap(); + if(StringTools.isNotBlank(doctorName)){ + CommonlyUsedDoctor commonlyUsedDoctor = new CommonlyUsedDoctor(); + commonlyUsedDoctor.setPinYinCode(GB2Alpha.string2Alpha(doctorName)); + commonlyUsedDoctor.setDoctorName(doctorName); + map.put("success", true); + map.put("data", commonlyUsedDoctor); + JSONObject jsonObject = JSONObject.fromObject(map); + StrutsResponseUtils.output(jsonObject); + } + StrutsResponseUtils.output(false, "加载数据失败"); + }catch(Exception e){ + e.printStackTrace(); + StrutsResponseUtils.output(false,"发生异常"); + } + + } }