<aside class="main-sidebar">
    <section class="sidebar">

        <div class="user-panel">
            <div class="pull-left image">
                <img src="<?php echo $this->basePath('css/admin/img/avatar.png'); ?>" class="img-circle" alt="User Image">
            </div>
            <div class="pull-left info">
                <p><?= $this->currentAdmin('admin_name')?></p>
                <a href="#"><?= $this->currentAdmin('admin_group_name')?></a>
            </div>
        </div>

        <ul class="sidebar-menu" data-widget="tree">
            <li class="treeview <?php if($moduleName == 'Admin' && $controllerName != 'HomeController') echo 'active'; ?>">
                <a href="javascript:;">
                    <i class="fa fa-cogs"></i><span><?=$this->translate('系统')?></span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li <?=($controllerName == 'SystemController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('admin-system', ['action'=> 'index']);?>">
                            <?=$this->translate('系统设置')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'AdminController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('admin', ['action'=> 'index']);?>">
                            <?=$this->translate('管理员')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'AdminGroupController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('admin-group', ['action'=> 'adminGroupList']);?>">
                            <?=$this->translate('管理员组')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'RegionController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('region');?>">
                            <?=$this->translate('地区管理')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'AppController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('app');?>">
                            <?=$this->translate('商城绑定')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'OperLogController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('oper-log');?>">
                            <?=$this->translate('操作日志')?>
                        </a>
                    </li>
                </ul>
            </li>
            <li class="treeview <?=($moduleName == 'Store' ? 'active' : '') ?>">
                <a href="javascript:;">
                    <i class="fa fa-database"></i><span><?=$this->translate('基础数据')?></span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li <?=($controllerName == 'GoodsController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('goods');?>">
                            <?=$this->translate('商品')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'GoodsCategoryController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('goods-category');?>">
                            <?=$this->translate('商品分类')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'UnitController' ? 'class="active"' : '')?>>
                    <a href="<?=$this->url('unit');?>">
                        <?=$this->translate('计量单位')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'BrandController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('brand');?>">
                            <?=$this->translate('商品品牌')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'WarehouseController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('warehouse');?>">
                            <?=$this->translate('仓库')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'PositionController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('position');?>">
                            <?=$this->translate('仓位')?>
                        </a>
                    </li>
                    <!--li>
                        <a href="">
                            <?=$this->translate('库存盘点')?>
                        </a>
                    </li>
                    <li>
                        <a href="">
                            <?=$this->translate('库间调拨')?>
                        </a>
                    </li-->
                </ul>
            </li>
            <li class="treeview <?=($moduleName == 'Purchase' ? 'active' : '') ?>">
                <a href="javascript:;">
                    <i class="fa fa-bars"></i><span><?=$this->translate('采购')?></span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li <?=($controllerName == 'OrderController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('p-order');?>">
                            <?=$this->translate('采购订单')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'WarehouseOrderController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('warehouse-order');?>">
                            <?=$this->translate('采购入库单')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'OrderReturnController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('order-return');?>">
                            <?=$this->translate('采购退货单')?>
                        </a>
                    </li>

                </ul>
            </li>
            <li class="treeview <?=($moduleName == 'Sales' ? 'active' : '') ?>">
                <a href="javascript:;">
                    <i class="fa fa-th"></i><span><?=$this->translate('销售')?></span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li <?=($controllerName == 'SalesOrderController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('sales-order');?>">
                            <?=$this->translate('销售订单')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'SalesSendOrderController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('sales-send-order');?>">
                            <?=$this->translate('销售发货单')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'SalesOrderReturnController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('sales-order-return');?>">
                            <?=$this->translate('销售退货单')?>
                        </a>
                    </li>
                </ul>
            </li>
            <li class="treeview <?=($moduleName == 'Stock' ? 'active' : '') ?>">
                <a href="javascript:;">
                    <i class="fa fa-cubes"></i><span><?=$this->translate('库存')?></span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li <?=($controllerName == 'IndexController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('erp-stock');?>">
                            <?=$this->translate('其他入库')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'StockCheckController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('stock-check');?>">
                            <?=$this->translate('库存盘点')?>
                        </a>
                    </li>
                </ul>
            </li>
            <li class="treeview <?=($moduleName == 'Shop' ? 'active' : '') ?>">
                <a href="javascript:;">
                    <i class="fa fa-shopping-cart"></i><span><?=$this->translate('商城')?></span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li <?=($controllerName == 'IndexController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('app-shop');?>">
                            <?=$this->translate('商城订单')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'OrderGoodsController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('app-shop-order-goods');?>">
                            <?=$this->translate('订单商品')?>
                        </a>
                    </li>
                </ul>
            </li>
            <li class="treeview <?=($moduleName == 'Customer' ? 'active' : '') ?>">
                <a href="javascript:;">
                    <i class="glyphicon glyphicon-user"></i><span><?=$this->translate('客户')?></span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li <?=($controllerName == 'CustomerController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('customer');?>">
                            <?=$this->translate('客户')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'CustomerCategoryController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('customer-category');?>">
                            <?=$this->translate('客户分类')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'SupplierController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('supplier');?>">
                            <?=$this->translate('供应商')?>
                        </a>
                    </li>
                    <li <?=($controllerName == 'SupplierCategoryController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('supplier-category');?>">
                            <?=$this->translate('供应商分类')?>
                        </a>
                    </li>
                </ul>
            </li>
            <li class="treeview <?=($moduleName == 'Finance' ? 'active' : '') ?>">
                <a href="javascript:;">
                    <i class="fa fa-money"></i><span><?=$this->translate('资金')?></span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li <?=($controllerName == 'PayableController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('finance-payable');?>">
                            <?=$this->translate('应付账款')?></a>
                    </li>
                    <li <?=($controllerName == 'ReceivablesController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('accounts-receivable');?>">
                            <?=$this->translate('应收账款')?>
                        </a>
                    </li>
                    <!--li>
                        <a href="">
                            <?=$this->translate('其他应付账款')?>
                        </a>
                    </li>
                    <li>
                        <a href="">
                            <?=$this->translate('其他应收账款')?>
                        </a>
                    </li-->
                </ul>
            </li>
            <!--li class="treeview <?=($moduleName == 'Report' ? 'active' : '') ?>">
                <a href="javascript:;">
                    <i class="fa fa-pie-chart"></i><span><?=$this->translate('报表')?></span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li <?=($controllerName == 'IndexController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('report');?>"><?=$this->translate('销售')?></a>
                    </li>
                    <li <?=($controllerName == 'ReportStockController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('report-stock');?>"><?=$this->translate('库存')?></a>
                    </li>
                    <li <?=($controllerName == 'ReportPurchaseController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('report-purchase');?>"><?=$this->translate('采购')?></a>
                    </li>
                    <li <?=($controllerName == 'ReportFinanceController' ? 'class="active"' : '')?>>
                        <a href="<?=$this->url('report-finance');?>"><?=$this->translate('资金')?></a>
                    </li>

                </ul>
            </li-->

        </ul>
    </section>
</aside>