📄 standards_update.jsp
字号:
<%@ page language="java" pageEncoding="GBK"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<base href="http://localhost:8080/accp_hr/">
<title>薪酬标准更改页面</title>
<script type="text/javascript" src="js/DateTime2.js"></script>
<script src="js/formcheck/jquery_last.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="css/validator2.css"></link>
<script src="js/formcheck/formValidator.js" type="text/javascript" ></script>
<script src="js/formcheck/formValidatorRegex.js" type="text/javascript"></script>
<script language="javascript" src="js/formcheck/DateTimeMask.js" type="text/javascript"></script>
<style type="text/css">
.texts{
background-color: transparent;
border-style: none;
}
</style>
</head>
<body bgcolor="#DADEDD" style="background-image: url('images/accphr/main.jpg');background-attachment :fixed ;">
<center>薪酬标准更改</center>
<br>
<html:form action="standards" styleId="form1">
<input type="hidden" name="ops" value="doUpdate" >
<input type="hidden" name="standards.ssdId" value="${standardsForm.standards.ssdId}" >
<table align="center" border="0" width="100%">
<tr>
<td><input type="button" value="返回" onclick="location.href='standards.do?ops=toList'" ></td>
</tr>
<tr>
<td>
<table border="1" cellspacing="0" align="center" width="98%" bordercolor="black" style="font-size: 12px">
<tr>
<th width="15%">薪酬标准单编号</th>
<td width="35%"><html:text property="standards.standardId" readonly="true" styleClass="texts" /> </td>
<td rowspan="7" colspan="2">
<table border="1" width="100%" height="100%" cellspacing="0" align="center" bordercolor="black" style="font-size: 12px">
<logic:iterate id="item" name="sublist" indexId="i">
<tr>
<th>${item.itemName }</th>
<td width="75%">
<input type="text" name="subs" value="${item.salary }" id="ones${i }" onblur="jisuan('one${i }');" size="10" >
<span id="one${i }" style="width:150px"></span>
</td>
</tr>
</logic:iterate>
</table>
</td>
</tr>
<tr>
<th>制定者名字 </th>
<td><html:text property="standards.designer" styleId="name2" readonly="true" styleClass="texts" /> <span id="name2Tip" style="width:100px"></span></td>
</tr>
<tr>
<th>登记人</th>
<td><html:text property="standards.register" styleId="name3" readonly="true" styleClass="texts" /> <span id="name3Tip" style="width:100px"></span></td>
</tr>
<tr>
<th>登记时间</th>
<td><input type="text" name="rtimes" value="${standardsForm.standards.registTime}" class="texts" readonly="readonly" ></td>
</tr>
<tr>
<th>薪酬标准单名称</th>
<td><html:text property="standards.standardName" styleId="name1" /> <span id="name1Tip" style="width:100px"></span></td>
</tr>
<tr>
<th>薪酬总额</th>
<td><html:text property="standards.salarySum" readonly="true" styleId="amounts" /> </td>
</tr>
<tr>
<th>备注</th>
<td><html:textarea property="standards.remark" rows="3" /></td>
</tr>
<tr>
<td colspan="2" align="center">复核信息</td>
<td colspan="2" align="center">更改信息</td>
</tr>
<tr>
<th>复核人</th>
<td>${standardsForm.standards.checker} </td>
<th>更改人</th>
<td>
<html:text property="standards.changer" readonly="true" value="${loginuser.uname}" styleClass="texts"></html:text>
</td>
</tr>
<tr>
<th>复核时间</th>
<td>${standardsForm.standards.checkTime } </td>
<th>更改时间</th>
<td>
<input type="text" name="times" id="currentTime" readonly="readonly" class="texts">
</td>
</tr>
<tr>
<th>是否经过复核</th>
<td colspan="3">
<html:radio property="standards.checkStatus" value="0" disabled="true" />未复核
<html:radio property="standards.checkStatus" value="1" disabled="true" />通过
<html:radio property="standards.checkStatus" value="2" disabled="true" />未通过
</td>
</tr>
<tr>
<th>复核意见</th>
<td colspan="3">${standardsForm.standards.checkComment} </td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center"><html:submit value="提交" onclick="return tijiao;" /> <html:reset value="重置" /> </td>
</tr>
</table>
</html:form>
</body>
</html>
<script type="text/javascript">
$(document).ready(function(){
$.formValidator.initConfig({formid:"form1",onerror:function(msg){alert(msg)}});
//验证登记人不能为空
$("#name1").formValidator({onshow:"请输入名称",onfocus:"名称不能为空",oncorrect:"通过"}).
inputValidator({min:1,empty:{leftempty:false,rightempty:false,
emptyerror:"两边不能有空符号"},onerror:"名称不能为空"});
});
//验证薪酬金额
function jisuan(){
var my_array = new Array();
var sums=0;
var my_array=document.getElementsByName("subs");
for(var i=0;i<my_array.length;i++){
if(isNaN(my_array[i].value))
{
document.getElementById("one"+i).innerHTML="请输入正确的金额!";
document.getElementById("ones"+i).focus();
return false;
}
if(!isNaN(my_array[i].value)){
if(parseFloat(my_array[i].value)>=0){
document.getElementById("one"+i).innerHTML="";
sums+=parseFloat(my_array[i].value);
}
else{
document.getElementById("one"+i).innerHTML="请输入正确的金额!";
document.getElementById("ones"+i).focus();
return false;
}
}
}
document.getElementById("amounts").value=sums;
}
function tijiao(){
return jisuan();
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -