📄 organ_operate.jsp
字号:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.util.Date" %>
<%@ page language="java" import="java.util.Hashtable,java.util.ArrayList,java.util.Iterator" %>
<%@ page errorPage="/error/error.jsp" %>
<jsp:useBean id="OrganTree" class="bean.TreeCom.TreeBean" />
<HTML>
<HEAD>
<TITLE>部门详细信息</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html"; charset="gb2312">
<link href="css/style.css" rel="stylesheet" type="text/css">
<script src="js/checkdata.js" type="text/javascript"></script>
</HEAD>
<script language="JavaScript">
function OpenUserWindow(s1,s2){
var sHref="User_Info.jsp?TPage=0&TOrganID="+s1+"&TOrganName="+s2;
if (window.parent) window.parent.iframe_User_Info.location.href=sHref;
}
function CheckSubmit(){
temp=document.all("OrganName").value;
temp.replace(" ","");
if (temp=="") document.all("OrganName").value=temp;
temp=document.all("OrganAddr").value;
temp.replace(" ","");
if (temp=="") document.all("OrganAddr").value=temp;
temp=document.all("Postal").value;
temp.replace(" ","");
if (temp=="") document.all("Postal").value=temp;
temp=document.all("Telephone").value;
temp.replace(" ","");
if (temp=="") document.all("Telephone").value=temp;
temp=document.all("Fax").value;
temp.replace(" ","");
if (temp=="") document.all("Fax").value=temp;
temp=document.all("Remark").value;
temp.replace(" ","");
if (temp=="") document.all("Remark").value=temp;
if ( document.all("OrganName").value == 0 )
{
window.alert("请输入部门名称!");
document.all("OrganName").focus();
return false;
}
if (getLength(document.all("OrganName").value)>40)
{
window.alert("部门名称长度不能超过40位!");
document.all("OrganName").focus();
return false;
}
if (getLength(document.all("Postal").value)>6)
{
window.alert("邮编长度不能超过6位!");
document.all("Postal").focus();
return false;
}
if (getLength(document.all("Telephone").value)>20)
{
window.alert("电话长度不能超过20位!");
document.all("Telephone").focus();
return false;
}
if (getLength(document.all("OrganAddr").value)>40)
{
window.alert("部门地址长度不能超过40位!");
document.all("OrganAddr").focus();
return false;
}
if (getLength(document.all("Fax").value)>20)
{
window.alert("传真长度不能超过20位!");
document.all("Fax").focus();
return false;
}
if (getLength(document.all("Remark").value)>100)
{
window.alert("部门说明长度不能超过100位!");
document.all("Remark").focus();
return false;
}
document.all("TOrganName").value=document.all("OrganName").value;
document.all("TOrganAddr").value=document.all("OrganAddr").value;
document.all("TPostal").value=document.all("Postal").value;
document.all("TTelephone").value=document.all("Telephone").value;
document.all("TFax").value=document.all("Fax").value;
document.all("TRemark").value=document.all("Remark").value;
return true;
}
function ResetValue(){
document.all("OrganName").value=document.all("TOrganName").value;
document.all("OrganAddr").value=document.all("TOrganAddr").value;
document.all("Postal").value=document.all("TPostal").value;
document.all("Telephone").value=document.all("TTelephone").value;
document.all("Fax").value=document.all("TFax").value;
document.all("Remark").value=document.all("TRemark").value;
}
function ResetValue1(){
document.all("OrganName").value = "";
document.all("OrganAddr").value = "";
document.all("Postal").value = "";
document.all("Telephone").value = "";
document.all("Fax").value = "";
document.all("Remark").value = "";
}
function modOrgan(){
r=CheckSubmit();
if (r) {
ask=confirm("你确定修改该记录吗?\n\n点“确定”继续,点“取消”返回");
if (ask){
sHref = "Organ_Operate1.jsp?TAction=mod&TOrganID="+document.all("TOrganID").value
+"&TSupOrganID="+document.all("TSupOrganID").value
+"&TOrganName="+document.all("TOrganName").value
+"&TOrganAddr="+document.all("TOrganAddr").value
+"&TTelephone="+document.all("TTelephone").value
+"&TFax="+document.all("TFax").value
+"&TPostal="+document.all("TPostal").value
+"&TRemark="+document.all("TRemark").value;
window.open(sHref,"_blank", " left=0,top=0,width=2, height=2,status=no,menubar=no,location=no,resizable=no,alwaysRaised=yes,z-look=yes,depended=yes");
}
}
}
function goto_add(s1,s2){
var sHref="Organ_Operate.jsp?TAction=add&TOrganID="+s1;
window.location.href=sHref;
}
function addOrgan(){
r=CheckSubmit();
if (r) {
sHref="Organ_Operate1.jsp?TAction=add&TOrganID="+document.all("TOrganID").value
+"&TSupOrganID="+""
+"&TOrganName="+document.all("TOrganName").value
+"&TOrganAddr="+document.all("TOrganAddr").value
+"&TTelephone="+document.all("TTelephone").value
+"&TFax="+document.all("TFax").value
+"&TPostal="+document.all("TPostal").value
+"&TRemark="+document.all("TRemark").value;
window.open(sHref,"_blank","left=0,top=0,width=2, height=2,status=no,menubar=no,location=no,resizable=no,alwaysRaised=yes,z-look=yes,depended=yes");
}
}
function delOrgan(){
if (document.all("TOrganID").value==""){
window.alert("请选中要作废的部门机构!");
return false;
}
else {
ask=confirm("你确定将作废与该部门相关的一切信息吗?\n\n点“确定”继续,点“取消”返回");
if (ask){
sHref="Organ_Operate1.jsp?TAction=del&TOrganID="+document.all("TOrganID").value
+"&TSupOrganID="+document.all("TSupOrganID").value
+"&TOrganName="+document.all("TOrganName").value
+"&TOrganAddr="+document.all("TOrganAddr").value
+"&TTelephone="+document.all("TTelephone").value
+"&TFax="+document.all("TFax").value
+"&TPostal="+document.all("TPostal").value
+"&TRemark="+document.all("TRemark").value;
window.open(sHref,"_blank","left=0,top=0,width=2, height=2,status=no,menubar=no,location=no,resizable=no,alwaysRaised=yes,z-look=yes,depended=yes");
}
else return false;
}
}
</script>
<%
String sOrganID =request.getParameter("TOrganID");
String sAction =request.getParameter("TAction");
int i=0;
String sSupOrganID = "";
String sOrganName = "";
String sOrganAddr = "";
String sTelephone = "";
String sFax = "";
String sPostal = "";
String sRemark = "";
ArrayList list = OrganTree.getOrganTreeNode(sOrganID);
Iterator itr = list.iterator();
while (itr.hasNext()) {
Hashtable ht = (Hashtable) itr.next();
sOrganID = ht.get("OrganID").toString();
sSupOrganID = ht.get("SupOrganID").toString();
sOrganName = ht.get("OrganName").toString();
sOrganAddr = ht.get("OrganAddr").toString();
sTelephone = ht.get("Telephone").toString();
sFax = ht.get("Fax").toString();
sPostal = ht.get("Postal").toString();
sRemark = ht.get("Remark").toString();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -