<!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/ciho-combtree.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/lib/combotree.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/jsonConvert.js" type="text/javascript"></script>
    <script src="../../Scripts/05/p0515.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        var bLoadComplete = false;
        $(function () {
            //转换下拉框控件类型
            $("#cbmSearchTypeP0515").combobox();
            $("#cmbDateExtentP0515").combobox();
            $("#cmbCustomerP0515").combobox();
            $("#cmbZyP0515").combobox();
            $("#cmbYpP0515").combobox();
            addArrowClass();
            $("#cmbKmP0515").cihoComboTree({
                width: 80,
                showMode: "all"
            });
            addTreeArrowClass();
            inputAndBindData("dateStartTimeP0515", false, null, dateTimeChange_P0515);
            inputAndBindData("dateEndTimeP0515", false, null, dateTimeChange_P0515);

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

            //piframe
            var iHeightDetail = window.parent.document.documentElement.clientHeight; //设定新创建的iframe的高度，宽度
            var strIframeHtml = "";
            strIframeHtml += "<iframe id=\"idIframe-51504\" frameborder=\"0\" scrolling=\"no\" style=\"display:none;width:100%;height:" + iHeightDetail + "\"></iframe>";
            //在该tab下添加明细iframe.不需要制定src
            $(window.parent.document).find("#tabs").find("#515").append(strIframeHtml);
            //改变窗口大小时，改变表格的高度和宽度。
            window.onresize = function () {
                resizeGrid(strTableP0515, true, false);
                resizeGridScroll(strTableP0515);
            }
            bLoadComplete = true;
        });
        function refreshMyCombobox(strModels) { //基本资料有更新，刷新combobox的方法
            if ($(window.parent.document).find('#idIframe-51504').length > 0) {
                $(window.parent.document.getElementById("idIframe-51504").contentWindow.document.getElementById("idRefreshCombobox")).val(strModels[0]);
                $(window.parent.document.getElementById("idIframe-51504").contentWindow.document.getElementById("idRefreshCombobox")).click();
            }
            for (var i = 0; i < strModels.length; i++) {
                var data;
                if (strModels[i] == "Tkhxx") {
                    data = getComboboxData(strModels[i] + "2");
                    data.unshift({ dm: "", mc: "全部客户", "selected": true });
                    reLoadCombobox("cmbCustomerP0515", data);
                }
                if (strModels[i] == "TZyxx") {
                    data = getComboboxData(strModels[i] + "2");
                    data.unshift({ "dm": "", "mc": "全部职员", "selected": true });
                    data.push({ "dm": "-1", "mc": "其他职员" });
                    reLoadCombobox("cmbZyP0515", data);
                }
                if (strModels[i] == "Tspxx") {
                    data = getComboboxData(strModels[i] + "2");
                    data.unshift({ "dm": "", "mc": "全部药品", "selected": true });
                    reLoadCombobox("cmbYpP0515", data);
                }
                if (strModels[i] == "TKjkm") {
                    var objKjkm = ParseData(window.external.DoOptions("Tp051504", "DoOthers", "{}")).Records;
                    if (objKjkm != null && objKjkm != "{}") {
                        objKjkm.unshift({ "id": "", "text": "全部费用科目" });
                        $("#cmbKmP0515").cihoComboTree("loadData", objKjkm);
                    }
                    objKjkm = {};
                }
            }
        }
    </script>
</head>
<body>
    <div class="title_bar">
        <div class="topi">
            <div class="column">
                <div id="added">
                    <ul class="topnav">
                        <li><a href="#" onclick="showDetailP0515();return false;">查看明细</a>
                            <ul class="addnav">
                                <li><a href="#" onclick="toExcelMethod()">导出</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
                <div class="dedt">
                    <ul>
                        <li>
                            <select id="cbmSearchTypeP0515" class="easyui-combobox" style="width:90px"></select>
                        </li>
                        <li>
                            <select id="cmbDateExtentP0515" class="easyui-combobox" style="width: 90px">
                            </select>
                        </li>
                        <li>
                            <input id="dateStartTimeP0515" type="text" style="width: 80px; text-align: center"
                                onchange="dateTimeChange_P0515()" />
                                <font class="text_hx">&nbsp;&nbsp;</font>
                            <input id="dateEndTimeP0515" type="text" style="width: 80px; text-align: center"
                                onchange="dateTimeChange_P0515()" />
                        </li>
                        <li>
                            <input type="text" id="cmbKmP0515" class="ciho-Input"/>
                        </li>
                        <li>
                            <select id="cmbCustomerP0515" class="easyui-combobox" style="width: 120px">
                            </select>
                        </li>
                        <li>
                            <select id="cmbYpP0515" class="easyui-combobox" style="width:120px">
                            </select>
                        </li>
                        <li>
                            <select id="cmbZyP0515" class="easyui-combobox" style="width: 120px">
                            </select>
                        </li>
                        <li class="enter"><a id="btnSearchDataP0515" href="#" onclick="searchDataClick_P0515('0')">
                            查询</a></li>
                    </ul>
                </div>
                <div class="clr">
                </div>
            </div>
            <div>
            </div>
        </div>
        <div class="clr">
        </div>
    </div>
    <div class="mation">
        <div id="divTp0515" class="mation_div">
            <table id="Tp0515">
            </table>
        </div>
        <div id="divTp051501" class="mation_div">
            <table id="Tp051501">
            </table>
        </div>
        <div id="divTp051502" class="mation_div">
            <table id="Tp051502">
            </table>
        </div>
        <div id="divTp051503" class="mation_div">
            <table id="Tp051503">
            </table>
        </div>
    </div>
</body>
</html>
