providentFundStrategy-update.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <title>公积金策略表</title>
  7. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  8. <script src="plug-in/layer/layer.js"></script>
  9. <script>
  10. function btn_ok(){
  11. var id = $("#id").val();
  12. var providentFundName = $("#providentFundName").val();
  13. if(providentFundName != ''){
  14. $.ajax({
  15. url:"providentFundStrategyController.do?isCorrection",
  16. data:{providentFundName:providentFundName,id:id},
  17. dataType:"json",
  18. type:"POST",
  19. success:function(result){
  20. if(result.success){
  21. $("#btnsub").click();
  22. }else{
  23. layer.alert(result.msg);
  24. }
  25. }
  26. });
  27. }else{
  28. $("#btnsub").click();
  29. }
  30. }
  31. function callback(data){
  32. if(data.success){
  33. layer.alert(data.msg,{ icon: 0 , closeBtn: 0 }, function(index){
  34. window.location.href="providentFundStrategyController.do?list"
  35. layer.close(index);
  36. });
  37. }
  38. else{
  39. layer.alert(data.msg);
  40. }
  41. }
  42. //复制的字符处理问题
  43. $("textarea[maxlength]").blur(function(){
  44. var area=$(this);
  45. var max=parseInt(area.attr("maxlength"),10); //获取maxlength的值
  46. if(max>0){
  47. if(area.val().length>max){ //textarea的文本长度大于maxlength
  48. area.val(area.val().substr(0,max)); //截断textarea的文本重新赋值
  49. }
  50. }
  51. });
  52. function num1(obj){
  53. obj.value = obj.value.replace(/[^\d.]/g,""); //清除"数字"和"."以外的字符
  54. obj.value = obj.value.replace(/^\./g,""); //验证第一个字符是数字
  55. obj.value = obj.value.replace(/\.{2,}/g,"."); //只保留第一个, 清除多余的
  56. obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
  57. obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3'); //只能输入两个小数
  58. }
  59. function num(obj){
  60. obj.value = obj.value.replace(/[^\d.]/g,""); //清除"数字"和"."以外的字符
  61. obj.value = obj.value.replace(/^\./g,""); //验证第一个字符是数字
  62. obj.value = obj.value.replace(/\.{1,}/g,"."); //只保留第一个, 清除多余的
  63. obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
  64. if(obj.value > 100){
  65. var s = obj.value;
  66. obj.value = s.replace(s,(s+'').substring(0,2));
  67. }
  68. obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d).*$/,'$1$2.$3'); //只能输入两个小数
  69. }
  70. function onpay(id){
  71. if(id == 1){
  72. var basePay = $("#basePay").val();
  73. if(basePay != '' && basePay == 0){
  74. layer.alert("缴费基数不可为0");
  75. $("#basePay").val("");
  76. }
  77. }else if(id == 2){
  78. var companyRatio = $("#companyRatio").val();
  79. if(companyRatio != '' && companyRatio == 0){
  80. layer.alert("单位缴费比例不可为0");
  81. $("#companyRatio").val("");
  82. }
  83. }else if(id == 3){
  84. var personalRatio = $("#personalRatio").val();
  85. if(personalRatio != '' && personalRatio == 0){
  86. layer.alert("个人缴费比例不可为0");
  87. $("#personalRatio").val("");
  88. }
  89. }
  90. }
  91. </script>
  92. <script type="text/javascript">
  93. //编写自定义JS代码
  94. function cal(){
  95. window.location.href="providentFundStrategyController.do?list";
  96. }
  97. </script>
  98. <style type="text/css">
  99. .fixed-h{
  100. float:left;
  101. width:100%;
  102. min-height:630px;
  103. overflow:auto;
  104. background:#ffffff;
  105. }
  106. </style>
  107. </head>
  108. <body>
  109. <t:formvalid formid="formobj" tipSweep="true" dialog="false" usePlugin="password" layout="table" action="providentFundStrategyController.do?doUpdate" tiptype="1" callback="callback">
  110. <input id="id" name="id" type="hidden" value="${providentFundStrategyPage.id }"/>
  111. <div class="fixed-h">
  112. <table style="width: 100%;" cellpadding="0" cellspacing="1" class="formtable">
  113. <tr>
  114. <td align="right">
  115. <label class="Validform_label">
  116. <span color="red" class="requiredIcon">*</span>
  117. 公积金策略名称:
  118. </label>
  119. </td>
  120. <td class="value">
  121. <input type="text" name="providentFundName" id="providentFundName" value='${providentFundStrategyPage.providentFundName}' datatype="s1-20" errormsg="公积金策略名称非法" nullmsg="请填写公积金策略名称!" class="Validform_error">
  122. <span class="Validform_checktip Validform_wrong" style="display: none;">请填写公积金策略名称!</span>
  123. </td>
  124. </tr>
  125. <tr>
  126. <td align="right">
  127. <label class="Validform_label">
  128. <span color="red" class="requiredIcon">*</span>
  129. 缴费基数:
  130. </label>
  131. </td>
  132. <td class="value">
  133. <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}'/>&nbsp;元
  134. <span class="Validform_checktip"></span>
  135. <label class="Validform_label" style="display: none;">缴费基数</label>
  136. </td>
  137. </tr>
  138. <tr>
  139. <td align="right">
  140. <label class="Validform_label">
  141. <span color="red" class="requiredIcon">*</span>
  142. 单位缴费比例:
  143. </label>
  144. </td>
  145. <td class="value">
  146. <input id="companyRatio" name="companyRatio" type="text" onkeyup="num(this)" onBlur="onpay(2)" style="width: 35px" datatype="d" nullmsg="请填写单位缴费比例!" errormsg="单位缴费比例非法" value='${providentFundStrategyPage.companyRatio}'/>&nbsp;%
  147. <span class="Validform_checktip"></span>
  148. <label class="Validform_label" style="display: none;">个人缴费比例</label>
  149. </td>
  150. </tr>
  151. <tr>
  152. <td align="right">
  153. <label class="Validform_label">
  154. <span color="red" class="requiredIcon">*</span>
  155. 个人缴费比例:
  156. </label>
  157. </td>
  158. <td class="value">
  159. <input id="personalRatio" name="personalRatio" type="text" onkeyup="num(this)" onBlur="onpay(3)" style="width: 35px" datatype="d" nullmsg="请填写个人缴费比例!" errormsg="个人缴费比例非法" value='${providentFundStrategyPage.personalRatio}'/>&nbsp;%
  160. <span class="Validform_checktip"></span>
  161. <label class="Validform_label" style="display: none;">个人缴费比例</label>
  162. </td>
  163. </tr>
  164. <tr>
  165. <td align="right">
  166. <label class="Validform_label">
  167. <span color="red" class="requiredIcon">*</span>
  168. 适用开始时间:
  169. </label>
  170. </td>
  171. <td class="value">
  172. <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"/>
  173. <span class="Validform_checktip"></span>
  174. <label class="Validform_label" style="display: none;">适用开始时间</label>
  175. </td>
  176. </tr>
  177. <tr>
  178. <td align="right">
  179. <label class="Validform_label">
  180. <span color="red" class="requiredIcon">*</span>
  181. 适用结束时间:
  182. </label>
  183. </td>
  184. <td class="value">
  185. <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"/>
  186. <span class="Validform_checktip"></span>
  187. <label class="Validform_label" style="display: none;">适用结束时间</label>
  188. </td>
  189. </tr>
  190. <!-- <tr>
  191. <td align="right">
  192. <label class="Validform_label">
  193. 适用结束时间:
  194. </label>
  195. </td>
  196. <td class="value">
  197. <span class="Validform_checktip"></span>
  198. <label class="Validform_label" style="display: none;">适用结束时间</label>
  199. </td>
  200. </tr> -->
  201. <tr>
  202. <td align="right">
  203. <label class="Validform_label">
  204. 备注:
  205. </label>
  206. </td>
  207. <td class="value">
  208. <textarea rows="4" cols="51" maxlength="200" name="remark" id="remark" placeholder="请输入备注(最多输入文字数200)">${providentFundStrategyPage.remark}</textarea>
  209. <%-- <input id="remark" name="remark" type="text" style="width: 150px" ignore="ignore" value='${providentFundStrategyPage.remark}'/> --%>
  210. <label class="Validform_label" style="display: none;">备注</label>
  211. </td>
  212. </tr>
  213. <%-- <tr>
  214. <td align="right">
  215. <label class="Validform_label">
  216. 状态:
  217. </label>
  218. </td>
  219. <td class="value">
  220. <t:dictSelect field="status" type="list" typeGroupCode="isused" datatype="*" defaultVal="${providentFundStrategyPage.status}" hasLabel="false" title="状态"></t:dictSelect>
  221. <span class="Validform_checktip"></span>
  222. <label class="Validform_label" style="display: none;">状态</label>
  223. </td>
  224. </tr>
  225. <tr>
  226. <td align="right">
  227. <label class="Validform_label">
  228. 逻辑删除标识:
  229. </label>
  230. </td>
  231. <td class="value">
  232. <t:dictSelect field="deleteFlag" type="radio" typeGroupCode="del_flag" datatype="*" defaultVal="${providentFundStrategyPage.deleteFlag}" hasLabel="false" title="逻辑删除标识"></t:dictSelect>
  233. <span class="Validform_checktip"></span>
  234. <label class="Validform_label" style="display: none;">逻辑删除标识</label>
  235. </td>
  236. </tr> --%>
  237. <tr>
  238. <td height="100px" align="center" colspan="2">
  239. </td>
  240. </tr>
  241. <tr>
  242. <td height="50px" align="center" colspan="2" >
  243. <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-confirm" onclick="btn_ok()">确定</a>
  244. <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
  245. <a style="margin-left:0px" href="#" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-return" onclick="cal();">返回</a>
  246. </td>
  247. </tr>
  248. </table>
  249. </div>
  250. </t:formvalid>
  251. </body>
  252. <script src = "webpage/cn/com/lzt/providentfundstrategy/providentFundStrategy.js"></script>