📄 worktipwrite.jsp
字号:
<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.Calendar" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>
<%@ page import="cn.com.aheadsoft.util.StringFormat"%>
<%@ page import="java.io.FileInputStream"%>
<%@ page import="cn.com.aheadsoft.util.Configuration"%>
<%@ page import="cn.com.aheadsoft.util.ObjectID" %>
<%@ page import="cn.com.aheadsoft.recordset.DetailRecordSet" %>
<%
DetailRecordSet detailRs=new DetailRecordSet();
detailRs=(DetailRecordSet)request.getAttribute("DetailRecordSet");
String tipDate=(String)request.getAttribute("dateString");
if(null==tipDate){
tipDate=request.getParameter("dateString");
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" href="/krm/jsp/css/css_Inform.css">
<title>分发提示</title>
<script src="/krm/jsp/jscript/Calendar.js"></script>
<script>
<!--
function checkOK(){
if(document.form1.user.value.length<1 ){
alert("请选择责任人!");
return false;
}
if(document.form1.memo.value.length<1){
alert("请填写提示内容!");
document.form1.memo.focus();
return false;
}
if(document.form1.type.value==0){
alert("请选择提示类别!");
document.form1.type.focus();
return false;
}
if((document.form1.type.value==1)&&(document.form1.task.value==0)){
alert("请选择所属任务!");
document.form1.task.focus();
return false;
}
return true;
}
function openWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
function openWin(url) {
window.open(url,'','toolbar=no,location=no,menubar=no,resizable=1,scrollbars=yes,left=100,top=100,width=600,height=400');
}
function popup(){
show_calendar('form1.otherdate');
return true;
}
function list(){
var date=document.form1.otherdate.value;
location.href='/krm/servlet/WorkTipServlet?status=otherdate&otherdate=' + date;
return true;
}
-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="F1F7F9">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="F1F7F9">
<tr height="8">
<td></td>
</tr>
<tr>
<td align="center" bgcolor="F1F7F9">
<fieldset style="width:95%; text-align:center">
<legend><img src="/krm/jsp/diamanage/image/dia_gztsfa.gif" ></legend>
<form action="/krm/servlet/WorkTipServlet" method="post" name="form1" onsubmit="return checkOK()">
<input type="hidden" name="date" value="<%=tipDate%>" >
<table border="1" width="95%" align="center" height="30%" bordercolor="A1B7DB" class="collapse">
<tr >
<td class="common" align="right" colspan="6">
提示日期:<input type="text" class="middle" name="otherdate" value="<%=tipDate%>" >
<a href="javascript:show_calendar('form1.otherdate');"><image src="/krm/jsp/image/selectdate.gif" border="0"></a>
<a href="#" onClick="return list();" ><image src="/krm/jsp/diamanage/image/open.gif" border="0"></a>
</td>
</tr>
<tr bgcolor="3366CC">
<td class="common" colspan="9" align="center"><font color="ffffff">
工作提示分发</font></td>
</tr>
<tr height="25">
<td width="15%" class="common" bgcolor="#F1F7F9" align="left" > 陈董备忘</td>
<td valign="top" class="common" bgcolor="#F1F7F9" colspan="3">
<textarea rows="5" cols="70" style="overflow:auto" name="Diary_Memo" ><%
/*Calendar calendar1=Calendar.getInstance();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
Date nowDate = new Date(calendar1.getTimeInMillis());
String tipDate = formatter.format(nowDate);*/
String chenMemo=null;
Configuration cfg = Configuration.getInstance();
String path = cfg.getValue("SYS.DIAMEMOPATH");
java.io.File f1=new java.io.File(path + System.getProperty("file.separator") + tipDate);
if(f1.exists()){
//response.sendRedirect("/krm/jsp/util/info.jsp?msg=1000");
//return;
//}
FileInputStream is = new FileInputStream(path + System.getProperty("file.separator") + tipDate);
byte[] a=new byte[is.available()];
is.read(a);
is.close();
chenMemo = new String(a);
chenMemo.trim();
out.println(new String(chenMemo.getBytes("gb2312"),"iso_8859_1"));
}else{
chenMemo="陈董今天没有工作备忘,您可以手工在提示内容框中输入!";
out.println(chenMemo);
}
%>
</textarea>
</td>
</tr>
<tr height="25">
<td width="15%" class="common" bgcolor="#F1F7F9" align="left" > 责任人</td>
<td class="common" colspan="3"> <input type="text" class="long" readonly="true" name="user" alt="责任人" >
<a href="javascript:openWindow('/krm/servlet/UserSelectServlet?src1=form1.userid&src2=form1.user','selectuser','width=500,height=300')"><image src="/krm/jsp/image/selectperson.gif" border="0"></a></td>
<input type="hidden" name="userid" alt="责任人" value="">
</tr>
<tr height="25">
<td width="15%" class="common" bgcolor="#F1F7F9" align="left" > 提示内容</td>
<td valign="top" class="common" bgcolor="#F1F7F9" colspan="3">
<textarea rows="3" style="overflow:auto" cols="70" name="memo" alt="提示内容"></textarea>
</td>
</tr>
<tr height="25">
<td width="15%" class="common" bgcolor="#F1F7F9" align="left" > 类别
</td>
<td class="common" bgcolor="#F1F7F9">
<select name="type" class="common">
<option value="0">--请选择--</option>
<option value="1">现有任务</option>
<option value="2">其他工作</option>
<option value="3">陈董思想</option>
<option value="4">主要信息</option>
<option value="5">新增任务</option>
</select>
</td>
<td width="15%" class="common" bgcolor="#F1F7F9" align="left" > 所属任务</td>
<td class="common" > <select name="task" class="common">
<option value="0">--请选择--</option>
<%
if((null!=detailRs)&&(detailRs.size()>0)){
while(detailRs.next()){
%>
<option value="<%= detailRs.getD_Serial()%>-<%=StringFormat.Source2GB(detailRs.getD_Topic())%>"><%= StringFormat.Source2GB(detailRs.getD_Num()) %>-<%= StringFormat.Source2GB(detailRs.getD_Topic()) %></option>
<%
}
}
%>
</select>
</td>
</tr>
<tr height="25">
<td align="center" colspan="4"><input type="Image" src="/krm/jsp/image/send.gif" border="0">
<a href="/krm/servlet/WorkTipServlet?status=month" ><img src="/krm/jsp/image/back.gif" border="0"></a>
</td>
</tr>
<input type="Hidden" name="status" value="i">
</table>
</form>
</fieldset>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -