<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompensatePush.aspx.cs" Inherits="M_Main.CarparkNew.BangDao.LogPush.CompensatePush" %>


<!DOCTYPE html>

<html>
<head>
    <title></title>
    <script type="text/javascript" src="/HM/M_Main/jscript/DateControl.js"></script>
    <script type="text/javascript" src="/HM/M_Main/jscript/JSClient.js"></script>
    <script type="text/javascript" src="/HM/M_Main/jscript/ajax.js"></script>
    <script type="text/javascript" src="/HM/M_Main/jscript/Keydown.js" event="onkeydown" for="document"></script>
    <script type="text/javascript" src="/HM/M_Main/Jscript-Ui/jquery-easyui-1.4.4/jquery.min.js"></script>
    <script src="/HM/M_Main/jscript/JSClient.js" type="text/javascript"></script>
    <script src="/HM/M_Main/jscript/jquery.tool.new.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="/HM/M_Main/Jscript-Ui/jquery-easyui-1.4.4/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="/HM/M_Main/Jscript-Ui/jquery-easyui-1.4.4/themes/icon.css" />
    <script type="text/javascript" src="/HM/M_Main/Jscript-Ui/jquery-easyui-1.4.4/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/HM/M_Main/Jscript-Ui/jquery-easyui-1.4.4/locale/easyui-lang-zh_CN.js"></script>
    <link href="/HM/M_Main/css/framesearch.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="/HM/M_Main/Jscript-Ui/JQForm/JQForm.js"></script>
    <script src="/HM/M_Main/jscript/Dialog.js" type="text/javascript"></script>
    <script src="/HM/M_Main/jscript/Dialog.js" type="text/javascript"></script>
    <link href="/HM/M_Main/css/button.css" rel="stylesheet" />
    <script src="/HM/M_Main/jscript/DateFormat.js" type="text/javascript"></script>
    <script src="/HM/M_Main/jscript/format.js" type="text/javascript"></script>
    <script type="text/javascript" src="/HM/M_Main/Jscript-Ui/JQForm/JQForm.js"></script>
    <script type="text/javascript" src="/HM/M_Main/jscript/DatePicker/WdatePicker.js"></script>
    <style type="text/css">
        body {
            margin: 0px;
            margin-top: 0px;
            overflow: hidden;
            background-color: #ffffff;
        }

        .Container {
            width: 100%;
            font-size: 12px;
            font-family: 微软雅黑;
        }

        .ContainerLeft {
            float: left;
            overflow-y: auto;
            border-right: 1px solid #cccccc;
        }

        .ContainerRight {
            float: left;
            width: 100%;
            overflow: auto;
        }
    </style>
</head>
<body>
    <form id="FrmForm">
      <div style="width: 100%;" id="TableContainer"></div>
        <input type="hidden" id="SourceType" name="SourceType" runat="server" />
        <input type="hidden" id="ParkID" name="ParkID" runat="server" />
        <input type="hidden" id="CommID" name="CommID" runat="server" />
        <script src="/HM/M_Main/jscript/CloseAjaxCache.js" type="text/javascript"></script>
        <script type="text/javascript">
            $(function () {
                LoadList();
            });

            function InitFunction() {
                var h = $(window).height();
                var w = $(window).width() * 0.25 - 1;
                $("#TableContainer").css("height", h + "px");
            }
            InitFunction();

            //选择车场
            var column1 = [[
                { field: 'ParkCode', title: '车场编码', width: 180, align: 'left', sortable: true },
                { field: 'ParkName', title: '车场名称', width: 180, align: 'left', sortable: true },
                { field: 'parkArea', title: '停车场区域数', width: 180, align: 'left', sortable: true },
                { field: 'totalPlaceCount', title: '授权区域名称', width: 180, align: 'left', sortable: true },
                { field: 'period', title: '停车场总停车位', width: 180, align: 'left', sortable: true },
                { field: 'AddTime', title: '添加时间', width: 180, align: 'left', sortable: true },
            ]];

            var column2 = [[
                { field: 'startDate', title: '缴费开始时间', width: 180, align: 'left', sortable: true },
                { field: 'endDate', title: '缴费结束时间', width: 180, align: 'left', sortable: true },
                { field: 'price', title: '金额', width: 180, align: 'left', sortable: true },
                { field: 'payType', title: '支付方式', width: 180, align: 'left', sortable: true },
            ]];

            var toolbar = [
                {
                    text: '确定选择',
                    iconCls: 'icon-save',
                    handler: function () {
                        var row = $('#TableContainer').datagrid("getSelected");
                        if (row) {
                            HDialog.ReturnIsJson = true;
                            HDialog.Close(row);
                        } else {
                            HDialog.Info("请选择项!");
                        }
                    }
                }
            ];

            function LoadList() {
                var SourceType = $("#SourceType").val();
                var columnsj = column2;
                var Command = "GetKeTuo_ParkFeesList";
                if (SourceType == "车位退费" || SourceType == "车位充值") {
                    columnsj = column2;
                    Command = "GetKeTuo_ParkFeesList";
                } else if (SourceType == "拉取区域" || SourceType == "拉取套餐") {
                    columnsj = column1;
                    Command = "GetKeTuo_ParkConfigList";
                } else { return; }
                $("#TableContainer").datagrid({
                    url: '/HM/M_Main/HC/DataGetControl.aspx?Method=DataGet&Class=BangDao_Park&Command=' + Command + '&' + $('#FrmForm').serialize(),
                    method: "get",
                    loadMsg: '数据加载中,请稍候...',
                    nowrap: false,
                    pageSize: top.ListPageSize,
                    pageList: top.ListPageList,
                    columns: columnsj,
                    fitColumns: true,
                    singleSelect: true,
                    border: false,
                    pagination: true,
                    rownumbers: true,
                    width: "100%",
                    toolbar: toolbar,
                    sortOrder: "asc",
                    onDblClickRow: function (rowIndex, rowData) {
                        HDialog.ReturnIsJson = true;
                        HDialog.Close(rowData);
                    },
                    onLoadSuccess: function (data) {
                        console.log(data);
                    }
                });
            }

        </script>
    </form>
</body>
</html>
