| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260 |
- <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@include file="/context/mytags.jsp"%>
- <!DOCTYPE html>
- <html>
- <head>
- <title>公积金策略表</title>
- <t:base type="jquery,easyui,tools,DatePicker"></t:base>
- <script src="plug-in/layer/layer.js"></script>
- <script>
- function btn_ok(){
- var id = $("#id").val();
- var providentFundName = $("#providentFundName").val();
- if(providentFundName != ''){
- $.ajax({
- url:"providentFundStrategyController.do?isCorrection",
- data:{providentFundName:providentFundName,id:id},
- dataType:"json",
- type:"POST",
- success:function(result){
- if(result.success){
- $("#btnsub").click();
- }else{
- layer.alert(result.msg);
- }
- }
- });
- }else{
- $("#btnsub").click();
- }
- }
- function callback(data){
-
-
- if(data.success){
- layer.alert(data.msg,{ icon: 0 , closeBtn: 0 }, function(index){
- window.location.href="providentFundStrategyController.do?list"
- layer.close(index);
- });
- }
- else{
- layer.alert(data.msg);
- }
- }
-
- //复制的字符处理问题
- $("textarea[maxlength]").blur(function(){
- var area=$(this);
- var max=parseInt(area.attr("maxlength"),10); //获取maxlength的值
- if(max>0){
- if(area.val().length>max){ //textarea的文本长度大于maxlength
- area.val(area.val().substr(0,max)); //截断textarea的文本重新赋值
- }
- }
- });
-
- function num1(obj){
- obj.value = obj.value.replace(/[^\d.]/g,""); //清除"数字"和"."以外的字符
- obj.value = obj.value.replace(/^\./g,""); //验证第一个字符是数字
- obj.value = obj.value.replace(/\.{2,}/g,"."); //只保留第一个, 清除多余的
- obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
- obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3'); //只能输入两个小数
- }
-
- function num(obj){
- obj.value = obj.value.replace(/[^\d.]/g,""); //清除"数字"和"."以外的字符
- obj.value = obj.value.replace(/^\./g,""); //验证第一个字符是数字
- obj.value = obj.value.replace(/\.{1,}/g,"."); //只保留第一个, 清除多余的
- obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
- if(obj.value > 100){
- var s = obj.value;
- obj.value = s.replace(s,(s+'').substring(0,2));
- }
- obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d).*$/,'$1$2.$3'); //只能输入两个小数
- }
-
- function onpay(id){
- if(id == 1){
- var basePay = $("#basePay").val();
- if(basePay != '' && basePay == 0){
- layer.alert("缴费基数不可为0");
- $("#basePay").val("");
- }
- }else if(id == 2){
- var companyRatio = $("#companyRatio").val();
- if(companyRatio != '' && companyRatio == 0){
- layer.alert("单位缴费比例不可为0");
- $("#companyRatio").val("");
- }
- }else if(id == 3){
- var personalRatio = $("#personalRatio").val();
- if(personalRatio != '' && personalRatio == 0){
- layer.alert("个人缴费比例不可为0");
- $("#personalRatio").val("");
- }
- }
- }
- </script>
- <script type="text/javascript">
- //编写自定义JS代码
- function cal(){
- window.location.href="providentFundStrategyController.do?list";
- }
- </script>
- <style type="text/css">
- .fixed-h{
- float:left;
- width:100%;
- min-height:630px;
- overflow:auto;
- background:#ffffff;
- }
- </style>
- </head>
- <body>
- <t:formvalid formid="formobj" tipSweep="true" dialog="false" usePlugin="password" layout="table" action="providentFundStrategyController.do?doUpdate" tiptype="1" callback="callback">
- <input id="id" name="id" type="hidden" value="${providentFundStrategyPage.id }"/>
- <div class="fixed-h">
- <table style="width: 100%;" cellpadding="0" cellspacing="1" class="formtable">
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>
- 公积金策略名称:
- </label>
- </td>
- <td class="value">
- <input type="text" name="providentFundName" id="providentFundName" value='${providentFundStrategyPage.providentFundName}' datatype="s1-20" errormsg="公积金策略名称非法" nullmsg="请填写公积金策略名称!" class="Validform_error">
- <span class="Validform_checktip Validform_wrong" style="display: none;">请填写公积金策略名称!</span>
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>
- 缴费基数:
- </label>
- </td>
- <td class="value">
- <input id="basePay" name="basePay" type="text" style="width: 150px" onkeyup="num1(this)" onBlur="onpay(1)" maxlength="8" datatype="d" errormsg="缴费基数非法" nullmsg="请填写缴费基数!" value='${providentFundStrategyPage.basePay}'/> 元
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">缴费基数</label>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>
- 单位缴费比例:
- </label>
- </td>
- <td class="value">
- <input id="companyRatio" name="companyRatio" type="text" onkeyup="num(this)" onBlur="onpay(2)" style="width: 35px" datatype="d" nullmsg="请填写单位缴费比例!" errormsg="单位缴费比例非法" value='${providentFundStrategyPage.companyRatio}'/> %
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">个人缴费比例</label>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>
- 个人缴费比例:
- </label>
- </td>
- <td class="value">
- <input id="personalRatio" name="personalRatio" type="text" onkeyup="num(this)" onBlur="onpay(3)" style="width: 35px" datatype="d" nullmsg="请填写个人缴费比例!" errormsg="个人缴费比例非法" value='${providentFundStrategyPage.personalRatio}'/> %
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">个人缴费比例</label>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>
- 适用开始时间:
- </label>
- </td>
- <td class="value">
- <input id="startTime" name="startTime" type="text" style="width: 150px" nullmsg="适用开始时间不可为空!" class="Wdate" onclick="WdatePicker({maxDate:'#F{$dp.$D(\'endTime\',{d:-1})}'})" datatype="date" nullmsg="适用开始时间不可为空!" value='<fmt:formatDate value='${providentFundStrategyPage.startTime}' type="date" pattern="yyyy-MM-dd"/>' readonly="readonly"/>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">适用开始时间</label>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>
- 适用结束时间:
- </label>
- </td>
- <td class="value">
- <input id="endTime" name="endTime" type="text" style="width: 150px" nullmsg="适用结束时间不可为空!" class="Wdate" onclick="WdatePicker({minDate:'#F{$dp.$D(\'startTime\',{d:1})}'})" datatype="date" nullmsg="适用结束时间不可为空!" value='<fmt:formatDate value='${providentFundStrategyPage.endTime}' type="date" pattern="yyyy-MM-dd"/>' readonly="readonly"/>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">适用结束时间</label>
- </td>
- </tr>
- <!-- <tr>
- <td align="right">
- <label class="Validform_label">
- 适用结束时间:
- </label>
- </td>
- <td class="value">
-
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">适用结束时间</label>
- </td>
- </tr> -->
- <tr>
- <td align="right">
- <label class="Validform_label">
- 备注:
- </label>
- </td>
- <td class="value">
- <textarea rows="4" cols="51" maxlength="200" name="remark" id="remark" placeholder="请输入备注(最多输入文字数200)">${providentFundStrategyPage.remark}</textarea>
- <%-- <input id="remark" name="remark" type="text" style="width: 150px" ignore="ignore" value='${providentFundStrategyPage.remark}'/> --%>
- <label class="Validform_label" style="display: none;">备注</label>
- </td>
- </tr>
- <%-- <tr>
- <td align="right">
- <label class="Validform_label">
- 状态:
- </label>
- </td>
- <td class="value">
- <t:dictSelect field="status" type="list" typeGroupCode="isused" datatype="*" defaultVal="${providentFundStrategyPage.status}" hasLabel="false" title="状态"></t:dictSelect>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">状态</label>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- 逻辑删除标识:
- </label>
- </td>
- <td class="value">
- <t:dictSelect field="deleteFlag" type="radio" typeGroupCode="del_flag" datatype="*" defaultVal="${providentFundStrategyPage.deleteFlag}" hasLabel="false" title="逻辑删除标识"></t:dictSelect>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">逻辑删除标识</label>
- </td>
- </tr> --%>
- <tr>
- <td height="100px" align="center" colspan="2">
- </td>
- </tr>
- <tr>
- <td height="50px" align="center" colspan="2" >
- <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-confirm" onclick="btn_ok()">确定</a>
- <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
- <a style="margin-left:0px" href="#" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-return" onclick="cal();">返回</a>
- </td>
- </tr>
- </table>
- </div>
- </t:formvalid>
- </body>
- <script src = "webpage/cn/com/lzt/providentfundstrategy/providentFundStrategy.js"></script>
|