Index: ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js =================================================================== diff -u -r33979 -r34014 --- ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js (.../qualitymonitoringInstanceForm.js) (revision 33979) +++ ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js (.../qualitymonitoringInstanceForm.js) (revision 34014) @@ -3412,7 +3412,13 @@ showResultQM("请选择监测项!"); return false; } - + + //登记人不能为空 + var createUserName = Ext.getCmp("createUserName").getValue(); + if(createUserName == ''){ + showResultQM("登记人不能为空!"); + return false; + } //5、如果是(整炉 or 监测项=无 or 监测范围=无 or 监测范围=灭菌炉记录)则可以不用填写器械包信息,否则强制要登记器械包信息 var barcode = Ext.getCmp('barcode').getValue(); //第一组的器械包条码 var tousseName = Ext.getCmp('tousseName').getRawValue(); //第一组的器械包名称 @@ -3661,7 +3667,7 @@ checkIsTousseInstanceRepackingAndSubmitFormNew(thiz,JSON.stringify(tousseAndMaterialAll),saveAndCreate); } -function loadResponPersonByBarcode(barcode){ +function loadResponPersonByBarcode(barcode,domId){ if(isUndefinedOrNullOrEmpty(barcode)){ showResultQM('条码不能为空!'); return ; @@ -3673,9 +3679,11 @@ showResultQM("请输入正确的人员条码!"); return; } - Ext.getCmp('responsiblePerson').setValue(result.fullName); - if((result.fullName || '') !== ''){ - Ext.getCmp('responsiblePerson').disable(); + Ext.getCmp(domId).setValue(result.fullName); + if(domId == 'responsiblePerson'){ + if((result.fullName || '') !== ''){ + Ext.getCmp('responsiblePerson').disable(); + } } }else{ showResultQM('找不到该条码所对应的人员信息'); @@ -4196,7 +4204,21 @@ if(id != null && id != ''){ labelWidthPosition = 91; } - + var userReader = new Ext.data.JsonReader({ + fields: [ + { name: 'id' }, + { name: 'fullName' }, + { name: 'orgUnitName' } + ] + }); + // 查找某科室的人员的store + var departUsersStore = new Ext.data.Store({ + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/systemmanage/user/userAction!loadUsersBySearchString.do', + method: 'POST' + }), + reader: userReader + }); var varibaleContent1; var varibaleContent2; // 责任环节带出监测项 @@ -4271,13 +4293,30 @@ labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, height:setH, items : [{ - xtype : 'textfield', - name : 'createUserName', + xtype : 'combo', + fieldLabel : '登记人', id : 'createUserName', - fieldLabel : "登记人", + name : 'createUserName', + queryParam : 'spell', + minChars : 0, + displayField : 'fullName', + store : departUsersStore, + forceSelection : false, + lazyInit : true, + triggerAction : 'all', + hideTrigger : false, + typeAhead : false, + allowBlank : false, anchor : '95%', - disabled : true, - value : userName + value : userName, + listeners:{ + specialkey : function(field,e){ + if(e.getKey() == 13){ + var createUserName = Ext.getCmp('createUserName').getValue(); + loadResponPersonByBarcode(createUserName,'createUserName') + } + } + } }] }, { layout : 'form', @@ -4325,7 +4364,7 @@ if(e.getKey() == 13){ var barcodeValue = field.getValue(); Ext.getCmp("responsiblePersonBarcode").setValue(''); - loadResponPersonByBarcode(barcodeValue); + loadResponPersonByBarcode(barcodeValue,'responsiblePerson'); } } },