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

📄 edit.jsp

📁 会议流程管理系统
💻 JSP
字号:
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*,java.text.*,java.sql.*,oa.main.DealString"%>
<jsp:useBean id="pb" class="oa.main.ParentBean" scope="page"/>
<jsp:useBean id="psbean" class="oa.bean.PersonBean" scope="page"/>


<%
DealString ds = new DealString();
oa.bean.SysmanBean mySysBean = null;
	String uid = (String)session.getAttribute("zgbh");		
	if(uid==null)
	{
		response.sendRedirect("../../session_oa.htm");
		return;
	}

//增加或修改的动作标志
String action = ds.toString((String)request.getParameter("action"));
String title = "发布通知";
if(action.equals("mod")) title = "修改会议通知";
if(action.equals("add")) title = "发布会议通知";

String cur = ds.toString((String)request.getParameter("cur"));

//修改时的编号
String id = ds.toString((String)request.getParameter("id"));

if(action.equals("mod"))
{
	//增加判断是有人查看,如果有人查看则不能修改,提示出错
	String sqlcheck ="select ID from HG2_MEET_NOTICEMEN where NOTICEID="+id+" and ISREAD = 1";
	Vector vectcheck = pb.getDataBySql(sqlcheck);
	//表示已经有人阅读,提示出错
	if(vectcheck.size()>0){
		%>
			<br>
			<br>
			在此页面停留时间过长,已经有人阅读此会议,不能修改,请<a href="list.jsp">返回</a>
			<hr>
		<%out.close();
	}
}
try{
	String []str = new String[13];
	if(action!=null && action.equals("mod"))
	{
	// 设置查询的 SQL 语句
		String sql = "select * from HG2_MEET_NOTICE where id="+id;
		Vector vect = new Vector();
/*		ResultSet rs = null;
		rs = pb.selectRecord(sql);
		if(rs.next())
		{
			str[0] = ds.toString(rs.getString("TITLE"));
			str[1] = ds.toString(rs.getString("KEYWORD"));
			str[2] = ds.toString(rs.getString("LEVEL1"));
			str[3] = ds.toString(rs.getString("TIME"));
			str[4] = ds.toString(rs.getString("TIMESTART"));
			str[5] = ds.toString(rs.getString("TIMEEND"));
			//str[6] = ds.toString(rs.getString(""));
			//str[7] = ds.toString(rs.getString(""));
		}
*/
        vect = pb.getDataBySql(sql);
		str[0] = (String)((Hashtable)vect.get(0)).get("TITLE");
		str[1] = (String)((Hashtable)vect.get(0)).get("KEYWORD");
		str[2] = (String)((Hashtable)vect.get(0)).get("LEVEL1");
		str[3] = (String)((Hashtable)vect.get(0)).get("TIME");
		str[4] = (String)((Hashtable)vect.get(0)).get("TIMESTART");
		str[5] = (String)((Hashtable)vect.get(0)).get("TIMEEND");
		str[6] = "";
		str[7] = "";
		str[8] = (String)((Hashtable)vect.get(0)).get("WORD");

		str[9] = ds.toString((String)((Hashtable)vect.get(0)).get("OLDORGID"));//附件原名
		str[10] = ds.toString((String)((Hashtable)vect.get(0)).get("ORGID"));//附件

		str[11] = ds.toString((String)((Hashtable)vect.get(0)).get("CURSIZE"));//当前附件大小
		str[12] = ds.toString((String)((Hashtable)vect.get(0)).get("STRSIZE"));//每个文件大小

		String zgbh = "";
		String zgxm = "";
		sql = "select RECEIVER from HG2_MEET_NOTICEMEN where NOTICEID="+id;
        vect = pb.getDataBySql(sql);
		for(int j=0;j<vect.size();j++)
		{
			zgbh = (String)((Hashtable)vect.get(j)).get("RECEIVER");//职工编号
			zgxm = psbean.getZgName(zgbh);//职工姓名
			if(!str[6].equals("")){
				str[6] =str[6]+";"+zgbh;
			}
			else{
				str[6] = zgbh;
			}
			if(!str[7].equals("")){
				str[7] =str[7]+";"+zgxm;
			}
			else{
				str[7] = zgxm;
			}
		}
	}
	else
	{
	    for(int i=0;i<11;i++)
		{
            str[i]="";
	    }
		str[3] = ds.getDateTime();
	}
	str[6] = str[6].replaceAll(";",",");
	str[7] = str[7].replaceAll(";",",");

	str[11] = "0";
%>


<%
	//初始化总大小
	mySysBean = new oa.bean.SysmanBean();
	if(mySysBean.getConn()==null)
	{

		%>		
		数据库无法响应,请<a href="javascript:window.history.back(-1);">返回</a>重试  
		<%
			out.close();
	}
	mySysBean.setType(1);
	mySysBean.setID("1");
	mySysBean.setDictname("发表文章附件大小");
	Hashtable hash = (Hashtable)mySysBean.getOneData();
	String str_size = (String)hash.get("XMMC");
	str_size = str_size.substring(0,str_size.length()-2);
	int sumsize = Integer.parseInt(str_size)*1024*1024;
	//mySysBean.closeConn();
	
	//初始化年月
	String upmonth = ds.getDateTime().substring(0,10);
	
	//新建目录
	String saveDirectory = oa.main.ParentBean.FilesPath+"meet\\";
	java.io.File f = new java.io.File(saveDirectory+upmonth.substring(0,4));
	if(!f.exists())
	{
		f.mkdir();
	}
	f = new java.io.File(saveDirectory+upmonth.substring(0,4)+"\\"+upmonth.substring(5,7));
	if(!f.exists())
	{
		f.mkdir();
	}

	f = new java.io.File(saveDirectory+upmonth.substring(0,4)+"\\"+upmonth.substring(5,7)+"\\"+upmonth.substring(8,10));
	if(!f.exists())
	{
		f.mkdir();
	}

	//初始化大小
	String strsize = "" ;
	int cursize = 0 ;
	String[] t_strfile = str[10].split(",");
	for ( int i = 0 ; i < t_strfile.length ; i++ )
	{
		if(!t_strfile[i].equals(""))
		{
			if(!str[12].equals(""))str[12] += ",";
			str[12] += "0"; 
		}
	}
	if(str[11].equals("")) str[11] = "0" ;

%>

<HTML>
<head><title>会议通知</title>
<link href="../../css/person.css" type=text/css rel=stylesheet>
<script language="javascript" src="../scripts/department.js"></script>
<script src="Popup.js"></script>
</head>
<BODY leftMargin=0 topMargin=0 >
<br>&nbsp;&nbsp;&nbsp;<font color="#505050" size=2>当前位置:会议管理>><a href="list.jsp">会议通知</a></font>

<div align=center>
<font color="#666666" size=3><b><%=title%><b></font>
</div>
<br>
<form name=form1 action="action.jsp?action=<%=action%>&id=<%=id%>&cur=<%=cur%>" method=post>

<input type=hidden name=strfile value="<%=str[9]%>">
<input type=hidden name=strname value="<%=str[10]%>">
<input type=hidden name=strsize value="<%=str[12]%>">
<input type=hidden name=cursize value="<%=str[11]%>">
<input type=hidden name=sumsize value="<%=sumsize%>">
<input type=hidden name=upmonth value="<%=upmonth%>">

<table border="1" width="95%" align=center cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#A5BEE0" >
    <tr bgcolor="#E0E0E0" height=25>
      <td width="15%" align=right>通知标题:</td>
      <td width="85%" >&nbsp;<input type="text" name="txt_title" maxlength=80 size="50" class=text value="<%=str[0]%>" style="color: #000000; background-color: #FFFFFF;font-family:宋体; font-size: 12px;BORDER-RIGHT: 1px solid #A5BEE0; BORDER-TOP: 1px solid #A5BEE0; BORDER-LEFT: 1px solid #A5BEE0; BORDER-BOTTOM: 1px solid #A5BEE0"></td>
    </tr>
    <tr bgcolor="#ffffff" height=25>
      <td width="15%" align=right>通知内容:</td>
      <td width="85%" >&nbsp;<textarea name="txt_wordno" class="text" cols="100" rows="5" ><%=str[8]%></textarea>
	  </td>
    </tr>
	<tr bgcolor="#E0E0E0" height=25>
      <td width="15%" align=right>关键字:</td>
      <td width="85%" >&nbsp;<input type="text" name="txt_kw" maxlength=80 size="50" class=text value="<%=str[1]%>" style="color: #000000; background-color: #FFFFFF;font-family:宋体; font-size: 12px;BORDER-RIGHT: 1px solid #A5BEE0; BORDER-TOP: 1px solid #A5BEE0; BORDER-LEFT: 1px solid #A5BEE0; BORDER-BOTTOM: 1px solid #A5BEE0"></td>
    </tr>
	<tr bgcolor="#E0E0E0" height=25>
		<td  width="15%" align=right>附件:</td>
		<td width="85%">&nbsp;<input type=text name="OLDORGID" value="<%=str[9]%>" size=50 readonly style="color: #000000; background-color: #FFFFFF;font-family:宋体; font-size: 12px;BORDER-RIGHT: 1px solid #A5BEE0; BORDER-TOP: 1px solid #A5BEE0; BORDER-LEFT: 1px solid #A5BEE0; BORDER-BOTTOM: 1px solid #A5BEE0">&nbsp;<input type=button value="编辑附件" onclick="upload('1');"><input type=hidden name="ORGID" value="<%=str[10]%>">
		 </td>
	</tr>
<%if(false){%>
    <tr bgcolor="#ffffff" height=25>
      <td width="15%" align=right>会议通知级别:</td>
      <td width="85%" >&nbsp;<select  name="sel_jb" style="color: #000000; background-color: #FFFFFF;font-family:宋体; font-size: 12px; BORDER-RIGHT: 1px solid #A5BEE0; BORDER-TOP: 1px solid #A5BEE0; BORDER-LEFT: 1px solid #A5BEE0; BORDER-BOTTOM: 1px solid #A5BEE0">
	  <option value=1 <%if(str[2].equals("")||str[2].equals("1")){%>selected<%}%>>一级</option>
	  <option value=2 <%if(str[2].equals("2")){%>selected<%}%>>二级</option>
	  <option value=3 <%if(str[2].equals("3")){%>selected<%}%>>三级</option>
	  </select></td>
    </tr>
	
<%}%>
<input type="hidden" name="sel_jb" value="1">
    <tr bgcolor="#ffffff" height=25>
      <td width="15%" align=right>发送给:</td>
      <td width="85%" >&nbsp;<input type="text" name="txt_receivername" maxlength=80 size="50" class=text value="<%=str[7]%>" style="color: #000000; background-color: #FFFFFF;font-family:宋体; font-size: 12px;BORDER-RIGHT: 1px solid #A5BEE0; BORDER-TOP: 1px solid #A5BEE0; BORDER-LEFT: 1px solid #A5BEE0; BORDER-BOTTOM: 1px solid #A5BEE0" readonly><input type="hidden" name="txt_receiverZGBH" maxlength=80 size="50" class=text value="<%=str[6]%>" style="color: #000000; background-color: #FFFFFF;font-family:宋体; font-size: 12px;BORDER-RIGHT: 1px solid #A5BEE0; BORDER-TOP: 1px solid #A5BEE0; BORDER-LEFT: 1px solid #A5BEE0; BORDER-BOTTOM: 1px solid #A5BEE0">&nbsp;<input type="hidden" value="" name="txt_receiver" class=txtframe><input type="button" value="从组织机构" onclick="openWns('../../organization/departBrower.jsp?ZGBHs='+document.all.txt_receiverZGBH.value,'选择人员')">
	</td>
    </tr>

<%if(false){%>
    <tr bgcolor="#E0E0E0" height=25 style="visible:hidden">
      <td width="15%" align=right>发布时间:</td>
      <td width="85%" >&nbsp;<input type="text" name="addtime" maxlength=20 size="20" class=text value="<%=str[3]%>" style="color: #000000; background-color: #FFFFFF;font-family:宋体; font-size: 12px;BORDER-RIGHT: 1px solid #A5BEE0; BORDER-TOP: 1px solid #A5BEE0; BORDER-LEFT: 1px solid #A5BEE0; BORDER-BOTTOM: 1px solid #A5BEE0" readonly><a href="#" title="点击修改预警时间" onClick="fPopUpDlg('calendar.htm',document.all.addtime,'winpop',172,230);return false;">
	   <img src="../../images/DATETIME.GIF" border=0></td>
    </tr>
<%}%>
    <input type="hidden" name="addtime" maxlength=20 size="20" class=text value="<%=str[3]%>">
    <tr bgcolor="#E0E0E0" height=25>
      <td width="15%" align=right>会议开始时间:</td>
      <td width="85%" >&nbsp;<input type="text" name="starttime" maxlength=20 size="20" class=text value="<%=str[4]%>" style="color: #000000; background-color: #FFFFFF;font-family:宋体; font-size: 12px;BORDER-RIGHT: 1px solid #A5BEE0; BORDER-TOP: 1px solid #A5BEE0; BORDER-LEFT: 1px solid #A5BEE0; BORDER-BOTTOM: 1px solid #A5BEE0" readonly><a href="#" title="点击修改预警时间" onClick="fPopUpDlg('calendar.htm',document.all.starttime,'winpop',172,230);return false;">
	   <img src="../../images/DATETIME.GIF" border=0></td>
    </tr>
    <tr bgcolor="#ffffff" height=25>
      <td width="15%" align=right>会议结束时间:</td>
      <td width="85%" >&nbsp;<input type="text" name="endtime" maxlength=20 size="20" class=text value="<%=str[5]%>" style="color: #000000; background-color: #FFFFFF;font-family:宋体; font-size: 12px;BORDER-RIGHT: 1px solid #A5BEE0; BORDER-TOP: 1px solid #A5BEE0; BORDER-LEFT: 1px solid #A5BEE0; BORDER-BOTTOM: 1px solid #A5BEE0" readonly><a href="#" title="点击修改预警时间" onClick="fPopUpDlg('calendar.htm',document.all.endtime,'winpop',172,230);return false;">
	   <img src="../../images/DATETIME.GIF" border=0></td>
    </tr>

    <tr bgcolor="#E0E0E0" height=25>
      <td colspan=2 align=center><input type="button"  value="提交" name="baocun" onclick="toact1()" style="background-color: #ffffff;cursor:hand;" style="color: #000000; background-color: #FFFFFF;font-family:宋体; font-size: 12px;BORDER-RIGHT: 1px solid #A5BEE0; BORDER-TOP: 1px solid #A5BEE0; BORDER-LEFT: 1px solid #A5BEE0; BORDER-BOTTOM: 1px solid #A5BEE0"></td>
    </tr>
</table>
</form>
</BODY>
</HTML>
<script language=javascript>
	function muban()
	{
		var windoc = "word/EditDoc.jsp?id="+document.all.txt_wordno.value;	
		var winword = window.open(windoc,"editDOC","height=500,width=750,top=0,left=0,toolbar=no,menubar=no,location=no,resizable=yes,directories=no,status=no,scrollbars=yes,dependent=no");
		winword.focus();
	}
    function toact1()
	{
		if(document.all.txt_receivername.value == "")
		{
			alert("请选择通知接收人!");
		}
		else if(document.all.txt_title.value=="")
		{
			alert("请输入通知标题!");
		}
		else
		{
			//alert("调试:"+document.all.form1.txt_receiverZGBH.value);
			document.all.form1.baocun.disabled = true;
			document.all.form1.action="action.jsp?action=<%=action%>&id=<%=id%>&receiver=<%=str[6]%>&cur=<%=cur%>";
			document.all.form1.submit();
		}
		//document.all.form1.submit();
	}
	function onButton_OK(oList){
	    var strNames="";
		var strValues="";
		var strZGBHValues="";
		var strValues1="";
		for(var i=0;i<oList.length;i++){
			strNames+=oList.options[i].text;
			strNames+=",";
			strValues1=oList.options[i].value;//zgbh+xm+gh
			
			if(strValues!="")
			    strValues+=",";
			strValues+=(strValues1.split(","))[1];
		
			strZGBHValues+=(strValues1.split(","))[0];//存储zgbh的隐藏框值
			strZGBHValues+=",";
		}
		document.all.txt_receivername.value = strValues;
		document.all.txt_receiverZGBH.value = strZGBHValues;//存储zgbh的隐藏框值
	}

	function openWns(url,name){
		var hWnd=window.open(url,name,'left=100,top=50,width=460,height=490');
		hWnd.focus();
	}

	function upload(id)
	{	
		var go = "";
		var strfile=document.all.strfile.value;
		var strname=document.all.strname.value;
		var strsize=document.all.strsize.value;
		var cursize=document.all.cursize.value;
		var sumsize=document.all.sumsize.value;
		var upmonth=document.all.upmonth.value;

		go = "upload.jsp?strfile="+ strfile +"&strname=" + strname + "&strsize="+strsize+"&cursize="+cursize+"&sumsize=" + sumsize + "&upmonth=" + upmonth + "&id=" + id;
		var oawin = window.open(go,"_blank","toolbar=0,location=0,status=1,menubar=0,scrollbars=yes,resizable=1,width=600,height=320");
		oawin.focus();
		oawin.opener=window;
	}
</script>
<%}finally{
	if(pb!=null)
		pb.closeConn();
	if(psbean!=null)
		psbean.closeConn();
	if(mySysBean!=null)
		mySysBean.closeConn();

}%>

⌨️ 快捷键说明

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