<!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>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <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.combo_ciho.js" type="text/javascript"></script>
    <script src="../../Scripts/lib/jquery.combobox.js" type="text/javascript"></script>
    <script src="../../Scripts/lib/jquery.layoutpanel.js" type="text/javascript"></script>
    <script src="../../Scripts/common.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/jsonConvert.js" type="text/javascript"></script>
    <script src="../../Scripts/01/p0111.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        var bLoadComplete = true; //是否更新下拉框信息
        $(function () {
            //转换下拉框控件类型
            $("#cbmSearchTypeP0111").combobox();
            $("#cmbDateExtentP0111").combobox();
            $("#cmbProviderP0111").combobox();
            $("#cmbDrugP0111").combobox();
            $("#cmbBillsTypeP0111").combobox();
            addArrowClass(); //修改combobox箭头的样式
            inputAndBindData("dateStartTimeP0111", false, null, dateTimeChange_P0111);
            inputAndBindData("dateEndTimeP0111", false, null, dateTimeChange_P0111);

            //页面加载方法
            pageLoad_P0111();

            //采购明细的iframe
            var iHeightDetail = window.parent.document.documentElement.clientHeight; //设定新创建的iframe的高度，宽度
            var strIframeHtml = "<iframe id=\"idIframe-11102\" frameborder=\"0\" scrolling=\"no\" style=\"display:none;width:100%;height:" + iHeightDetail + "\"></iframe>";
            $(window.parent.document).find("#tabs #111").append(strIframeHtml); //在该tab下添加明细iframe.不需要制定src

            //改变窗口大小时，改变表格的高度和宽度。
            window.onresize = function () {
                //隐藏浮动层
                $(".operate").hide();

                //调整表格的大小
                resizeGrid(strTableP0111, false, true);
                //有滚动条时改变表格宽度
                resizeGridScroll(strTableP0111);
            }

            //是否更新下拉框信息
            bLoadComplete = true;

            //释放内存
            iHeightDetail = null;
            strIframeHtml = null;
        });

        //更新下拉框信息
        function refreshMyCombobox(strModels) {
            if ($(window.parent.document).find('#idIframe-11102').length > 0) {
                $(window.parent.document.getElementById("idIframe-11102").contentWindow.document.getElementById("idRefreshCombobox")).val(strModels[0]);
                $(window.parent.document.getElementById("idIframe-11102").contentWindow.document.getElementById("idRefreshCombobox")).click();
            }
            for (var i = 0; i < strModels.length; i++) {
                var data = getComboboxData(strModels[i] + "2");
                //这里是当前页面有的comgbobox
                if (strModels[i] == "Tgysxx") {
                    data.unshift({ "dm": "", "mc": "全部供应商", "selected": true });
                    reLoadCombobox("cmbProviderP0111", data);

                }
                else if (strModels[i] == "Tspxx") {
                    data.unshift({ "dm": "", "mc": "全部药品", "selected": true });
                    reLoadCombobox("cmbDrugP0111", data);
                }
            }
        }
    </script>
</head>
<body>
    <div class="title_bar">
        <div class="topi">
            <div class="column">
                <div id="added">
                    <ul class="topnav">
                        <li><a href="#" onclick="viewDetail_P0111()">查看明细</a>
                            <ul class="addnav">
                                <li><a href="#" onclick="makeExportData(strTableP0111,'采购统计')">导出</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
                <div class="dedt">
                    <ul>
                        <li>
                            <select id="cbmSearchTypeP0111" class="easyui-combobox">
                            </select>
                        </li>
                        <li>
                            <select id="cmbDateExtentP0111" class="easyui-combobox">
                            </select>
                        </li>
                        <li class="inp_70">
                            <input id="dateStartTimeP0111" type="text" style="text-align: center" onchange="dateTimeChange_P0111()" />
                            <font class="text_hx">&nbsp;&nbsp;</font>
                            <input id="dateEndTimeP0111" type="text" style="text-align: center" onchange="dateTimeChange_P0111()" />
                        </li>
                        <li>
                            <select id="cmbProviderP0111" class="easyui-combobox">
                            </select>
                        </li>
                        <li>
                            <select id="cmbDrugP0111" class="easyui-combobox">
                            </select>
                        </li>
                        <li class="unline">
                            <input id="cheIsGoodsRejected" type="checkbox" /><span onclick="$('#cheIsGoodsRejected').attr('checked',!$('#cheIsGoodsRejected').attr('checked'))">包含退货</span></li>
                        <li class="enter"><a id="btnSearchDataP0111" href="#" onclick="searchDataClick_P0111()">
                            查询</a></li>
                    </ul>
                </div>
                <div class="clr">
                </div>
            </div>
            <div>
            </div>
        </div>
        <div class="clr">
        </div>
    </div>
    <div class="mation">
        <div id="divTp0111" class="mation_div">
            <table id="Tp0111">
            </table>
        </div>
        <div id="divTp011101" class="mation_div">
            <table id="Tp011101">
            </table>
        </div>
    </div>
</body>
</html>
