<!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/ui.jqgrid.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/grid.locale-cn.js" type="text/javascript"></script>
    <script src="../../Scripts/lib/jquery.jqGrid.min.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/lib/jquery.autonum.min.js" type="text/javascript"></script>
    <script src="../../Scripts/msgBox.js" type="text/javascript"></script>
    <script src="../../Scripts/msg.js" type="text/javascript"></script>
    <script src="../../Scripts/common.js" type="text/javascript"></script>
    <script src="../../Scripts/page.js" type="text/javascript"></script>
    <script src="../../Scripts/ciho.js" type="text/javascript"></script>
    <script src="../../Scripts/06/p0607.js" type="text/javascript"></script>
    <script src="../../Scripts/06/p060701.js" type="text/javascript"></script>
    <script src="../../Scripts/06/p060702.js" type="text/javascript"></script>
    <script src="../../Scripts/06/p060703.js" type="text/javascript"></script>
    <script src="../../Scripts/06/p060704.js" type="text/javascript"></script>
    <script type="text/javascript">
        var bLoadComplete = false;
        $(document).ready(function () {

            try {

                //取系统启用时间的前一天
                strStateDate = new Date(window.parent._startDate.replace(/-/g, '/'));
                strStateDate.setDate(strStateDate.getDate() - 1);
                strStateDate = strStateDate.getFullYear() + '-' + (strStateDate.getMonth() + 1) + '-' + strStateDate.getDate();

                //列配置
                var config = ParseData(window.external.DoOptions(strTableNameP0607, "GetTableConfig", "{}"));
                var arrData = ParseData(window.external.DoOptions(strTableNameP0607, 'GetList', '{}'));

                //改变窗口大小时事件
                window.onresize = function () {
                    $(".operate").hide();
                    resizeGrid(strTableNameP0607, false, false);
                    resizeGridScroll(strTableNameP0607);
                }

                //table对象
                var objTable = $("#" + strTableNameP0607);

                //创建grid
                createTreeGrid(strTableNameP0607, config.colNames, config.colModel, "{}", "a3", null, null, null);

                //设置表格属性，事件
                objTable.setGridParam({ cellEdit: true });
                objTable.setGridParam({ cellsubmit: "clientArray" });
                objTable.setGridParam({ afterEditCell: afterEditCell });
                objTable.setGridParam({ afterSaveCell: afterSaveCell });
                objTable.setColProp("a16", { editable: true });
                objTable.setColProp("a16", { formatter: Formatter });
                objTable.setColProp("cz", { formatter: FormatterCz });

                //设置表格高度
                resizeGrid(strTableNameP0607, false, false);

                //加载数据
                loadTreeData(strTableNameP0607, arrData.Records);

                //调整滚动条
                resizeGridScroll(strTableNameP0607);

                bLoadComplete = true;

                //释放内存
                objTable = null;
                arrData = null;
                config = null;
            }
            catch (e) { proceError("P0607", e.ToString()); }
        });
</script>
</head>
<body>
    <div class="title_bar">
        <div class="topi">
            <div class="column">
                <div id="added">
                    <ul class="topnav">
                        <li><a href="#" onclick="SaveQuwh();">&nbsp;&nbsp;保&nbsp;&nbsp;&nbsp;存&nbsp;&nbsp;</a>
                            <span></span></li>
                    </ul>
                </div>
                <div class="dedt">
                    <div id="dvTip" class="dvTip">
                    </div>
                </div>
                <div class="clr">
                </div>
            </div>
            <div>
            </div>
        </div>
        <div class="clr">
        </div>
    </div>
    <div class="mation">
        <div class="mation_div">
            <table id="Tqcwh">
            </table>
        </div>
    </div>
    <div id="divP0607">
    </div>
    <div id="divP060701">
    </div>
    <div id="divAddType">
    </div>
</body>
</html>
