<!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" />
    <!--css引用--->
    <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/lib/jquery.autonum.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jsonConvert.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/common.js" type="text/javascript"></script>
    <script src="../../Scripts/06/p0610.js" type="text/javascript"></script>
    <script type="text/javascript">
        var bLoadComplete = false;
        $(function () {
            strTableNameP0610 = "Tkpdwxx";
            pageLoad();
            //改变窗口大小时，改变表格的高度和宽度。
            window.onresize = function () {
                $(".operate").hide();
                resizeGrid(strTableNameP0610, false, false);
                resizeGridScroll(strTableNameP0610);
            }
            bLoadComplete = true;
        });

        function pageLoad() {
            //获得jqGrid的列名和属性
            var objconfig = ParseData(window.external.DoOptions(strTableNameP0610, 'GetTableConfig', '{}'));
            for (var i = 0; i < objconfig.colModel.length; i++) {
                if (objconfig.colModel[i].name == "a10" || objconfig.colModel[i].name == "a11") {
                    objconfig.colModel[i].editrules["required"] = true;
                    objconfig.colModel[i].formatter = formatterP0610Percent;
                }
            }
            //获得数据源。
            var objResult = ParseData(window.external.DoOptions(strTableNameP0610, 'GetList', '{}'));
            //注意：jqGrid的数据源是strParesdData.Records.
            var strParsedData = objResult.Records;
            //创建jqGrid
            createGrid(strTableNameP0610, objconfig.colNames, objconfig.colModel, strParsedData, selectRow_P0610, gridComplete_P0610, false, alterRecord);
            $("#" + strTableNameP0610).sortGrid("a2", false, "asc");
            resizeGrid(strTableNameP0610, false, false);
            resizeGridScroll(strTableNameP0610);
            objconfig = {};
            objResult = {};
            strParsedData = null;
        }

        function refreshInfos(obj) {
            if (obj && obj.page && obj.flag) {
                if (obj.page == "p0401" || obj.page == "p0402" && obj.flag == "1") {
                    $("#" + strTableNameP0610).GridUnload(strTableNameP0610);
                    pageLoad();
                }
            }
        }

        function toExcelMethod(tablId) {    //导出数据
            makeExportData(strTableNameP0610, "开票单位基本信息");
        }
    </script>
</head>
<body>
<div class="title_bar">
        <div class="topi">
    
            <div class="column">
                <div id="added">
                    <ul class="topnav">
                        <li><a href="#" onclick="alterRecord('1')">&nbsp;&nbsp;新&nbsp;&nbsp;&nbsp;增&nbsp;&nbsp;</a>
                            <ul class="addnav">
                                <li><a href="#" onclick="javascript:toExcelMethod('Tkpdwxx')">导出</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="Tkpdwxx"></table>
    </div>         
    </div>
    <div id="divP0610"></div>    
</body>
</html>
