<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>生产佳ERP系统</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="../layuiadmin/style/admin.css" media="all">
</head>
<body class="layui-layout-body">

  <div id="LAY_app">
    <div class="layui-layout layui-layout-admin">
      <div class="layui-header">
        <!-- 头部区域 -->
        <ul class="layui-nav layui-layout-left">
          <li class="layui-nav-item layadmin-flexible" lay-unselect>
            <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
              <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
            </a>
          </li>
          <li class="layui-nav-item" lay-unselect>
            <a href="javascript:;" layadmin-event="refresh" title="刷新">
              <i class="layui-icon layui-icon-refresh-3"></i>
            </a>
          </li>
        </ul>
        <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="javascript:;" layadmin-event="theme">
              <i class="layui-icon layui-icon-theme"></i>
            </a>
          </li>
          <li class="layui-nav-item" lay-unselect>
            <a href="javascript:;">
              <cite id="id_username"></cite>
            </a>
            <dl class="layui-nav-child">
              <dd><a lay-href="account/user_password.html">修改密码</a></dd>
              <hr>
              <dd layadmin-event="logout" style="text-align: center;"><a>退出</a></dd>
            </dl>
          </li>

          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>
          </li>
          <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
            <a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
          </li>
        </ul>
      </div>

      <!-- 侧边菜单 -->
      <div class="layui-side layui-side-menu">
        <div class="layui-side-scroll">
          <div class="layui-logo">
            <span>生产佳<span style="font-size: 12px;">erp</span></span>
          </div>

          <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-muen" lay-filter="layadmin-system-side-menu">
            <li data-name="set" class="layui-nav-item">
              <a href="javascript:;" lay-tips="公告管理" lay-direction="2">
                <i class="layui-icon layui-icon-notice"></i>
                <cite>公告管理</cite>
              </a>
              <dl class="layui-nav-child">
                <dd data-name="button" data-permission="office.view_notice">
                  <a lay-href="notice/notice.html">公告管理</a>
                </dd>
              </dl>
            </li>
            <li data-name="set" class="layui-nav-item">
              <a href="javascript:;" lay-tips="销售管理" lay-direction="2">
                <i class="layui-icon layui-icon-form"></i>
                <cite>销售管理</cite>
              </a>
              <dl class="layui-nav-child">
                <dd data-name="button" data-permission="plan.view_sale_plan">
                  <a lay-href="plan/sale.html">销售计划管理</a>
                </dd>
                <dd data-name="button" data-permission="order.view_sale_order">
                  <a lay-href="order/sale_order.html">销售订单管理</a>
                </dd>
                <dd data-name="button" data-permission="product.view_goods_product">
                  <a lay-href="goods/goods_stock_query.html">成品库存查询</a>
                </dd>
              </dl>
            </li>
            <li data-name="component" class="layui-nav-item">
              <a href="javascript:;" lay-tips="生产管理" lay-direction="2">
                <i class="layui-icon layui-icon-read"></i>
                <cite>生产管理</cite>
              </a>
              <dl class="layui-nav-child">
                <dd data-name="nav" data-permission="plan.view_production_plan">
                  <a lay-href="plan/production.html">生产计划管理</a>
                </dd>
              </dl>
            </li>
            <li data-name="set" class="layui-nav-item">
              <a href="javascript:;" lay-tips="采购管理" lay-direction="2">
                <i class="layui-icon layui-icon-cart-simple"></i>
                <cite>采购管理</cite>
              </a>
              <dl class="layui-nav-child">
                <dd data-name="button" data-permission="purchase.view_purchase_plan">
                  <a lay-href="purchase/purchase.html">计划管理</a>
                </dd>
                <dd data-name="button" data-permission="purchase.view_purchase_user_plan">
                  <a lay-href="purchase/purchase_price.html">询价管理</a>
                </dd>
                <dd data-name="button" data-permission="purchase.view_purchase_order">
                    <a lay-href="purchase/purchase_order.html">合同管理</a>
                  </dd>
                <dd data-name="button" data-permission="purchase.view_purchase_payment">
                    <a lay-href="purchase/purchase_payment.html">付款管理</a>
                  </dd>
                <dd data-name="button" data-permission="purchase.view_purchase_invoice">
                    <a lay-href="purchase/purchase_invoice.html">发票管理</a>
                  </dd>
              </dl>
            </li>
            <li data-name="component" class="layui-nav-item">
              <a href="javascript:;" lay-tips="原料管理" lay-direction="2">
                <i class="layui-icon layui-icon-read"></i>
                <cite>原料管理</cite>
              </a>
              <dl class="layui-nav-child" >
                <dd data-name="nav" data-permission="purchase.view_material_godown_entry">
                  <a lay-href="purchase/material_godownentry.html">入库管理</a>
                </dd>
                  <dd data-name="nav" data-permission="purchase.view_material_godownentry_query">
                  <a lay-href="purchase/material_godownentry_query.html">入库查询</a>
                </dd>
                  <dd data-name="nav" data-permission="material.view_material_deliver">
                  <a lay-href="material/deliver_material.html">出库管理</a>
                </dd>
                  <dd data-name="nav" data-permission="plan.view_material_deliver_query">
                  <a lay-href="material/deliver_material_query.html">出库查询</a>
                </dd>
                  <dd data-name="nav" data-permission="purchase.view_material_godown_entry_return">
                  <a lay-href="purchase/material_godownentry_return.html">退货管理</a>
                </dd>
                  <dd data-name="nav" data-permission="account.view_material_godownentry_return_query">
                  <a lay-href="purchase/material_godownentry_return_query.html">退货查询</a>
                </dd>
                <dd data-name="nav" data-permission="material.view_material_deliver_return">
                  <a lay-href="material/deliver_material_return.html">退料管理</a>
                </dd>
                  <dd data-name="nav" data-permission="warehouse.view_material_deliver_return_query">
                  <a lay-href="material/deliver_material_return_query.html">退料查询</a>
                </dd>
                  <dd data-name="nav" data-permission="warehouse.view_material_inventory">
                  <a lay-href="material/material_inventory.html">盘存管理</a>
                </dd>
                <dd data-name="nav" data-permission="warehouse.view_material_stock">
                  <a lay-href="material/material_stock.html">库存查询</a>
                </dd>
                <dd data-name="nav" data-permission="product.view_material_stock_ledger">
                  <a lay-href="material/material_stock_ledger.html">库存总账</a>
                </dd>
              </dl>
            </li>
              <li data-name="component" class="layui-nav-item">
              <a href="javascript:;" lay-tips="耗材管理" lay-direction="2">
                <i class="layui-icon layui-icon-read"></i>
                <cite>耗材管理</cite>
              </a>
              <dl class="layui-nav-child" >
                <dd data-name="nav" data-permission="purchase.view_consumable_godown_entry">
                  <a lay-href="purchase/consumable_godownentry.html">入库管理</a>
                </dd>
                  <dd data-name="nav" data-permission="purchase.view_consumable_godownentry_query">
                  <a lay-href="purchase/consumable_godownentry_query.html">入库查询</a>
                </dd>
                  <dd data-name="nav" data-permission="material.view_consumable_deliver">
                  <a lay-href="material/deliver_consumable.html">出库管理</a>
                </dd>
                  <dd data-name="nav" data-permission="plan.view_consumable_deliver_query">
                  <a lay-href="material/deliver_consumable_query.html">出库查询</a>
                </dd>
                  <dd data-name="nav" data-permission="purchase.view_consumable_godown_entry_return">
                  <a lay-href="purchase/consumable_godownentry_return.html">退货管理</a>
                </dd>
                  <dd data-name="nav" data-permission="account.view_consumable_godownentry_return_query">
                  <a lay-href="purchase/consumable_godownentry_return_query.html">退货查询</a>
                </dd>
                <dd data-name="nav" data-permission="material.view_consumable_deliver_return">
                  <a lay-href="material/deliver_consumable_return.html">退料管理</a>
                </dd>
                  <dd data-name="nav" data-permission="purchase.view_consumable_deliver_return_query">
                  <a lay-href="material/deliver_consumable_return_query.html">退料查询</a>
                </dd>
                  <dd data-name="nav" data-permission="warehouse.view_consumable_inventory">
                  <a lay-href="material/consumable_inventory.html">盘存管理</a>
                </dd>
                <dd data-name="nav" data-permission="warehouse.view_consumable_stock">
                  <a lay-href="material/consumable_stock.html">库存查询</a>
                </dd>
                <dd data-name="nav" data-permission="product.view_consumable_stock_ledger">
                  <a lay-href="material/consumable_stock_ledger.html">库存总账</a>
                </dd>
              </dl>
            </li>
              <li data-name="component" class="layui-nav-item">
              <a href="javascript:;" lay-tips="成品管理" lay-direction="2">
                <i class="layui-icon layui-icon-read"></i>
                <cite>成品管理</cite>
              </a>
              <dl class="layui-nav-child" >
                <dd data-name="nav" data-permission="goods.view_goods_godown_entry">
                  <a lay-href="goods/goods_godownentry.html">入库管理</a>
                </dd>
                  <dd data-name="nav" data-permission="order.view_goods_godownentry_query">
                  <a lay-href="goods/goods_godownentry_query.html">入库查询</a>
                </dd>
                  <dd data-name="nav" data-permission="order.view_goods_deliver">
                  <a lay-href="order/goods_deliver.html">出库管理</a>
                </dd>
                  <dd data-name="nav" data-permission="order.view_goods_deliver_query">
                  <a lay-href="order/goods_deliver_query.html">出库查询</a>
                </dd>
                  <dd data-name="nav" data-permission="order.view_goods_deliver_return">
                  <a lay-href="order/goods_deliver_return.html">退库管理</a>
                </dd>
                  <dd data-name="nav" data-permission="order.view_goods_deliver_return_query">
                  <a lay-href="order/goods_deliver_return_query.html">退库查询</a>
                </dd>
                </dd>
                  <dd data-name="nav" data-permission="goods.view_goods_inventory">
                  <a lay-href="goods/goods_inventory.html">盘存管理</a>
                </dd>
                <dd data-name="nav" data-permission="warehouse.view_goods_stock">
                  <a lay-href="goods/goods_stock.html">库存查询</a>
                </dd>
                <dd data-name="nav" data-permission="product.view_goods_stock_ledger">
                  <a lay-href="goods/goods_stock_ledger.html">库存总账</a>
                </dd>
              </dl>
            </li>
            <li data-name="component" class="layui-nav-item">
              <a href="javascript:;" lay-tips="统计报表" lay-direction="2">
                <i class="layui-icon layui-icon-read"></i>
                <cite>财务管理</cite>
              </a>
              <dl class="layui-nav-child">
                <dd data-name="nav" data-permission="product.view_department_ledger">
                  <a lay-href="statistics/department_ledger.html">部门总账</a>
                </dd>
                <dd data-name="nav" data-permission="finance.view_finance_income">
                  <a lay-href="statistics/finance_index.html">收支管理</a>
                </dd>
                <dd data-name="nav" data-permission="finance.view_finance_income">
                  <a lay-href="statistics/bank_index.html">银行总账</a>
                </dd>
              </dl>
            </li>
            <li data-name="set" class="layui-nav-item">
              <a href="javascript:;" lay-tips="基础数据" lay-direction="2">
                <i class="layui-icon layui-icon-set"></i>
                <cite>基础数据</cite>
              </a>
              <dl class="layui-nav-child">
                <dd data-name="nav" data-permission="material.view_material">
                  <a lay-href="material/material.html">原料产品管理</a>
                </dd>
                <dd data-name="nav" data-permission="material.view_consumable">
                  <a lay-href="material/consumable.html">耗材产品管理</a>
                </dd>
                <dd data-name="nav" data-permission="goods.view_goods">
                  <a lay-href="goods/goods.html">成品产品管理</a>
                </dd>
                <dd data-name="nav" data-permission="warehouse.view_material_warehouse">
                  <a lay-href="warehouse/material_warehouse.html">原料仓别管理</a>
                </dd>
                <dd data-name="nav" data-permission="warehouse.view_consumable_warehouse">
                  <a lay-href="warehouse/consumable_warehouse.html">耗材仓别管理</a>
                </dd>
                <dd data-name="nav" data-permission="warehouse.view_goods_warehouse">
                  <a lay-href="warehouse/goods_warehouse.html">成品仓别管理</a>
                </dd>
                <dd data-name="nav" data-permission="account.view_department">
                  <a lay-href="account/department.html">组织结构管理</a>
                </dd>
                <dd data-name="nav" data-permission="foundation.view_option">
                  <a lay-href="foundation/option.html">自定义项管理</a>
                </dd>
                  <dd data-name="nav" data-permission="finance.view_finance_category">
                  <a lay-href="finance/index.html">收支类别设置</a>
                </dd>
                <dd data-name="nav" data-permission="supplier.view_supplier">
                  <a lay-href="supplier/supplier.html">供应商管理</a>
                </dd>
                <dd data-name="nav" data-permission="customer.view_customer">
                  <a lay-href="customer/customer.html">客户管理</a>
                </dd>
                <dd data-name="nav" data-permission="account.view_user">
                  <a lay-href="account/employee.html">人员管理</a>
                </dd>
                <dd data-name="nav" data-permission="foundation.view_group">
                  <a lay-href="account/group.html">权限管理</a>
                </dd>
                <dd data-name="nav" data-permission="config.edit_config">
                  <a lay-href="config/index.html">基础设置</a>
                </dd>
              </dl>
            </li>
          </ul>
        </div>
      </div>

      <!-- 页面标签 -->
      <div class="layadmin-pagetabs" id="LAY_app_tabs">
        <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
        <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
        <div class="layui-icon layadmin-tabs-control layui-icon-down">
          <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
            <li class="layui-nav-item" lay-unselect>
              <a href="javascript:;"></a>
              <dl class="layui-nav-child layui-anim-fadein">
                <dd layadmin-event="closeThisTabs"><a href="javascript:;">关闭当前标签页</a></dd>
                <dd layadmin-event="closeOtherTabs"><a href="javascript:;">关闭其它标签页</a></dd>
                <dd layadmin-event="closeAllTabs"><a href="javascript:;">关闭全部标签页</a></dd>
              </dl>
            </li>
          </ul>
        </div>
        <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs">
          <ul class="layui-tab-title" id="LAY_app_tabsheader">
            <li lay-id="home/console.html" class="layui-this"><i class="layui-icon layui-icon-home"></i></li>
          </ul>
        </div>
      </div>


      <!-- 主体内容 -->
      <div class="layui-body" id="LAY_app_body">
        <div class="layadmin-tabsbody-item layui-show">
          <iframe src="dashboard/home.html" frameborder="0" class="layadmin-iframe"></iframe>
        </div>
      </div>

      <!-- 辅助元素，一般用于移动设备下遮罩 -->
      <div class="layadmin-body-shade" layadmin-event="shade"></div>
    </div>
  </div>

  <script src="../layuiadmin/layui/layui.js"></script>
  <script>
  layui.config({
    base: '../layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use('index', function () {
      var $ = layui.$;
      var name = layui.data(layui.setter.tableName)['name'];
      $('#id_username').html(name);

      var permissions = layui.data(layui.setter.tableName)['permissions'];
      $('#LAY-system-side-muen .layui-nav-child dd').each(function () {
          var perm = $(this).data("permission");
          //console.log(perm, permissions.indexOf(perm))
          if(permissions.indexOf(perm) == -1){
            $(this).remove();
          }
      });

      $('#LAY-system-side-muen .layui-nav-item dl').each(function () {
          if($(this).children('dd').length == 0)
              $(this).parent().remove();
      });

  });
  </script>
</body>
</html>


