<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">
<script src="/thmz/js/dependent/bootstrap-select.js"></script>
<script src="/thmz/js/dependent/validator.js"></script>
<script src="/thmz/js/common/map-util.js"></script>
<script src="/thmz/js/dependent/daterangepicker.js"></script>
<script src="/thmz/js/common/date-util.js"></script>
<script src="/thmz/js/charge/discount.js"></script>
<div class="row">
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_panel">
            <!--<div class="panel-heading">查询条件</div>-->
            <div class="panel-body">
                <form id="formSearch" class="form-horizontal" autocomplete="off">
                    <div class="form-group" style="margin-top:15px">
                        <label class="control-label col-sm-1" for="delFlag" style="width: 5%;">启用状态</label>
                        <div class="col-lg-2" style="width: 8%;float: left;">
                            <select class="form-control selectpicker show-tick" id="delFlag" title="请选择"
                                    onchange="initDiscountList()">
                            </select>
                        </div>
                        <label class="control-label col-sm-1" for="deptType" style="width: 5%;">科室类别</label>
                        <div class="col-md-3 col-sm-3 col-xs-12" style="width: 8%;float: left;">
                            <select class="form-control selectpicker show-tick" data-live-search="true" title="请选择"
                                    id="deptType" onchange="initDiscountList()">
                            </select>
                        </div>
                        <label class="control-labe2 col-sm-2" for="deptNo" style="width: 6%;">科室</label>
                        <div class="col-md-3 col-sm-3 col-xs-12" style="width: 8%;float: left;">
                            <select class="form-control selectpicker show-tick" data-live-search="true" title="请选择"
                                    id="deptNo" onchange="initDiscountList()">
                            </select>
                        </div>
                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="chargeItem" style="width: 5%;">项目
                        </label>
                        <div class="col-md-3 col-sm-3 col-xs-12" style="width: 8%;float: left;">
                            <select class="form-control selectpicker show-tick" data-live-search="true" title="请选择"
                                    id="chargeItem" onchange="initDiscountList()">
                            </select>
                        </div>
                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="reportrange" style="width: 75px;">
                            生效时间
                        </label>
                        <div class="col-md-3 col-sm-3 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>
                        <!--<label class="control-label col-sm-1" for="clCode" style="width: 6%;">耗材院内码</label>-->
                        <!--<div class="col-sm-3" style="width: 8%;float: left;">-->
                        <!--<input type="text" class="form-control" id="clCode" onchange="initZdChargeItemList()">-->
                        <!--</div>-->
                        <button type="button" style="margin-left:5px;width: 4%;" id="btn_add" class="btn btn-primary"
                                title="新增收费项目"><i class="fa fa-plus"></i>
                        </button>
                        <button type="button" style="margin-left:5px;width: 4%;" id="btn_clean" class="btn btn-primary"
                                title="重置"><i class="fa fa-rotate-left"></i>
                        </button>
                    </div>

                </form>
            </div>
        </div>

        <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-hidden="true">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">

                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" onclick="clearInput()"><span
                                aria-hidden="true">×</span>
                        </button>
                        <h4 class="modal-title" id="myModalLabel">新增惠民活动</h4>
                    </div>
                    <div class="modal-body">
                        <form class="form-horizontal form-label-left" novalidate id="formPlus">
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="nameParams">惠民活动名称
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" id="nameParams"
                                           class="form-control col-md-7 col-xs-12">
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="deptTypeParams">科室类别 <span
                                        class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <select class="form-control selectpicker show-tick" required="required"
                                            id="deptTypeParams" title="请选择"></select>
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="deptNoParmas">科室 <span
                                        class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <select class="form-control selectpicker show-tick" required="required"
                                            id="deptNoParmas" title="请选择" data-live-search="true"></select>
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="discountBeginTime">惠民活动开始时间
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <div class="form-group">
                                        <div class='input-group date' id='discountBeginTime'>
                                            <input type='text' class="form-control"/>
                                            <span class="input-group-addon">
                               <span class="glyphicon glyphicon-calendar"></span>
                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="discountEndTime">惠民活动结束时间
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <div class="form-group">
                                        <div class='input-group date' id='discountEndTime'>
                                            <input type='text' class="form-control"/>
                                            <span class="input-group-addon">
                               <span class="glyphicon glyphicon-calendar"></span>
                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="chargeItemCodesParams">惠民活动项目
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <select class="form-control selectpicker show-tick" id="chargeItemCodesParams" multiple data-live-search="true" title="请选择">
                                    </select>
                                </div>
                            </div>


                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="discountTypeParams">优惠类型 <span
                                        class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <select class="form-control selectpicker show-tick" required="required"
                                            id="discountTypeParams" title="请选择" onchange="discountTypeChange()"></select>
                                </div>
                            </div>

                            <div class="item form-group hide" id="discountRateDiv">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="discountRate">折扣率
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="number" id="discountRate"
                                           class="form-control col-md-7 col-xs-12">
                                </div>
                            </div>
                            <div class="item form-group" id="discountPriceDiv">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="discountPrice">优惠价
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="number" id="discountPrice"
                                           class="form-control col-md-7 col-xs-12">
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-sm-3  col-sm-3 col-xs-12" for="deleteFlagParams">启用状态</label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <select class="form-control selectpicker show-tick" id="deleteFlagParams" title="请选择">
                                    </select>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <input type="hidden" id="id"/>
                        <button type="button" class="btn btn-primary" id="save">保存</button>
                        <button type="button" class="btn btn-default" data-dismiss="modal" onclick="clearInput()">取消
                        </button>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>

<table id="tb_table"></table>
<input id="orderByCase" type="hidden"/>