jiaojinSubsidyStrategy-add.jsp 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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 type="text/javascript">
  9. function onTypeChanged(){
  10. var checkValue=$("#type").val();
  11. if(checkValue == "2"){
  12. $("#tr_refer").show();
  13. $("#tr_money").hide();
  14. $("#money").val("");
  15. }else if(checkValue == "3"){
  16. $("#tr_refer").hide();
  17. $("#tr_money").show();
  18. }
  19. }
  20. $(function(){
  21. $("#type").val("3");
  22. onTypeChanged();
  23. } );
  24. function num1(obj){
  25. obj.value = obj.value.replace(/[^\d.]/g,""); //清除"数字"和"."以外的字符
  26. obj.value = obj.value.replace(/^\./g,""); //验证第一个字符是数字
  27. obj.value = obj.value.replace(/\.{2,}/g,"."); //只保留第一个, 清除多余的
  28. obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
  29. obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3'); //只能输入两个小数
  30. }
  31. </script>
  32. </head>
  33. <body>
  34. <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="jiaojinSubsidyStrategyController.do?doAdd" >
  35. <input id="id" name="id" type="hidden" value="${jiaojinSubsidyStrategyPage.id }"/>
  36. <table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
  37. <tr>
  38. <td align="right">
  39. <label class="Validform_label">
  40. 名称:
  41. </label>
  42. </td>
  43. <td class="value">
  44. <input id="name" name="name" type="text" style="width: 150px" class="inputxt" datatype="*" ignore="checked" />
  45. <span class="Validform_checktip"></span>
  46. <label class="Validform_label" style="display: none;">名称</label>
  47. </td>
  48. </tr>
  49. <tr>
  50. <td align="right">
  51. <label class="Validform_label">
  52. 类型:
  53. </label>
  54. </td>
  55. <td class="value">
  56. <select id="type" name="type" style="width: 150px" onchange="onTypeChanged()">
  57. <!-- <option value="2" selected="selected">按缴金金额补</option> -->
  58. <option value="3">自定义金额</option>
  59. </select>
  60. </td>
  61. </tr>
  62. <tr id="tr_refer">
  63. <td align="right">
  64. <label class="Validform_label">
  65. 引用对象:
  66. </label>
  67. </td>
  68. <td class="value">
  69. <t:dictSelect field="refer" type="list" dictTable="t_bus_social_security_strategy" dictField="id" dictText="social_security_unit" defaultVal="${jiaojinSubsidyStrategyPage.refer}" hasLabel="false" title="引用对象" ></t:dictSelect>
  70. <span class="Validform_checktip"></span>
  71. <label class="Validform_label" style="display: none;">引用对象</label>
  72. </td>
  73. </tr>
  74. <tr id="tr_money">
  75. <td align="right">
  76. <label class="Validform_label">
  77. 补贴金额:
  78. </label>
  79. </td>
  80. <td class="value">
  81. <input id="money" name="money" type="text" style="width: 150px" class="inputxt" ignore="ignore" onkeyup="num1(this)"/>
  82. <span class="Validform_checktip"></span>
  83. <label class="Validform_label" style="display: none;">补贴金额</label>
  84. </td>
  85. </tr>
  86. <tr>
  87. <td align="right">
  88. <label class="Validform_label">
  89. 说明:
  90. </label>
  91. </td>
  92. <td class="value">
  93. <input id="description" name="description" type="text" style="width: 150px" class="inputxt" ignore="ignore" />
  94. <span class="Validform_checktip"></span>
  95. <label class="Validform_label" style="display: none;">说明</label>
  96. </td>
  97. </tr>
  98. </table>
  99. </t:formvalid>
  100. </body>
  101. <script src = "webpage/cn/com/lzt/jiaojinsubsidy/jiaojinSubsidyStrategy.js"></script>