<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChargeTotal.aspx.cs" Inherits="Medical.MQuery.SysChargeTotal.ChargeTotal" %>

<%@ 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></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>
    <div class="pt-panel">
        <strong>门诊收费登记</strong>
        <form name="fCondition" class="pt-padding">
            <ucLoadButton:LoadButton ID="LoadButton1" runat="server"/>
            <dl>
                <dt>处方编号</dt>
                <dd><input type="text" name="num" /></dd>
            </dl>
            <ucDate:Date ID="ucDate" Start="Tody" End="Tody" runat="server" />
        </form>
    </div>
    <div class="pt-panel pt-below">
        <strong>查询一览</strong>
        <div class="pt-grid_frame">
            <table class="pt-grid" id="grid">
                <thead>
                    <tr>
                        <th rowspan='2'>门诊号</th>
                        <th rowspan='2'>处方编号</th>
                        <th rowspan='2'>姓名</th>
<%--                        <th rowspan='2'>医疗证号</th>--%>
                        <th rowspan='2'>收费日期</th>
                        <th colspan='2'>药品费</th>
                        <th rowspan='2'>一般诊疗费</th>
                        <th rowspan='2'>床位费</th>
                        <th rowspan='2'>检验费</th>
                        <th colspan='4'>检查费</th>
                        <th colspan='2'>治疗费</th>
                        <th rowspan='2'>手术费</th>
                        <th rowspan='2'>其他</th>
                        <th rowspan='2'>应收合计</th>
                        <th rowspan='2'>实收合计</th>
<%--                        <th rowspan='2'>新农合统筹报销</th>--%>
                    </tr>
                    <tr>
                        <th>西药</th>
                        <th>中药</th>
                        <th>心电图</th>
                        <th>B超</th>
                        <th>X线</th>
                        <th>其他</th>
                        <th>西医治疗费</th>
                        <th>中医治疗费</th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
        <ucPager:Pager ID="gridPager" runat="server" />
    </div>
    <script>
        (function() {
            var url = "ChargeTotal.aspx",
            grid = new Grid({ id: "grid", url: url, pager: new Pager("gridPager"), bindFun: bindData, isAfter:0 });

            function init() {
                DateValidate(document.getElementById("startDate"), document.getElementById("endDate"));
                grid.search();
                bindEvents();
            }

            function bindEvents() {
                $("#btnQuery").click(function() {
                    grid.search(true);
                });
            }
            function bindData(tr, data) {
                tr.append($("<td>").html(data.wCode))
                .append($("<td>").html(data.cNum))
                .append($("<td>").html(data.wName))
//                .append($("<td>").html(data.wMedicalCode))
                .append($("<td>").html(data.wChargeDate))
                .append($("<td>").html(data.cWesternDrug))
                .append($("<td>").html(data.cChineseDrug))
                .append($("<td>").html(data.cGeneral))
                .append($("<td>").html(data.cObserve))
                .append($("<td>").html(data.cInspection))
                .append($("<td>").html(data.cECG))
                .append($("<td>").html(data.cBScan))
                .append($("<td>").html(data.cXRay))
                .append($("<td>").html(data.cIOther))
                .append($("<td>").html(data.cWesternCure))
                .append($("<td>").html(data.cChineseCure))
                .append($("<td>").html(data.cOperation))
                .append($("<td>").html(data.cOther))
                .append($("<td>").html(data.cReceivable))
                .append($("<td>").html(data.cReal))
//                .append($("<td>").html(data.cExpenseAccount));
            }
            init();
        })();
    </script>
</body>
</html>
