providentFundStrategy-add.jsp 9.4 KB

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