📄 employee_insurance_index.jsp
字号:
<%
/**
* $RCSfile: employee_insurance_index.jsp,v $
* $Revision: 1.0 $
* $Date: 2001/05/17 20:57:46 $
* /mainctrl/intranet/hr/insurance_component_list
*/
%>
<%@ page errorPage="/vnex/ErrorPage.jsp" %>
<%@ page import="com.vnex.intranet.hr.employer_info.value.*"%>
<%@ page import="com.vnex.intranet.hr.employer_info.process.*"%>
<%@ page import="com.vnex.intranet.hr.util.*"%>
<%@ page import="java.util.*" %>
<jsp:useBean id="salaryProxyBean" class="com.vnex.intranet.hr.employer_info.proxy.SalaryProxyBean" scope="application" />
<%
Collection pageColl = new ArrayList();
SalaryComponent sc = new SalaryComponent();
SalaryComponent scFind = new SalaryComponent();
boolean doFind = false;
if ( request.getParameter("doAdd") != null )
{
String name = request.getParameter("name");
sc.setName( name );
sc.setType( MemberDbTable.INSURANCE_TYPE );
if ( request.getParameter("state") != null && request.getParameter("state").equals("1") )
sc.setState(MemberDbTable.COMPONENT_USE);
else
sc.setState(MemberDbTable.COMPONENT_UNUSE);
if ( request.getParameter("calcType") != null && request.getParameter("calcType").equals("1") )
sc.setCalcType(MemberDbTable.INCREASE_TYPE);
else
sc.setCalcType(MemberDbTable.DECREASE_TYPE);
sc.setCalcNum( Float.parseFloat( request.getParameter("calcNum")) );
sc.setDescription( request.getParameter("description") );
salaryProxyBean.comCreate( sc );
}
if ( request.getParameter("doModify") != null )
{
int id = Integer.parseInt( request.getParameter("id") );
sc.setId( id );
String name = request.getParameter("name");
sc.setName( name );
sc.setType( MemberDbTable.INSURANCE_TYPE );
if ( request.getParameter("state") != null && request.getParameter("state").equals("1") )
sc.setState(MemberDbTable.COMPONENT_USE);
else
sc.setState(MemberDbTable.COMPONENT_UNUSE);
if ( request.getParameter("calcType") != null && request.getParameter("calcType").equals("1") )
sc.setCalcType(MemberDbTable.INCREASE_TYPE);
else
sc.setCalcType(MemberDbTable.DECREASE_TYPE);
sc.setCalcNum( Float.parseFloat( request.getParameter("calcNum")) );
sc.setDescription( request.getParameter("description") );
salaryProxyBean.comStore( sc );
}
if ( request.getParameter("doFind") != null )
{
int id = Integer.parseInt( request.getParameter("id") );
scFind = salaryProxyBean.comFind( id );
doFind = true;
}
if ( request.getParameter("doRemove") != null && request.getParameterValues("delId") != null)
{
String[] idA = request.getParameterValues("delId");
for ( int i=0; i<idA.length; i++ )
{
salaryProxyBean.comRemove( Integer.parseInt(idA[i]) );
}
}
if ( request.getParameter("doCreateAll") != null )
{
salaryProxyBean.salaryCreateAllSalary( MemberDbTable.INSURANCE_TYPE );
}
pageColl = salaryProxyBean.comFindAll( MemberDbTable.INSURANCE_TYPE );
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<jsp:include page="/vnex/page/FORM_HEAD.jsp" />
<script language=JavaScript>
function submitAdd()
{
if ( !checkdata() )
{
return false;
}
form1.action= "/mainctrl/intranet/hr/insurance_component_list?doAdd=1";
form1.submit();
}
function submitRemove()
{
form1.action= "/mainctrl/intranet/hr/insurance_component_list?doRemove=1";
form1.submit();
}
function submitCreateAll()
{
if ( confirm("你确认要生成所有的职员的保险设置吗?\n此项操作将会耗费比较长的时间!") )
{
form1.action= "/mainctrl/intranet/hr/insurance_component_list?doCreateAll=1";
form1.submit();
}
else return false;
}
function submitModify()
{
if ( !checkdata() )
{
return false;
}
form1.action= "/mainctrl/intranet/hr/insurance_component_list?doModify=1";
form1.submit();
}
</script>
<script Language="JavaScript" src="/vnex/validate.js"></script>
<script language=JavaScript>
function checkdata()
{
if ( form1.name.value.length < 1 )
{
alert("\你必须输入名称!");
return false;
}
if ( isWhitespace(form1.name.value) )
{
alert("\你输入的名称不能为空格!");
return false;
}
if ( form1.calcNum.value.length < 1 )
{
alert("\你必须输入计算规则!");
return false;
}
if ( form1.description.value.length < 1 )
{
alert("\你必须描述内容!");
return false;
}
if ( isWhitespace(form1.description.value) )
{
alert("\你输入的描述内容不能为空格!");
return false;
}
if ( !isFloat( form1.calcNum.value ) )
{
alert("\你必须在计算规则中输入小数!");
return false;
}
if ( form1.calcNum.value <0 || form1.calcNum.value >100 )
{
alert("\你在计算规则中输入小数必须(0<x<100)!");
return false;
}
return true;
}
</script>
<BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff
topMargin=0 leftmargin="0" marginwidth="0" marginheight="0">
<script language="JavaScript" src="/vnex/menu/menu.js">
/*
Static Top Menu Script
By ChunyiYang
*/
</script>
<script language="JavaScript" src="/vnex/menu/menucontext.js"></script>
<script language="JavaScript">
showToolbar();
</script>
<script language="JavaScript">
function UpdateIt(){
if (document.all){
document.all["MainTable"].style.top = document.body.scrollTop;
setTimeout("UpdateIt()", 200);
}
}
UpdateIt();
</script>
<DIV align=center>
<form name="form1" method="post" action="">
<TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
<TBODY>
<jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
<TR>
<TD colSpan=3 align="center">
<br>
<br>
<br>
<br>
<table width="500" border="0">
<tr>
<td align="center"><font class=strong>保险管理 </font></td>
</tr>
</table>
<span class=iframestyle
style="OVERFLOW: visible; HEIGHT: 100%">
<table class=title cellspacing=1 cellpadding=2 width="450" border=0>
<tr>
<td width="10%" align="center"><font class=strong>选择</font></td>
<td align="center" width="21%"><font class=strong>保险名称<br>
</font></td>
<td align="center" width="25%"><font class=strong>计算规则 <br>
</font></td>
<td align="center" width="15%"><font class=strong>类型</font></td>
<td align="center" colspan="2" width="33%"><font class=strong>状态</font></td>
</tr>
<%
Iterator iter = pageColl.iterator();
while ( iter.hasNext() )
{
sc = (SalaryComponent)iter.next();
%>
<tr>
<td bgcolor="#e0e0e0" width="10%" align="center">
<input type="checkbox" name="delId" value="<%= sc.getId() %>">
</td>
<td bgcolor="#e0e0e0" width="21%" align="center"><a href="/mainctrl/intranet/hr/insurance_component_list?doFind=1&id=<%= sc.getId() %>"><%= sc.getName() %></a><br>
</td>
<td bgcolor="#e0e0e0" align="center" width="25%">工资*<%= sc.getCalcNum() %>%<br>
</td>
<td bgcolor="#e0e0e0" align="center" width="15%"><% if ( sc.getCalcType() == MemberDbTable.DECREASE_TYPE ) out.print("减项"); else out.print("增项"); %></td>
<td bgcolor="#e0e0e0" colspan="2" width="33%" align="center"><% if ( sc.getState() == MemberDbTable.COMPONENT_USE ) out.print("正在使用"); else out.print("暂停使用"); %></td>
</tr>
<%
}
%>
</table>
</span><br>
<br>
<input type="button" value="删除" name="B1" class=button onclick="return submitRemove()">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="3"><img src="/vnex/hr_asp/a.gif" width="1" height="1"></td>
</tr>
<tr>
<td background="/vnex/MacOS/hr.gif"><img src="/vnex/MacOS/hr.gif" width="1" height="2"></td>
</tr>
<tr>
<td height="3"><img src="/vnex/hr_asp/a.gif" width="1" height="1"></td>
</tr>
</table>
<br><span class=iframestyle
style="OVERFLOW: visible; HEIGHT: 100%">
<table class=title cellspacing=1 cellpadding=2 width="450" border=0>
<tr>
<td bgcolor="#e0e0e0" align="center" width="19%"><font class=strong>保险名称:</font><br>
</td>
<td bgcolor="#e0e0e0" colspan="2" width="53%">
<input type="text" name="name" class=text size="24" maxlength="10" value=<%= scFind.getName() %>>
</td>
</tr>
<tr>
<td bgcolor="#fafafa" align="center" width="19%"><font class=strong>计算规则:</font><br>
</td>
<td bgcolor="#fafafa" colspan="2" width="53%">
<input type="text" name="calcNum" class=text size="24" value=<%= scFind.getCalcNum() %>>(0..100)
</td>
</tr>
<tr>
<td bgcolor="#fafafa" align="center" width="28%"><font class=strong>类型:</font></td>
<td bgcolor="#fafafa" colspan="2" width="72%">
<%
if ( scFind.getCalcType() == MemberDbTable.DECREASE_TYPE )
{
%>
<input type="radio" name="calcType" value="1">
增项
<input type="radio" name="calcType" value="-1" checked>
减项 </td>
<%
}
else
{
%>
<input type="radio" name="calcType" value="1" checked>
增项
<input type="radio" name="calcType" value="-1">
减项 </td>
<%
}
%>
</tr>
<tr>
<td bgcolor="#e0e0e0" width="28%" align="center"><font class=strong>状态:</font></td>
<td bgcolor="#e0e0e0" colspan="2" width="72%">
<input type="checkbox" name="state" value="1"<% if ( scFind.getState() == MemberDbTable.COMPONENT_USE ) out.print("checked"); %>>
正在使用</td>
</tr>
<tr>
<td bgcolor="#e0e0e0" width="19%" align="center"><font class=strong>保险说明:</font><br>
</td>
<td bgcolor="#e0e0e0" colspan="2" width="53%">
<input type="text" name="description" class=text size="40" maxlength="30" value=<%= scFind.getDescription() %> >
</td>
</tr>
</table>
</span> <br><br>
<input type="button" value="增加" name="B32" class=button onclick="return submitAdd()">
<%
if ( doFind )
{
%>
<input type="button" value="修改" name="B3" class=button onclick="return submitModify()">
<%
}
%>
<input type="hidden" value="<%= sc.getId() %>" name="id" class=button>
<input type="reset" value="取消" name="B32" class=button>
<input type="button" value="全部职员生成" name="B32" class=button onclick="return submitCreateAll()">
<br><br>
<jsp:include page="/vnex/page/TTOA_HELP.jsp" />
</TD>
</TR>
<jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
</TBODY>
</TABLE>
<BR>
<jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
</form></DIV>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -