<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_send.js"></script>
<script src="/thmz/js/dependent/LodopFuncs.js"></script>
<title>门诊西药房发退药</title>
<!-- 打印的样式-->
<style media="print">
    @page {
        size: auto;
        margin: 0mm;
    }
</style>
<style>
    .hidden {
        display: none;
    }
</style>
<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 class="panel-body">
                <form id="formSearch" class="form-horizontal" autocomplete="off">
                    <div class="btn-group col-md-2 col-sm-2 col-xs-12" id="send_refund_group">
                        <button class="btn btn-sm btn-primary" type="button" onclick="sendRefundButtonChange(this,0)">
                            &nbsp;&nbsp;发药&nbsp;&nbsp;
                        </button>
                        <button class="btn btn-sm btn-default" type="button" onclick="sendRefundButtonChange(this,1)">
                            &nbsp;&nbsp;退药&nbsp;&nbsp;
                        </button>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-2 col-sm-2 col-xs-12" for="patientId_or_cardNo">病人ID/就诊卡号
                        </label>
                        <div class="col-md-2 col-sm-2 col-xs-12">
                            <input id="patientId_or_cardNo" class="form-control col-md-7 col-xs-12" type="text"
                                   onchange="setPatientId()"
                                   placeholder="病人ID/就诊卡号">
                            <input id="patientId" type="hidden">
                        </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="realNoSearch">流水号
                        </label>
                        <div class="col-md-2 col-sm-2 col-xs-12">
                            <input id="realNoSearch" class="form-control col-md-7 col-xs-12" type="text"
                                   placeholder="流水号">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="btn-group col-md-2 col-sm-2 col-xs-12">
                            <div class="checkbox">
                                <label>
                                    <input type="checkbox" id="sendAndMatch">发配一体
                                </label>
                            </div>
                        </div>
                        <label class="control-label col-md-2 col-sm-2 col-xs-12"
                               for="confirmFlagSearch">状态</label>
                        <div class="col-md-2 col-sm-2 col-xs-12">
                            <select class="form-control selectpicker show-tick" required="required" title="请选择"
                                    onchange="initTbTable()"
                                    id="confirmFlagSearch">
                                <option value="0" selected>未发药</option>
                                <option value="1">已发药</option>
                            </select>
                        </div>
                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="reportrange"
                               style="width: 105px;">
                            缴费时间
                        </label>
                        <div class="col-md-4 col-sm-4 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>
                        <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>
                        <button type="button" id="btn_radiology_send" class="btn btn-primary"
                                title="放射科发药"><i class="glyphicon glyphicon-send"></i>
                        </button>
                        <button type="button" id="btn_ty"
                                class="btn btn-primary hidden"
                                title="退药完成"><i class="fa fa-check-square-o"></i>
                        </button>
                    </div>
                </form>
            </div>
            <div id="tb_table_div">
                <table id="tb_table"></table>
                <div id="report_table" class="in"
                     style="display: none;width:850px;height: 500px;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_zsd" style="position: relative;">
                        <div id="report_table_1">
                            <span style="text-align:center;font-size:18px;font-weight: 700;display:block;">泰和医院门、急诊注射单</span>
                            <span id="dateTime" style="margin-left: 570px;"></span>
                            <div id="div_yp">
                                <table border frame='box' cellspacing="0"
                                       style="width: 760px;border-collapse: collapse;">
                                    <tbody id="zsd_one" style="white-space:nowrap;overflow: hidden;">
                                    <tr style="height: 170px;">
                                        <td colspan="12" style="vertical-align:top;margin-left: 10px;">
                                            <table align="left">
                                                <tbody id="zsd_yp">
                                                <tr>
                                                    <td>&nbsp;&nbsp;</td>
                                                    <td style="vertical-align: middle !important;width: 10px;text-align: center;">
                                                        组
                                                    </td>
                                                    <td style="vertical-align: middle !important;width: 200px;text-align: center;">
                                                        药品名称
                                                    </td>
                                                    <td style="vertical-align: middle !important;width: 60px;text-align: center;">
                                                        剂量
                                                    </td>
                                                    <td style="vertical-align: middle !important;width: 60px;text-align: center;">
                                                        单位
                                                    </td>
                                                    <td style="vertical-align: middle !important;width: 120px;text-align: center;">
                                                        给药方式
                                                    </td>
                                                    <td style="vertical-align: middle !important;width: 60px;text-align: center;">
                                                        频率
                                                    </td>
                                                    <td style="vertical-align: middle !important;width: 60px;text-align: center;">
                                                        天数
                                                    </td>
                                                    <td style="vertical-align: middle !important;width: 120px;text-align: center;">
                                                        规格(备注)
                                                    </td>
                                                </tr>
                                                </tbody>
                                            </table>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                                <table border frame='box' cellspacing="0"
                                       style="width: 760px;border-collapse: collapse;">
                                    <tbody id="zsd_two" style="white-space:nowrap;overflow: hidden;">
                                    <tr>
                                        <td style="vertical-align: middle !important;width: 30px;text-align: center;">
                                            执行时间
                                        </td>
                                        <td style="vertical-align: middle !important;width: 30px;text-align: center;">
                                            配药者
                                        </td>
                                        <td style="vertical-align: middle !important;width: 30px;text-align: center;">
                                            核对者
                                        </td>
                                        <td style="vertical-align: middle !important;width: 30px;text-align: center;">
                                            执行者
                                        </td>
                                        <td style="vertical-align: middle !important;width: 30px;text-align: center;">
                                            备注
                                        </td>
                                        <td style="vertical-align: middle !important;width: 30px;text-align: center;">
                                            执行时间
                                        </td>
                                        <td style="vertical-align: middle !important;width: 30px;text-align: center;">
                                            配药者
                                        </td>
                                        <td style="vertical-align: middle !important;width: 30px;text-align: center;">
                                            核对者
                                        </td>
                                        <td style="vertical-align: middle !important;width: 30px;text-align: center;">
                                            执行者
                                        </td>
                                        <td style="vertical-align: middle !important;width: 30px;text-align: center;">
                                            备注
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                            <span>&nbsp;&nbsp;&nbsp;&nbsp;说明：1.本注射单作为患者注射治疗的凭证，凡注射时请同时携带门诊病历本，并避免空腹注射。<br/>
                                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.门诊注射区开发时间：周一至周日8:00-17:30，急诊室24小时开放</span>
                        </div>
                    </div>
                    <!--注射单打印结束-->
                    <!--药品标签打印开始-->
                    <div id="print_view_bq">
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <span style="font-size:18px;font-weight: 700;">门诊</span>
                            患者药品标签&nbsp;&nbsp;
                            <input style="margin-bottom:3px;border: 0px;width: 30px;background-color: white;color: black;" disabled
                                   value="" id="NO"/>
                        </span>
                        <form style="font-size: 15px;">
                            <span style="margin-bottom:3px;">患者姓名:</span>
                            <input style="margin-bottom:3px;border: 0px;width: 60px;background-color: white;color: black;" disabled
                                   value="" id="ypbq_name"/>
                            <span style="margin-left: 5px;">ID号:</span>
                            <input style="margin-bottom:3px;border: 0px;width: 70px;background-color: white;color: black;" disabled
                                   value="" id="ypbq_patientId"/>
                            <br/>
                            <span style="margin-bottom:3px;">性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别:</span>
                            <input style="margin-bottom:3px;border: 0px;width: 60px;background-color: white;color: black;"
                                   disabled value="" id="ypbq_sex"/>
                            <span style="margin-bottom:3px;margin-left: 5px;">年龄:</span>
                            <input style="margin-bottom:3px;border: 0px;width: 60px;background-color: white;color: black;"
                                   disabled value="" id="ypbq_age"/>
                            <br/>
                            <span style="margin-bottom:3px;">药品名称:</span>
                            <input style="margin-bottom:3px;border: 0px;width: 180px;background-color: white;color: black;"
                                   disabled value="" id="ypbq_drugname"/>
                            <br/>
                            <span style="margin-bottom:3px;">规格数量:</span>
                            <input style="margin-bottom:3px;border: 0px;width: 120px;background-color: white;color: black;"
                                   disabled value="" id="ypbq_specification"/>
                            <input style="margin-bottom:3px;border: 0px;width: 20px;background-color: white;color: black;text-align: right"
                                   disabled value="" id="ypbq_quantity"/>
                            <input style="margin-bottom:3px;border: 0px;width: 20px;background-color: white;color: black;"
                                   disabled value="" id="ypbq_ypUnitName"/>
                            <br/>
                            <span style="margin-bottom:3px;">用法用量:</span>
                            <input style="margin-bottom:3px;border: 0px;width: 60px;background-color: white;color: black;"
                                   disabled value="" id="ypbq_printName"/>
                            <input style="margin-bottom:3px;border: 0px;width: 130px;background-color: white;color: black;"
                                   disabled value="" id="ypbq_comm"/>
                            <br/>
                            <span style="margin-bottom:3px;">嘱&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;托:</span>
                            <input style="margin-bottom:3px;border: 0px;width: 180px;background-color: white;color: black;"
                                   disabled value="" id="ypbq_instructionText"/>
                            <br/>
                            <span style="margin-bottom:3px;">窗&nbsp;&nbsp;口&nbsp;&nbsp;号:</span>
                            <input style="margin-bottom:3px;border: 0px;width: 35px;background-color: white;color: black;"
                                   disabled value="" id="ypbq_windowsNoYf"/>&nbsp;&nbsp;
                            <input style="margin-bottom:3px;border: 0px;width: 120px;background-color: white;color: black;"
                                   disabled value="" id="dataTime"/>
                            <br/>
                        </form>
                    </div>
                    <!--药品标签打印结束-->
                    <!--放射科发药打印开始-->
                    <div id="print_view_fsk" style="position: relative;">
                        <span style="text-align:center;font-size:18px;font-weight: 700;display:block;margin-bottom: 20px">放射科发药记录单</span>
                        起始日期：<span id="startDate" style="margin-right: 100px;"></span>
                        截止日期：<span id="endDate"></span>
                        <table border frame='box' cellspacing="0"
                               style="border-collapse: collapse;">
                            <tbody id="fsk_tbody" style="white-space:nowrap;overflow: hidden;">
                            <tr>
                                <td style="vertical-align: middle !important;width: 30px;text-align: center;">
                                    货位号
                                </td>
                                <td style="vertical-align: middle !important;width: 30px;text-align: center;">
                                    品名
                                </td>
                                <td style="vertical-align: middle !important;width: 30px;text-align: center;">
                                    厂商
                                </td>
                                <td style="vertical-align: middle !important;width: 30px;text-align: center;">
                                    规格
                                </td>
                                <td style="vertical-align: middle !important;width: 30px;text-align: center;">
                                    数量
                                </td>
                            </tr>
                            </tbody>
                        </table>
                        <div style="display: block;text-align: center;margin-top: 10px;">
                            <span>发药人:</span>
                            <input style="border: 0px;width: 100px;background-color: white;color: black;" disabled
                                   value="" id="name"/>
                            <span>核对人:</span>
                            <input style="border: 0px;width: 100px;background-color: white;color: black;" disabled
                                   value=""/>
                        </div>
                    </div>
                    <!--放射科发药打印结束-->
                </div>
            </div>
            <div class="col-md-5 col-sm-5 col-xs-12">
                <div class="col-md-12 col-sm-12 col-xs-12">
                    <table id="tb_table_right_ty"></table>
                </div>
            </div>
            <div class="col-md-5 col-sm-5 col-xs-12" id="return_total_amount" style="display: none;margin-top: 10px;">
                <div class="col-md-12 col-sm-12 col-xs-12" style="display: block;text-align: right;">
                    处方总金额：<span id="returnTotalAmount" style="color: red;">0.00</span>
                </div>
            </div>
        </div>
    </div>
