<link rel="stylesheet" href="/thmz/css/bootstrap/css/bootstrap-select.css"/>
<link rel="stylesheet" href="/thmz/css/bootstrap/css/daterangepicker.css"/>
<link rel="stylesheet" href="/thmz/css/custom.min.css">
<link rel="stylesheet" href="/thmz/css/toll_administration.css">
<script src="/thmz/js/dependent/bootstrap-select.js"></script>
<script src="/thmz/js/dependent/daterangepicker.js"></script>
<script src="/thmz/js/dependent/daterangepicker.zh-CN.js"></script>
<script src="/thmz/js/zy/actpatient.js"></script>
<script src="/thmz/js/dependent/LodopFuncs.js"></script>
<title>住院病人列表</title>
<!-- 打印的样式-->
<style media="print">
    @page {
        size: auto;
        margin: 0mm;
    }
</style>
<div class="row">
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_panel" style="background: #EBEBE4;">
            <div class="panel-body">
                <form id="formSearch" class="form-horizontal" autocomplete="off">
                    <div class="btn-group col-md-3 col-sm-3 col-xs-12" id="pay_mark_group">
                        <button class="btn btn-sm btn-primary" type="button" onclick="payMarkButtonChange(this,0)">
                            &nbsp;&nbsp;在院病人&nbsp;&nbsp;
                        </button>
                        <button class="btn btn-sm btn-default" type="button" onclick="payMarkButtonChange(this,1)">
                            &nbsp;&nbsp;出院病人&nbsp;&nbsp;
                        </button>
                    </div>
                    <div class="form-group col-md-9 col-sm-9 col-xs-12">
                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="cardNo">卡号
                        </label>
                        <div class="col-md-2 col-sm-2 col-xs-12">
                            <input id="cardNo" class="form-control col-md-7 col-xs-12" type="text"
                                   placeholder="患者ID/卡号">
                        </div>
                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="name">姓名</label>
                        <div class="col-md-2 col-sm-2 col-xs-12" style="float: left;">
                            <input type="text" class="form-control" id="name" placeholder="患者姓名">
                            <input type="hidden" id="patientId"/>
                        </div>
                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="deptNoParam">病区
                        </label>
                        <div class="col-md-2 col-sm-2 col-xs-12">
                            <select class="form-control selectpicker show-tick" data-live-search="true" title="请选择"
                                    id="deptNoParam" onchange="initSmallDeptByDept()">
                            </select>
                        </div>
                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="smallDeptParam">小科室
                        </label>
                        <div class="col-md-2 col-sm-2 col-xs-12">
                            <select class="form-control selectpicker show-tick" data-live-search="true" title="请选择"
                                    id="smallDeptParam">
                            </select>
                        </div>
                    </div>
                    <div class="btn-group col-md-3 col-sm-3 col-xs-12"></div>
                    <div class="form-group col-md-9 col-sm-9 col-xs-12">
                        <!--<div class="col-md-3 col-sm-3 col-xs-12"></div>-->
                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="inpatientNo">住院号
                        </label>
                        <div class="col-md-2 col-sm-2 col-xs-12">
                            <input id="inpatientNo" class="form-control col-md-7 col-xs-12" type="text"
                                   placeholder="住院号">
                        </div>
                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="reportrange" style="width: 75px;"
                               id="timeParams">
                            入院时间
                        </label>
                        <div class="col-md-4 col-sm-4 col-xs-12">
                            <div id="reportrange" class="pull-right"
                                 style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc">
                                <i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
                                <span>December 30, 2014 - January 28, 2015</span> <b class="caret"></b>
                            </div>
                        </div>
                        <div class="col-md-2 col-sm-2 col-xs-12" style="width: 105px;">
                            <!--<label style="float: right;">-->
                            <!--只看自己 <input id="ownData" type="checkbox"/>-->
                            <!--</label>-->
                        </div>
                        <div class="col-md-1 col-sm-1 col-xs-12" style="text-align:left;">
                            <button type="button" style="margin-left:20px" id="btn_clean" class="btn btn-primary"
                                    title="重置"><i class="fa fa-rotate-left"></i>
                            </button>
                        </div>
                        <div class="col-md-1 col-sm-1 col-xs-12" style="text-align:left;">
                            <button type="button" style="margin-left:3px" id="btn_query" class="btn btn-primary"
                                    title="查询"><i class="fa fa-search"></i>
                            </button>
                        </div>
                    </div>
                </form>
            </div>
            <table id="tb_table"></table>
        </div>
    </div>
