首页 > 代码库 > 弹Windows出层

弹Windows出层

 <div id="divUserIntegralList" class="easyui-window"
  data-options="iconCls:‘icon-save‘,closed:‘true‘,collapsible:false,minimizable:false,maximizable:false,closable:true"
  style="width: 700px; height: 450px; padding: 10px;">任务详情</div>

 

   function OpenSon(id){
    $(‘#divUserIntegralList‘).window({href:‘<%=request.getContextPath()%>/jsp/beiqi/beiqiVehicleTaskView.jsp?id=‘
      + id}).window(‘setTitle‘, ‘任务详情‘).window(‘open‘);
   }

 

<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
<title>用户积分</title>
<%@ include file="../common/header.jsp"%>

</head>
<body>
<div class="list_title"><span>任务详情</span></div>
    
    <table id="dgUserIntegralList" style="width: 100%;"></table>

    <script type="text/javascript">
       var mainID = <%=request.getParameter("id")%>;
       $(function($) {
           setAutoHeight(200,"dgUserIntegralList"); 
             $(#dgUserIntegralList).datagrid({
                 url:<%=request.getContextPath()%>/bqCarManagerController/taskView?mainID=+mainID,
                                toolbar : $(#toolbar),
                                rownumbers : true,
                                columns : [ [                                    
                                        {
                                            field : id,
                                            hidden : true,
                                            title : id
                                        }, {
                                            field : jobtype,
                                            title : 任务类型,
                                            width : 25%,
                                            formatter : function(value, rec) { //格式化函数添加一个操作列
                                                if (rec.jobtype == 1) {
                                                    return "充电任务";
                                                } else if(rec.jobtype == 3) {
                                                    return "调配任务";
                                                } else{
                                                    return "整备任务";
                                                }
                                            }
                                        }, {
                                            field : taskstatus,
                                            title : 任务状态,
                                            width : 25%,
                                            formatter : function(value, rec) { //格式化函数添加一个操作列
                                                if (rec.taskstatus == 0) {
                                                    return "待分配";
                                                } else if(rec.taskstatus == 1) {
                                                    return "已分配";
                                                } else if(rec.taskstatus == 2) {
                                                    return "处理中";
                                                } else if(rec.taskstatus == 4) {
                                                    return "完成";
                                                }
                                            }
                                        }, {
                                            field : createdate,
                                            title : 创建时间,
                                            width : 50%,
                                        } ] ],
                                pagination : true,
                                pageSize : 10,
                                pageList :  [10,50,100],
                                layout:[prev,links,next,list],
                                emptyMsg : 无数据,
                                onBeforeLoad : function(param) {
                                    $($(#fm_s).serializeArray()).each(
                                            function() {
                                                param[this.name] = this.value;
                                            });
                                },
                                onBeforeSelect : function() {
                                    return false;
                                }
                            });
             
             var pager = $(#dgUserIntegralList).datagrid(getPager);    // get the pager of datagrid
                pager.pagination({
                    pageSize:10,
                    pageList:  [10,50,100],
                    displayMsg:‘‘,
                    links : 5,
                    layout:[prev,links,next,list]
                });     
        });

       function search() {
            $(#dgUserIntegralList).datagrid(load);
        }
         
    </script>
</body>
</html>

 

弹Windows出层