lemail.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="Cache-Control" content="no-siteapp" />
  9. <!--[if lt IE 9]>
  10. <script type="text/javascript" src="${ctx}/assets/lib/html5.js"></script>
  11. <script type="text/javascript" src="${ctx}/assets/lib/respond.min.js"></script>
  12. <script type="text/javascript" src="${ctx}/assets/lib/PIE_IE678.js"></script>
  13. <![endif]-->
  14. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui/css/H-ui.min.css" />
  15. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/H-ui.admin.css" />
  16. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/Hui-iconfont/1.0.7/iconfont.css" />
  17. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/icheck/icheck.css" />
  18. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/skin/default/skin.css" id="skin" />
  19. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/style.css" />
  20. <script type="text/ecmascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.js"></script>
  21. <script type="text/javascript" src="${ctx}/assets/static/h-ui/js/H-ui.js"></script>
  22. <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqueryui/jquery-ui.css" />
  23. <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqgrid/css/ui.jqgrid.css" />
  24. <script type="text/ecmascript" src="${ctx}/assets/lib/jqueryui/jquery-ui.js"></script>
  25. <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/i18n/grid.locale-cn.js"></script>
  26. <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/jquery.jqGrid.min.js"></script>
  27. <script type="text/javascript" src="${ctx}/assets/js/base.js"></script>
  28. <!--[if IE 6]>
  29. <script type="text/javascript" src="${ctx}/assets/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
  30. <script>DD_belatedPNG.fix('*');</script>
  31. <![endif]-->
  32. <script type="text/javascript">
  33. $(function() {
  34. $(window).resize(function(){
  35. $("#jqGrid").setGridWidth($(window).width()-40); 
  36. });
  37. var PostData={emailtype:'${emailtype}'};
  38. $("#jqGrid").jqGrid({
  39. url : '${ctx}/myconsole/lemail/dosave',
  40. editurl:"${ctx}/myconsole/lemail/saveOrUpdate",
  41. mtype : "POST",
  42. postData: PostData,
  43. datatype : "json",
  44. caption:'领导信箱 ',
  45. colModel : [ {
  46. label : '信件编号',
  47. name : 'id',
  48. hidden : true,
  49. key : true,
  50. width : 50,
  51. }, {
  52. label : '来信标题 ',
  53. name : 'title',
  54. editable: true,
  55. width : 180,
  56. },
  57. {
  58. label : '来信内容',
  59. name : 'mailcontent',
  60. editable: true,
  61. hidden :true,
  62. editrules:{edithidden:true},
  63. edittype : "textarea",
  64. editoptions: {
  65. rows:"5",
  66. cols:"70"
  67. }
  68. },
  69. {
  70. label : '来信类型',
  71. name : 'mailtype',
  72. editable: true,
  73. width : 60,
  74. }, {
  75. label : '写信人',
  76. name : 'username',
  77. editable: true,
  78. }, {
  79. label : '写信时间',
  80. name : 'writetime',
  81. editable: true,
  82. width : 80,
  83. }, {
  84. label : '处理状态',
  85. name : 'tstate',
  86. editable: true,
  87. width : 80,
  88. } , {
  89. label : '回复内容',
  90. name : 'replycontent',
  91. editable: true,
  92. hidden :true,
  93. formoptions:{
  94. elmsuffix:'*'
  95. },
  96. editrules:{
  97. required:true,
  98. edithidden:true
  99. },
  100. edittype : "textarea",
  101. editoptions: {
  102. rows:"5",
  103. cols:"70"
  104. }
  105. }
  106. ],
  107. rownumbers : true,//添加左侧行号
  108. viewrecords : true,//是否在浏览导航栏显示记录总数
  109. rowNum : 10,//每页显示记录数
  110. rowList : [10,15,20,30,40,50 ],//用于改变显示行数的下拉列表框的元素数组。
  111. autowidth : true,
  112. height : 'auto',
  113. pager : "#jqGridPager"
  114. });
  115. $('#jqGrid').navGrid('#jqGridPager',
  116. // the buttons to appear on the toolbar of the grid
  117. {
  118. edit : true,
  119. add : false,
  120. del : true,
  121. search : true,
  122. refresh : true,
  123. view : false,
  124. position : "left",
  125. cloneToTop : false
  126. },
  127. // options for the Edit Dialog
  128. { width : 700,
  129. recreateForm : true,
  130. checkOnUpdate : true,
  131. checkOnSubmit : true,
  132. closeAfterEdit : true,
  133. onInitializeForm:function(formid) {
  134. },
  135. serializeEditData: function(postdata) {
  136. //myconsole.log(postdata);
  137. $.each(postdata,function (index, value) {
  138. //myconsole.log(index);
  139. if(index!="jqGrid_id" && index!="oper" && index!="id"){
  140. modifyJosnKey(postdata,index,"mail."+index);
  141. }
  142. if(index=="id"){
  143. postdata["mail."+index]=value
  144. }
  145. })
  146. //myconsole.log(postdata);
  147. return postdata;
  148. },
  149. errorTextFormat : function(data) {
  150. return 'Error: ' + data.responseText
  151. }
  152. },
  153. // options for the Add Dialog
  154. {
  155. closeAfterAdd : true,
  156. recreateForm : true,
  157. beforeSubmit: function(postdata, formid){
  158. $.each(postdata,function (index, value) {
  159. if(index!="jqGrid_id" && index!="oper"){
  160. modifyJosnKey(postdata,index,"mail."+index);
  161. }
  162. })
  163. return[true,''];
  164. },
  165. errorTextFormat : function(data) {
  166. return 'Error: ' + data.responseText
  167. }
  168. },
  169. // options for the Delete Dailog
  170. {
  171. errorTextFormat : function(data) {
  172. return 'Error: ' + data.responseText
  173. }
  174. },{
  175. // search options 这里支持多条件查询
  176. multipleSearch: true,
  177. sopt:['eq','ne','cn','nc','lt','le','gt','ge'],
  178. afterSubmit: function(r, data) {
  179. var messageString = r.responseText;
  180. var mesObj = eval('(' + messageString + ')');
  181. return [mesObj.state, mesObj.message];
  182. }
  183. }
  184. );
  185. })
  186. </script>
  187. <title>领导信箱</title>
  188. </head>
  189. <body>
  190. <div class="page-container">
  191. <table id="jqGrid"></table>
  192. <div id="jqGridPager"></div>
  193. </div>
  194. <footer class="footer mt-20">
  195. <div class="container">
  196. <p></p>
  197. </div>
  198. </footer>
  199. </body>
  200. </html>