<!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>
    <!--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/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/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/02/p0211.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        var bLoadComplete = false;
        $(function () {
            //转换下拉框控件类型
            $("#cbmSearchTypeP0211").combobox();
            $("#cmbDateExtentP0211").combobox();
            $("#cmbCustomerP0211").combobox();
            $("#cmbDrugP0211").combobox();
            $("#cmbZyP0211").combobox();
            addArrowClass();
            inputAndBindData("dateStartTimeP0211", false, null, dateTimeChange_P0211);
            inputAndBindData("dateEndTimeP0211", false, null, dateTimeChange_P0211);

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

            //采购明细的iframe
            var iHeightDetail = window.parent.document.documentElement.clientHeight; //设定新创建的iframe的高度，宽度
            var strIframeHtml = "<iframe id=\"idIframe-21103\" frameborder=\"0\" scrolling=\"no\" style=\"display:none;width:100%;height:" + iHeightDetail + "\"></iframe>";
            $(window.parent.document).find("#tabs").find("#211").append(strIframeHtml);
            //改变窗口大小时，改变表格的高度和宽度。
            window.onresize = function () {
                resizeGrid(strTableP0211, true, false);
                resizeGridScroll(strTableP0211);
            }
            bLoadComplete = true;
        });
        function refreshMyCombobox(strModels) { //基本资料有更新，刷新combobox
            try {
                if ($(window.parent.document).find('#idIframe-21103').length > 0) {
                    $(window.parent.document.getElementById("idIframe-21103").contentWindow.document.getElementById("idRefreshCombobox")).val(strModels[0]);
                    $(window.parent.document.getElementById("idIframe-21103").contentWindow.document.getElementById("idRefreshCombobox")).click();
                }
                for (var i = 0; i < strModels.length; i++) {
                    var data;

                    if (strModels[i] == "Tspxx") {
                        data = getComboboxData(strModels[i] + "2");
                        data.unshift({ dm: "", mc: "全部药品", "selected": true });
                        reLoadCombobox("cmbDrugP0211", data);
                    }
                    if (strModels[i] == "Tkhxx") {
                        data = getComboboxData(strModels[i] + "2");
                        data.unshift({ dm: "", mc: "全部客户", "selected": true });
                        reLoadCombobox("cmbCustomerP0211", data);
                    }
                    if (strModels[i] == "TZyxx") {
                        data = getComboboxData(strModels[i] + "2");
                        data.unshift({ "dm": "", "mc": "全部销售员", "selected": true });
                        data.push({ "dm": "-1", "mc": "其他销售员" });
                        reLoadCombobox("cmbZyP0211", data);
                    }
                }
            } catch (e) {
                proceError(strTableP0211, "");
            }
        }
    </script>
</head>
<body>
    <div class="title_bar">
        <div class="topi">
            <div class="column">
                <div id="added">
                    <ul class="topnav">
                        <li><a href="#" onclick="viewDetail_P0211();return false;">查看明细</a>
                            <ul class="addnav">
                                <li><a href="#" onclick="toExcelMethod()">导出</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
                <div class="dedt">
                    <ul>
                        <li>
                            <select id="cbmSearchTypeP0211" class="easyui-combobox" style="width: 90px">
                            </select>
                        </li>
                        <li>
                            <select id="cmbDateExtentP0211" class="easyui-combobox" style="width: 90px">
                            </select>
                        </li>
                        <li>
                            <input id="dateStartTimeP0211" type="text" style="width: 80px; text-align: center"
                                onchange="dateTimeChange_P0211()" />
                                <font class="text_hx">&nbsp;&nbsp;</font>
                            <input id="dateEndTimeP0211" type="text" style="width: 80px; text-align: center"
                                onchange="dateTimeChange_P0211()" />
                        </li>
                        <li>
                            <select id="cmbCustomerP0211" class="easyui-combobox" style="width: 120px">
                            </select>
                        </li>
                        <li>
                            <select id="cmbDrugP0211" class="easyui-combobox" style="width: 120px">
                            </select>
                        </li>
                        <li>
                            <select id="cmbZyP0211" class="easyui-combobox" style="width: 120px">
                            </select>
                        </li>
                        <li class="unline">
                            <input id="cheIsGoodsRejected" type="checkbox" style="width: 18px; border: 0px" />包含退货
                        </li>
                        <li class="enter"><a id="btnSearchDataP0211" href="#" onclick="searchDataClick_P0211('0')">
                            查询</a></li>
                    </ul>
                </div>
                <div class="clr">
                </div>
            </div>
            <div>
            </div>
        </div>
        <div class="clr">
        </div>
    </div>
    <div class="mation">
        <div id="divTp0211" class="mation_div">
            <table id="Tp0211">
            </table>
        </div>
        <div id="divTp021101" class="mation_div">
            <table id="Tp021101">
            </table>
        </div>
        <div id="divTp021102" class="mation_div">
            <table id="Tp021102">
            </table>
        </div>
    </div>
</body>
</html>
