<!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/combotree.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/page.js" type="text/javascript"></script>
    <script src="../../Scripts/common.js" type="text/javascript"></script>
    <script src="../../Scripts/05/p051504.js" type="text/javascript"></script>
    <script src="../../Scripts/05/P051504_fyd.js" type="text/javascript"></script>
    <script src="../../Scripts/03/p031201_bsd.js" type="text/javascript"></script>
    <script src="../../Scripts/03/p031201_byd.js" type="text/javascript"></script>
    <script src="../../Scripts/05/p051102_ytd.js" type="text/javascript"></script>
    <script src="../../Scripts/01/p011102_cgd.js" type="text/javascript"></script>
    <script src="../../Scripts/01/p011202_fhd.js" type="text/javascript"></script>
    <script src="../../Scripts/01/p011401_fkd.js" type="text/javascript"></script>
    <script src="../../Scripts/02/p021303_skd.js" type="text/javascript"></script>
    <script src="../../Scripts/05/p051801_gzd.js" type="text/javascript"></script>
    <script src="../../Scripts/05/p051801_tzd.js" type="text/javascript"></script>
    <script src="../../Scripts/05/p051001_tcd.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        var bLoadComplete = false;
        $(function () {
            //转换下拉框控件类型
            $("#cmbDateExtentP051504").combobox();
            $("#cmbKhP051504").combobox();
            $("#cmbDrugP051504").combobox();
            $("#cmbZyP051504").combobox();
            addArrowClass();
            $("#cmbKmP051504").cihoComboTree({
                width: 80,
                showMode: "all"
            });
            addTreeArrowClass();
            inputAndBindData("dateStartTimeP051504", false, null, dateTimeChange_P051504);
            inputAndBindData("dateEndTimeP051504", false, null, dateTimeChange_P051504);

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

            //改变窗口大小时，改变表格的高度和宽度。
            window.onresize = function () {
                resizeGrid(strTableP051504, true, true);
                resizeGridScroll(strTableP051504);
            }
            bLoadComplete = true;
        });
        function refreshMyCombobox() {  //基本资料有更新，刷新combobox的方法
            var strModels = $("#idRefreshCombobox").val();
            var data = getComboboxData(strModels + "2");

            if (strModels == "Tspxx") {
                data.unshift({ dm: "", mc: "全部药品", "selected": true });
                reLoadCombobox("cmbDrugP051504", data);
            }
            else if (strModels == "Tkhxx") {
                data.unshift({ dm: "", mc: "全部客户", "selected": true });
                reLoadCombobox("cmbKhP051504", data);
            }
            else if (strModels == "TZyxx") {
                data.unshift({ dm: "", mc: "全部职员", "selected": true });
                data.push({ "dm": "-1", "mc": "其他职员" });
                reLoadCombobox("cmbZyP051504", data);
            }
            else if (strModels == "TKjkm") {
                var objKjkm = ParseData(window.external.DoOptions(strTableP051504, "DoOthers", "{}")).Records;
                if (objKjkm != null && objKjkm != "{}") {
                    objKjkm.unshift({ "id": "", "text": "全部费用科目" });
                    $("#cmbKmP051504").cihoComboTree("loadData", objKjkm);
                }
                objKjkm = {};
            }
        }
        function toExcelMethods() {  //导出方法
            makeExportData(strTableP051504, "费用统计－费用明细");
        }
    </script>
</head>
<body>
    <div class="title_bar">
        <div class="topi">
            <div class="column">
                <div id="Back_box">
                    <ul class="Back_btn">
                        <li class="Back_left"><a href="#" onclick="showDetailP051504();return false;">查看单据</a></li>
                        <li class="Back_cen"><a href="#" onclick="toExcelMethods()">导出</a> </li>
                        <li class="Back_right"><a href="#" onclick="pageBack_P051504()">返回</a> </li>
                    </ul>
                </div>
                <div class="dedt">
                    <ul>
                        <li>
                            <select id="cmbDateExtentP051504" class="easyui-combobox" style="width: 90px">
                            </select>
                        </li>
                        <li>
                            <input id="dateStartTimeP051504" type="text" style="width: 80px; text-align: center"
                                onchange="dateTimeChange_P051504()" />
                                <font class="text_hx">&nbsp;&nbsp;</font>
                            <input id="dateEndTimeP051504" type="text" style="width: 80px; text-align: center"
                                onchange="dateTimeChange_P051504()"/>
                        </li>
                        <li>
                            <input type="text" id="cmbKmP051504" class="ciho-Input"/>
                        </li>
                        <li>
                            <select id="cmbKhP051504" class="easyui-combobox" style="width: 120px">
                            </select>
                        </li>
                        <li>
                            <select id="cmbDrugP051504" class="easyui-combobox" style="width: 120px">
                            </select>
                        </li>
                        <li>
                            <select id="cmbZyP051504" class="easyui-combobox" style="width: 120px">
                            </select>
                        </li>
                        <li class="enter"><a id="btnSearchDataP051504" href="#" onclick="searchDataClick_P051504()">
                            查询</a></li>
                    </ul>
                </div>
                <div class="clr">
                </div>
            </div>
            <div>
            </div>
        </div>
        <div class="clr">
        </div>
    </div>
    <div class="mation">
        <div class="mation_div">
            <table id="Tp051504">
            </table>
        </div>
        <!--分页使用层-->
        <div id="divPageP051504" class="Page"></div>
    </div>

    <div id="divP051504">
    </div>
    <div id="divP05150401"></div>
    <input style="display: none" type="button" id="idRefreshCombobox" value="" onclick="refreshMyCombobox()" />
</body>
</html>
