water-property-edit.jsp 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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}/waterProperties/editData.do" method="post" target="frmright">
  27. <div class="box1" id="formContent" whiteBg="true">
  28. <input type="hidden" name="propertiesId" value='${bwp.propertiesId!""}'/>
  29. <table class="tableStyle" formMode="transparent">
  30. <tr>
  31. <td><span class="star">*</span>编号:</td>
  32. <td>
  33. <input type="text" [#if flag??&&flag=="modify"] value='${bwp.number!""}' disabled="disabled"
  34. [#elseif flag??&&flag=="add"] name="number" value='${waterPropertiesNo!""}' readonly="readonly" datatype="*" [/#if] style="width: 60%"/>
  35. </td>
  36. </tr>
  37. <tr>
  38. <td><span class="star">*</span>用水性质名称:</td>
  39. <td><input type="text" name="propertiesName" value='${bwp.propertiesName!""}' datatype="*" style="width: 60%" ajaxurl="${ctx}/waterProperties/validateWaterPropertyName.do?oldPropertiesId=${(bwp.propertiesId)!''}"/></td>
  40. </tr>
  41. <tr>
  42. <td><span class="star">*</span>水价:</td>
  43. <td><input type="text" name="waterPrice"
  44. value='${bwp.waterPrices!""}'
  45. datatype="n|decimal" errormsg="请输入数字!" style="width: 60%"/></td>
  46. </tr>
  47. <tr>
  48. <td>备注:</td>
  49. <td><textarea name="remark">${bwp.remark!""}</textarea></td>
  50. </tr>
  51. <tr>
  52. <td colspan="2">
  53. <input type="submit" value="提交"/>
  54. <input type="button" value="取消" onclick="top.Dialog.close()"/>
  55. </td>
  56. </tr>
  57. </table>
  58. </div>
  59. </form>
  60. <!-- 异步提交start -->
  61. <script type="text/javascript">
  62. function initComplete(){
  63. //表单提交
  64. $("#myFormId").Validform({
  65. tiptype:3,//表示在右边显示
  66. ajaxPost:true,
  67. datatype:{
  68. //小数
  69. "decimal" : /^\d+\.\d+$/
  70. },
  71. showAllError:true,
  72. callback:function(responseText){
  73. $.Hidemsg();
  74. if(responseText.status=="y"){
  75. top.Dialog.alert(responseText.info,function(){
  76. closeWin();
  77. });
  78. }else{
  79. top.Dialog.alert(responseText.info,function(){
  80. return false;
  81. });
  82. }
  83. }
  84. });
  85. }
  86. //重置
  87. function closeWin() {
  88. //刷新数据
  89. top.frmright.resetSearch();
  90. //关闭窗口
  91. top.Dialog.close();
  92. }
  93. </script>
  94. <!-- 异步提交end -->
  95. </body>
  96. </html>