<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DispensingQuery.aspx.cs" Inherits="Medical.MBusiness.SysDispensing.DispensingQuery" %>

<%@ Register Src="../../Controls/Date.ascx" TagName="Date" TagPrefix="ucDate" %>
<%@ Register Src="../../Controls/Pager.ascx" TagName="Pager" TagPrefix="ucPager" %>
<%@ Register Src="../../Controls/LoadButton.ascx" TagName="LoadButton" TagPrefix="ucLoadButton" %>
<!DOCTYPE html>
<html>
<head>
    <title><%=ModuleName%></title>
    <link href="../../css/style.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="../../Scripts/My97DatePicker/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="../../js/myLib/jsHelper_Form.js" type="text/javascript"></script>
    <script src="../../js/myLib/Pager.js" type="text/javascript"></script>
    <script src="../../js/myLib/Grid.js" type="text/javascript"></script>
    <script src="../../js/myLib/jsHelper_Base.js" type="text/javascript"></script>
</head>
<body>
    <form id="fCondition" name="fCondition" >
    <div class="pt-panel">
        <strong><%=ModuleName%></strong>
            <ucLoadButton:LoadButton ID="LoadButton1" runat="server"/>
            <dl>
                <dt>药品类别</dt>
                <dd><select id="category" name="category" runat="server"></select></dd>
            </dl>
            <dl>
                <dt>姓名</dt>
                <dd><input type="text" name="name" /></dd>                
            </dl>
            <dl>
                <dt>药品名称</dt>
                <dd><input type="text" name="drugname" /></dd>
            </dl>
            <dl>
                <dt>经手人</dt>
                <dd><input type="text" name="man" /></dd>
            </dl>
            <ucDate:Date ID="ucDate" runat="server" />
            <%--<dl>
                <dt>金额合计：</dt>
                <dd><span id="totalMoney" class="pt-tip">0.00</span>元</dd>
            </dl>--%>
    </div>
    <div class="pt-panel pt-below">
        <strong>查询一览</strong>
        <div class="pt-grid_frame">
            <table class="pt-grid" id="grid" style="width:1200px">
                <thead>
                    <tr>
                        <th>处方编号</th>
                        <th>姓名</th>
                        <th>发药时间</th>
                        <th>诊断症状</th>
                        <th>药品编号</th>
                        <th>药品名称</th>
                        <th>批号</th>
                        <th>有效期</th>
                        <th>规格</th>
                        <th>单位</th>
                        <th>总量</th>
                        <th>用量</th>
                        <th>用法</th>
                        <th>药品类别</th>
                        <th>医生</th>
                        <th>经手人</th>
                    </tr>
                </thead>
                <tbody></tbody>
            </table>
        </div>
        <ucPager:Pager ID="gridPager" runat="server" />
    </div>
    <script type="text/javascript">
        (function() {
            var url = "DispensingQuery.aspx",
            listbutton = '<%=Medical.MCommon.PageHelper.GetListButton() %>',
            grid = new Grid({ id: "grid", url: url, pager: new Pager("gridPager") }),
            title = '<%=ModuleName %>';

            function init() {
                grid.search();
//                bindMoney();
                bindEvents();
            }

            function bindEvents() {
                $("#btnQuery").click(function() {
                    grid.search(true);
//                    bindMoney();
                });
                $('input[type="text"]').keydown(function(e) {
                    if (e.keyCode == 13) {
                        grid.search(true);
//                        bindMoney();
                    }
                });
            }
//            function bindMoney() {
//                var parms = { action: "getMoney" };
//                $.get(url, $.parseJSON(form2JsonString(fCondition, parms)), function(data) {
//                    $("#totalMoney").text(data);
//                });
//            }
            init();
        })();
    </script>
    </form>
</body>
</html>


