<!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>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <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/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/common.js" type="text/javascript"></script>
    <script src="../../Scripts/06/p0613.js" type="text/javascript"></script>
    <script type="text/javascript">
       

        $(function () {
        })

        //        //sdsd
        function alterRecord() {
            window.parent.openDlgAlter();
            $(window.parent.document).find("#alterRecord").empty();
            creatDiv_TopButton("alterRecord", "1", '', "库存期初录入");
             $(window.parent.document).find("#divform").append("<table id='TKcqc'></table>");
             $(window.parent.document).find("#divform").before("<div class=\"pop_h3\"><a href='#' onclick=\"AddRows('TKcqc','1') \">添加行</a> |<a href='#' onclick=\"AddRows('TKcqc','1') \">导入</a></div>");
             $(window.parent.document).find(".btn02").remove();
            var config = [];
            config = ParseData(window.external.DoOptions('TKcqc', 'GetTableConfig', '{}'));
            var strNames = config.colNames;
            alert(strNames);
            var strModel = config.colModel;
            //获得数据源。
            //var d = window.external.DoOptions('TKcqc', 'GetList', '{}');
            var s = ParseData(window.external.DoOptions('TKcqc', 'GetList', '{}'));
            //注意：jqGrid的数据源是strParsedData.Records.
            var strParsedData = s.Records;
//                    for (var i in strParsedData) {
//                        alert(i + "----" + strParsedData[i]);
//                        for (var j in strParsedData[i]) {
//                            alert(j+"-------"+strParsedData[i][j]);
//                        }
//                    }
            var title = "库存期初录入";
            //创建弹出添加窗口
            //creatRow("idPage", title, strParsedData, strNames, strModel, strTableName);
            createkcGrid('TKcqc', strParsedData, strNames, strModel, title);
        }
    </script>   
       
</head>
<body>
    <div class="title_bar">
        <div class="topi">
    
            <div class="column">
                <div id="added">
                    <ul class="topnav">
                        <li><a href="#" onclick="alterRecord()">&nbsp;&nbsp;新&nbsp;&nbsp;增&nbsp;&nbsp;</a>
                            <ul class="addnav">
                                <li><a href="#">分类设置</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
                <div class="dedt"></div>
                <div class="clr"></div>
            </div>
            <div></div>
        </div>
        <div class="clr"></div>
    </div>

    <div class="mation">
    <div class="mation_div">
<!--    <table id="TKcqc"></table>-->
    </div>

     <div id="showRows"></div>    
    <div id="idPage" class="Page">
    <div class="clr"></div>
    </div>          
    </div>

    <!--隐藏按钮，用于menu页面触发本页面的click事件-->
    <input type="button" id="idSubPage_TKcqc" value="" onclick="actionFromParent()" style="display:none"/>

</body>
</html>

