⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editempinfo.jsp

📁 一个关于tlms的一个小程序 看看能否帮助到别人
💻 JSP
字号:
<%@ include file="/WEB-INF/jsp/common/Taglibs.jsp" %>

<script type='text/javascript' src='<c:url value="/dwr/interface/empInfo.js"/>'></script>
<script type='text/javascript' src='<c:url value="/dwr/engine.js"/>'></script>
<script type='text/javascript' src='<c:url value="/dwr/util.js"/>'></script>
  	
<script type="text/javascript" language="javascript">
    function saveEmployee() {
        var form = document.forms[0];
        //alert(111);
        //if (validateEmpInfo(form)) {
            form.action = '<c:url value="/study/empinfo/saveEmpInfo.do"/>';
            form.submit();
        //}
    }    
    
    function verifyLoginName(){
    	//alert(111);
		var loginName = document.all["empInfoBean.loginName"].value;
		if (loginName == ""){
			alert("loginname empty!!!");
			document.all["empInfoBean.loginName"].focus();
			document.all["empInfoBean.loginName"].select();
		}
		
		//alert(loginName);
		empInfo.checkLoginName(loginName, callback);
	}
	
	function callback(msg) {
		//alert(msg);
		
		var o = document.all["hrefSave"];
   		if (msg){
   			alert("LoginName Existed!!");
   			//alert(o);
   			o.disabled = true;
   			document.all["empInfoBean.loginName"].focus();
   			document.all["empInfoBean.loginName"].select();
   		} else {
  			//alert("LoginName not Existed!!");
   			o.disabled = false;
   		}
	}
</script>

<c:choose>
    <c:when test="${employeeBean.status=='2'}">
        <c:set var="readyOnlyType" value="true" scope="request"/>
    </c:when>
    <c:otherwise>
        <c:set var="readyOnlyType" value="false" scope="request"/>
    </c:otherwise>
</c:choose>
<html:form action="/empinfo/saveEmpInfo.do">
<html:hidden property="empInfoBean.id" value="${employeeBean.id}"/>
<html:hidden property="employeeBean.password" value="${employeeBean.password}"/>

<div align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="table1">
<tr>
    <td height="28" colspan="2">
        <img src="<c:url value='/images/dot.gif'/>" width="11" height="11" alt="">
        <bean:message key="menu.tlms.study"/>&gt;
        <bean:message key="tlms.study.empinfo.add"/>
    </td>
</tr>
<tr>
    <td width="2%" height="31" class="section">
        <img src="<c:url value='/images/menu_dot.jpg'/>" width="6" height="19" alt="">
    </td>
    <td width="98%" class="section">
        <bean:message key="tlms.study.empinfo.add"/>
    </td>
</tr>
<tr>
    <td></td>
    <td></td>
</tr>
<tr>
    <td></td>
    <td>
        <table width="100%" height="43" border="0" cellpadding="0" cellspacing="0"
               style="font-size:12px; width:96%" id="table2">
            <tr>
                <td width="11%" nowrap><bean:message key="label.study.empinfo.id"/></td>
                <td width="28%" nowrap>
                    <c:choose>
                        <c:when test="${empty employeeBean.id}">
                            <html:text property="empInfoBean.id" value="${empInfoBean.id}" readonly="true"/>
                        </c:when>
                        <c:otherwise>
                            <html:text property="empInfoBean.id" value="${empInfoBean.id}" readonly="true"/>
                        </c:otherwise>
                    </c:choose>
                </td>
                <td width="11%" nowrap><bean:message key="label.study.empinfo.truename"/></td>
                <td width="53%" nowrap>
                    <html:text property="empInfoBean.trueName" value="${empInfoBean.trueName}" readonly="${readyOnlyType}"/>
                </td>
            </tr>
            <tr>
                <td nowrap><bean:message key="label.study.empinfo.loginname"/></td>
                <td nowrap>
                    <html:text property="empInfoBean.loginName" value="${empInfoBean.loginName}" readonly="${readyOnlyType}" onblur="verifyLoginName();"/>
                </td>
                <td nowrap><bean:message key="label.study.empinfo.password"/></td>
                <td nowrap>
                    <html:password property="empInfoBean.password" value="${empInfoBean.password}"
                               readonly="${readyOnlyType}"/>
                </td>
            </tr>
            <tr>
                <td nowrap><bean:message key="label.study.empinfo.confirmpassword"/></td>
                <td nowrap>
                	<html:password property="confirmPassword" value="${empInfoBean.password}" readonly="${readyOnlyType}"></html:password>
                </td>
                                
                <td nowrap><bean:message key="label.study.empinfo.tel"/></td>
                <td nowrap>
                    <html:text property="empInfoBean.tel" value="${empInfoBean.tel}" readonly="${readyOnlyType}"/>
                </td>
            </tr>
            <tr>
                <td nowrap><bean:message key="label.study.empinfo.email"/></td>
                <td nowrap>
                    <html:text property="empInfoBean.email" value="${empInfoBean.email}" readonly="${readyOnlyType}"/>
                </td>
                <td nowrap><bean:message key="label.study.empinfo.status"/></td>
                <td nowrap>
                    <c:choose>
                        <c:when test="${ !empty empInfoBean.status }">
                            <code:dispCode codeType="EMP_STATUS" codeValue="${empInfoBean.status}"/>
                        </c:when>
                        <c:otherwise>
                        	<html:select property="empInfoBean.status">
                            <code:dispCode codeType="EMP_STATUS" codeValue=""/>
                            </html:select>
                        </c:otherwise>
                    </c:choose>
                </td>
            </tr>
            <tr>
                <td nowrap><bean:message key="label.study.empinfo.deptname"/></td>
                <td nowrap>
                	<html:select property="empInfoBean.demoDeptInfo.id" value="${empInfoBean.demoDeptInfo.id}">
                        <html:option value=""><bean:message key="label.common.pleaseSelect"/></html:option>
                        <c:forEach items="${deptlist}" var="dept">
                            <html:option value="${dept.id}"><c:out value="${dept.name}"/></html:option>
                        </c:forEach>
                    </html:select>                                                        	                    
                </td>
                <td nowrap>&nbsp;</td>
                <td nowrap>
                    &nbsp;
                </td>
            </tr>
            
            <tr>
                <td colspan="4" nowrap></td>
            </tr>
        </table>
    </td>
</tr>

<tr>
    <td></td>
    <td>
        <table border="0" cellspacing="0" cellpadding="0" align="left">
            <tr>
                <td width="8" class="ButtonHOMEL-msover"></td>
                <td class="ButtonHOME-msover">
                    <c:if test="${readyOnlyType=='false'}">
                        <c:choose>
                            <c:when test="${empty employeeBean.id}">
                                <a href="#" name="hrefSave" class="hrefColor" onclick="saveEmployee()">
                                    <bean:message key="button.save"/>
                                </a>
                            </c:when>
                            <c:otherwise>
                                <a href="#" name="hrefSave" class="hrefColor" onclick="saveEmployee()">
                                    <bean:message key="button.save"/>
                                </a>
                            </c:otherwise>
                        </c:choose>
                    </c:if>
                    <c:if test="${readyOnlyType=='true'}">
                        <a href="#" class="hrefColor" onclick="activeEmployee()">
                            <bean:message key="button.active"/>
                        </a>
                    </c:if>
                </td>
                <td width="8" class="ButtonHOMER-msover"></td>
                <td width="10"></td>
            </tr>
        </table>
        
    </td>
</tr>
</table>
</div>
</html:form>


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -