<link rel="stylesheet" href="/thmz/css/bootstrap/css/bootstrap-select.css"/>
<script src="/thmz/js/dependent/bootstrap-select.js"></script>
<script src="/thmz/js/dependent/validator.js"></script>
<script src="/thmz/js/mz/unit_code.js"></script>
<title>科室列表</title>
<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="code" style="width: 6%;">科室编码</label>-->
                        <!--<div class="col-sm-3" style="width: 8%;float: left;">-->
                            <!--<input type="text" class="form-control" id="code">-->
                        <!--</div>-->
                        <!--<label class="control-label col-sm-1" for="name" style="width: 6%;">科室名称</label>-->
                        <!--<div class="col-sm-3" style="width: 8%;float: left;">-->
                            <!--<input type="text" class="form-control" id="name">-->
                        <!--</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" >
                            </select>
                        </div>
                        <label class="control-label col-sm-1" for="pyCode" style="width: 5%;">拼音码</label>
                        <div class="col-sm-3" style="width: 6%;float: left;">
                            <input type="text" class="form-control" id="pyCode">
                        </div>
                        <label class="control-label col-sm-1" for="wbCode" style="width: 5%;">五笔码</label>
                        <div class="col-sm-3" style="width: 6%;float: left;">
                            <input type="text" class="form-control" id="wbCode">
                        </div>
                        <label class="control-label col-sm-1" for="delFlag" style="width: 4%;">停用</label>
                        <div class="col-lg-2" style="width: 8%;float: left;">
                            <select class="form-control selectpicker show-tick" id="delFlag" title="请选择">
                            </select>
                        </div>
                        <label class="control-label col-sm-1" for="classType" style="width: 4%;">分类</label>
                        <div class="col-lg-2" style="width: 8%;float: left;">
                            <select class="form-control selectpicker show-tick" id="classType" title="请选择"></select>
                        </div>
                        <div class="col-sm-4" style="text-align:left;width: 5%;">
                            <button type="button" style="margin-left:5px" id="btn_clean" class="btn btn-primary"
                                    title="重置"><i class="fa fa-rotate-left"></i>
                            </button>
                        </div>
                        <div class="col-sm-4" style="text-align:left;width: 5%;">
                            <button type="button" style="margin-left:5px" id="btn_query" class="btn btn-primary"
                                    title="查询"><i class="fa fa-search"></i>
                            </button>
                        </div>
                        <div class="col-sm-4" style="text-align:left;width: 5%;">
                            <button type="button" style="margin-left:5px" id="export_excel" class="btn btn-primary">
                                导出EXCEL
                            </button>
                        </div>
                    </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"><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" autocomplete="off">
                            <div class="item form-group">
                                <!--<label class="control-label col-md-3 col-sm-3 col-xs-12" for="codePlus">科室编码 <span-->
                                        <!--class="required">*</span>-->
                                <!--</label>-->
                                <!--<div class="col-md-6 col-sm-6 col-xs-12">-->
                                    <!--<input id="codePlus" class="form-control col-md-7 col-xs-12"-->
                                           <!--data-validate-length-range="4,7" required="required" type="text">-->
                                <!--</div>-->
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="namePlus">科室名称 <span
                                        class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" id="namePlus" class="form-control col-md-7 col-xs-12"
                                           data-validate-length-range="2,16" required="required">
                                </div>
                            </div>
                            <!--<div class="item form-group">-->
                                <!--<label class="control-label col-md-3 col-sm-3 col-xs-12" for="pyCodePlus">拼音码 <span-->
                                        <!--class="required">*</span>-->
                                <!--</label>-->
                                <!--<div class="col-md-6 col-sm-6 col-xs-12">-->
                                    <!--<input type="text" id="pyCodePlus" required="required"-->
                                           <!--data-validate-length-range="1,8" 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="wbCodePlus">五笔码 <span-->
                                        <!--class="required">*</span>-->
                                <!--</label>-->
                                <!--<div class="col-md-6 col-sm-6 col-xs-12">-->
                                    <!--<input type="text" id="wbCodePlus" required="required"-->
                                           <!--data-validate-length-range="1,8" 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="xnhDeptCodePlus">新农合科室编码-->
                                <!--</label>-->
                                <!--<div class="col-md-6 col-sm-6 col-xs-12">-->
                                    <!--<input type="text" id="xnhDeptCodePlus" data-validate-length-range="1,20"-->
                                           <!--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="xnhDeptNamePlus">新农合科室名称-->
                                <!--</label>-->
                                <!--<div class="col-md-6 col-sm-6 col-xs-12">-->
                                    <!--<input type="text" id="xnhDeptNamePlus" data-validate-length-range="1,25"-->
                                           <!--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="officePosPlus">就诊地点
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" id="officePosPlus" data-validate-length-range="1,20"
                                           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="sortCodePlus">排序码
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" id="sortCodePlus" data-validate-length-range="1,3"
                                           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="classTypePlus">分类 <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="classTypePlus" title="请选择"></select>
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="mzClassPlus">门诊分类码 <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="mzClassPlus" title="请选择"></select>
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="ynCodePlus">院内码 <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="ynCodePlus" title="请选择"></select>
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="parentCodePlus">父科室
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <select class="form-control selectpicker show-tick" data-live-search="true"
                                            id="parentCodePlus" title="请选择"></select>
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="mzFlagPlus">门诊开放 <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="mzFlagPlus" title="请选择"></select>
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="ghjzFlagPlus">门诊挂号就诊 <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="ghjzFlagPlus" title="请选择"></select>
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="ghChargeFlagPlus">收取挂号费
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <select class="form-control selectpicker show-tick" id="ghChargeFlagPlus"
                                            title="请选择"></select>
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="yjFlagPlus">医技上线
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <select class="form-control selectpicker show-tick" id="yjFlagPlus"
                                            title="请选择"></select>
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="supplyFlagPlus">用药方式执行科室
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <select class="form-control selectpicker show-tick" id="supplyFlagPlus"
                                            title="请选择"></select>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <!--因为部门表没有主键，需要记录下来要修改的记录原code，防止修改了code本身-->
                        <input type="hidden" id="originalCode"/>
                        <button type="button" class="btn btn-primary" id="saveUnitCode">保存</button>
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    </div>
                </div>
            </div>
        </div>

        <!-- 信息删除确认 -->
        <div class="modal fade" id="deleteConfirmModel">
            <div class="modal-dialog">
                <div class="modal-content message_align">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">×</span></button>
                        <h4 class="modal-title">提示信息</h4>
                    </div>
                    <div class="modal-body">
                        <p id="deleteMessage">您确认要删除吗？</p>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <a onclick="deleteSubmit()" class="btn btn-success" data-dismiss="modal">确定</a>
                        <input type="hidden" id="deleteCode"/>
                        <input type="hidden" id="dataDelFlag"/>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
    </div>
</div>

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