<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<%@ include file="/WEB-INF/jspf/common.jspf" %>
<%@ include file="/WEB-INF/jspf/ztreeCommom.jsp" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>打印用途管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv=X-UA-Compatible IE=EmulateIE7>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="${path}/static/js/html5shiv.min.js"></script>
    <script type="text/javascript" src="${path}/static/js/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="${path}/static/js/respond.min.js"></script>
    <![endif]-->
    <script>
        var path = "${path}";
    </script>
    <style type="text/css">
        .leftDiv {
            border-right: 10px solid #c1d7e3;
            background-color: #fff
        }

        .rightDiv {
            background-color: #fff
        }

        .addbtn {
            width: 100%;
            text-align: center;
        }

        .insertbtn {
            width: 60%;
        }

        .searcDiv {
            margin: 10px 20px;
        }

        .form-control {
            margin: 0 auto;
            width: 80%;
        }

        .input {
            width: 90%;
        }

        .control-label {
            padding-left: 12% !important;
            padding-top: 1%;
        }

        .btn {
            margin-left: 8%;
        }

        .btns {
            height: 2% !important;
        }

        th td {
            text-align: center !important;
        }

        table {
            margin-left: 1%;
        }

        /*模态框头*/
        .modal-header {
            background-color: #199ED8;
            text-align: center;
        }
        .zTreeDemo {
            height: calc(100% - 80px) !important;
            min-height: 394px !important;
        }
        .main-content {
            height: calc(100vh - 43px);
        }
    </style>
</head>
<body style="background-color:#c1d7e3">
<input type="hidden" id="currentId">
<div class="main">
    <div class="headDiv">
        <div class="headSpanDiv">
                <span class="headspan">
                    打印用途管理
                </span>
        </div>
    </div>
    <div class="row main-content">
        <!--树-->
        <div class="col-md-3 leftDiv">
            <div class="searcDiv">
                <input type="text" id="key" value="" class="form-control input-sm"
                       placeholder="类别名称" maxlength="25"/>
            </div>
            <shiro:hasPermission name="/printing/addEmrType">
                <div class="row addbtn">
                    <button type="button" class="btn btn-sm btn-info insertbtn" id="addModle" onclick="addEmrType()">
                        添加
                    </button>
                </div>
            </shiro:hasPermission>
            <div class="zTreeDemo">
                <ul id="ztree" class="ztree"></ul>
            </div>
        </div>
        <!--明细选项-->
        <div class="col-md-9 rightDiv">
            <iframe style="width:100%;height:100%" frameborder="no" border="0" name="iframe" id="iframe" scrolling="yes"
                    src="${path}/printing/printManageIframe?id=${emrType.id}"></iframe>
        </div>
    </div>
    <!-- 模态框1（Modal）添加 -->
    <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        <font size="30">&times;</font>
                    </button>
                    <h4 class="modal-title" style="font-weight: bold">
                        打印用途管理
                    </h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" role="form" id="addForm">
                        <input type="hidden" name="formToken" id="formToken" value="${formToken}">
                        <div class="row">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">类别标志：</label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control input-sm input" name="typeFlag" id="typeFlag"
                                           maxlength="25">
                                </div>
                                <div class="col-sm-1"></div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">类别名称：</label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control input-sm input" name="typeName"
                                           id="typeName2" maxlength="25">
                                </div>
                                <div class="col-sm-1"></div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">排序：</label>
                                <div class="col-sm-7">
                                    <input type="number" class="form-control input-sm input" name="typeSort"
                                           oninput="if(value.length>4)value=value.slice(0,4)" min="0">
                                </div>
                                <div class="col-sm-1"></div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">有效否：</label>
                                <div class="col-sm-7">
                                    <select class="form-control input-sm input" name="effective">
                                        <option value="1">是</option>
                                        <option value="0">否</option>
                                    </select>
                                </div>
                                <div class="col-sm-1"></div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="form-group">
                                <div class="col-sm-4"></div>
                                <div class="col-sm-8">
                                    <label>
                                        <input type="radio" value="1" name="selectFlag">选中类别为当前使用
                                    </label>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-sm btn-default" data-dismiss="modal">关闭
                    </button>
                    <button type="button" class="btn btn-sm btn-primary" onclick="add()">
                        提交更改
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
        $(".modal-dialog").draggable();//为模态对话框添加拖拽
    })
</script>
<script type="text/javascript" src="${path}/static/js/recordManage/printing/printManage.js"></script>
</body>
</html>
