<!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>
    <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/common.js" type="text/javascript"></script>
    <script src="../../Scripts/page.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/02/p0201.js" type="text/javascript"></script>
    <script src="../../Scripts/02/p020101.js" type="text/javascript"></script>
    <script src="../../Scripts/02/p020102.js" type="text/javascript"></script>
    <script src="../../Scripts/02/p020301.js" type="text/javascript"></script>
    <script src="../../Scripts/02/p020302.js" type="text/javascript"></script>
    <script src="../../Scripts/ciho.js" type="text/javascript"></script>
</head>
<body>
    <div class="title_bar">
        <div class="topi">
            <div class="column">
                <div id="added">
                    <ul class="topnav">
                        <li><a href="#" onclick="openSales(1)">&nbsp;&nbsp;销&nbsp;&nbsp; 售&nbsp;&nbsp;</a>
                            <ul class="addnav">
                                <li><a href="#" onclick="showDialogP020102('1');">退货</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
                <div class="dedt">
                    <ul>
                        <li>
                            <select id="cmbDateExtentP0201" class="easyui-combobox">
                                <option selected="selected" value='本月'>本月</option>
                                <option value='本周'>本周</option>
                                <option value='上一月'>上一月</option>
                                <option value='本季度'>本季度</option>
                                <option value='近半年'>近半年</option>
                                <option value='本年'>本年</option>
                            </select>
                        </li>
                        <li>
                            <input id="dateStartTimeP0201" type="text" class="easyui-combobox" onchange="dateTimeChangeP0201();" />
                            <font class="text_hx">&nbsp;&nbsp;</font>
                            <input id="dateEndTimeP0201" type="text" class="easyui-combobox" onchange="dateTimeChangeP0201();" />
                        </li>
                        <li>
                            <!-- 全部客户 -->
                            <select id="cmbKhP0201" class="easyui-combobox">
                            </select>
                        </li>
                        <li>
                            <!-- 全部药品 -->
                            <select id="cmbSpP0201" class="easyui-combobox">
                            </select>
                        </li>
                        <li>
                            <!-- 全部销售员 -->
                            <select id="cmbZyP0201" class="easyui-combobox">
                            </select>
                        </li>
                        <li>
                            <!-- 全部单据类型 -->
                            <select id="cmbBillTypesP0201" class="easyui-combobox">
                            </select>
                        </li>
                        <li class="enter"><a id="btnSearchDataP0201" href="#">查询</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="Tp0201">
            </table>
        </div>
        <div id="divPageP0201" class="Page">
        </div>
    </div>
    <!-- 弹出层 -->
    <div id="divP020101">
    </div>
    <div id="divP020102">
    </div>
    <div id="divP020103">
    </div>
    <div id="divP02010301">
    </div>
    <!-- 收款单使用 -->
    <div id="divP020301">
    </div>
    <!-- 收款单-回款分配使用 -->
    <div id="divP020302">
    </div>
    <div id="divAddType">
    </div>
</body>
<script type="text/javascript">

    var bLoadComplete = false;
    $(document).ready(function () {
        try {
            //改变窗口大小时。
            window.onresize = function () {
                $(".operate").hide();

                resizeGrid(strTableP0201, true, true)
                resizeGridScroll(strTableP0201);
            }

            //查询点击事件
            $("#btnSearchDataP0201").click(function () {
                objPageParamP0201.sortfield = "djdate";
                objPageParamP0201.orderby = "desc";
                objPageParamP0201.flag = 1;

                //加载表格数据
                searchDataClickP0201();
            });

            //搜索头部信息
            getSearchInfoP0201();

            //配置信息
            var objConfig = ParseData(window.external.DoOptions(strTableP0201, "GetTableConfig", "{}"));
            createGrid(strTableP0201, objConfig.colNames, objConfig.colModel, "{}", onSelectGridP0201, null, true, funcDbClick);

            //设置属性
            var objTable = $("#" + strTableP0201);
            objTable.setGridParam({ gridComplete: funcChangeRed });
            objTable.setGridParam({ onSortCol: sortDataP0201 });
            objTable.setColProp("a2", { formatter: formatterP0201Count });
            objTable.setColProp("dj", { formatter: formatterP0201Price });
            objTable.setColProp("a3", { formatter: formatterP0201Money });
            objTable.setColProp("wsk", { formatter: formatterP0201Money });
            objTable.setColProp("a5", { formatter: formatterP0201Money });
            objTable.setColProp("a4", { formatter: formatterP0201A4 });

            //创建分页
            createPage(strPageP0201, strTableP0201);

            //分页数据
            objPageParamP0201.sortfield = "djdate";
            objPageParamP0201.orderby = "desc";

            //设置表格的高度
            resizeGrid(strTableP0201, true, true);

            //加载表格数据
            searchDataClickP0201();

            bLoadComplete = true;
        }
        catch (e) {
            proceError("P0201", e.ToString());
        }
    });
</script>
</html>
