📄 workplan_edit.jsp
字号:
<input name="users" id="users" type="hidden" value="<%=users%>">
<input class="SmallButton" title="添加收件人" onClick="openWinUsers()" type="button" value="添 加" name="button">
<input class="SmallButton" title="清空收件人" onClick="form1.users.value='';form1.userRealNames.value=''" type="button" value="清 空" name="button"></td>
</tr>
<tr>
<td class="TableContent" noWrap>负责人:</td>
<td class="TableData">
<%
if(StrUtil.getNullStr(wpd.getPrincipal()).equals("")){
principalRealNames = "";
}else{
String[] principalArray = wpd.getPrincipal().split(",");
if(principalArray == null){
UserDb ud = new UserDb();
ud = ud.getUserDb(principal);
principalRealNames = ud.getRealName();
}else{
len = principalArray.length;
for (int i=0; i<len; i++) {
if(principal.equals("")){
principal = principalArray[i];
UserDb ud = new UserDb();
ud = ud.getUserDb(principalArray[i]);
principalRealNames = ud.getRealName();
}else{
principal += "," + principalArray[i] ;
UserDb ud = new UserDb();
ud = ud.getUserDb(principalArray[i]);
principalRealNames += "," + ud.getRealName();
}
}
}
}
%>
<textarea name="principalRealNames" cols="45" rows="3" readOnly wrap="virtual" id="principalRealNames"><%=principalRealNames%></textarea>
<input name="principal" type="hidden" id="principal" value="<%=principal%>">
<input class="SmallButton" title="添加收件人" onClick="openWinPrincipal()" type="button" value="添 加" name="button">
<input class="SmallButton" title="清空收件人" onClick="form1.principal.value='';form1.principalRealNames.value=''" type="button" value="清 空" name="button"></td>
</tr>
<tr>
<td class="TableContent" noWrap>附件上传:</td>
<td class="TableData"><input title="选择附件文件" type="file" size="30" name="attachment"></td>
</tr>
<tr>
<td class="TableContent" noWrap>备注:</td>
<td class="TableData"><textarea name="remark" cols="45" rows="3" wrap="yes" id="remark"><%=wpd.getRemark()%></textarea></td>
</tr>
<tr>
<td class="TableData" noWrap>提醒:</td>
<td class="TableData"><input id="smsRemind" type="checkbox" CHECKED name="isMessageRemind" value="true">
<label for="SMS_REMIND">使用内部短信提醒用户
<%
if (com.redmoon.oa.sms.SMSFactory.isUseSMS()) {
%>
<input name="isToMobile" value="true" type="checkbox" checked />
短讯提醒
<%}%>
</label></td>
</tr>
<tr class="TableControl" align="middle">
<td colSpan="2" align="left" noWrap>
附件:
<%
java.util.Iterator attir = wpd.getAttachments().iterator();
while (attir.hasNext()) {
Attachment att = (Attachment)attir.next();
%>
<li><img src="../images/attach.gif" width="17" height="17"> <a target="_blank" href="workplan_getfile.jsp?workPlanId=<%=wpd.getId()%>&attachId=<%=att.getId()%>"><%=att.getName()%></a> <a href="workplan_do.jsp?op=delattach&workPlanId=<%=wpd.getId()%>&attachId=<%=att.getId()%>">删除</a></li>
<%}%>
</td>
</tr>
<tr class="TableControl" align="middle">
<td colSpan="2" align="center" noWrap><input name="submit" type="submit" value=" 提 交 ">
<input name="button" type="reset" value=" 重 填 ">
</td>
</tr>
</tbody>
</form>
</table>
<%
JobUnitDb ju = new JobUnitDb();
int jobId = ju.getJobId("com.redmoon.oa.job.WorkplanJob", "" + id);
if (jobId!=-1) {
ju = (JobUnitDb)ju.getQObjectDb(new Integer(jobId));
%>
<table width="81%" border="0" align="center" class="main">
<form name="form2" action="workplan_do.jsp?op=editJob" method="post" onsubmit="return form2_onsubmit()">
<tr>
<td align="left"><strong>调度计划 <a href="workplan_do.jsp?op=delJob&id=<%=ju.get("id")%>&planId=<%=id%>">删除</a></strong></td>
</tr>
<tr>
<td align="left"><input name="job_class" type="hidden" value="com.redmoon.oa.job.WorkplanJob">
<input name="map_data" type="hidden" value="<%=id%>">
名称:
<input name="job_name" value="<%=ju.getString("job_name")%>">
每月:
<input name="month_day" size="2" value="<%=ju.getString("month_day")%>">
号</td>
</tr>
<tr>
<td align="left"> 开始时间
<%
String cron = ju.getString("cron");
String[] ary = cron.split(" ");
if (ary[0].length()==1)
ary[0] = "0" + ary[0];
if (ary[1].length()==1)
ary[1] = "0" + ary[1];
if (ary[2].length()==1)
ary[2] = "0" + ary[2];
String t = ary[2] + ":" + ary[1] + ":" + ary[0];
%>
<input style="WIDTH: 50px" name="time" size="20" value="<%=t%>">
<img style="CURSOR: hand" onclick="SelectDateTime('time')" src="../images/form/clock.gif" align="absMiddle" width="18" height="18"> 在
<input name="weekDay" type="checkbox" value="1">
星期日
<input name="weekDay" type="checkbox" value="2">
星期一
<input name="weekDay" type="checkbox" value="3">
星期二
<input name="weekDay" type="checkbox" value="4">
星期三
<input name="weekDay" type="checkbox" value="5">
星期四
<input name="weekDay" type="checkbox" value="6">
星期五
<input name="weekDay" type="checkbox" value="7">
星期六
<input name="submit3" type="submit" value=" 确 定 ">
<input name="planId" type="hidden" value="<%=id%>">
<input name="id" type="hidden" value="<%=ju.getInt("id")%>">
<input name="cron" type="hidden">
<input name="data_map" type="hidden">
<input name="user_name" value="<%=privilege.getUser(request)%>" type="hidden">
<%
String[] w = ary[5].split(",");
for (int i=0; i<w.length; i++) {
%>
<script>
setCheckboxChecked("weekDay", "<%=w[i]%>");
</script>
<%
}
%>
</td>
</tr>
</form>
</table>
<%}
else {
%>
<table class="main" width="600" border="0" align="center">
<form name="form2" action="workplan_do.jsp?op=addJob" method="post" onsubmit="return form2_onsubmit()">
<tr>
<td align="left"><strong>调度计划</strong></td>
</tr>
<tr>
<td align="left"><input name="job_class" type="hidden" value="com.redmoon.oa.job.WorkplanJob">
每月:
<input name="month_day" size="2">
号<input name="job_name" type="hidden" value="<%=wpd.getTitle()%>"></td>
</tr>
<tr>
<td align="left"> 开始时间
<input style="WIDTH: 50px" value="12:00:00" name="time" size="20">
<img style="CURSOR: hand" onClick="SelectDateTime('time')" src="../images/form/clock.gif" align="absMiddle" width="18" height="18"> 在
<input name="weekDay" type="checkbox" value="1">
星期日
<input name="weekDay" type="checkbox" value="2">
星期一
<input name="weekDay" type="checkbox" value="3">
星期二
<input name="weekDay" type="checkbox" value="4">
星期三
<input name="weekDay" type="checkbox" value="5">
星期四
<input name="weekDay" type="checkbox" value="6">
星期五
<input name="weekDay" type="checkbox" value="7">
星期六
<input name="submit2" type="submit" value=" 确 定 ">
<input name="id" type="hidden" value="<%=id%>">
<input name="cron" type="hidden">
<input name="data_map" type="hidden">
<input name="user_name" value="<%=privilege.getUser(request)%>" type="hidden"></td>
</tr>
</form>
</table>
<%}%>
</body>
<script>
function getDept() {
return form1.depts.value;
}
function SelectDateTime(objName) {
var dt = showModalDialog("../util/calendar/time.htm", "" ,"dialogWidth:266px;dialogHeight:125px;status:no;help:no;");
if (dt!=null)
findObj(objName).value = dt;
}
function form2_onsubmit() {
var t = form2.time.value;
var ary = t.split(":");
var weekDay = getCheckboxValue("weekDay");
var dayOfMonth = form2.month_day.value;
if (weekDay=="" && dayOfMonth=="") {
alert("请填写每月几号或者星期几!");
return false;
}
if (weekDay=="")
weekDay = "?";
if (ary[2].indexOf("0")==0 && ary[2].length>1)
ary[2] = ary[2].substring(1, ary[2].length);
if (ary[1].indexOf("0")==0 && ary[1].length>1)
ary[1] = ary[1].substring(1, ary[1].length);
if (ary[0].indexOf("0")==0 && ary[0].length>1)
ary[0] = ary[0].substring(1, ary[0].length);
if (dayOfMonth=="")
dayOfMonth = "?";
var cron = ary[2] + " " + ary[1] + " " + ary[0] + " " + dayOfMonth + " * " + weekDay;
form2.cron.value = cron;
form2.data_map.value = "<%=id%>";
}
function trimOptionText(strValue)
{
// 注意option中有全角的空格,所以不直接用trim
var r = strValue.replace(/^ *|\s*|\s*$/g,"");
return r;
}
</script>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -