You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

225 lines
7.0 KiB

<%@page import="com.zky.para.Para"%>
<%@include file="/auth.jsp"%>
<%@page import="java.util.Date"%>
<%@page language="java" pageEncoding="utf-8" %>
<jsp:useBean id="getPara" scope="application" class="com.zky.para.SyncPara"/>
<%
String sj= Common.convertNull(request.getParameter("sj"));
String qj= Common.convertNull(request.getParameter("qj"));
%>
<html>
<head>
<title>涉密人员管理</title>
<link href="../../css/font.css" rel="stylesheet" type="text/css">
<script src="../../js/date.js"></script>
<script src="../../js/check.js"></script>
<style type="text/css">
.qj{disabled:disabled; }
</style>
<script>
function setValue() {
<%
if (!Common.isNull(qj)) {
out.println("form1.qj.value='" + qj + "';");
}
if (!Common.isNull(sj)) {
out.println("form1.sj.value='" + sj + "';");
}
%>
}
function check(operate) {
form1.operate.value = operate;
if (form1.sj.value == "") {
alert("请选择地市!");
form1.sj.focus();
return false;
}
var typemenu=document.getElementById("sj");
var val=typemenu.value;
if(val==0930){
}else{
if (form1.qj.value == "") {
alert("请选择所属区县!");
form1.qj.focus();
return false;
}
}
if (form1.departtypeid.value == "") {
alert("请选择单位类型!");
form1.departtypeid.focus();
return false;
}
if (form1.departname.value == "") {
alert("请选择输入单位名称!");
form1.departname.focus();
return false;
}
if (form1.departaddr.value == "") {
alert("请输入单位地址!");
form1.departaddr.focus();
return false;
}
if (form1.departlvlid.value == "") {
alert("请选择单位级别!");
form1.departlvlid.focus();
return false;
}
if(operate=="addDept")
{
form1.action="/servlet/DeptManage?operate=addDept";
}
return true;
onClick1();
onClick2();
onClick3();
form1.button1.disabled=true;
form1.button2.disabled=true;
form1.submit();
}
function onClick1(){
var empid=document.getElementById("departphone").value.trim();
var reg=/^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/;
if(!reg.test(empid)){
alert("电话格式错误或长度错误!");
}
}
function onClick2(){
var empid=document.getElementById("post_code").value.trim();
var reg=/[1-9]\d{5}(?!\d)/ ;
if(!reg.test(empid)){
alert("邮编格式不正确!");
}
}
function onClick3(){
var empid=document.getElementById("net_address").value.trim();
var reg=/^(http:\/\/)?(www.)?(\w+\.)+\w{2,4}(\/)?$/;
if(!reg.test(empid)){
alert("网址格式错误!");
}
}
function selectChange(i)
{
form1.action = "/manage/DeptEdit.jsp";
form1.submit();
}
</script>
<style type="text/css">
html { overflow-x:hidden; overflow-y:hidden; }
.aselect{
width: 155px;
}
</style>
</head>
<body onload="setValue();">
<form name="form1" method="post" action="/servlet/EmpManage">
<input type="hidden" name="operate" value=""/>
<input type="hidden" name="submitbtn" value=""/>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" class="box">
<tr>
<td valign="top"><table width="100%" height="23" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="25%" background="/images/tab_search_01.jpg"><table width="80%" height="23" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="3%"><img src="/images/little_red.jpg" width="12" height="12"></td>
<td width="97%" class="font12b">&nbsp部门管理</td>
</tr>
</table></td>
<td width="82%" background="/images/tab_search_03.jpg"><img src="/images/tab_search_02.jpg" width="12" height="23"></td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="d8e9fe" class="table02">
<tr bgcolor="#FFFFFF">
<td class="cell1" style="line-height: 30px; " width="100px;">所属地市</td>
<td class="cell2">
<select class='aselect' name="sj" setValue="<%=sj%>" onChange="selectChange(1);" >
<%=Para.getSj(getPara)%>
</select><font color="#ff0000">*</font>
</td>
<td class="cell1">所属区县</td>
<td class="cell2">
<select class='aselect' name="qj" id="qj" <%if(sj.equals("0930")){ %> disabled="disabled" <%} %> setValue="<%=qj%>" onChange="selectChange(1);">
<%=Para.getQj(getPara,sj)%>
</select><font color="#ff0000">*</font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="cell1" style="line-height: 30px;">单位类型</td>
<td class="cell2">
<select class='aselect' name="departtypeid" >
<option>---选择单位类型---</option>
<option value="涉密单位">涉密单位</option>
<option value="资质单位">资质单位</option>
</select><font color="#ff0000">*</font>
</td>
<td class="cell1">单位名称</td>
<td class="cell2">
<input type="text" name="departname" onblur="checklength(this,40);" onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')" maxlength="25"><font color="#ff0000">*</font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="cell1">单位级别</td>
<td class="cell2">
<select class='aselect' name="departlvlid" >
<option>---选择单位类型---</option>
<option value="省级">省级</option>
<option value="市级">市级</option>
<option value="区县">区县</option>
</select><font color="#ff0000">*</font>
</td>
<td class="cell1" style="line-height: 30px;">下属单位</td>
<td class="cell2">
<input type="text" name="paet" >
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="cell1" style="line-height: 30px;">单位地址</td>
<td class="cell2">
<input type="text" name="departaddr" onblur="checklength(this,128);" maxlength="25"><font color="#ff0000">*</font>
</td>
<td class="cell1" style="line-height: 30px;">单位电话</td>
<td class="cell2">
<input type="text" name="departphone" onblur="onClick1()" maxlength="12">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="cell1" style="line-height: 35px;">单位负责人</td>
<td class="cell2">
<input type="text" name="departrepname" maxlength="10">
</td>
<td class="cell1">单位邮编</td>
<td class="cell2">
<input type="text" name="post_code" onblur="onClick2()" maxlength="6" >
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="cell1" style="line-height: 30px;">单位网址</td>
<td class="cell2" colspan="3">
<input type="text" onblur="onClick3()" name="net_address" >
</td>
</tr>
</table>
<br>
<table width="99%" align="center">
<tr align="center">
<td><input border="0" type="image" src="../../images1/bc1.png" alt="保存" onclick="return check('addDept');"/>&nbsp;&nbsp;
<a href="javascript:history.go(-1)"><img src="../../images1/fh.png" alt="返回" border="0" /></a>
<!--<input border="0" type="image" src="../../images1/fh.png" alt="返回" onclick="javascript:history.go(-1)"/> -->
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>