123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="renderer" content="webkit|ie-comp|ie-stand">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <meta http-equiv="Cache-Control" content="no-siteapp" />
- <!--[if lt IE 9]>
- <script type="text/javascript" src="${ctx}/assets/lib/html5.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/respond.min.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/PIE_IE678.js"></script>
- <![endif]-->
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui/css/H-ui.min.css" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/H-ui.admin.css" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/Hui-iconfont/1.0.7/iconfont.css" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/icheck/icheck.css" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/skin/default/skin.css" id="skin" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/style.css" />
- <script type="text/ecmascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.js"></script>
- <script type="text/javascript" src="${ctx}/assets/static/h-ui/js/H-ui.js"></script>
- <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqueryui/jquery-ui.css" />
- <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqgrid/css/ui.jqgrid.css" />
- <script type="text/ecmascript" src="${ctx}/assets/lib/jqueryui/jquery-ui.js"></script>
- <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/i18n/grid.locale-cn.js"></script>
- <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/jquery.jqGrid.min.js"></script>
- <script type="text/javascript" src="${ctx}/assets/js/base.js"></script>
- <!--[if IE 6]>
- <script type="text/javascript" src="${ctx}/assets/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
- <script>DD_belatedPNG.fix('*');</script>
- <![endif]-->
- <script type="text/javascript">
- $(function() {
- $(window).resize(function(){
- $("#jqGrid").setGridWidth($(window).width()-40);
- });
- var PostData={emailtype:'${emailtype}'};
- $("#jqGrid").jqGrid({
- url : '${ctx}/myconsole/lemail/dosave',
- editurl:"${ctx}/myconsole/lemail/saveOrUpdate",
- mtype : "POST",
- postData: PostData,
- datatype : "json",
- caption:'领导信箱 ',
- colModel : [ {
- label : '信件编号',
- name : 'id',
- hidden : true,
- key : true,
- width : 50,
- }, {
- label : '来信标题 ',
- name : 'title',
- editable: true,
- width : 180,
-
- },
- {
- label : '来信内容',
- name : 'mailcontent',
- editable: true,
- hidden :true,
- editrules:{edithidden:true},
- edittype : "textarea",
- editoptions: {
- rows:"5",
- cols:"70"
- }
- },
- {
- label : '来信类型',
- name : 'mailtype',
- editable: true,
- width : 60,
-
- }, {
- label : '写信人',
- name : 'username',
- editable: true,
-
- }, {
- label : '写信时间',
- name : 'writetime',
- editable: true,
- width : 80,
- }, {
- label : '处理状态',
- name : 'tstate',
- editable: true,
- width : 80,
- } , {
- label : '回复内容',
- name : 'replycontent',
- editable: true,
- hidden :true,
-
- formoptions:{
- elmsuffix:'*'
- },
- editrules:{
- required:true,
- edithidden:true
- },
-
- edittype : "textarea",
- editoptions: {
- rows:"5",
- cols:"70"
- }
- }
- ],
- rownumbers : true,//添加左侧行号
- viewrecords : true,//是否在浏览导航栏显示记录总数
- rowNum : 10,//每页显示记录数
- rowList : [10,15,20,30,40,50 ],//用于改变显示行数的下拉列表框的元素数组。
- autowidth : true,
- height : 'auto',
- pager : "#jqGridPager"
- });
- $('#jqGrid').navGrid('#jqGridPager',
- // the buttons to appear on the toolbar of the grid
- {
- edit : true,
- add : false,
- del : true,
- search : true,
- refresh : true,
- view : false,
- position : "left",
- cloneToTop : false
- },
- // options for the Edit Dialog
- { width : 700,
- recreateForm : true,
- checkOnUpdate : true,
- checkOnSubmit : true,
- closeAfterEdit : true,
- onInitializeForm:function(formid) {
- },
- serializeEditData: function(postdata) {
- //myconsole.log(postdata);
- $.each(postdata,function (index, value) {
- //myconsole.log(index);
- if(index!="jqGrid_id" && index!="oper" && index!="id"){
- modifyJosnKey(postdata,index,"mail."+index);
- }
- if(index=="id"){
- postdata["mail."+index]=value
- }
- })
- //myconsole.log(postdata);
- return postdata;
- },
- errorTextFormat : function(data) {
- return 'Error: ' + data.responseText
- }
- },
- // options for the Add Dialog
- {
- closeAfterAdd : true,
- recreateForm : true,
- beforeSubmit: function(postdata, formid){
- $.each(postdata,function (index, value) {
- if(index!="jqGrid_id" && index!="oper"){
- modifyJosnKey(postdata,index,"mail."+index);
- }
- })
- return[true,''];
- },
- errorTextFormat : function(data) {
- return 'Error: ' + data.responseText
- }
- },
- // options for the Delete Dailog
- {
- errorTextFormat : function(data) {
- return 'Error: ' + data.responseText
- }
- },{
- // search options 这里支持多条件查询
- multipleSearch: true,
- sopt:['eq','ne','cn','nc','lt','le','gt','ge'],
- afterSubmit: function(r, data) {
- var messageString = r.responseText;
- var mesObj = eval('(' + messageString + ')');
- return [mesObj.state, mesObj.message];
- }
- }
- );
- })
- </script>
- <title>领导信箱</title>
- </head>
- <body>
- <div class="page-container">
- <table id="jqGrid"></table>
- <div id="jqGridPager"></div>
- </div>
- <footer class="footer mt-20">
- <div class="container">
- <p></p>
- </div>
- </footer>
- </body>
- </html>
|