status-edit.jsp 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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. <!-- MiniColors -->
  14. <script src="${ctx}/minicolors/jquery.minicolors.js"></script>
  15. <link rel="stylesheet" href="${ctx}/minicolors/jquery.minicolors.css">
  16. <!--框架必需end-->
  17. <!-- 表单验证start -->
  18. <link rel="stylesheet" href="${ctx}/qui/libs/js/form/validform/css/style.css" type="text/css" media="all" />
  19. <script src="${ctx}/qui/libs/js/form/validform/validform.js" type="text/javascript"></script>
  20. <!-- 表单验证end -->
  21. <!--表单异步提交start-->
  22. <script src="${ctx}/qui/libs/js/form/form.js" type="text/javascript"></script>
  23. <!--表单异步提交end-->
  24. <!--箭头分页start-->
  25. <script type="text/javascript" src="${ctx}/qui/libs/js/nav/pageArrow.js"></script>
  26. <!--箭头分页end-->
  27. <style>
  28. body {
  29. font: 16px sans-serif;
  30. line-height: 1.8;
  31. padding: 0 40px;
  32. margin-bottom: 200px;
  33. }
  34. a {
  35. color: #08c;
  36. text-decoration: none;
  37. }
  38. a:hover {
  39. text-decoration: underline;
  40. }
  41. .form-group {
  42. margin: 20px 0;
  43. }
  44. label {
  45. color: #888;
  46. }
  47. </style>
  48. <script>
  49. $(document).ready( function() {
  50. $('.demo').each( function() {
  51. //
  52. // Dear reader, it's actually very easy to initialize MiniColors. For example:
  53. //
  54. // $(selector).minicolors();
  55. //
  56. // The way I've done it below is just for the demo, so don't get confused
  57. // by it. Also, data- attributes aren't supported at this time. Again,
  58. // they're only used for the purposes of this demo.
  59. //
  60. $(this).minicolors({
  61. control: $(this).attr('data-control') || 'hue',
  62. defaultValue: $(this).attr('data-defaultValue') || '',
  63. inline: $(this).attr('data-inline') === 'true',
  64. letterCase: $(this).attr('data-letterCase') || 'lowercase',
  65. opacity: $(this).attr('data-opacity'),
  66. position: $(this).attr('data-position') || 'bottom left',
  67. change: function(hex, opacity) {
  68. var log;
  69. try {
  70. log = hex ? hex : 'transparent';
  71. if( opacity ) log += ', ' + opacity;
  72. console.log(log);
  73. } catch(e) {}
  74. },
  75. theme: 'default'
  76. });
  77. });
  78. });
  79. </script>
  80. </head>
  81. <body>
  82. <form id="myFormId" action="${ctx}/status/editData.do" method="post" target="frmright">
  83. <div class="box1" id="formContent" whiteBg="true">
  84. <input type="hidden" name="id" value='${baseStatus.id!""}'/>
  85. <table class="tableStyle" formMode="transparent">
  86. <tr>
  87. <td><span class="star">*</span>状态名称:</td>
  88. <td><input type="text" name="statusName" value='${baseStatus.statusName!""}' datatype="*" style="width: 50%" ajaxurl="${ctx}/status/validateStatusName.do?id=${(baseStatus.id)!''}"/></td>
  89. </tr>
  90. <tr>
  91. <td><span class="star">*</span>状态颜色:</td>
  92. <td><input type="text" name="statusColor" id="text-field" value='${baseStatus.statusColor!"#70c24a"}' class="demo" datatype="*" style="width: 60%" value="#70c24a"/></td>
  93. </tr>
  94. <tr>
  95. <td colspan="2">
  96. <input type="submit" value="保存"/>
  97. <input type="button" value="取消" onclick="top.Dialog.close()"/>
  98. </td>
  99. </tr>
  100. </table>
  101. </div>
  102. </form>
  103. <!-- 异步提交start -->
  104. <script type="text/javascript">
  105. function initComplete(){
  106. //表单提交
  107. $("#myFormId").Validform({
  108. tiptype:3,//表示在右边显示
  109. ajaxPost:true,
  110. datatype:{
  111. //小数
  112. "decimal" : /^\d+\.\d+$/
  113. },
  114. showAllError:true,
  115. callback:function(responseText){
  116. $.Hidemsg();
  117. if(responseText.status=="y"){
  118. top.Dialog.alert(responseText.info,function(){
  119. closeWin();
  120. });
  121. }else{
  122. top.Dialog.alert(responseText.info,function(){
  123. return false;
  124. });
  125. }
  126. }
  127. });
  128. }
  129. //重置
  130. function closeWin() {
  131. //刷新数据
  132. top.frmright.resetSearch();
  133. //关闭窗口
  134. top.Dialog.close();
  135. }
  136. </script>
  137. <!-- 异步提交end -->
  138. </body>
  139. </html>