Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/supplyroomtype/supplyRoomTypeForm.js =================================================================== diff -u -r37626 -r37776 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/supplyroomtype/supplyRoomTypeForm.js (.../supplyRoomTypeForm.js) (revision 37626) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/supplyroomtype/supplyRoomTypeForm.js (.../supplyRoomTypeForm.js) (revision 37776) @@ -1268,6 +1268,30 @@ value: '仅病人所在科室', triggerAction: 'all' }] + }, { + layout: 'form', + labelWidth: 180, + columnWidth: .25, + hidden: !sstsConfig.needBeStrongPwdWhenModifyPwd, + items: [{ + xtype: 'combo', + fieldLabel: '添加用户时验证密码强度', + id: 'verifyPasswordWhenNewUser', + name: 'verifyPasswordWhenNewUser', + valueField: 'value', + displayField: 'value', + mode: 'local', + anchor: '100%', + editable: false, + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + forceSelection: true, + allowBlank: true, + value: '是', + triggerAction: 'all' + }] } ] }, { @@ -3919,6 +3943,12 @@ useRecordTiSettlementDepart = Ext.getCmp("useRecordTiSettlementDepart").getValue(); } + //ZSRY-73:添加用户时验证密码强度 + var verifyPasswordWhenNewUser = ''; + if (sstsConfig.needBeStrongPwdWhenModifyPwd) { + verifyPasswordWhenNewUser = Ext.getCmp("verifyPasswordWhenNewUser").getValue(); + } + //KSDQDYRMYY-13 var isEnableTousseOpRecipient = '否'; var isEnableTousseOpDestLocation = '否'; @@ -4168,6 +4198,7 @@ tousseCamImgVidRetentionTime: tousseCamImgVidRetentionTime, ftCamImgVidRetentionTime: ftCamImgVidRetentionTime, useRecordTiSettlementDepart: useRecordTiSettlementDepart, + verifyPasswordWhenNewUser:verifyPasswordWhenNewUser, invoiceModeTousseRange: invoiceModeTousseRange, kardexContainerHost: kardexContainerHost, kardexContainerPort: kardexContainerPort, @@ -4474,6 +4505,10 @@ if (sstsConfig.enableTheSettlementDepartmentIsDepartOfPatientFunction) { Ext.getCmp('useRecordTiSettlementDepart').setValue(supplyRoomConfig.useRecordTiSettlementDepart || '仅病人所在科室'); } + //ZSRY-73:添加用户时验证密码强度 + if (sstsConfig.needBeStrongPwdWhenModifyPwd) { + Ext.getCmp('verifyPasswordWhenNewUser').setValue(supplyRoomConfig.verifyPasswordWhenNewUser); + } var isFtOnlyImplantConvert = (supplyRoomConfig.isFtOnlyImplantConvert == true || supplyRoomConfig.isFtOnlyImplantConvert == 'true') ? '是' : '否'; Ext.getCmp('mergeTousseRuleForInvoiceBatchPrint').setValue(supplyRoomConfig.mergeTousseRuleForInvoiceBatchPrint); Ext.getCmp('mergeTousseRuleForInvoiceBatchPrintStr').setValue(supplyRoomConfig.mergeTousseRuleForInvoiceBatchPrint); Index: ssts-web/src/main/webapp/systemmanage/userFormExt.js =================================================================== diff -u -r30664 -r37776 --- ssts-web/src/main/webapp/systemmanage/userFormExt.js (.../userFormExt.js) (revision 30664) +++ ssts-web/src/main/webapp/systemmanage/userFormExt.js (.../userFormExt.js) (revision 37776) @@ -64,11 +64,13 @@ Ext.getCmp('confirmpwd').setValue(""); return false; } - var checkPasswordResult = testPasswordReg(passwdValue,Ext.getCmp('name').getValue()) - if(!checkPasswordResult.success){ - Ext.MessageBox.show({title:'错误提示', msg:checkPasswordResult.msg, buttons:Ext.Msg.OK,icon:Ext.Msg.ERROR}); - return false; - } + if(verifyPasswordWhenNewUser == '是'){ + var checkPasswordResult = testPasswordReg(passwdValue,Ext.getCmp('name').getValue()) + if(!checkPasswordResult.success){ + Ext.MessageBox.show({title:'错误提示', msg:checkPasswordResult.msg, buttons:Ext.Msg.OK,icon:Ext.Msg.ERROR}); + return false; + } + } } isRepeatLogninId = false; DWREngine.setAsync(false); @@ -90,6 +92,11 @@ if(!Ext.isEmpty(id)){ hidePWD = true; } + //ZSRY-72:增加密码设置要求提示语 + var msg = '' + if(verifyPasswordWhenNewUser == '是'){ + msg = getModifyPwdMsg(); + } var orgUnitId = getURLParameter('orgUnitId','0'); var formObj = new Ext.FormPanel({ labelAlign: 'left', @@ -320,13 +327,30 @@ fieldLabel:'备注', height:60, width: 400 - }], + }, { + items:[{ + hidden:msg == ''?true:false, + layout:'column', + items:[{ + id:'showPwdMessage', + xtype:'textfield', + width : 390, + allowBlank : true, + labelSeparator:'', + labelWidth:0, + anchor: '99%', + readOnly : true, + cls : 'fieldReadOnlyNoRemove', + value: msg + }] + }] + }], buttons: [{ id:'print', text: '打印预览', handler: function(){ - printBarcode(this,1); + printBarcode(1); } },{ text: '编辑', @@ -337,18 +361,22 @@ text: '保存并打印', hidden: !enableSaveBtn, handler: function(){ - saveAndPrint(this,0); + saveFun(this,2); } }, { id:'saveBtn', text: '保存', hidden: !enableSaveBtn, - handler: save + handler: function(){ + saveFun(this,0); + } },{ text: '保存并新建', id:'saveAndNewBtn', hidden: !enableSaveBtn, - handler: saveAndNew + handler: function(){ + saveFun(this,1); + } },{ text: '取消', handler:gohistory @@ -360,6 +388,9 @@ Ext.getCmp('passwd').hide(); Ext.getCmp('confirmpwd').hide(); } + if(msg !== ''){ + Ext.getCmp('showPwdMessage').el.dom.style.color = 'red'; + } formObj.form.load({ url:WWWROOT+'/systemmanage/user/loadForm.do', method:'GET', @@ -375,7 +406,7 @@ FormUtils.setReadOnly(formObj.form.el.dom, true); } - function printBarcode(obj,type){ + function printBarcode(type){ var barcode = Ext.getCmp('barcode').getRawValue(); if(barcode == null || barcode == ""){ barcode = ""; @@ -396,84 +427,40 @@ DWREngine.setAsync(true); printUserInfo(barcode,userName,orgUnitNames,name,type); } - - function save(){ - this.disable(); //按钮禁用 + + function saveFun(that,saveType){ + that.disable(); //按钮禁用 if(!formObj.form.isValid()){ Ext.MessageBox.show({title:'错误提示', msg:'请正确填写表单各值。',buttons:Ext.Msg.OK,icon:Ext.Msg.ERROR}); - this.enable(); + that.enable(); return false; } if(!validateUser(id)){ - this.enable(); + that.enable(); return false; } + formObj.form.submit({ url:WWWROOT+'/systemmanage/user/save.do', method:'POST', waitMsg:'正在保存数据,请稍候', waitTitle:'提交表单', success:function(form,action){ - history.go(-1); + if(saveType == 0){ + history.go(-1); + }else if(saveType == 1){ + location.href=WWWROOT + "/systemmanage/userFormExt.jsp?orgUnitId="+orgUnitId+"&editMode=true"; + }else if(saveType == 2){ + history.go(-1); + printBarcode(2); + } }, failure:function(form, action){ - alert('failure = '+action.failureType); + alert('保存失败:'+action.failureType); } }); } - function saveAndPrint(obj,type){ - obj.disable(); - if(!formObj.form.isValid()){ - Ext.MessageBox.show({title:'错误提示', msg:'请正确填写表单各值。',buttons:Ext.Msg.OK,icon:Ext.Msg.ERROR}); - obj.enable(); - return false; - } - if(!validateUser(id)){ - obj.enable(); - return false; - } - formObj.form.submit({ - url:WWWROOT+'/systemmanage/user/save.do', - method:'POST', - waitMsg:'正在保存数据,请稍候', - waitTitle:'提交表单', - success:function(form,action){ - history.go(-1); -// var barcodeStr = action.result.barcode; - printBarcode(null,type); - }, - failure:function(form, action){ - alert('failure = '+action.failureType); - } - }); - } - - function saveAndNew(){ - this.disable(); - if(!formObj.form.isValid()){ - Ext.MessageBox.show({title:'错误提示', msg:'请正确填写表单各值。',buttons:Ext.Msg.OK,icon:Ext.Msg.ERROR}); - this.enable(); - return false; - } - if(!validateUser(id)){ - this.enable(); - return false; - } - formObj.form.submit({ - url:WWWROOT+'/systemmanage/user/save.do', - method:'POST', - waitMsg:'正在保存数据,请稍候', - waitTitle:'提交表单', - success:function(form,action){ - location.href=WWWROOT + "/systemmanage/userFormExt.jsp?orgUnitId="+orgUnitId+"&editMode=true"; - }, - failure:function(form, action){ - alert('failure = '+action.failureType); - } - }); - } - function edit(){ this.setVisible(false); Ext.getCmp('saveBtn').setVisible(true); Index: ssts-web/src/main/webapp/systemmanage/userFormExt.jsp =================================================================== diff -u -r29513 -r37776 --- ssts-web/src/main/webapp/systemmanage/userFormExt.jsp (.../userFormExt.jsp) (revision 29513) +++ ssts-web/src/main/webapp/systemmanage/userFormExt.jsp (.../userFormExt.jsp) (revision 37776) @@ -1,11 +1,15 @@ <%@ page contentType="text/html; charset=UTF-8"%> <%@ page import="com.forgon.directory.model.BarcodeDevice" %> +<%@page import="com.forgon.disinfectsystem.basedatamanager.supplyroomconfig.service.SupplyRoomConfigManager"%> +<%@page import="com.forgon.disinfectsystem.entity.basedatamanager.supplyroomconfig.SupplyRoomConfig"%> <%@ include file="/common/taglibs.jsp"%> <% LoginUserData loginUser = AcegiHelper.getLoginUser(); + SupplyRoomConfigManager supplyRoomConfigManager = (SupplyRoomConfigManager)SpringBeanManger.getBean("supplyRoomConfigManager"); request.setAttribute("userLoginName",loginUser.getUserName()); request.setAttribute("currentOrgUnitName",loginUser.getCurrentOrgUnitName()); + request.setAttribute("verifyPasswordWhenNewUser",supplyRoomConfigManager.getSystemParamsObj().getVerifyPasswordWhenNewUser()); %>
@@ -27,6 +31,7 @@ var userLoginName = '${userLoginName}'; var currentOrgUnitName = '${currentOrgUnitName}'; +var verifyPasswordWhenNewUser = '${verifyPasswordWhenNewUser}';