<%@ 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" %>
<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{
            height: 100%;
            border-right: 10px solid #c1d7e3;
            background-color:#fff
        }
        .rightDiv{
            height: 100%;
            background-color:#fff
        }
        .searchDiv{
            margin-top:2%;
        }
        .form-group{
            margin-top:-3%;
        }
        .form-control{
             margin: 0 auto;
             width:80%;
         }
        .input{
            width:205px;
        }
        .treeBtns{
            margin-top:-2%;
            margin-left:10%;
        }
        .treeBtn{
            margin-left:13%;
        }
        .insertbtn{
            right: 93px!important;
            margin-top: 20px;
            width: 107px;
            position: absolute;
            color: #fff;
        }
        .btns{
            width:100%;
            margin-left:116px;
            margin-top:46px;
        }
        .savebtn{
            width: 107px;
        }
        .delbtn{
            width: 107px;
            margin-left: 70px;
        }
        .content{
            position: absolute;
            margin-top: 4%;
            margin-left: 3%;
        }
        /**页头**/
        .headDiv{
            height:30px;
            width: 100%;
            font-weight: bold;
            font-size: 18px;
        }
        .headDiv span{
           color: #fff;
        }
        .headSpanDiv{
            padding: 5px 15px;}
        /**form表单div*/
        .formDiv{
            padding-left:87px;
        }
        .textarea{
            width: 305px;
        }
        /**短的div*/
        .shortDiv{
            width:100px;
            margin:0;
        }
        .loading {
            width: 160px;
            height: 56px;
            position: absolute;
            top: 50%;
            left: 50%;
            line-height: 56px;
            color: #fff;
            padding-left: 60px;
            font-size: 15px;
            background: #000;
            opacity: 0.7;
            z-index: 9999;
            -moz-border-radius: 20px;
            -webkit-border-radius: 20px;
            border-radius: 20px;
            filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70);
        }
        .col-md-3,.col-md-9 {
            padding: 0;
        }
        .zTreeDemo {
            height: calc(100vh - 200px) !important;
            min-height: 394px !important;
        }
    </style>
