📄 edituser.jsp
字号:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; UTF-8">
<title>Y6高级销售管理平台</title>
<link href="${pageContext.request.contextPath}/css/global.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/css/layer.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/css/common_01.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath}/css/fillet_common_01.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath}/css/fillet_common_cust_01.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath}/css/cust_01.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/js/selectDateTime.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/cascadeCountry.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/cascadeIndustry.js"></script>
<script type="text/javascript">
function isNum(name,val){
if(isNaN(val)){
name.value="";
name.focus();
}
}
function changeAction(){
var systemForm = document.getElementById("systemForm");
if(check(systemForm) == true){
systemForm.action = "${pageContext.request.contextPath}/admin/user.do?method=modifyUser¶m=newAgain";
systemForm.submit();
}
}
function check(form){
if(form.userName.value.length == ""){
alert("请输入用户名");
form.userName.focus();
return false;
}
if(form.familyName.value.length == ""){
alert("请输入姓名");
form.familyName.focus();
return false;
}
if(form.positionId.value.length == ""){
alert("请输入岗位");
form.positionId.focus();
return false;
}
if(form.email.value.length == ""){
alert("请输入电子邮件");
form.email.focus();
return false;
}
if(form.email.value.length != ""){
if (form.email.value.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1){
alert("您输入的电子邮件格式无效");
form.email.value="";
form.email.focus();
return false;
}
}
if(form.phone.value.length == ""){
alert("请输入联系电话");
form.phone.focus();
return false;
}
if(form.type.value.length == ""){
alert("请输入用户类型");
form.type.focus();
return false;
}
if(window.confirm("您确定要保存吗?")){
return true;
}
return false;
}
</script>
</head>
<body>
<div class="title" >
<ul>
<li class="content" >
客户编辑:新建客户
</li>
</ul>
</div>
<br>
<form id="systemForm" action="${pageContext.request.contextPath}/admin/user.do?method=modifyUser"
method="post" onsubmit="return check(this);">
<div class="wrapper">
<div class="title1">
<ul>
<li class="content" style="font-weight: bold;color: #ffffff;">
客户编辑
</li>
<li class="submit">
<input class="userButton float_left" type="submit" name="Submit" value="保存" ${sessionScope.jspRightsControl["5"].rightsMap["502"].style } />
<input class="userButton float_left" type="button" onclick="changeAction();" name="Submit2" value="保存并新建" ${sessionScope.jspRightsControl["5"].rightsMap["502"].style } />
<input class="userButton float_left" type="button" onClick="javascript:history.go(-1);" name="Submit3" value="取消" />
</li>
</ul>
</div>
<div class="body1">
<ul>
<table width="98%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td width="50%">
<table width="100%">
<tr>
<td align="right" width="30%">登录名 </td>
<td>
${user.userName }
<input name="userName" type="hidden" value="${user.userName }">
<input name="id" type="hidden" value="${user.id }"> </td>
</tr>
</table>
</td>
<td width="50%">
<table width="100%">
<tr>
<td width="19%" align="right">姓名 </td>
<td width="81%" ><input name="familyName" value="${user.familyName }">
<font color="#ff8000"><span class="STYLE4"> *必填</span>
</font>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="1" width="50%" bgcolor="#D6E4ED"></td>
<td height="1" width="50%" bgcolor="#D6E4ED"></td>
</tr>
<tr>
<td width="50%">
<table width="100%">
<tr>
<td width="30%" align="right">密码 </td>
<td><input name="password" value="${user.password }">
<font color="#ff8000"><span class="STYLE4"> <font
color="#ff8000"><span class="STYLE4">*初始密码为12345</span>
</font><font color="#ff8000"><span class="STYLE4"></span>
</font>
</td>
</tr>
</table>
</td>
<td width="50%" >
<table width="100%">
<tr>
<td width="19%" align="right">岗位 </td>
<td width="81%" >
<select name="positionId">
<logic:notEmpty name="positions">
<logic:iterate id="position" name="positions">
<option value="${position.id }"
<c:if test="${user.position==position.positionName }">selected</c:if>>
${position.positionName}
</option>
</logic:iterate>
</logic:notEmpty>
</select>
<font color="#ff8000"><span class="STYLE4">*</span> </font><font
color="#ff8000"><span class="STYLE4">必选</span> </font> 是否部门领导
<input type="radio" value="1" name="isDeptLead"
<c:if test="${useruser=='1' }"> checked="checked"</c:if>>
是
<input type="radio" value="2" name="isDeptLead"
<c:if test="${useruser=='2' }"> checked="checked"</c:if>>
否
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="1" width="50%" bgcolor="#D6E4ED"></td>
<td height="1" width="50%" bgcolor="#D6E4ED"></td>
</tr>
<tr>
<td width="50%">
<table width="100%">
<tr>
<td width="30%" align="right">电子邮件 </td>
<td>
<input name="email" value="${user.email }">
<font color="#ff8000"><span class="STYLE4"> *必填</span>
</font>
</td>
</tr>
</table>
</td>
<td width="50%" >
<table width="100%">
<tr>
<td width="20%" align="right">电话 </td>
<td width="80%" >
<input name="phone" value="${user.phone }">
<font color="#ff8000"><span class="STYLE4">*</span>
</font><font color="#ff8000"><span class="STYLE4">必填</span>
</font>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="1" width="50%" bgcolor="#D6E4ED"></td>
<td height="1" width="50%" bgcolor="#D6E4ED"></td>
</tr>
<tr>
<td width="50%">
<table width="100%">
<tr>
<td width="30%" align="right">类型 </td>
<td>
<select name="type">
<option value="">
请选择
</option>
<option value="1"
<c:if test="${user.type=='1' }">selected</c:if>>
管理员
</option>
<option value="2"
<c:if test="${user.type=='2' }">selected</c:if>>
普通用户
</option>
</select>
<font color="#ff8000"><span class="STYLE4">*</span>
</font><font color="#ff8000"><span class="STYLE4">必选</span>
</font>
</td>
</tr>
</table>
</td>
<td width="50%" >
<table width="100%">
<tr>
<td width="20%" align="right"> </td>
<td width="80%" >
</td>
</tr>
</table>
</td>
</tr>
</table>
</ul>
<ul class="title">
<li>
<table width="98%" border="0" cellspacing="0" cellpadding="0" height="27" align="center">
<tr>
<td width="27"> </td>
<td width="338"></td>
<td width="688" ><input class="userButton float_left" type="submit" name="Submit" value="保存" ${sessionScope.jspRightsControl["5"].rightsMap["502"].style } />
<input class="userButton" type="button float_left" onClick="changeAction();" name="Submit2" value="保存并新建" ${sessionScope.jspRightsControl["5"].rightsMap["502"].style } />
<input class="userButton" type="button float_left" onClick="javascript:history.go(-1);" name="Submit3" value="取消" />
</td>
</tr>
</table>
</li>
</ul>
</div>
<b class="rb"> <b class="rb5"></b> <b class="rb4"></b> <b
class="rb3"></b> <b class="rb2"></b> <b class="rb1"></b> </b>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -