<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/common/socket-com.js"></script>
<script src="/thmz/js/mz/west_pharmacy_dispensing.js"></script>
<script src="/thmz/js/dependent/LodopFuncs.js"></script>
<title>门诊西药房配药</title>
<div class="row" style="height: calc(100% - 60px);overflow-y: auto;" >
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_panel" style="background: #EBEBE4;">
            <div style="padding: 15px 15px 0px 15px;">
                <form id="formSearch" class="form-horizontal " autocomplete="off">
                    <div class="form-group">
                        <div class="col-md-3 col-sm-3 col-xs-12 item"></div>
                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="patientIdSearch">病人ID
                        </label>
                        <div class="col-md-2 col-sm-2 col-xs-12">
                            <input id="patientIdSearch" class="form-control optional" type="text">
                        </div>
                        <!--<div class="col-md-3 col-sm-3 col-xs-12 item">
                            <label class="control-label col-md-4 col-sm-4 col-xs-12"
                                   for="printStatusSearch">打印状态</label>
                            <div class="col-md-8 col-sm-8 col-xs-12">
                                <select class="form-control selectpicker show-tick" required="required" title="请选择"
                                        id="printStatusSearch">
                                    <option value="0" selected>未打印</option>
                                    <option value="1">已打印</option>
                                </select>
                            </div>
                        </div>-->
                        <div class="col-md-3 col-sm-3 col-xs-12 item">
                            <label class="control-label col-md-4 col-sm-4 col-xs-12"
                                   for="dispensingStatusSearch">发药状态</label>
                            <div class="col-md-8 col-sm-8 col-xs-12">
                                <select class="form-control selectpicker show-tick" required="required" title="请选择"
                                        id="dispensingStatusSearch" onchange="initTable()">
                                    <option value="0" selected>未配药</option>
                                    <option value="5">已配未发药</option>
                                    <option value="1">已发药</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="form-group ">
                        <div class="col-md-3 col-sm-3 col-xs-12 item">
                            <label>
                                自动打印 <input id="aotuPrint" type="checkbox"/>
                            </label>
                        </div>
                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="nameSearch">姓名
                        </label>
                        <div class="col-md-2 col-sm-2 col-xs-12">
                            <input id="nameSearch" class="form-control optional" type="text">
                        </div>
                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="reportrange">
                            时间范围
                        </label>
                        <div class="col-md-3 col-sm-3 col-xs-12" style="width: 220px;">
                            <div id="reportrange" class="pull-right"
                                 style="background: #fff; cursor: pointer; padding: 6.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 item">
                            <button type="button" style="margin-left:3px" id="btn_query" class="btn btn-primary"
                                    title="查询"><i class="fa fa-search"></i>
                            </button>
                            <button type="button" id="btn_clean" class="btn btn-primary"
                                    title="重置"><i class="fa fa-rotate-left"></i>
                            </button>
                        </div>
                    </div>
                </form>
            </div>
            <div>
                <table id="prescription_table"></table>
            </div>
        </div>

        <div id="report_table" class="in"
             style="display: none;width:550px;height: 700px;margin:0 auto;border: 1px solid #337ab7;font-size: 16px;padding: 40px 20px 40px 20px;overflow-y: auto; overflow-x:hidden;">
            <div id="print_view" style="position: relative;">
                <div id="report_table_1">
                    <h3 style="margin-left: 160px;">泰和医院处方笺</h3>
                    <div>
                        <form>
                            <input style="border: 0px;width: 80px;margin-left: 380px;font-size: 17px;font-weight: bold;background-color: white;color: black;" disabled value="" id="drugFlag"/>
                            <br/>
                            <span style="font-size: 14px;">医疗/医保卡号:</span>
                            <input style="border: 0px;width: 150px;background-color: white;color: black;font-size: 14px;" disabled value="" id="ybCardNo"/>
                            <span style="margin-left: 10px;font-size: 14px;">处方号:</span>
                            <input style="border: 0px;width: 120px;background-color: white;color: black;font-size: 14px;" disabled value="" id="realNo"/>
                            <div style="border:1px solid black;width: 470px;"></div>
                            <span style="font-size: 14px;margin-bottom: 5px;">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名:</span>
                            <input style="margin-bottom: 5px;font-size: 14px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 75px;background-color: white;color: black;"
                                   disabled value="" id="name"/>
                            <span style="margin-bottom: 5px;margin-left: 20px;font-size: 14px;">性别:</span>
                            <input style="margin-bottom: 5px;font-size: 14px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 40px;background-color: white;color: black;"
                                   disabled value="" id="sex"/>
                            <span style="margin-bottom: 5px;margin-left: 20px;font-size: 14px;">年龄:</span>
                            <input style="margin-bottom: 5px;font-size: 14px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 55px;background-color: white;color: black;"
                                   disabled value="" id="age"/>
                            <span style="margin-bottom: 5px;margin-left: 20px;font-size: 14px;">体重(KG):</span>
                            <input style="margin-bottom: 5px;font-size: 14px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 28px;background-color: white;color: black;"
                                   disabled value=""/>
                            <br/>
                            <span style="margin-bottom: 5px;font-size: 14px;">病&nbsp;&nbsp;历&nbsp;&nbsp;号:</span>
                            <input style="margin-bottom: 5px;font-size: 14px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 150px;background-color: white;color: black;"
                                   disabled value="" id="patientId"/>
                            <span style="margin-bottom: 5px;margin-left: 50px;font-size: 14px;">科&nbsp;&nbsp;&nbsp;&nbsp;别:</span>
                            <input style="margin-bottom: 5px;font-size: 14px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 154px;background-color: white;color: black;"
                                   disabled value="" id="warnDeptName"/>
                            <br/>
                            <span style="margin-bottom: 5px;font-size: 14px;">身份证号:</span>
                            <input style="margin-bottom: 5px;font-size: 14px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 150px;background-color: white;color: black;"
                                   disabled value="" id="socialNo"/>
                            <span style="margin-bottom: 5px;margin-left: 50px;font-size: 14px;">手机号:</span>
                            <input style="margin-bottom: 5px;font-size: 14px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 152px;background-color: white;color: black;"
                                   disabled value="" id="phoneNo"/>
                            <br/>
                            <span style="margin-bottom: 5px;font-size: 14px;">临床诊断:</span>
                            <input style="margin-bottom: 5px;font-size: 14px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 412px;background-color: white;color: black;"
                                   disabled value="" id="icdText"/>
                            <br/>
                            <span style="margin-bottom: 5px;font-size: 14px;">地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址:</span>
                            <input style="margin-bottom: 5px;font-size: 14px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 250px;background-color: white;color: black;"
                                   disabled value="" id="address"/>
                            <span style="margin-bottom: 5px;margin-left: 5px;font-size: 14px;">日期:</span>
                            <input style="margin-bottom: 5px;font-size: 14px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 117px;background-color: white;color: black;" disabled value="" id="priceTime"/>
                            <br/>
                        </form>
                    </div>
                    <div id="div_yp">
                        <table class="table table-striped table-bordered" >
                            <tbody id="tbody_yp">
                            <!--<tr>
                                <td style="width: 10px;" align="left" valign="top">1.</td>
                                <td style="vertical-align: middle !important;width: 260px;">复方石淋通胶囊(湖南德康天机草堂中国股份有限公司)
                                </td>
                                <td style="vertical-align: middle !important;width: 120px;text-align: right;">0.25g x36粒/盒</td>
                                <td style="vertical-align: middle !important;width: 20px;text-align: right;">×</td>
                                <td style="vertical-align: middle !important;width: 20px;text-align: right;">6.0</td>
                                <td style="vertical-align: middle !important;width: 30px;text-align: right;">盒</td>
                            </tr>
                            <tr>
                                <td colspan="5" style="vertical-align: middle !important;text-align: right;">用法:0.2mg/次 TID 口服</td>
                            </tr>-->
                            </tbody>
                        </table>
                    </div>
                    <div id="zbr_div" style="position: absolute;top:635px; ">
                        <div style="margin-bottom: 5px;margin-top: 10px;"><span style="font-size: 14px;">医师(签章):</span>
                            <input style="font-size: 14px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 190px;background-color: white;color: black;"
                                   disabled value="" id="employeeName"/>
                            <span style="margin-bottom: 5px;margin-left: 50px;font-size: 14px;">药品金额:</span>
                            <input style="margin-bottom: 5px;font-size: 14px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 70px;background-color: white;color: black;"
                                   disabled value="" id="totalPrice"/>
                            <br/>
                            <span style="margin-bottom: 5px;font-size: 14px;">审核药师:</span>
                            <input style="margin-bottom: 5px;font-size: 14px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 55px;background-color: white;color: black;"
                                   disabled value=""/>
                            <span style="margin-bottom: 5px;margin-left: 25px;font-size: 14px;">调配药师/士:</span>
                            <input style="margin-bottom: 5px;font-size: 14px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 55px;background-color: white;color: black;"
                                   disabled value=""/>
                            <span style="margin-bottom: 5px;margin-left: 27px;font-size: 14px;">核对、发药药师:</span>
                            <input style="margin-bottom: 5px;font-size: 14px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 55px;background-color: white;color: black;"
                                   disabled value=""/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--处方详细弹窗开始-->
