123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- <%@ page contentType="text/html;charset=UTF-8"%>
- <%@ include file="/WEB-INF/include/taglibs.jsp"%>
- <!DOCTYPE html>
- <html>
- <head>
- <title>用户管理</title>
- <%@ include file="/WEB-INF/include/common.jsp"%>
- <script type="text/javascript">
- var functionId = '${functionId}';
-
- function statusFormat(value) {
- if(value == 11601){
- return "解冻";
- }else if(value == 11602){
- return "冻结";
- }else if(value == 11701){
- return "月";
- }else if(value == 11702){
- return "日";
- }else if(value == 11703){
- return "周";
- }else{
- return value;
- }
- };
-
- $(function() {
- var buttonData = '${requestScope.buttons}';
-
- //实例化查询表单,当前页面只能实例化一次
- var searchForm = $("#searchForm").searchForm();
- var advSearchForm = $("#advSearchForm").searchForm();
-
- //实例化实体List
- $.ReportPushList = new $.AbstractList({
- entity : "ReportPush",
- searchForm : searchForm,
- advSearchForm : advSearchForm,
- functionId : functionId,
- showTopic : true,
- autoLoad : false
- });
- $.fn.extend($.ReportPushList, {
- frozen : function(){
- var url = WEBROOT + "/ReportPush/frozenCheck.action";
- var rows = this.getSelections();
-
- if (rows.length == 0) {
- if(this.advSearchForm) {
- this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
- }
- var conditionForSign = this.searchForm.getQo();
- if (conditionForSign['conditionRules'] != "") {
- var postData = {
- conditions : JSON.stringify(conditionForSign)
- };
- ajaxRequest(url, postData, sucessFrozenCheck, null, this);
- } else {
- alertMsg("提示", "请选择要冻结的行", "error");
- }
- } else {
- var ids = [];
- for (var i = 0; i < rows.length; i++) {
- ids.push(rows[i][this.id]);
- }
- var postData = {
- ids : $.encodeJSON(ids)
- };
- ajaxRequest(url, postData, sucessFrozenCheck, null, this);
- }
- },
- unFrozen : function(){
- var url = WEBROOT + "/ReportPush/unFrozenCheck.action";
- var rows = this.getSelections();
-
- if (rows.length == 0) {
- if(this.advSearchForm) {
- this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
- }
- var conditionForSign = this.searchForm.getQo();
- if (conditionForSign['conditionRules'] != "") {
- var postData = {
- conditions : JSON.stringify(conditionForSign)
- };
- ajaxRequest(url, postData, sucessUnFrozenCheck, null, this);
- } else {
- alertMsg("提示", "请选择要解结的行", "error");
- }
- } else {
- var ids = [];
- for (var i = 0; i < rows.length; i++) {
- ids.push(rows[i][this.id]);
- }
- var postData = {
- ids : $.encodeJSON(ids)
- };
- ajaxRequest(url, postData, sucessUnFrozenCheck, null, this);
- }
- }
- });
- if (!$.isEmpty(buttonData)) {
- //构建权限按钮
- var jsonButtons = JSON.parse(buttonData);
- $.buildToolbar($("#toolbar"), jsonButtons);
- };
- $("#btnSearch").bind("click",
- $.proxy($.ReportPushList.quickSearch, $.ReportPushList));
-
- });
-
- function sucessFrozenCheck(data){
- $.messager.confirm('提示', '可以冻结' + data[0].length + '条记录,确定要冻结吗?', function(result) {
- if (result) {
- if (data[0].length > 0) {
- var url = WEBROOT + "/ReportPush/frozenDo.action";
- var postData = {
- ids : $.encodeJSON(data[0])
- };
- ajaxRequest(url, postData, sucessFrozenDo, null, this);
- }
- }
- });
- }
-
- function sucessUnFrozenCheck(data){
- $.messager.confirm('提示', '可以解冻' + data[0].length + '条记录,确定要解冻吗?', function(result) {
- if (result) {
- if (data[0].length > 0) {
- var url = WEBROOT + "/ReportPush/unFrozenDo.action";
- var postData = {
- ids : $.encodeJSON(data[0])
- };
- ajaxRequest(url, postData, sucessUnFrozenDo, null, this);
- }
- }
- });
- }
-
- function sucessFrozenDo(data) {
- if(data.code=="fail"){
- alertMsg("提示",data['errorDesc'], "error");
- }else{
- alertMsg("提示", "冻结成功", "info");
- $.ReportPushList.datagrid.datagrid('clearSelections');
- $.ReportPushList.datagrid.datagrid('reload');
- }
- }
-
- function sucessUnFrozenDo(data) {
- if(data.code=="fail"){
- alertMsg("提示",data['errorDesc'], "error");
- }else{
- alertMsg("提示", "解冻成功", "info");
- $.ReportPushList.datagrid.datagrid('clearSelections');
- $.ReportPushList.datagrid.datagrid('reload');
- }
- }
- </script>
- </head>
- <body style="overflow-y:hidden" fit="true" scroll="no">
- <div id="tabs" class="easyui-tabs" fit="true">
- <div title="查询">
- <form id="searchForm" action="#" method="post">
- <table width="100%">
- <tr>
- <td class="title">数据来源:</td>
- <td>
- <select id="queryId" name="queryId" class="easyui-combobox" style="width: 155px" condition='"operator":"like"'>
- <c:forEach var="item" items="${queryMainList}">
- <option value="${item.id}">${item.queryName}</option>
- </c:forEach>
- </select>
- </td>
-
- <td class="title">状态:</td>
- <td>
- <select id="reportPushStatus" name="reportPushStatus" class="easyui-combobox" style="width: 155px" condition='"operator":"like"'>
- <c:forEach var="item" items="${reportPushStatusList}">
- <option value="${item.id}">${item.dictionaryName}</option>
- </c:forEach>
- </select>
- </td>
- <td class="title">创建时间:</td>
- <td><input class="easyui-datebox" type="text"
- style="width: 155px" style="vertical-align: middle"
- name="creationTime" condition='"operator":">="' />~ <input
- class="easyui-datebox" style="width: 155px" type="text"
- style="vertical-align: middle" name="creationTime"
- condition='"operator":"<="' />
- </td>
- </tr>
- <tr>
- <td align="right" colspan="6"><a id="btnSearch" href="#"
- class="easyui-linkbutton" data-options="iconCls:'icon-search'">查询</a>
- </td>
- </tr>
- </table>
- </form>
- <div id="toolbar" class="toolbar"></div>
- <table id="maingrid" data-options="fitColumns:true">
- <thead>
- <tr>
- <th data-options="field:'id',hidden:true">主键</th>
- <th data-options="field:'ck',checkbox:true">编码</th>
- <th data-options="field:'queryName',align:'center',width:100">数据来源</th>
- <th data-options="field:'warehouseName',align:'center',width:100">仓库名称</th>
- <th data-options="field:'customerName',align:'center',width:100">货主名称</th>
- <th data-options="field:'timeType',align:'center',width:80,formatter:statusFormat">时间模式</th>
- <th data-options="field:'pushDate',align:'center',width:80">推送日期</th>
- <th data-options="field:'pushTime',align:'center',width:100">时分秒</th>
- <th data-options="field:'reportPushStatus',align:'center',width:100,formatter:statusFormat">状态</th>
- <th data-options="field:'creationTime',align:'center',width:120">创建时间</th>
- <th data-options="field:'createdBy',align:'center',width:100">创建人</th>
- </tr>
- </thead>
- </table>
- </div>
- <div title="内容">
- <iframe id="innerFrame" name="innerTab" scrolling="auto"
- frameborder="0" style="width:100%;height:99.4%;border:none;"></iframe>
- </div>
- </div>
- </body>
- </html>
|