adsPersonalLegalAdviser.jsp 9.46 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="contextPath" value="${pageContext.request.contextPath}"></c:set>

<link rel="stylesheet" href="${contextPath}/static/assets/css/jquery-ui.css" />
<link rel="stylesheet" href="${contextPath}/static/assets/css/datepicker.css" />
<link rel="stylesheet" href="${contextPath}/static/assets/css/ui.jqgrid.css" />


<style>
    #MyDiv{
        display: none;
        position: absolute;
        top: 0px;
        left: 300px;
        z-index: 666;
    }
</style>

<div style="background: rgba(1,1,2,0.05)">
    <br>
    订单号:<input id="orderId" placeholder="输入订单号搜索" class="input-medium search-query" type="text"/>
    &nbsp;&nbsp;
    手机号:<input id="phone" placeholder="输入手机号搜索" class="input-medium search-query" type="text"/>
    &nbsp;&nbsp;
    筛选日期:<input type="text" class="input-sm" placeholder="开始日期"  id="startDate"/>
    <input type="text" class="input-sm" placeholder="结束日期"  id="endDate"/>
    &nbsp;<button id="searchd" type="button" class="btn" >搜索</button>
    <br>
    <br>
</div>

<div class="row">
    <div class="col-xs-12">
        <table id="grid-table"></table>
        <div id="grid-pager"></div>
        <script type="text/javascript">
            var $path_base = "${contextPath}/static";//in Ace demo this will be used for editurl parameter
        </script>
        <!-- PAGE CONTENT ENDS -->
    </div><!-- /.col -->
</div><!-- /.row -->

<div  id="MyDiv" class="modal-dialog white_content">
    <div class="modal-content">
        <div class="modal-header no-padding">
            <div class="table-header">
                <button onclick="CloseDiv()" type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    <span  class="white">&times;</span>
                </button>
                查看图片
            </div>
        </div>
        <br>
        <br>
        <div id="pic">

        </div>

    </div><!-- /.modal-dialog -->
</div>





