📄 dealorder.jsp~2~
字号:
<%@ 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" %>
<html>
<head>
<link rel="STYLESHEET" type="text/css" href="css/shared.css">
<title>
listsalary
</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 addsalary()
{
document.salaryActionForm.operation.value = "add";
document.salaryActionForm.submit();
}
function deletesalary()
{
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.salaryActionForm.deleteUID.value = selectedTr.childNodes(0).children(1).value;
document.salaryActionForm.operation.value="delete";
salaryRows.removeChild(selectedTr);
selectedTr = null;
document.salaryActionForm.submit();
}else
{
salaryRows.removeChild(selectedTr);
selectedTr = null;
}
}
}
function savesalary()
{
document.salaryActionForm.operation.value = "save";
document.salaryActionForm.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="salaryAction.do">
<html:hidden name="salaryActionForm" property="deleteUID" />
<html:hidden name="salaryActionForm" 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="salaryRows" onclick="onClickedCell()">
<logic:iterate name="salaryActionForm" property="salarys" id="salarys">
<tr class="tdsectionbar">
<td class="tdbg0" >
<html:text indexed="true" name="salarys" property="month" />
<html:hidden indexed="true" name="salarys" property="salaryuid" />
</td>
<td class="tdbg0" >
<html:select indexed="true" name="salarys" property="employeeuid" >
<html:optionsCollection name="salaryActionForm" property="employees" value="employeePairUID" label="employeePairName" />
</html:select>
</td>
<td class="tdbg0" >
<html:text indexed="true" name="salarys" property="monthsalary" />
</td>
<td class="tdbg0">
<html:text indexed="true" name="salarys" property="allowance" />
</td>
<td class="tdbg0" >
<html:text indexed="true" name="salarys" property="unworkdays" />
</td>
<td class="tdbg0" >
<html:text indexed="true" name="salarys" property="additiondays" />
</td>
<td class="tdbg0" >
<html:text indexed="true" name="salarys" property="formoblie" />
</td>
<td class="tdbg0" >
<html:text indexed="true" name="salarys" 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 + -