</head>
<body style="background-color: #c1d7e3">
<input type="hidden" id="treeId">
<input type="hidden" id="newName">
<input type="hidden" id="treeTypeCode">
<input type="hidden" id="treeTypeName">
<input type="hidden" id="treeCode">
<input type="hidden" id="treeName">
<div class="row main">
    <!--树-->
    <div class="col-md-3 leftDiv">
        <div class="headDiv">
            <div class="headSpanDiv">
            </div>
        </div>
        <div class="">
            <div class="searchDiv">
                <div class="form-group">
                    <label class="col-sm-9 control-label"><input type="text" class="form-control input input-sm" name="typeCode" id="searchContext" maxlength="25" placeholder="名称"></label>
                    <div class="col-sm-3">
                        <button type="button" class="btn btn-sm btn-primary left"  onclick="reloadTree()">搜索</button>
                    </div>
                </div>
                <br/>
            </div>
            <div class="treeBtns">
                <button type="button" class="btn  btn-primary btn-sm treeBtn" onclick="expandAll();">全部展开</button>
                <button type="button" class="btn  btn-primary btn-sm treeBtn" onclick="collapseAll();">全部收缩</button>
            </div>
            <div id="myModal" class="modal fade" data-keyboard="false"
                 data-backdrop="static" data-role="dialog"
                 aria-labelledby="myModalLabel" aria-hidden="true">
                <div id="loading" class="loading">加载中。。。</div>
            </div>
            <div class="zTreeDemo">
                <ul id="ztree" class="ztree"></ul>
            </div>
        </div>
    </div>
    <!--内容-->
    <div class="rightDiv col-md-9">
        <div class="headDiv">
            <div class="headSpanDiv">
                <span>字典信息</span>
            </div>
        </div>
        <div class="formDiv">
            <form class="form-horizontal" role="form" id="form">
                <input type="hidden" id="id" name="id">
                <input type="hidden" id="childNode">
                <shiro:hasPermission name="/dictionary/add">
                    <div class="row" id="addBtn">
                        <button type="button" class="btn btn-sm insertbtn" style="background-color: #FF6600" onclick="add()">添加</button>
                    </div>
                </shiro:hasPermission>
                <div class="row">
                    <div class="content" id="contentDiv" style="display: none">
                        <div class="form-group typeDiv">
                            <label class="col-sm-5 control-label">类型代码：</label>
                            <div class="col-sm-7">
                                <input type="text" class="form-control input input-sm" name="typecode" id="typecode" maxlength="25">
                            </div>
                        </div>
                        <div class="form-group typeDiv">
                            <label  class="col-sm-5 control-label">类型名称：</label>
                            <div class="col-sm-7">
                                <input type="text" class="form-control input input-sm" name="typename" id="typename" maxlength="25">
                            </div>
                        </div>
                        <div class="form-group codeDiv">
                            <label  class="col-sm-5 control-label">代码：</label>
                            <div class="col-sm-7">
                                <input type="text" class="form-control input input-sm" name="code" id="code" maxlength="25">
                            </div>
                        </div>
                        <div class="form-group codeDiv">
                            <label class="col-sm-5 control-label">名称：</label>
                            <div class="col-sm-7">
                                <input type="text" class="form-control input input-sm" name="name" id="name" maxlength="25">
                            </div>
                        </div>
                        <div class="form-group">
                            <label  class="col-sm-5 control-label">拼音码：</label>
                            <div class="col-sm-7">
                                <input type="text" class="form-control input input-sm" name="pyCode" id="pyCode" maxlength="25">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-5 control-label">五笔码：</label>
                            <div class="col-sm-7">
                                <input type="text" class="form-control input input-sm" name="wbCode" id="wbCode" maxlength="25">
                            </div>
                        </div>
                        <div class="form-group">
                            <label  class="col-sm-5 control-label">邮编码：</label>
                            <div class="col-sm-7">
                                <input type="text" class="form-control input input-sm" id="zipCode" name="zipCode" maxlength="10">
                            </div>
                        </div>
                        <div class="form-group">
                            <label  class="col-sm-5 control-label">国际码：</label>
                            <div class="col-sm-7">
                                <input type="text" class="form-control input input-sm" name="gbCode" id="gbCode" maxlength="10">
                            </div>
                        </div>
                        <div class="form-group">
                            <label  class="col-sm-5 control-label">说明：</label>
                            <div class="col-sm-7">
                                <textarea class="form-control input input-sm textarea" name="cComment" id="cComment" maxlength="15"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="" style="width:100%;padding-left: 184px;">
                                <input type="checkbox" class="left" name="flag" id="flag" value="1"><span class="left">是否使用标志或报表上可见</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-5 control-label">父节点:</label>
                            <div class="col-sm-7">
                                <select class="form-control input input-sm" name="parentId" id="parentId">
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label  class="col-sm-5 control-label">有效否:</label>
                            <div class="col-sm-7">
                                <select class="form-control input input-sm shortDiv" name="effective" id="effective">
                                    <option value="1">是</option>
                                    <option value="0">否</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label  class="col-sm-5 control-label">备注:</label>
                            <div class="col-sm-7">
                                <textarea class="form-control input input-sm textarea" name="remark"  id="remark" maxlength="16"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="btns">
                                <shiro:hasPermission name="/dictionary/update">
                                    <button type="button" class="btn btn-info btn-sm savebtn" onclick="save()">保存</button>
                                </shiro:hasPermission>
                                <shiro:hasPermission name="/dictionary/delete">
                                    <button type="button" class="btn btn-danger btn-sm delbtn" onclick="del()">删除</button>
                                </shiro:hasPermission>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="${path}/static/js/otherManage/dictionaryList.js?t=1"></script>
</body>
</html>