</div>


<!--出院结算弹窗开始-->
<div class="modal fade bs-example-modal-sm in" tabindex="-1" role="dialog" aria-hidden="true" id="settlementModal"
     style="top:20%;">
    <div class="modal-dialog modal-sm">
        <div class="modal-content" style="width: 480px;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" onclick="clearMode()"><span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">出院结算</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal form-label-left" novalidate>
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="dismissFlag">结算类型
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <select class="form-control selectpicker show-tick" id="dismissFlag" title="请选择"
                                    onchange="dismissFlagChange()">
                            </select>
                        </div>
                    </div>
                    <div class="item form-group hide" id="myDatepickerDiv">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="myDatepicker">断账时间
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <div class="form-group">
                                <div class='input-group date' id='myDatepicker'>
                                    <input type='text' class="form-control"/>
                                    <span class="input-group-addon">
                               <span class="glyphicon glyphicon-calendar"></span>
                            </span>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <input id="inpatientNoParams" type="hidden"/>
                <input id="admissTimesParams" type="hidden"/>
                <button type="button" class="btn btn-primary" onclick="execute()">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal" onclick="clearMode()">取消</button>
            </div>
        </div>
    </div>
</div>
<!--出院结算弹窗结尾-->


<!--出院结算异常弹窗开始-->
<div class="modal fade bs-example-modal-sm in" tabindex="-1" role="dialog" aria-hidden="true" id="ycyzModal">
    <div class="modal-dialog modal-sm">
        <div class="modal-content" style="width: 980px;margin-left: -300px;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">异常状态医嘱 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<small style="color: red">
                    结算失败,当前病人有以下异常医嘱需要处理
                </small>
                </h4>
            </div>
            <div class="modal-body">
                <table id="settlement_table"></table>
                <table id="settlement_table_detail"></table>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
<!--出院结算异常弹窗结尾-->


<!--账页弹窗开始-->
<div class="modal fade bs-example-modal-sm in" tabindex="-1" role="dialog" aria-hidden="true" id="zyLedgerFileModal">
    <div class="modal-dialog modal-sm">
        <div class="modal-content" style="width: 980px;margin-left: -300px;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">账页信息</h4>
            </div>
            <div class="modal-body">
                <table id="zyLedgerFile_table"></table>
                <table id="datatable" class="table table-striped table-bordered" style="margin-top: 10px;">
                    <tbody>
                    <tr>
                        <td>西药费</td>
                        <td id="charge1">0.0</td>
                        <td>中草药费</td>
                        <td id="charge2">0</td>
                        <td>床位费</td>
                        <td id="charge3">0</td>
                        <td>B超</td>
                        <td id="charge4">0</td>
                    </tr>
                    <tr>
                        <td>手术器械使用费</td>
                        <td id="charge5">0</td>
                        <td>心电监护</td>
                        <td id="charge6">0</td>
                        <td>体外反搏</td>
                        <td id="charge7">0</td>
                        <td>电胸电图</td>
                        <td id="charge8">0</td>
                    </tr>
                    <tr>
                        <td>心脑电图</td>
                        <td id="charge9">0</td>
                        <td>麻醉费</td>
                        <td id="charge10">0</td>
                        <td>透视照片</td>
                        <td id="charge11">0</td>
                        <td>手术费</td>
                        <td id="charge12">0</td>
                    </tr>
                    <tr>
                        <td>化验</td>
                        <td id="charge13">0</td>
                        <td>输血</td>
                        <td id="charge14">0</td>
                        <td>输氧</td>
                        <td id="charge15">0</td>
                        <td>接生</td>
                        <td id="charge16">0</td>
                    </tr>
                    <tr>
                        <td>护婴</td>
                        <td id="charge17">0</td>
                        <td>CT</td>
                        <td id="charge18">0</td>
                        <td>护理</td>
                        <td id="charge19">0</td>
                        <td>陪护</td>
                        <td id="charge20">0</td>
                    </tr>
                    <tr>
                        <td>理疗费</td>
                        <td id="charge21">0</td>
                        <td>抢救</td>
                        <td id="charge22">0</td>
                        <td>卫生处理</td>
                        <td id="charge23">0</td>
                        <td>消毒</td>
                        <td id="charge24">0</td>
                    </tr>
                    <tr>

                        <td>治疗费</td>
                        <td id="charge25">0</td>
                        <td>其他</td>
                        <td id="charge26">0</td>
                        <td>材料费</td>
                        <td id="charge27">0</td>
                        <td>中成药费</td>
                        <td id="charge28">0</td>
                    </tr>
                    <tr>
                        <td>暂存款</td>
                        <td id="deposit">2084.21</td>
                        <td id="settleTitle">补交</td>
                        <td id="settle">0</td>
                        <td>余额</td>
                        <td id="balance">0</td>
                        <td style="font-weight:bold">合计</td>
                        <td id="totalCharge" style="font-weight:bold">0</td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