<script type="text/javascript" >

    var myGrid = null;
    var scripts = [ null,  "${contextPath}/static/assets/js/date-time/bootstrap-datepicker.js", "${contextPath}/static/assets/js/date-time/locales/bootstrap-datepicker.zh-CN.js", "${contextPath}/static/assets/js/jqGrid/jquery.jqGrid.js", "${contextPath}/static/assets/js/jqGrid/i18n/grid.locale-cn.js", null ]

    $('.page-content-area').ace_ajax('loadScripts', scripts, function() {
        jQuery(function ($) {

            var grid_selector = "#grid-table";
            var pager_selector = "#grid-pager";

            /*搜索框  主要对Jquery grid进行刷新 带参数刷新    */
            $("#searchd").click(function(){
                var orderId = $("#orderId").val();
                var phone = $("#phone").val();
                var startDate = $("#startDate").val();
                var endDate = $("#endDate").val();
                myGrid.setGridParam({postData:{page:1,type:1,orderId:orderId,phone:phone,startDate:startDate,endDate:endDate},
                    url : '${contextPath}/ads/vip/getAdsPersonalLegalAdviser'}).trigger('reloadGrid');
            });


            $(document).keydown(function (event) {
                var key = window.event ? event.keyCode : event.which;
                if (key == 13) {
                    $("#searchd").click();
                }
            });

            $('#startDate').datepicker({
                language: 'zh-CN',
                pickTime: false,
                todayBtn: true,
                autoclose: true,
                minView: '2',
                forceParse: false,
                format:"yyyy-mm-dd"
            });$('#endDate').datepicker({
                language: 'zh-CN',
                pickTime: false,
                todayBtn: true,
                autoclose: true,
                minView: '2',
                forceParse: false,
                format:"yyyy-mm-dd"
            });


            myGrid=	jQuery(grid_selector).jqGrid({
                subGrid : false,
                url : "${contextPath}/ads/vip/getAdsPersonalLegalAdviser",
                datatype : "json",
                postData : {type:1},
                mtype:'POST',//设置http方式为post以解决乱码问题
                colNames : ['订单号','支付方式','支付单号','用户姓名','用户手机', '服务律师','律师手机','购买金额','付款时间','操作'],
                colModel : [{
                    name : 'orderId',
                    index : 'orderId',
                    width : 200,
                    search : false,
                    editable : false,
                    //sorttype : 'date'
                },{
                    name : 'paymentMethod',
                    index : 'paymentMethod',
                    width : 70,
                    search : false,
                    editable : false,
                    //sorttype : 'date'
                },{
                    name : 'paymentSlipNumber',
                    index : 'paymentSlipNumber',
                    width : 70,
                    search : false,
                    editable : false,
                    //sorttype : 'date'
                },{
                    name : 'userName',
                    index : 'userName',
                    width : 130,
                    search : false,
                    editable : false,
                    //sorttype : 'date'
                },{
                    name : 'mobile',
                    index : 'mobile',
                    width : 70,
                    search : false,
                    editable : false,
                    //sorttype : 'date'
                },{
                    name : 'realName',
                    index : 'realName',
                    width : 130,
                    search : false,
                    editable : false,
                    //sorttype : 'date'
                },{
                    name : 'phone',
                    index : 'phone',
                    width : 150,
                    search : false,
                    editable : false,
                    //sorttype : 'date'
                },{
                    name : 'price',
                    index : 'price',
                    width : 50,
                    search : false,
                    editable : false,
                    //sorttype : 'date'
                },{
                    name : 'payDate',
                    index : 'payDate',
                    width : 120,
                    search : false,
                    editable : false,
                    //sorttype : 'date'
                },{	name : 'type',
                    index : 'type',
                    width : 150,
                    editable : false,
                    search : false,
                    sortable : false,
                    fixed:true,
                    formatter : optionFormatter
                }],
                sortname : "createDate",
                sortorder : "desc",
                viewrecords : true,
                rowNum : 10,
                rowList : [ 10, 20, 30 ],
                pager : pager_selector,
                altRows : true,
                height:"auto",//自动根据每页条数弹性调整表格高度
                loadComplete : function() {
                    var table = this;
                    setTimeout(function(){
                        /*styleCheckbox(table);
                        updateActionIcons(table);*/
                        updatePagerIcons(table);
                        enableTooltips(table);
                    }, 0);
                }
            });

            function updatePagerIcons(table) {
                var replacement = {
                    'ui-icon-seek-first' : 'ace-icon fa fa-angle-double-left bigger-140',
                    'ui-icon-seek-prev' : 'ace-icon fa fa-angle-left bigger-140',
                    'ui-icon-seek-next' : 'ace-icon fa fa-angle-right bigger-140',
                    'ui-icon-seek-end' : 'ace-icon fa fa-angle-double-right bigger-140'
                };
                $('.ui-pg-table:not(.navtable) > tbody > tr > .ui-pg-button > .ui-icon').each(function() {
                    var icon = $(this);
                    var $class = $.trim(icon.attr('class').replace('ui-icon', ''));

                    if ($class in replacement)
                        icon.attr('class', 'ui-icon ' + replacement[$class]);
                })
            }

            function enableTooltips(table) {
                $('.navtable .ui-pg-button').tooltip({
                    container : 'body'
                });
                $(table).find('.ui-pg-div').tooltip({
                    container : 'body'
                });
            };

            function optionFormatter(cellvalue, options, cell) {
                var template = "<button data-toggle='modal' onclick='showPic(\""+cell.id+"\")' class='btn btn-minier btn-default'>详细</button>";
                template +="<button data-toggle='modal' onclick='showPic(\""+cell.id+"\")' class='btn btn-minier btn-default'>退款</button>";
                template += "<button data-toggle='modal' onclick='showPic(\""+cell.id+"\")' class='btn btn-minier btn-default'>取消</button>";
                return template;
            };

        });
    });
    function showPic(id) {

    }

    function CloseDiv() {
        $("#MyDiv").hide();
    }

</script>