📄 addunregdateclass.jsp
字号:
<!--侯文龙-->
<!--新建运行周期日期类型-->
<%@ page language="java" contentType="text/html; charset=GBK" %>
<%@ include file="/includes/head.jsp" %>
<HTML>
<HEAD>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="<%=fullPath%>js/style.css" type="text/css">
<script src="<%=fullPath%>js/coolWindowsCalendar.js"></script>
<script type="text/javascript" src="<%=fullPath%>js/calendar.js"></script>
<TITLE>addunregdateclass.jsp</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
<DIV id=overDiv
style="Z-INDEX: 1000; VISIBILITY: hidden; POSITION: absolute"></DIV>
<%String userId = (String) utb.nvl(sessionCtx.getValueAt("userId"), 0);
%> <!-- 获取当前操作人员编号 -->
<%
String opFlag=(String)context.getValueAt("opFlag"); //0表示是直接从左边菜单进入的,1从其它操作跳转的
%>
<script language="JavaScript" src="<%=fullPath%>js/checkData.js"></script>
<%
String timeFormat = "yyyy-MM-dd";
String date0;
String date1;
java.util.Calendar calendar = java.util.Calendar.getInstance();
java.util.Date date = calendar.getTime();
java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat(
timeFormat);
date0 = formatter.format(date);
IndexedCollection piColl = (IndexedCollection)context.getElementAt("irulelist");
int piCollSize = piColl.getSize();
String rulecode = ""; //<!-- 规则号 -->
String rulename = ""; //<!-- 规则名 -->
String describes = ""; //<!--描述 -->
String startdate = date0; // <!-- 开始时间 -->
String overdate = ""; // <!-- 开始时间 -->
String remark1 = "";
if ((opFlag.equals("0"))==false)
{
try {
rulename = (String)context.getValueAt("rulename");
rulecode = (String)context.getValueAt("rulecode");
startdate = (String)context.getValueAt("startdate");
overdate = (String)context.getValueAt("overdate");
describes = (String)context.getValueAt("describes");
remark1 = (String)context.getValueAt("remark1");
}
catch(Exception e){
rulename = "";
rulecode = "";
startdate= "";
overdate = "";
describes="";
remark1="";}}
describes= describes.replaceAll("<br>","\r\n");
remark1 = remark1.replaceAll("<br>","\r\n");
%>
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD BGCOLOR="#b2b2b2" WIDTH="1"><BR>
<BR>
<IMG SRC="<%=fullPath%>images/spacer.gif" WIDTH="1" HEIGHT="1"></TD>
<TD nowrap><BR>
<HR WIDTH="90%" SIZE="1">
<BR>
<TABLE WIDTH="90%" BORDER="0" CELLSPACING="0" CELLPADDING="0"
ALIGN="CENTER">
<TR>
<TD style='BACKGROUND-REPEAT: no-repeat' VALIGN="BOTTOM" CLASS="formtitle" HEIGHT="19"
BACKGROUND="<%=fullPath%>images/bg.jpg" width="230"> 新增运行周期日期类型</TD>
<TD VALIGN="middle" CLASS="formtitle" HEIGHT="19" width="880"> </TD>
</TR>
<TR>
<TD HEIGHT="1" VALIGN="middle" COLSPAN="2"><IMG
SRC="<%=fullPath%>images/spacer.gif" WIDTH="1" HEIGHT="1"></TD>
</TR>
<TR>
<TD HEIGHT="1" VALIGN="middle" COLSPAN="2" BGCOLOR="b2b2b2">
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1">
<TR>
<TD BGCOLOR="#FFFFFF" height="341">
<FORM name="addunregdateclass" method="post" action="<%=fullPath%><%=utb.getRequestServletUrl() %>" >
<%= utb.getRequiredHtmlFields("", "addunregdateclassOp")%>
<input type="hidden" name="opFlag" value="1">
<input type="hidden" name="opFlag1" value="1">
<input type="hidden" name="test" value=""/>
<input type="hidden" name="testY" value=""/>
<input type="hidden" name="datestr" value=""/>
<input type="hidden" name="flag" value="1"/>
<TABLE border="1" width="100%" bordercolordark=White bordercolorlight=#e3e4e3>
<TBODY>
<TR >
<TD align="right" width="83" >类型编号:</TD>
<TD align="LEFT" width="637"><input name="rulecode" type="text"
id="rulecode" value="<%=rulecode%>" size="36">
<input name="maker1" type="hidden" id="maker1" value="<%=userId%>"> </TR>
<TR>
<TD align="right" width="83" >类型名称:</TD>
<TD align="LEFT" width="637"><input name="rulename" type="text"
id="rulename" value="<%=rulename%>" size="36">
<input name="state1" type="hidden" id="state1" value="1">
</TR>
<TR>
<TD align="right" width="83" >生效日期:</td>
<TD align="LEFT" width="637">
<input name="startdate" type="text" id="startdate"
onFocus="setday(this,1)" value="<%=startdate%>" size="36" maxlength="10"></TD>
</TR>
<TR>
<TD align="right" width="83" >结束日期:</td>
<TD align="LEFT" width="637">
<input name="overdate" type="text" id="overdate"
onFocus="setday(this,1)" value="<%=overdate%>" size="36" maxlength="10"></TD>
</tr>
<tr>
<TD align="right" width="83" >日历查看:</td>
<td width="637"><input type="button" name="look" value="日历查看" onclick="javascript:ggPosX=0;ggPosY=0;show_yearly_calendar('addunregdateclass.testY');"/>
</td>
</TR>
<TR>
<TD align="right" width="83">规则描述:</TD>
<TD width="637"><TEXTAREA
rows="3" cols="52" name="describes" id="describes"><%=describes%></TEXTAREA></TD>
</TR>
<TR>
<TD align="right" width="83" > 备注:</TD>
<TD width="637"><TEXTAREA rows="3" cols="52"
name="remark1" id="remark1"><%=remark1%></TEXTAREA></TD>
</TR>
</TBODY>
</TABLE>
<TABLE width="70%" align="center" border="0" cellspacing="0" cellpadding="0" height="46">
<TR align="center">
<TD height="45" align="center">
<A href="javascript:ok()"><IMG
src="<%=fullPath%>images/button/omps1.gif" border="0"></A>
<A href="javascript:qrydate()"></A> <A
href="javascript:reset()"><IMG
src="<%=fullPath%>images/button/omps2.gif" border="0"></A>
<A href="javascript:qrydate()"></TD>
</TR>
</TABLE></FORM></TD>
</TR>
</TABLE>
</TBODY>
</TABLE>
<%if(opFlag.equals("0")){
%>
<%}else{%>
<TABLE WIDTH="90%" BORDER="0" CELLSPACING="0" CELLPADDING="0"
ALIGN="CENTER">
<TBODY>
<TR>
<TD style='BACKGROUND-REPEAT: no-repeat' VALIGN="BOTTOM" CLASS="formtitle" HEIGHT="19"
BACKGROUND="<%=fullPath%>images/bg.jpg" width="650"> 我已新增未审核类型</TD>
</TR>
<TR >
<TD >
<TABLE border="1" width="100%" align="center" bordercolordark=White bordercolorlight=#e3e4e3>
</TBODY>
<TR align="center">
<TD class="tableTop" align="center" width="11%" bgcolor=#E6E6E6><NOBR>序号</NOBR></TD>
<TD class="tableTop" align="center" width="16%" bgcolor=#E6E6E6><NOBR>类型编号</NOBR></TD>
<TD class="tableTop" align="center" width="21%" bgcolor=#E6E6E6><NOBR>类型名称</NOBR></TD>
<TD class="tableTop" align="center" width="13%" bgcolor=#E6E6E6><NOBR>起始日期</NOBR></TD>
<TD class="tableTop" align="center" width="19%" bgcolor=#E6E6E6><NOBR>结束日期</NOBR></TD>
<TD class="tableTop" align="center" width="18%" bgcolor=#E6E6E6><NOBR>删除</NOBR></TD>
</TR>
<% for (int i = 0; i < piColl.getSize(); i++) {
KeyedCollection pkColl = (KeyedCollection) piColl.getElementAt(i);
String u_ruleid = (String) utb.nvl(pkColl.getValueAt("u_ruleid"), 0);
String u_rulecode = (String) utb.nvl(pkColl.getValueAt("u_rulecode"), 0);
String u_rulename = (String) utb.nvl(pkColl.getValueAt("u_rulename"), 0);
String u_startdate = (String) utb.nvl(pkColl.getValueAt("u_startdate"), 0);
String u_overdate = (String) utb.nvl(pkColl.getValueAt("u_overdate"), 0);
%>
<TR>
<TD align="center" width="60"><%=i+1%></TD>
<TD align="center" width="143"><%=utb.nvl(u_rulecode, 1)%></TD>
<TD align="center" width="188"><%=utb.nvl(u_rulename, 1)%></A></TD>
<TD align="center" width="114"><%=utb.nvl(u_startdate, 1)%></TD>
<TD align="center" width="19%"><%=utb.nvl(u_overdate, 1)%></TD>
<TD align="center" width="18%"><a href="javascript:del('<%=u_ruleid%>')">删除</A></TD>
</TR>
<%}%>
<%}%>
</TBODY>
<script language="javascript">
function ok()
{
if(isEmpty(addunregdateclass.rulecode.value))
{
alert("类型编号不能为空");
addunregdateclass.rulecode.focus();
return;
}
if(isEmpty(addunregdateclass.rulename.value))
{
alert("规则名称不能为空");
addunregdateclass.rulename.focus();
return;
}
if(isEmpty(addunregdateclass.startdate.value))
{
alert("起始日期不能为空");
addunregdateclass.startdate.focus();
return;
}
if(isEmpty(addunregdateclass.overdate.value))
{
alert("结束日期不能为空");
addunregdateclass.overdate.focus();
return;
}
var str = "";
if(!selectedDates=="")
{for (var i = 1; i < selectedDates.length; i++) {
//str = str +"$|$"+selectedDates[i][0] + "-" + selectedDates[i][1] + "-" + selectedDates[i][2] ;
if(selectedDates[i][1]=="1"||selectedDates[i][1]=="2"||selectedDates[i][1]=="3"||selectedDates[i][1]=="4"||selectedDates[i][1]=="5"||selectedDates[i][1]=="6"||selectedDates[i][1]=="7"
||selectedDates[i][1]=="8"||selectedDates[i][1]=="9")
{selectedDates[i][1]="0"+selectedDates[i][1];}
if(selectedDates[i][2]=="1"||selectedDates[i][2]=="2"||selectedDates[i][2]=="3"||selectedDates[i][2]=="4"||selectedDates[i][2]=="5"||selectedDates[i][2]=="6"||selectedDates[i][2]=="7"
||selectedDates[i][2]=="8"||selectedDates[i][2]=="9")
{selectedDates[i][2]="0"+selectedDates[i][2];}
str= str+selectedDates[i][0] + selectedDates[i][1] + selectedDates[i][2] +"$|$" ; }
addunregdateclass.datestr.value=str;}
if(isEmpty(addunregdateclass.datestr.value))
{
if(window.confirm("执行日期为空,确认要添加吗?")!=true)
{addunregdateclass.look.focus();
return;
}
addunregdateclass.opFlag1.value="2";}
addunregdateclass.flag.value="1";
addunregdateclass.describes.value = addunregdateclass.describes.value.replace(/\r\n/ig,"<br>");
addunregdateclass.remark1.value = addunregdateclass.remark1.value.replace(/\r\n/ig,"<br>");
addunregdateclass.submit();
}
function reset()
{
addunregdateclass.reset();
selectedDates="";
}
function qrydate() {
qrydateform.submit();
}
function del(u_ruleid)
{
if(window.confirm("确认要删除选中日期规则类型吗")!=true)
{
return;
}
delruleform.ruleid.value=u_ruleid;
delruleform.submit();
}
</script>
</TABLE>
</TD></TR></TBODY></TABLE></TD></TR>
<form name="delruleform" method="post" action="<%=fullPath%><%=utb.getRequestServletUrl()%>">
<%=utb.getRequiredHtmlFields("", "delruleOp")%>
<input type="hidden" name="ruleid" value="">
</form>
<form name="qrydateform" method="post" action="<%=fullPath%><%=utb.getRequestServletUrl()%>">
<%=utb.getRequiredHtmlFields("", "addunregdateclassOp")%>
<input type="hidden" name="opFlag" value="2">
<input name="maker1" type="hidden" id="maker1" value="<%=userId%>">
<input name="state1" type="hidden" id="state1" value="1">
</form>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -