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

📄 bl.jsp~25~

📁 本文件中还有JSP、php和delphi等源程序
💻 JSP~25~
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ page import="com.hr.vo.Employee"%>
<html>
<head>
 <link rel="STYLESHEET" type="text/css" href="css/shared.css">
<title>
bl
</title>
<script language="javascript">
var selectedTr = null;
function setTrColor(colorTr,color)
{
 if(colorTr.tagName=="TR")
 {
  for(var i=0;i<colorTr.childNodes.length;i++)
  {
   colorTr.childNodes(i).style.backgroundColor = color;
   colorTr.childNodes(i).children(0).style.backgroundColor = color;
  }
 }
}
function addbl()
{
     document.bookBLActionForm.operation.value = "add";
     document.bookBLActionForm.submit();
}
function deletebl()
{

     if(selectedTr!=null)
    {   alert(selectedTr.childNodes(0).children(1).value);
	if(selectedTr.childNodes(0).children(1).value!=0&&selectedTr.childNodes(0).children(1).value!=null)
        {
		document.bookBLActionForm.deleteUID.value = selectedTr.childNodes(0).children(1).value;
		document.bookBLActionForm.operation.value="delete";
		blRows.removeChild(selectedTr);
       		selectedTr = null;
       		document.bookBLActionForm.submit();
        }else
	{
		blRows.removeChild(selectedTr);
		selectedTr = null;
	}
    }
}
function savebl()
{

 	document.bookBLActionForm.operation.value = "save";
	document.bookBLActionForm.submit();
}
function onClickedCell()
{
 var clickedcell = event.srcElement;
 if(selectedTr!=null)
{
  setTrColor(selectedTr,"#FFFFFF");
}
 while(clickedcell.tagName!="TR")
 {
   clickedcell = clickedcell.parentElement;
 }
 selectedTr = clickedcell;
 setTrColor(selectedTr,"#FFDDFF");
}
</script>
</head>
<body bgcolor="#ffffff" >
<h3 align="center">
员工薪资信息
</h3>
<br>
<hr height=1 />
<html:form method="post" action="bLAction.do">
<html:hidden name="bookBLActionForm" property="deleteUID" />
<html:hidden name="bookBLActionForm" property="operation"/>
<table width="100%">
<tr>
<td class="tdframe">
<table class="table1"  width="100%">
<thead class="tdsectionbar">
<td align="center" class="tdsectionbar" >月份</td>
<td align="center" class="tdsectionbar" >员工</td>
<td align="center" class="tdsectionbar" >每月工资(元)</td>
<td align="center" class="tdsectionbar" >奖金(元)</td>
<td align="center" class="tdsectionbar" >请假(天)</td>
<td align="center" class="tdsectionbar" >加班(天)</td>
<td align="center" class="tdsectionbar" >电话补助(元)</td>
<td align="center" class="tdsectionbar" >车补(元)</td>
</thead>
<tbody id="blRows" onclick="onClickedCell()">
<logic:iterate name="bookBLActionForm" property="bookbls" id="bookbls">
<tr class="tdsectionbar">
<td class="tdbg0" >
<html:select  indexed="true" name="bookbls" property="bookuid" >
<html:optionsCollection name="bookBLActionForm" property="books" value="typeUID" label="typeName" />
</html:select>
</td>
<td class="tdbg0" >
<html:select  indexed="true" name="bookbls" property="readeruid" >
<html:optionsCollection name="bookBLActionForm" property="readers" value="typeUID" label="typeName" />
</html:select>
</td>
<td class="tdbg0" >
<html:text indexed="true" name="bookbls" property="bookuid" />
<html:hidden indexed="true" name="bookbls" property="salaryuid" />
</td>
<td class="tdbg0" >
<html:select  indexed="true" name="bookbls" property="employeeuid" >
<html:optionsCollection name="bookBLActionForm" property="employees" value="employeePairUID" label="employeePairName" />
</html:select>
</td>
<td class="tdbg0" >
<html:text indexed="true" name="bookbls" property="monthsalary" />
</td>
<td class="tdbg0">
<html:text indexed="true" name="bookbls" property="allowance" />
</td>
<td class="tdbg0" >
<html:text indexed="true" name="bookbls" property="unworkdays" />
</td>
<td class="tdbg0" >
<html:text indexed="true" name="bookbls" property="additiondays" />
</td>
<td class="tdbg0" >
<html:text indexed="true" name="bookbls" property="formoblie" />
</td>
<td class="tdbg0" >
<html:text indexed="true" name="bookbls" property="forbus" />
</td>
</tr>
</logic:iterate>
</tbody>
</table>
</td>
</tr>
</table>
</html:form>
<br><br>
<input type="button" value="添加记录" class="button" onclick="addsalary();"/>
<input type="button" value="删除记录" class="button" onclick="deletesalary();"/>
<input type="button" value="保存记录" class="button" onclick="savesalary();"/>
<hr height=1 />
</body>
</html>

⌨️ 快捷键说明

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