</div>

<!--放射科发药弹窗开始-->
<div class="modal fade bs-example-modal-sm in" tabindex="-1" role="dialog" aria-hidden="true" id="radiologySendModal">
    <div class="modal-dialog modal-sm">
        <div class="modal-content" style="width: 1100px;margin-left: -350px;">
            <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>
                        <button type="button" style="margin-left:3px" id="btn_query1" class="btn btn-primary"
                                title="打"><i class="fa fa-search"></i>
                        </button>
                        <button type="button" id="btn_clean1" class="btn btn-primary"
                                title="重置"><i class="fa fa-rotate-left"></i>
                        </button>
                    </div>-->
                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="col-md-5 col-sm-5 col-xs-12">
                            <div id="rad_send_record_toolbar">
                                <span>发药记录</span>
                            </div>
                            <table id="rad_send_record_table"
                                   style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"></table>
                        </div>
                        <div class="col-md-7 col-sm-7 col-xs-12">
                            <div id="rad_send_stat_toolbar">
                                <span>药品清单</span>
                            </div>
                            <table id="rad_send_stat_table"
                                   style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"></table>
                        </div>
                    </div>
                </div>
            </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="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>
                        <div class="col-md-12 col-sm-12 col-xs-12" id="send_total_amount">
                            <div class="col-md-12 col-sm-12 col-xs-12" style="display: block;text-align: right;">
                                处方总金额：<span id="sendTotalAmount" style="color: red;">0.00</span>
                            </div>
                        </div>
                        <table id="tb_table_right"
                               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>
