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

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script type="text/javascript" src="../Jscript-Ui/jquery-easyui-1.4.4/jquery.min.js"></script>
    <script src="../jscript/JSClient.js" type="text/javascript"></script>
    <script src="../jscript/jquery.tool.new.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="../Jscript-Ui/jquery-easyui-1.4.4/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="../Jscript-Ui/jquery-easyui-1.4.4/themes/icon.css" />
    <script type="text/javascript" src="../Jscript-Ui/jquery-easyui-1.4.4/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../Jscript-Ui/jquery-easyui-1.4.4/locale/easyui-lang-zh_CN.js"></script>
    <link href="../css/framesearch.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="../Jscript-Ui/JQForm/JQForm.js"></script>
    <script src="../jscript/Dialog.js" type="text/javascript"></script>

    <link href="../css/button.css" rel="stylesheet" />
    <script src="../jscript/DateFormat.js" type="text/javascript"></script>
    <script src="../jscript/format.js" type="text/javascript"></script>
    <script type="text/javascript" src="../jscript/Cache.js"></script>
    <script type="text/javascript" src="../jscript/DatePicker/WdatePicker.js"></script>
</head>
<body>
    <form id="FrmForm">
        <input type="hidden" id="SelAll" name="SelAll" runat="server" />
        <input type="hidden" id="SelParkID" name="SelParkID" value="" runat="server" />
        <input id="strParkType" size="1" type="hidden" name="strParkType" runat="server" />

        <div style="width: 100%; background-color: #cccccc;" id="TableContainer">
        </div>
        <div id="SearchDlg" class="easyui-dialog" title="筛选条件" data-options="iconCls:'icon-search',closed: true,modal:true"
            style="width: 800px; height: 280px; padding: 10px;">
            <table class="DialogTable" style="line-height: 25px;">

                <tr>
                    <td class="TdTitle">停车场名称</td>
                    <td class="TdContentSearch">
                        <input type="text" style="width: 83%;" id="CommName" name="CommName" />

                    </td>
                    <td class="TdTitle">车牌号码</td>
                    <td class="TdContent">
                        <input type="text" style="width: 81%;" id="plateNo" name="plateNo" runat="server" /></td>
                </tr>
                <tr>
                    <td class="TdTitle">入场时间</td>
                    <td class="TdContentSearch">
                        <input class="Wdate" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" id="inTime" maxlength="50" name="inTime" runat="server" type="text" />
                    </td>
                    <td class="TdTitle">支付方式</td>
                    <td class="TdContentSearch">
                        <select id="chargeType" name="chargeType" class="easyui-combobox" data-options="editable:false,panelHeight: 'auto'" runat="server">
                            <option value="1">现金</option>
                            <option value="2">储值账户</option>
                            <option value="3">第三方</option>
                            <option value="4">支付宝</option>
                            <option value="5">微信</option>
                            <option value="6">无感支付</option>
                        </select>
                    </td>
                    
                </tr>
                <tr>
                    

                </tr>

                <tr>
                    <td class="TdTitle"></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td style="text-align: center;" colspan="4">
                        <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="LoadList();">确定筛选</a>
                    </td>

                </tr>

            </table>
        </div>
    </form>
</body>
</html>

<script language="javascript" type="text/javascript">

    var w = $(window).width();
    var h = $(window).height();
    $(function () {
        InitTableHeight();
        LoadList();
    });

    function InitTableHeight() {
        $("#TableContainer").css("height", h + "px");
        var wi = document.body.clientWidth * 0.29 * 0.8;
    }

    var column = [[

        {
            field: 'DictionaryName', title: '停车场名称', width: 80, align: 'left', sortable: true
        },
        { field: 'recordSyscode', title: '订单号', width: 50, align: 'left', sortable: true, hidden: true },
        { field: 'plateNo', title: '车牌号码', width: 100, align: 'left', sortable: true },
        { field: 'enRecordSyscode', title: '卡编号', width: 80, align: 'left', sortable: true },
        { field: 'cardNo', title: '卡号', width: 100, align: 'left', sortable: true },
        
        { field: 'inTime', title: '车辆入场时间', width: 100, align: 'left', sortable: true },
        { field: 'supposeCost', title: '应收金额', width: 100, align: 'left', sortable: true },
        { field: 'cost', title: '实收金额', width: 100, align: 'left', sortable: true },
        { field: 'deduceCost', title: '折扣金额', width: 100, align: 'left', sortable: true },
        {
            field: 'chargeType', title: '支付方式', width: 100, align: 'left', sortable: true, formatter: function (value, row, index) {
                var str = "";
                 if (row.chargeType == "1") {
                     str = "现金"
                } else if (row.chargeType == "2") {
                     str = "储值账户"
                }
                else if (row.chargeType == "3") {
                     str = "第三方"
                } else if (row.chargeType == "4") {
                     str = "支付宝"
                } else if (row.chargeType == "5") {
                     str = "微信"
                } else if (row.chargeType == "6") {
                     str = "无感支付"
                }
                return str;
            }
        }

    ]];

    var toolbar = [

        {
            text: '筛选',
            iconCls: 'icon-search',
            handler: function () {
                $('#SearchDlg').parent().appendTo($("form:first"))
                $('#SearchDlg').dialog('open');

            }
        }, '-',
        {
            text: '临停费用生成',
            iconCls: 'icon-filter',
            handler: function () {
                ViewReport('临停交款');
                
            }
        }, '-',
        {
            text: 'Excel导出',
            iconCls: 'icon-page_white_excel',
            handler: function () {
                window.location.href = "../CarparkNew/ParkingTemporaryManageExcel.aspx";
            }
        }, '-', {
            text: "<span style='color:red'>备注：查询车场临时费用明细</span>"
        }

    ];



    function LoadList() {
        $("#TableContainer").datagrid({
            url: '/HM/M_Main/HC/DataPostControl.aspx',
            method: "post",
            title: '',
            nowrap: false,
            pageSize: top.ListPageSize,
            pageList: top.ListPageList,
            columns: column,
            remoteSort: false,
            fitColumns: true,
            rownumbers: true,
            singleSelect: true,
            pagination: true,
            width: "100%",
            border: false,
            toolbar: toolbar,
            sortOrder: "asc",
            onBeforeLoad: function (param) {
                param = $.JQForm.GetParam("Carpark", "ParkingTemporaryStop", "TableContainer", param);
            }
        });
        $("#SearchDlg").dialog("close");
    }




    $("select").each(function () {

        var key = $(this).attr("id");
        $(this).css("width", '83%');
    });


    function ViewReport(title) {
        HDialog.Open('820', '600', '../CarparkNew/TemporaryParkingFees.aspx', title, true, function callback(_Data) {
            if (_Data == "true") {
                LoadList();
            }
        });
    }
</script>
