tsxxList.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. var tsxx = new Object();
  2. tsxx.loadSearchModule = function(p) {
  3. var $div = $("#" + p.id);
  4. if ($div.length > 0) {
  5. $div.load('tsxxSearchModule.htm', {
  6. from : p.from,
  7. callBackFunName : p.callBackFunName,
  8. 'tsxxSearchGrid' : $("#tsxxSearchModule").val()
  9. }, function() {
  10. });
  11. }
  12. };
  13. /**
  14. * 加载推送消息记录查询模块
  15. */
  16. tsxx.loadSearchModule({
  17. id : 'tsxxSearchModule',
  18. from : 'tsxxjl',
  19. callBackFunName : 'searchTsxxCallBack'
  20. });
  21. /**
  22. * 搜索条件回调函数
  23. *
  24. * @param {搜索条件对象}
  25. * data
  26. * @param {分隔符}
  27. * fgf
  28. */
  29. function searchTsxxCallBack(data, fgf) {
  30. huimv.searchGrid("tsxxGrid", {
  31. url : 'getTsxxList.htm',
  32. params : [{
  33. name : 'param',
  34. value : data
  35. }, {
  36. name : 'fgf',
  37. value : fgf
  38. }]
  39. }, '<b>推送消息记录搜索结果</b>');
  40. }
  41. /**
  42. * 加载推送消息记录列表数据
  43. */
  44. function loadTsxxGrid(tsxxSearchGrid) {
  45. jQuery("#tsxxGrid").flexigrid({
  46. url : 'getTsxxList.htm',
  47. dataType : 'json',
  48. method : 'post',
  49. params : [{
  50. name : 'tsxxSearchGrid',
  51. value : $('#tsxxSearchGrid').val()
  52. },{
  53. name : 'from',
  54. value : $("#from").val()
  55. }],
  56. title : '<b>推送消息记录浏览</b>',
  57. usepager : true,
  58. useRp : true,
  59. rp : 10,
  60. singleSelect : true,
  61. hidehead : false,
  62. showInputPage : true,
  63. showSelectRp : false,
  64. showTableToggleBtn : false,
  65. width : '790',
  66. resizable : false,
  67. nowrap : true,
  68. height : '335',
  69. cache : false,// 清除缓存
  70. colModel : [{
  71. display : '行号',
  72. name : 'hh',
  73. width : 25,
  74. sortable : false,
  75. align : 'center',
  76. process : function(col, record, d) {
  77. jQuery(col).html(d + 1);
  78. }
  79. }, {
  80. display : '消息ID',
  81. name : 'xxid',
  82. width : 140,
  83. sortable : false,
  84. align : 'center',
  85. process : function(col, record, postion, pid) {
  86. jQuery(col).addClass('s');
  87. jQuery(col).html('<a onclick="viewTsxx(' + record.id + ');">' + record.xxid + '</a>');
  88. }
  89. }, {
  90. display : '计划推送',
  91. name : 'jhts',
  92. width : 50,
  93. sortable : true,
  94. align : 'center'
  95. }, {
  96. display : '送达',
  97. name : 'sd',
  98. width : 30,
  99. sortable : true,
  100. align : 'center'
  101. }, {
  102. display : '送达率',
  103. name : 'sdl',
  104. width : 40,
  105. sortable : true,
  106. align : 'center'
  107. }, {
  108. display : '点击',
  109. name : 'dj',
  110. width : 30,
  111. sortable : true,
  112. align : 'center'
  113. }, {
  114. display : '点击率',
  115. name : 'djl',
  116. width : 40,
  117. sortable : true,
  118. align : 'center'
  119. }, {
  120. display : '推送时间',
  121. name : 'tssj',
  122. width : 120,
  123. sortable : true,
  124. align : 'center'
  125. }, {
  126. display : '更新状态',
  127. name : 'gxzt',
  128. width : 50,
  129. sortable : true,
  130. align : 'center',
  131. process : function(col, record, postion, pid) {
  132. jQuery(col).addClass('s');
  133. var str = '';
  134. if (record.gxzt == 1) {
  135. str += '<span>' + "OK" + '</span>';
  136. }
  137. jQuery(col).html(str);
  138. }
  139. }]
  140. });
  141. }
  142. loadTsxxGrid($('#tsxxSearchGrid'));
  143. /**
  144. * 编辑完成后回调函数
  145. *
  146. * @param {} lx
  147. * @param {} data
  148. */
  149. function processAfterEditTsxx() {
  150. Dialogs.close();
  151. huimv.reloadGrid('tsxxGrid');
  152. }