<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <title><%= manager.isTemporary ? '清单精灵编辑器' : '清单指引编辑器' %></title>
  <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="/web/maintain/billsGuidance_lib/css/main.css">
  <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
  <style>
    .avatar {
      display: flex;
      align-items: center;
      height: 38px;
      cursor: pointer;
      padding: 0 20px;
    }
    .avatar:hover {
      text-decoration: none;
      box-shadow: inset 0 3px 5px rgb(0 0 0 / 13%);
    }
    .avatar .dropdown-menu a {
      display: block;
      padding: 3px 20px;
      clear: both;
      font-weight: 400;
      line-height: 1.42857143;
      color: #333;
      white-space: nowrap;
    }
  </style>
    <script>
      const isTemporary = '<%- manager.isTemporary %>';
      const lockOperate = '<%- manager.lockOperate %>';
    </script>
</head>

<body>
  <div class="header">
    <nav class="navbar navbar-toggleable-lg navbar-light bg-faded p-0 " style="display: flex; justify-content: space-between;">
      <span class="header-logo px-2"><%= manager.isTemporary ? '清单精灵编辑器' : '清单指引编辑器' %></span>
      <!-- <% if (manager.isTemporary)  { %>
        <div style="cursor: pointer;">
          <a href="/stdBillsmain">
            <span>切换到清单规则编辑器</span>
        </a>
          
        </div>
      <% } %>-->
      <% if (manager.isTemporary)  { %>
              <div class="avatar btn-group">
                  <a class="dropdown-toggle" data-toggle="dropdown">
                      <span><%= manager.username %></span>
                  </a>
                  <ul class="dropdown-menu dropdown-menu-right">
                      <li><a href="/login/logout">退出登录</a></li>
                  </ul>
      <% } %> 
    </nav>
    <% if (!manager.isTemporary)  { %>
      <nav class="navbar navbar-toggleable-lg justify-content-between navbar-light p-0">
        <ul class="nav navbar-nav px-1">
          <li class="nav-item">
            <a class="nav-link" href="javacript:void(0);" aria-haspopup="true" aria-expanded="false" data-toggle="modal"
              data-target="#add">新建清单指引库</a>
          </li>
        </ul>
      </nav>
    <% } %>
  </div>
  <div class="main">
    <div class="content">
      <div class="container-fluid">
        <div class="row">
          <div class="col-md-10">
            <div class="warp-p2 mt-3">
              <table class="table table-hover table-bordered">
                <thead>
                  <tr>
                    <th><%= manager.isTemporary ? '清单精灵名称' : '清单指引名称' %></th>
                    <th width="160">编办</th>
                    <th width="300">清单规则</th>
                    <th width="100">类型</th>
                    <th width="160">添加时间</th>
                    <th width="70">操作</th>
                    <%- manager.isTemporary ? '' : '<th width="120">生成清单分类v1</th>' %>
                    <%- manager.isTemporary ? '' : '<th width="120">导出分类excel</th>' %>
                  </tr>
                </thead>
                <tbody>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <!--弹出添加-->
  <div class="modal fade" id="add" data-backdrop="static" style="display: none;" aria-hidden="true">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">添加清单指引</h5>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">×</span>
          </button>
        </div>
        <div class="modal-body">
          <form>
            <div class="form-group">
              <label>清单指引名称</label>
              <input id="createName" class="form-control" placeholder="输入清单指引名称" type="text">
            </div>
            <div class="form-group">
              <label>编办</label>
              <select id="comSels" class="form-control">
                <option>重庆2018</option>
              </select>
            </div>
            <div class="form-group">
              <label>清单规则</label>
              <select id="billsLibSels" class="form-control">
                <option>重庆清单规则-2013</option>
              </select>
            </div>
            <div class="form-group">
              <label>类型</label>
              <div>
                <div class="form-check form-check-inline">
                  <label class="form-check-label">
                    <input class="form-check-input" type="radio" checked name="inlineRadioOptions" id="inlineRadio1"
                      value="1"> 清单指引
                  </label>
                </div>
                <div class="form-check form-check-inline">
                  <label class="form-check-label">
                    <input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio2" value="2">
                    清单精灵
                  </label>
                </div>
              </div>
            </div>
          </form>
        </div>
        <div class="modal-footer">
          <a href="javascript:void(0);" id="addY" class="btn btn-primary">确定</a>
          <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
        </div>
      </div>
    </div>
  </div>
  <!--弹出编辑-->
  <div class="modal fade" id="edit" data-backdrop="static" style="display: none;" aria-hidden="true">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">编辑清单指引</h5>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">×</span>
          </button>
        </div>
        <div class="modal-body">
          <form>
            <div class="form-group">
              <label>清单指引名称</label>
              <input id="edName" class="form-control" placeholder="输入清单指引名称" type="text" value="XXX清单指引">
            </div>
            <div class="form-group">
              <label>编办</label>
              <select id="edComSels" class="form-control" disabled>
                <option>重庆2018</option>
              </select>
            </div>
            <div class="form-group">
              <label>清单规则</label>
              <select id="edBillsLibSels" class="form-control" disabled>
                <option>重庆清单规则-2013</option>
              </select>
            </div>
          </form>
        </div>
        <div class="modal-footer">
          <a href="javascript:void(0);" id="editY" class="btn btn-primary">确定</a>
          <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
        </div>
      </div>
    </div>
  </div>

  <!--弹出删除-->
  <div class="modal fade" id="del" data-backdrop="static" style="display: none;" aria-hidden="true">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">删除确认</h5>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">×</span>
          </button>
        </div>
        <div class="modal-body">
          <h5 class="text-danger">删除后无法恢复，确认是否删除？</h5>
        </div>
        <div class="modal-footer">
          <a id="delY" href="javascript:void(0);" class="btn btn-danger">确认</a>
          <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
        </div>
      </div>
    </div>
  </div>
  <!-- 生成清单分类 -->
  <div class="modal fade" id="generate-class-modal" data-backdrop="static" style="display: none;" aria-hidden="true">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">生成清单分类</h5>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">×</span>
          </button>
        </div>
        <div class="modal-body">
          <div id="generate-class-info" style="font-weight: 700;"></div>
        </div>
        <div class="modal-footer">
          <a id="generate-class-confirm" href="javascript:void(0);" class="btn btn-danger">确认</a>
          <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
        </div>
      </div>
    </div>
  </div>
  <!-- JS. -->
  <script src="/lib/jquery/jquery.min.js"></script>
  <script src="/lib/tether/tether.min.js"></script>
  <script src="/lib/bootstrap/bootstrap.min.js"></script>
  <script src="/lib/lodash/lodash.js"></script>
  <script src="/public/web/PerfectLoad.js"></script>
  <script src="/web/maintain/billsGuidance_lib/js/global.js"></script>
  <script src="/public/web/uuid.js"></script>
  <script src="/public/web/common_ajax.js"></script>
  <script src="/public/web/lock_util.js"></script>
  <script src="/web/maintain/billsGuidance_lib/js/main.js"></script>

</body>
<script type="text/javascript">
  autoFlashHeight();
</script>

</html>