reportPushList.jsp 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <%@ page contentType="text/html;charset=UTF-8"%>
  2. <%@ include file="/WEB-INF/include/taglibs.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <title>用户管理</title>
  7. <%@ include file="/WEB-INF/include/common.jsp"%>
  8. <script type="text/javascript">
  9. var functionId = '${functionId}';
  10. function statusFormat(value) {
  11. if(value == 11601){
  12. return "解冻";
  13. }else if(value == 11602){
  14. return "冻结";
  15. }else if(value == 11701){
  16. return "月";
  17. }else if(value == 11702){
  18. return "日";
  19. }else if(value == 11703){
  20. return "周";
  21. }else{
  22. return value;
  23. }
  24. };
  25. $(function() {
  26. var buttonData = '${requestScope.buttons}';
  27. //实例化查询表单,当前页面只能实例化一次
  28. var searchForm = $("#searchForm").searchForm();
  29. var advSearchForm = $("#advSearchForm").searchForm();
  30. //实例化实体List
  31. $.ReportPushList = new $.AbstractList({
  32. entity : "ReportPush",
  33. searchForm : searchForm,
  34. advSearchForm : advSearchForm,
  35. functionId : functionId,
  36. showTopic : true,
  37. autoLoad : false
  38. });
  39. $.fn.extend($.ReportPushList, {
  40. frozen : function(){
  41. var url = WEBROOT + "/ReportPush/frozenCheck.action";
  42. var rows = this.getSelections();
  43. if (rows.length == 0) {
  44. if(this.advSearchForm) {
  45. this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
  46. }
  47. var conditionForSign = this.searchForm.getQo();
  48. if (conditionForSign['conditionRules'] != "") {
  49. var postData = {
  50. conditions : JSON.stringify(conditionForSign)
  51. };
  52. ajaxRequest(url, postData, sucessFrozenCheck, null, this);
  53. } else {
  54. alertMsg("提示", "请选择要冻结的行", "error");
  55. }
  56. } else {
  57. var ids = [];
  58. for (var i = 0; i < rows.length; i++) {
  59. ids.push(rows[i][this.id]);
  60. }
  61. var postData = {
  62. ids : $.encodeJSON(ids)
  63. };
  64. ajaxRequest(url, postData, sucessFrozenCheck, null, this);
  65. }
  66. },
  67. unFrozen : function(){
  68. var url = WEBROOT + "/ReportPush/unFrozenCheck.action";
  69. var rows = this.getSelections();
  70. if (rows.length == 0) {
  71. if(this.advSearchForm) {
  72. this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
  73. }
  74. var conditionForSign = this.searchForm.getQo();
  75. if (conditionForSign['conditionRules'] != "") {
  76. var postData = {
  77. conditions : JSON.stringify(conditionForSign)
  78. };
  79. ajaxRequest(url, postData, sucessUnFrozenCheck, null, this);
  80. } else {
  81. alertMsg("提示", "请选择要解结的行", "error");
  82. }
  83. } else {
  84. var ids = [];
  85. for (var i = 0; i < rows.length; i++) {
  86. ids.push(rows[i][this.id]);
  87. }
  88. var postData = {
  89. ids : $.encodeJSON(ids)
  90. };
  91. ajaxRequest(url, postData, sucessUnFrozenCheck, null, this);
  92. }
  93. }
  94. });
  95. if (!$.isEmpty(buttonData)) {
  96. //构建权限按钮
  97. var jsonButtons = JSON.parse(buttonData);
  98. $.buildToolbar($("#toolbar"), jsonButtons);
  99. };
  100. $("#btnSearch").bind("click",
  101. $.proxy($.ReportPushList.quickSearch, $.ReportPushList));
  102. });
  103. function sucessFrozenCheck(data){
  104. $.messager.confirm('提示', '可以冻结' + data[0].length + '条记录,确定要冻结吗?', function(result) {
  105. if (result) {
  106. if (data[0].length > 0) {
  107. var url = WEBROOT + "/ReportPush/frozenDo.action";
  108. var postData = {
  109. ids : $.encodeJSON(data[0])
  110. };
  111. ajaxRequest(url, postData, sucessFrozenDo, null, this);
  112. }
  113. }
  114. });
  115. }
  116. function sucessUnFrozenCheck(data){
  117. $.messager.confirm('提示', '可以解冻' + data[0].length + '条记录,确定要解冻吗?', function(result) {
  118. if (result) {
  119. if (data[0].length > 0) {
  120. var url = WEBROOT + "/ReportPush/unFrozenDo.action";
  121. var postData = {
  122. ids : $.encodeJSON(data[0])
  123. };
  124. ajaxRequest(url, postData, sucessUnFrozenDo, null, this);
  125. }
  126. }
  127. });
  128. }
  129. function sucessFrozenDo(data) {
  130. if(data.code=="fail"){
  131. alertMsg("提示",data['errorDesc'], "error");
  132. }else{
  133. alertMsg("提示", "冻结成功", "info");
  134. $.ReportPushList.datagrid.datagrid('clearSelections');
  135. $.ReportPushList.datagrid.datagrid('reload');
  136. }
  137. }
  138. function sucessUnFrozenDo(data) {
  139. if(data.code=="fail"){
  140. alertMsg("提示",data['errorDesc'], "error");
  141. }else{
  142. alertMsg("提示", "解冻成功", "info");
  143. $.ReportPushList.datagrid.datagrid('clearSelections');
  144. $.ReportPushList.datagrid.datagrid('reload');
  145. }
  146. }
  147. </script>
  148. </head>
  149. <body style="overflow-y:hidden" fit="true" scroll="no">
  150. <div id="tabs" class="easyui-tabs" fit="true">
  151. <div title="查询">
  152. <form id="searchForm" action="#" method="post">
  153. <table width="100%">
  154. <tr>
  155. <td class="title">数据来源:</td>
  156. <td>
  157. <select id="queryId" name="queryId" class="easyui-combobox" style="width: 155px" condition='"operator":"like"'>
  158. <c:forEach var="item" items="${queryMainList}">
  159. <option value="${item.id}">${item.queryName}</option>
  160. </c:forEach>
  161. </select>
  162. </td>
  163. <td class="title">状态:</td>
  164. <td>
  165. <select id="reportPushStatus" name="reportPushStatus" class="easyui-combobox" style="width: 155px" condition='"operator":"like"'>
  166. <c:forEach var="item" items="${reportPushStatusList}">
  167. <option value="${item.id}">${item.dictionaryName}</option>
  168. </c:forEach>
  169. </select>
  170. </td>
  171. <td class="title">创建时间:</td>
  172. <td><input class="easyui-datebox" type="text"
  173. style="width: 155px" style="vertical-align: middle"
  174. name="creationTime" condition='"operator":">="' />~ <input
  175. class="easyui-datebox" style="width: 155px" type="text"
  176. style="vertical-align: middle" name="creationTime"
  177. condition='"operator":"<="' />
  178. </td>
  179. </tr>
  180. <tr>
  181. <td align="right" colspan="6"><a id="btnSearch" href="#"
  182. class="easyui-linkbutton" data-options="iconCls:'icon-search'">查询</a>
  183. </td>
  184. </tr>
  185. </table>
  186. </form>
  187. <div id="toolbar" class="toolbar"></div>
  188. <table id="maingrid" data-options="fitColumns:true">
  189. <thead>
  190. <tr>
  191. <th data-options="field:'id',hidden:true">主键</th>
  192. <th data-options="field:'ck',checkbox:true">编码</th>
  193. <th data-options="field:'queryName',align:'center',width:100">数据来源</th>
  194. <th data-options="field:'warehouseName',align:'center',width:100">仓库名称</th>
  195. <th data-options="field:'customerName',align:'center',width:100">货主名称</th>
  196. <th data-options="field:'timeType',align:'center',width:80,formatter:statusFormat">时间模式</th>
  197. <th data-options="field:'pushDate',align:'center',width:80">推送日期</th>
  198. <th data-options="field:'pushTime',align:'center',width:100">时分秒</th>
  199. <th data-options="field:'reportPushStatus',align:'center',width:100,formatter:statusFormat">状态</th>
  200. <th data-options="field:'creationTime',align:'center',width:120">创建时间</th>
  201. <th data-options="field:'createdBy',align:'center',width:100">创建人</th>
  202. </tr>
  203. </thead>
  204. </table>
  205. </div>
  206. <div title="内容">
  207. <iframe id="innerFrame" name="innerTab" scrolling="auto"
  208. frameborder="0" style="width:100%;height:99.4%;border:none;"></iframe>
  209. </div>
  210. </div>
  211. </body>
  212. </html>