<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>资产负债表</title>
    <link href="../../Content/Default/jquery-ui-1.8.10.custom.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/Default/combo.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/Default/combobox.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/style.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/lib/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="../../Scripts/lib/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script>
    <script src="../../Scripts/lib/highcharts.js" type="text/javascript"></script>
    <script src="../../Scripts/lib/jquery.layoutpanel.js" type="text/javascript"></script>
    <script src="../../Scripts/lib/jquery.combo_ciho.js" type="text/javascript"></script>
    <script src="../../Scripts/lib/jquery.combobox.js" type="text/javascript"></script>
    <script src="../../Scripts/common.js" type="text/javascript"></script>
    <script src="../../Scripts/msg.js" type="text/javascript"></script>
    <script src="../../Scripts/msgBox.js" type="text/javascript"></script>
    <script src="../../Scripts/05/p0512.js" type="text/javascript"></script>
    <script type="text/javascript">
        window.onresize = function () {
            resizeMyDiv();
        }

        $(function () {
            var now = getNowDate();
            $("#sjdate").val(now).change(function () { $("#sjtype").combobox("setValue", ""); $("#sjtype").combobox("setText", "自定义"); });
            inputAndBindData("sjdate", false, "", function () { $("#sjtype").combobox("setValue", ""); $("#sjtype").combobox("setText", "自定义"); });
            getdata();
            bindEvent();
            resizeMyDiv();
            $("#sjtype").combobox();
            addArrowClass();
            var sjdata = [{ "dm": "当前", "mc": "当前", "selected": true }, { "dm": "上月末", "mc": "上月末" }, { "dm": "上年末", "mc": "上年末"}];
            $("#sjtype").combobox({
                valueField: "dm",
                textField: "mc",
                width: 70,
                panelHeight: 62,
                onSelect: function () {
                    var newValue = $(this).combobox("getValue");
                    switch (newValue) {
                        case "当前":
                            var now = new Date();
                            $("#sjdate").val(now.getFullYear() + "-" + (now.getMonth() + 1) + "-" + now.getDate());
                            break;
                        case "上月末":
                            var now = new Date();
                            var lastmonth = new Date(now.getFullYear(), now.getMonth(), 0);
                            var year = lastmonth.getFullYear();
                            var month = (lastmonth.getMonth() + 1) < 10 ? ("0" + (lastmonth.getMonth() + 1)) : (lastmonth.getMonth() + 1);
                            var day = lastmonth.getDate() < 10 ? ("0" + lastmonth.getDate()) : lastmonth.getDate();
                            $("#sjdate").val(year + "-" + month + "-" + day);
                            break;
                        case "上年末":
                            var now = new Date();
                            $("#sjdate").val((now.getFullYear() - 1) + "-12-31");
                            break;
                    }
                },
                enterDown: function () {
                    var newValue = $(this).combobox("getValue");
                    switch (newValue) {
                        case "当前":
                            var now = new Date();
                            var year = now.getFullYear();
                            var month = (now.getMonth() + 1) < 10 ? ("0" + (now.getMonth() + 1)) : (now.getMonth() + 1);
                            var day = now.getDate() < 10 ? ("0" + now.getDate()) : now.getDate();
                            $("#sjdate").val(year + "-" + month + "-" + day);
                            break;
                        case "上月末":
                            var now = new Date();
                            var lastmonth = new Date(now.getFullYear(), (now.getMonth() - 1));
                            var year = lastmonth.getFullYear();
                            var month = (lastmonth.getMonth() + 1) < 10 ? ("0" + (lastmonth.getMonth() + 1)) : (lastmonth.getMonth() + 1);
                            var day = lastmonth.getDate() < 10 ? ("0" + lastmonth.getDate()) : lastmonth.getDate();
                            $("#sjdate").val(year + "-" + month + "-" + day);
                            break;
                        case "上年末":
                            var now = new Date();
                            $("#sjdate").val((now.getFullYear() - 1) + "-12-31");
                            break;
                    }
                }
            });
            $("#sjtype").combobox("loadData", sjdata);
            addArrowClass();
        });
    </script>
</head>
<body>
    <div class="report">
        <div class="report_a">
            <div class="report_choose">
                <div class="switch">
                    (资产总额-负债总额=净资产总额)</div>
                <ul>
                    <li class="enter"><a href="#" onclick="getdata()">查询</a></li>
                    <li>
                        <input id="sjdate" type="text" />
                    </li>
                    <li>
                        <select id="sjtype" class="easyui-combobox">
                        </select>
                    </li>
                </ul>
            </div>
            <div class="overflo">
                <div class="report_map">
                    <div id="left_pie" class="map_a">
                    </div>
                    <div id="center_pie" class="map_b">
                    </div>
                    <div id="right_pie" class="map_c">
                    </div>
                </div>
                <div class="mary">
                    <div class="mary_top" id="left_tree">
                        <div id="left_tree_0">
                            资产总额：<font>￥<label></label></font></div>
                        <ul>
                        </ul>
                    </div>
                    <div class="mary_top" id="center_tree">
                        <div id="center_tree_0">
                            负债总额：<font>￥<label></label></font>
                        </div>
                        <ul>
                        </ul>
                    </div>
                    <div class="mary_top" id="right_tree">
                        <div id="right_tree_0">
                            净资产总额：<font>￥<label></label></font>
                        </div>
                        <ul>
                        </ul>
                    </div>
                </div>
                <div class="start" style="display: none;">
                    <a id="expand" href="#">全部展开>></a></div>
            </div>
        </div>
    </div>
</body>
</html>
