base-section-edit.jsp 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. [#ftl]
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>编辑区间</title>
  7. <!--框架必需start-->
  8. <script type="text/javascript" src="${ctx}/qui/libs/js/jquery.js"></script>
  9. <script type="text/javascript" src="${ctx}/qui/libs/js/framework.js"></script>
  10. <link href="${ctx}/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  11. <link rel="stylesheet" type="text/css" id="skin" prePath="${ctx}/qui/"/>
  12. <link rel="stylesheet" type="text/css" id="customSkin"/>
  13. <!--框架必需end-->
  14. <!-- 表单验证start -->
  15. <link rel="stylesheet" href="${ctx}/qui/libs/js/form/validform/css/style.css" type="text/css" media="all" />
  16. <script src="${ctx}/qui/libs/js/form/validform/validform.js" type="text/javascript"></script>
  17. <!-- 表单验证end -->
  18. <!--表单异步提交start-->
  19. <script src="${ctx}/qui/libs/js/form/form.js" type="text/javascript"></script>
  20. <!--表单异步提交end-->
  21. <!--箭头分页start-->
  22. <script type="text/javascript" src="${ctx}/qui/libs/js/nav/pageArrow.js"></script>
  23. <!--箭头分页end-->
  24. </head>
  25. <body>
  26. <form id="myFormId" action="${ctx}/section/editData.do" method="post" target="frmright">
  27. <div class="box1" id="formContent" whiteBg="true">
  28. <input id="sectionId" type="hidden" name="sectionId" value='${bs.sectionId!""}'/>
  29. <input id='punishmentId' type="hidden" name="punishmentId" value='${punishmentId!""}'/>
  30. <table class="tableStyle" formMode="transparent">
  31. <tr>
  32. <td><span class="star">*</span>区段:</td>
  33. <td><input type="text" name="section" value='${bs.section!""}' datatype="n" style="width: 50%"/></td>
  34. <td><span class="star">*</span>加价比例:</td>
  35. <td><input type="text" name="progressivesPrice" value='${bs.progressivesPrice!""}' datatype="*" style="width: 50%"/></td>
  36. </tr>
  37. <tr>
  38. <td><span class="star">*</span>开始区间(%):</td>
  39. <td><input type="text" name="sectionUpLimit" value='${bs.sectionUpLimit!""}' datatype="n" style="width: 50%"/></td>
  40. <td><span class="star">*</span>是否包含开始:</td>
  41. <td>
  42. <select name='containUp' selWidth='60'>
  43. <option value='1' [#if bs.containUp??&&bs.containUp=='1']selected[/#if]>是</option>
  44. <option value='0' [#if bs.containUp??&&bs.containUp=='0']selected[/#if]>否</option>
  45. </select>
  46. </td>
  47. </tr>
  48. <tr>
  49. <td><span class="star">*</span>结束区间:</td>
  50. <td><input type="text" name="sectionLowerLimit" value='${bs.sectionLowerLimit!""}' datatype="n" style="width: 50%"/></td>
  51. <td><span class="star">*</span>是否包含结束:</td>
  52. <td>
  53. <select name='containLower' selWidth='60'>
  54. <option value='1' [#if bs.containLower??&&bs.containLower=='1']selected[/#if]>是</option>
  55. <option value='0' [#if bs.containLower??&&bs.containLower=='0']selected[/#if]>否</option>
  56. </select>
  57. </td>
  58. </tr>
  59. <tr>
  60. <td colspan="4">
  61. <input type="submit" value="保存"/>
  62. <input type="button" value="取消" onclick="top.Dialog.close()"/>
  63. </td>
  64. </tr>
  65. </table>
  66. </div>
  67. </form>
  68. <!-- 异步提交start -->
  69. <script type="text/javascript">
  70. function initComplete(){
  71. //表单提交
  72. $("#myFormId").Validform({
  73. tiptype:3,//表示在右边显示
  74. ajaxPost:true,
  75. showAllError:true,
  76. callback:function(responseText){
  77. $.Hidemsg();
  78. if(responseText.status=="y"){
  79. top.Dialog.alert(responseText.info,function(){
  80. closeWin();
  81. });
  82. }else{
  83. top.Dialog.alert(responseText.info,function(){
  84. return false;
  85. });
  86. }
  87. }
  88. });
  89. }
  90. //重置
  91. function closeWin() {
  92. var punishmentId=$("#punishmentId").val();
  93. //刷新数据
  94. top.frmright.refreshChild(punishmentId);
  95. //关闭窗口
  96. top.Dialog.close();
  97. }
  98. $(function($){
  99. var fp;
  100. $("input[name='fineProportion']").live("focus", function(e){
  101. fp=$(this).val();
  102. });
  103. $("input[name='fineProportion']").live("change", function(e){
  104. var fine=$(this).val();
  105. if(!isNaN(fine)){
  106. fine=Math.round(fine*100)/100;
  107. $(this).val(fine.toFixed(2));
  108. }else{
  109. $(this).val(fp);
  110. return false;
  111. }
  112. });
  113. });
  114. </script>
  115. <!-- 异步提交end -->
  116. </body>
  117. </html>