<div class="modal fade bs-example-modal-sm in" tabindex="-1" role="dialog" aria-hidden="true" id="cfxxModal">
    <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 modal-title-thmz">处方详细</h4>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <form id="fyform" class="form-horizontal" autocomplete="off">
                            <div class="form-group" style="padding-top: 10px;">
                                <label class="control-label col-md-1 col-sm-1 col-xs-12" for="employeeNameLabel">医生:
                                </label>
                                <div class="col-md-2 col-sm-2 col-xs-12">
                                    <input id="employeeNameLabel" class="form-control optional" type="text"
                                           style="border-style: none;box-shadow: 0px 0px 0px 0px;">
                                </div>

                                <label class="control-label col-md-1 col-sm-1 col-xs-12" for="warnDeptNameLabel">科室:
                                </label>
                                <div class="col-md-2 col-sm-2 col-xs-12">
                                    <input id="warnDeptNameLabel" class="form-control optional" type="text"
                                           style="border-style: none;box-shadow: 0px 0px 0px 0px;">
                                </div>
                                <label class="control-label col-md-2 col-sm-2 col-xs-12" for="chargeDateLabel">收费时间:
                                </label>
                                <div class="col-md-3 col-sm-3 col-xs-12">
                                    <input id="chargeDateLabel" class="form-control optional" type="text"
                                           style="border-style: none;box-shadow: 0px 0px 0px 0px;">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-md-1 col-sm-1 col-xs-12" for="icdTextLabel">诊断:
                                </label>
                                <div class="col-md-11 col-sm-11 col-xs-12">
                                    <input id="icdTextLabel" class="form-control optional" type="text"
                                           style="border-style: none;box-shadow: 0px 0px 0px 0px;">
                                </div>
                            </div>
                        </form>
                        <table id="tb_table_detail"
                               style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"></table>
                    </div>
                </div>
            </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>