<!--账页弹窗结尾-->



<!--收费弹窗开始-->
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-hidden="true" id="confirmFeeModal">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" style="width: 680px;margin-left: 120px;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" ><span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title" id="settleType">补交</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal form-label-left" id="payForm" novalidate>
                    <div class="item form-group"
                         style="padding: 20px 10px;background: rgb(245, 246, 250);border-radius: 4px;border: none;">
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <div class="total"> 总计费用：
                                    <span class="amountMoney" id="amountMoneyConfirm">0.00</span><span>元</span>
                                </div>
                            </div>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <div class="total"> 实际预交：
                                    <span class="amountMoney" id="depositConfirm">0.00</span><span>元</span>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <div class="total"> 医保记账：
                                    <span class="amountMoney" id="ybjzjeConfirm">0.00</span><span>元</span>
                                </div>
                            </div>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <div class="total" > <span id="settleName">补交金额：</span>
                                    <span class="amountMoney" id="settleConfirm">0.00</span><span>元</span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="item form-group pay-item">
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            <div class="col-md-2 col-sm-2 col-xs-12"></div>
                            <label class="col-md-3 col-sm-3 col-xs-12" for="cash">
                                <select class="form-control selectpicker show-tick" required="true"
                                        id="payType" onchange="checkFee(false)"></select>
                            </label>
                            <div class="col-md-3 col-sm-3 col-xs-12">
                                <input id="cash" class="form-control col-md-5 col-xs-12" type="number"
                                       data-placement="bottom-right" min="0" onchange="checkFee(false)">
                            </div>
                            <div class="col-md-1 col-sm-1 col-xs-12" style="line-height: 34px;">元</div>
                            <div class="col-md-3 col-sm-3 col-xs-12 hide">
                                <button type="button" class="btn btn-primary" id="addPayType">
                                    <span>增加收款方式</span>
                                </button>
                                <input type="hidden" id="payTypeIndex" value="0"/>
                            </div>
                        </div>
                    </div>
                    <div class="item form-group" id="changeAmountParent">
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            <div class="col-md-2 col-sm-2 col-xs-12"></div>
                            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="surplusAmount">剩余应退：
                            </label>
                            <div class="col-md-3 col-sm-3 col-xs-12">
                                <input id="surplusAmount" class="form-control col-md-5 col-xs-12"
                                       data-placement="bottom-right" readonly>
                            </div>
                            <div class="col-md-1 col-sm-1 col-xs-12" style="line-height: 34px;">元</div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <!--出纳所需条件-->
                <input id="inpatientNoTeller" type="hidden"/>
                <!--出纳所需条件-->
                <input id="admissTimesTeller" type="hidden"/>
                <button type="button" class="btn btn-primary" onclick="saveTeller()" id="saveTeller">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal" >取消</button>
            </div>
        </div>
    </div>
</div>
<!--收费弹窗结尾-->


<!--打发票弹窗开始-->
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-hidden="true" id="repPrintModal">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" style="width: 420px;margin-left: 200px;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title" id="tip_title">发票打印</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal form-label-left" novalidate>
                    <table class="table table-striped table-bordered">
                        <thead>
                        <tr>
                            <th>发票号<span style="font-size: 1px;margin-left: 20px;" id="tip_message">请选择需要打印发票的账页</span></th>
                        </tr>
                        </thead>
                        <tbody id="repPrintTable">
                        </tbody>
                    </table>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
<!--打发票弹窗结尾-->


<object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
    <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0></embed>
</object>

