<!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>
    <!--css引用--->
    <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/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/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/ciho.js" type="text/javascript"></script>
    <script src="../../Scripts/page.js" type="text/javascript"></script>
    <script src="../../Scripts/03/p0302.js" type="text/javascript"></script>
    <script src="../../Scripts/03/p030201.js" type="text/javascript"></script>
    <script type="text/javascript">
        var bLoadComplete = false;
        $(function () {
            //转换下拉框控件类型
            strTableNameP0302 = "Tp0302";
            $("#cmbDateExtentP0302").combobox();
            $("#cmbLxP0302").combobox();
            $("#cmbCkexportP0302").combobox();
            $("#cmbCkfoldP0302").combobox();
            $("#cmbYpP0302").combobox();
            //修改combobox下拉箭头的样式。
            addArrowClass();
            inputAndBindData("dateStartTimeP0302", false, null, dateTimeChange_P0302);
            inputAndBindData("dateEndTimeP0302", false, null, dateTimeChange_P0302);
            //页面加载方法
            pageLoad_P0302();

            //改变窗口大小时，改变表格的高度和宽度。
            window.onresize = function () {
                //隐藏浮动层
                $(".operate").hide();
                resizeGrid(strTableNameP0302, true, true);
                resizeGridScroll(strTableNameP0302);
            }
            bLoadComplete = true;
        });
        function refreshMyCombobox(strModels) { //基本资料有更新，刷新combobox
            for (var i = 0; i < strModels.length; i++) {
                var data = getComboboxData(strModels[i] + "2");

                if (strModels[i] == "Tspxx") {
                    data.unshift({ dm: "", mc: "全部药品" });
                    reLoadCombobox("cmbYpP0302", data);
                }
                if (strModels[i] == "TCkxx") {
                    data.unshift({ dm: "", mc: "调出仓库" });
                    reLoadCombobox("cmbCkexportP0302", data);
                    data.shift({ dm: "", mc: "调出仓库" });
                    data.unshift({ dm: "", mc: "调入仓库" });
                    var khdlist = getComboboxData('Tkhxx2');
                    var ckList = data;
                    if ($("#cmbLxP0302").combobox("getValue") == "601") {
                        $("#cmbCkfoldP0302").combobox("loadData", ckList);
                        $("#cmbCkfoldP0302").combobox("setValue", ckList[0].dm);
                    } else if ($("#cmbLxP0302").combobox("getValue") == "602") {
                        $("#cmbCkfoldP0302").combobox("loadData", khdlist);
                        $("#cmbCkfoldP0302").combobox("setValue", khdlist[0].dm);
                    }
                    else {
                        var items = ckList.concat(khdlist);
                        $("#cmbCkfoldP0302").combobox("loadData", items);
                        $("#cmbCkfoldP0302").combobox("setValue", items[0].dm);
                    }
                    data.shift({ dm: "", mc: "调入仓库" });
                }
                if (strModels[i] == "Tkhxx") {
                    var ckList = getComboboxData('TCkxx2');
                    ckList.unshift({ dm: "", mc: "调入仓库" });
                    var khlist = getComboboxData('Tkhxx2');
                    if ($("#cmbLxP0302").combobox("getValue") == "602") {
                        khlist.unshift({ dm: "", mc: "调入仓库" });
                        $("#cmbCkfoldP0302").combobox("loadData", khlist);
                        $("#cmbCkfoldP0302").combobox("setValue", khlist[0].dm);
                        khlist.shift({ dm: "", mc: "调入仓库" });
                    }
                    else if ($("#cmbLxP0302").combobox("getValue") == "") {
                        var items = ckList.concat(khlist);
                        $("#cmbCkfoldP0302").combobox("loadData", items);
                        $("#cmbCkfoldP0302").combobox("setValue", items[0].dm);
                    }
                    ckList.unshift({ dm: "", mc: "调入仓库" });
                }
            }
        }
    </script>
</head>
<body>
    <div class="title_bar">
        <div class="topi">
            <div class="column">
                <div id="added">
                    <ul class="topnav">
                        <li><a href="#" onclick="showDialog_P030201('1')">&nbsp;&nbsp;新&nbsp;&nbsp;&nbsp;增&nbsp;&nbsp;</a>
                               <span></span>
                        </li>
                    </ul>
                </div>
                <div class="dedt">
                    <ul>
                        <li> 
                            <select id="cmbDateExtentP0302" class="easyui-combobox">
                            </select>
                        </li>
                        <li class="inp_70">
                            <input id="dateStartTimeP0302" type="text" style="width: 80px; text-align: center"
                                onchange="dateTimeChange_P0302()" />
                                <font class="text_hx">&nbsp;&nbsp;</font>
                            <input id="dateEndTimeP0302" type="text" style="width: 80px; text-align: center"
                                onchange="dateTimeChange_P0302()" />
                        </li>
                        <li>
                            <select id="cmbLxP0302" class="easyui-combobox" style="width: 120px"></select>
                        </li>
                        <li>
                            <select id="cmbCkexportP0302" class="easyui-combobox" style="width: 120px"></select>
                        </li>
                        <li>
                            <select id="cmbCkfoldP0302" class="easyui-combobox" style="width: 120px"></select>
                        </li>
                        <li>
                             <select id="cmbYpP0302" class="easyui-combobox" style="width: 120px"></select>
                        </li>
                        <li class="enter"><a href="#" id="btnSearchData" class="buttonSearch" onclick="searchData_P0302()">查询</a></li>
                    </ul>
                </div>
                <div class="clr">
                </div>
            </div>
        </div>
        <div class="clr">
        </div>
    </div>
    <div class="mation">
        <div class="mation_div">
            <table id="Tp0302">
            </table>
        </div>
        <!--分页使用层-->
        <div id="divPageP0302" class="Page"></div>
     </div>
    
    <!-- 弹出窗口使用层 -->
    <div id="divP030201"></div>
    <div id="divAddType"></div>
</body>
</html>

