{% load i18n %}

<style>
    .left_col {
        position: fixed;
        top: 0;
        height: 100%;
        overflow: auto;
    }
</style>

<div class="col-md-3 left_col">
    <div class="left_col scroll-view">
        <div class="navbar nav_title" style="border: 0;">
            <span href="#" class="site_title">
                <img src="/media/{{company_logo}}" 
                    {% ifequal user.company.ancestor_id 31392 %}
                        style='height:46px;'
                     {% else %}
                        style='height:50px;'
                    {% endifequal %}
                >
                <span style='font-size:14px;'>
                    {% if user.company %}
                    {{user.company.name}}
                    {% else %}
                    {% trans '基础信息' %}
                    {% endif %}
                </span>
            </span>
        </div>
        <div class="clearfix"></div>
        <!-- sidebar menu -->
        <div id="sidebar-menu" class="main_menu_side hidden-print main_menu" style='margin-top:30px;'>
            {% ifequal user.company.ancestor_id 31917 %}
            <div class="menu_section">
                <h3>{% trans '康年皇冠' %}</h3>
                <ul class="nav side-menu">
                    <li><a><i class="fa fa-list"></i> {% trans '康年皇冠功能' %} <span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
							{% ifequal user.id 11444 %}
                            <li><a class="l-a" href="/inventory/kangnian_activation_page/">{% trans '标签批量激活' %}</a></li>
                            <li><a class="l-a" href="/obj/list/kangnian_activehistory/">{% trans '激活记录' %}</a></li>
							<li><a class="l-a" href="/obj/list/kangnian_inventorymanipulation/">{% trans '库存管理' %}</a></li>
							<li><a class="l-a" href="/obj/list/kangnian_inventorymanipulation_detail/">{% trans '库存明细' %}</a></li>
							{% endifequal %}
							
                            <li><a class="l-a" href="/obj/list/kangnian_reserve">{% trans '预约列表' %}</a></li>
                            <li><a class="l-a" href="/sales/kangnian_writeoff_page/">{% trans '在线核销' %}</a></li>
                            <li><a class="l-a" href="/obj/list/kangnian_writeoff/">{% trans '核销列表' %}</a></li>
							
							{% ifequal user.groups.all.0.name '财务' %}
								<li><a class="l-a" href="/obj/list/kangnian_activehistory/">{% trans '激活记录' %}</a></li>
								<li><a class="l-a" href="/obj/list/kangnian_inventorymanipulation/">{% trans '库存管理' %}</a></li>
								<li><a class="l-a" href="/obj/list/kangnian_inventorymanipulation_detail/">{% trans '库存明细' %}</a></li>
							{% endifequal %} 
                        </li>
                    </ul>
                </ul>
            </div>
            {% endifequal %}
            {% ifequal user.groups.all.0.name '销售出库组' %}
            <div class="menu_section">
                <h3>{% trans '物流管理' %}</h3>
                <ul class="nav side-menu">
                    <li><a><i class="fa fa-list"></i> {% trans '进销存报表' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                            <li><a class="l-a" href="/inventory/batch/gdn/">{% trans '销售出库' %}</a></li>
                            <li><a class="l-a" href="/inventory/batch/gtn/">{% trans '成品转库' %}</a></li>
                            <li><a class="l-a" href="/inventory/batch/gwn/">{% trans '销售退库' %}</a></li>
                            <li><a class="l-a" href="/inventory/stock/">{% trans '出入库列表' %}</a></li>
                        </ul>
                    </li>
                    <li><a><i class="fa fa-paw"></i> {% trans '物流查询' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                            <li><a class="l-a" href="/inventory/html/label_query/">{% trans '标签查询' %}</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
            {% else %}
            {% ifequal user.groups.all.0.name '成品入库组' %}
            <div class="menu_section">
                <h3>{% trans '物流管理' %}</h3>
                <ul class="nav side-menu">
                    <li><a><i class="fa fa-list"></i> {% trans '进销存报表' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                            <li><a class="l-a" href="/inventory/batch/grn/">{% trans '成品入库' %}</a></li>
                            <li><a class="l-a" href="/inventory/batch/gtn/">{% trans '成品转库' %}</a></li>
                            <li><a class="l-a" href="/inventory/batch/gcn/">{% trans '标签退库' %}</a></li>
                            <li><a class="l-a" href="/inventory/stock/">{% trans '出入库列表' %}</a></li>

                            <li><a class="l-a" href="/inventory/bottlecap/output/">{% trans '瓶盖绑定产量查询' %}</a></li>
                        </ul>
                    </li>
                    <li><a><i class="fa fa-paw"></i> {% trans '物流查询' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                            <li><a class="l-a" href="/inventory/html/label_query/">{% trans '标签查询' %}</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
            {% else %}
            {% ifequal user.groups.all.0.name '市场稽查组' %}
            <div class="menu_section">
                <h3>{% trans '物流管理' %}</h3>
                <ul class="nav side-menu">
                    <li><a><i class="fa fa-paw"></i> {% trans '物流查询' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                            <li><a class="l-a" href="/inventory/html/label_query/">{% trans '标签查询' %}</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
            {% else %}









            {% ifequal user.groups.all.0.name '仓管员' %}
                <div class="menu_section">
                <h3>{% trans '物流管理' %}</h3>
                <ul class="nav side-menu">
                    <li><a><i class="fa fa-list"></i> {% trans '进销存报表' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">                            
                            <li><a class="l-a" href="/inventory/batch/grn/">{% trans '成品入库' %}</a></li>
                            <li><a class="l-a" href="/inventory/batch/gdn/">{% trans '销售出库' %}</a></li>
                            <li><a class="l-a" href="/inventory/batch/gtn/">{% trans '成品转库' %}</a>
                            {% ifequal user.company.id 19318 %}
                                <li><a class="l-a" href="/obj/list/inventoryticket/">{% trans '销售启票' %}</a></li>                                 
                                <li><a class="l-a" href="/inventory/upload/inv/">{% trans '上传发货TXT文件' %}</a></li>                                 
                            {% endifequal %}
                    </li>
                    <li><a class="l-a" href="/inventory/batch/gwn/">{% trans '销售退库' %}</a></li>                      
                    <li><a class="l-a" href="/inventory/stock/">{% trans '出入库列表' %}</a></li>
                    {% ifnotequal request.user.company.id 1 %}
                        <li><a class="l-a" href="/inventory/stock/agents/">{% trans '经销商现有库存' %}</a></li>
                        <li><a class="l-a" href="/inventory/agent/list/">{% trans '经销商出入库查询' %}</a></li>
                    {% endifnotequal %}   
                </ul>               
                <li><a><i class="fa fa-paw"></i> {% trans '物流查询' %} <span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
                        <li><a class="l-a" href="/inventory/html/label_query/">{% trans '标签查询' %}</a></li>
                        {% ifequal request.user.company.id 1%}
                            {% if perms.company.sys_admin %}
                                <li><a class="l-a" href="/inventory/query/label_query/">{% trans '批量查询' %}</a></li>
                            {% endif %}
                        {% endifequal %}
                        {% if perms.company.stk_delivery %}
                            {% ifequal user.company.level_id 1 %}
                                <li><a class="l-a" href="/inventory/stock/err/list/">{% trans '标签检查' %}</a></li>
                                <li><a class="l-a" href="/inventory/stock/err/product/">{% trans '品名检查' %}</a></li>
                            {% endifequal %}
                        {% endif %}
                        {% ifequal request.user.company.level_id 1%}
                            {% if request.user.company.cfg_company.auth_area %}
                                <li><a class="l-a" href="/obj/list/bugsell/">{% trans '窜货预警' %}</a></li>
                            {% endif %}
                        {% endifequal%}

                    </ul>
                </li>
                </div>
                
            {% else %}
            <div class="menu_section">
                <h3>{% trans '基础信息' %}</h3>
                <ul class="nav side-menu">



                    {% ifequal user.id 1 %}
                        <li>
                            <a><i class="fa fa-cogs"></i> {% trans '系统设置' %} <span class="fa fa-chevron-down"></span></a>
                            <ul class="nav child_menu">
                                 <li><a class="l-a" href="/company/orginazition/cgroup/">{% trans '功能组别' %}</a></li>
                                 <li><a class="l-a" href="/company/orginazition/cgroup_menu/">{% trans '菜单设置' %}</a></li>
                            </ul>
                        </li>    
                    {% endifequal %}



                    <li>   
                        <a><i class="fa fa-home"></i> {% trans '公司管理' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                            <li><a class='l-a' href="/obj/list/user/">{% trans '用户帐号' %}</a></li>
                            {% ifequal user.company.level_id 1 %}
                                {% ifnotequal request.user.company.id 19257 %}
                                    <li><a class='l-a' href="/obj/list/prd_plant/">{% trans '工厂厂区' %}</a></li>
                                {% endifnotequal %}                                
                                {% ifnotequal request.user.id 4967 %}
                                    <li><a class='l-a' href="/obj/list/sal_division/">{% trans '营销战区' %}</a></li>
                                    <li><a class='l-a' href="/obj/list/sal_subdivision/">{% trans '营销分区' %}</a></li>
                                    <li><a class='l-a' href="/product/list/query/auth/">{% trans '稽察授权' %}</a></li>
                                    <li><a class='l-a' href="/company/list/staffdiv/">{% trans '营销人员区域管理' %}</a></li>
                                {% endifnotequal %}
                                {% ifequal request.user.company.id 20445 %}
                                    <li><a class='l-a' href="/obj/list/brandrecommender/">{% trans '品牌推荐官' %}</a></li>
                                {% endifequal %}                               
                            {% endifequal %}
                            <li><a class='l-a' href="/obj/list/store/">{% trans '仓库列表' %}</a></li>

                            {% ifequal request.user.company.get_cfg.bulletinboard 1 %}
                                <li><a class='l-a' href="/obj/list/bulletinboard/">{% trans '公告信息' %}</a></li>
                            {% endifequal %}
                           
                            {% if perms.company.sys_admin %}
                                {% ifequal request.user.ancestor_id 1644 %}
                                    <li><a class='l-a'  href="/company/orginazition/vieworginazition/">{%  trans '组织架构' %}</a></li>
                                {% endifequal%}
                            {% else %}
                                {% if user.staff_user %}
                                    <li><a class='l-a'  href="/company/orginazition/vieworginazition/">{%  trans '组织架构' %}</a></li>   
                                {% endif %}
                            {% endif %}





                            {% ifequal user.company.id 19257 %} 
                                <li><a class='l-a' href="/white_domain/">{% trans '域名白名单' %}</a></li>
                                <li><a class='l-a' href="/third_party_company/">{% trans '第三方公司' %}</a></li>
                                <!-- <li><a class='l-a' href="/label_bind_rule/">{% trans '第三方标签绑定规则' %}</a></li> -->
                                <li><a class='l-a' href="/third_party_label/list/">{% trans '第三方标签绑定记录' %}</a></li>
                                <li><a class='l-a' href="/company/saleman/checkin/">{% trans '业务员打卡记录' %}</a></li>
                            {% endifequal %}
                            <!--
                            <li><a class='l-a' href="/company/list">{% trans '经销商导入' %}</a></li>
                            -->
                            {% ifequal user.company.id 16687 %} 
                                {% ifnotequal request.user.id 4967 %}
                                    <li><a class='l-a' href="/white_domain/">{% trans '域名白名单' %}</a></li>
                                    <li><a class='l-a' href="/third_party_company/">{% trans '第三方公司' %}</a></li>
                                    <li><a class='l-a' href="/third_party_label/list/">{% trans '第三方标签绑定记录' %}</a></li>
                                    <li><a class='l-a' href="/company/saleman/checkin/">{% trans '业务员打卡记录' %}</a></li>
                                {% endifnotequal %}
                            {% endifequal %}
                        </ul>
                    </li>
                    {% ifequal user.company.level_id 1 %}     

                    <li>
                        <a><i class="fa fa-edit"></i> {% trans '产品管理' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                            <li><a class="l-a" href="/obj/list/series/">{% trans '产品系列' %}</a></li>
                            <li><a class="l-a" href="/obj/list/product/">{% trans '产品名称' %}</a></li>
                            <li><a class="l-a" href="/obj/list/productprop/">{% trans '产品属性' %}</a></li>
                            <li><a class="l-a" href="/obj/list/promat/">{% trans '促销物料' %}</a></li>
                        </ul>
                    </li>
                    {% endifequal %}
                    <li>
                        <a><i class="fa fa-sitemap"></i> {% trans '经销商管理' %} <span
                                class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                            <li><a class="l-a" href="/obj/list/agent/">{% trans '经销商列表' %}</a></li>
                            <li><a class="l-a" href="/company/list/register/">{% trans '终端店注册审核' %}</a></li>
                            {% ifequal user.company.ancestor_id 1644 %}
                                <li><a class='l-a' href="/inventory/check/storegeo/">{% trans '待核准仓库' %}</a></li>
                                <li><a class='l-a' href="/obj/list/wxwalletapplication/">{% trans '微信钱包审核' %}</a></li>
                                <li><a class='l-a' href="/obj/list/bankinfoapplication/">{% trans '银行卡审核' %}</a></li>
                            {% endifequal %}
                            <li><a class='l-a' href="/company/list/agent/order/">{% trans '订单列表' %}</a></li>
                            {% ifequal user.company.id 19257 %}
                            <li><a class='l-a' href="/company/list/agent/order_review/">{% trans '销售订单审核' %}</a></li>
                            <li><a class='l-a' href="/company/list/agent/order_return/">{% trans '退换订单审核' %}</a></li>
                            {% endifequal %}
                            {% ifequal user.company.id 16687 %}
                            <li><a class='l-a' href="/company/list/agent/order_review/">{% trans '销售订单审核' %}</a></li>
                            <li><a class='l-a' href="/company/list/agent/order_return/">{% trans '退换订单审核' %}</a></li>
                            {% endifequal %}



                        </ul>
                    </li>




                    {% ifequal user.company.id 19257 %}
                    <li>
                        <a>
                            <i class="fa fa-shopping-bag"></i> {% trans '铭牌权益' %} <span
                                class="fa fa-chevron-down"></span>
                        </a>
                        <ul class="nav child_menu">
                            <li><a class='l-a' href="/company/benefit/">{% trans '权益管理' %}</a></li>
                            <li><a class='l-a' href="/company/brands/">{% trans '铭牌管理' %}</a></li>
                            <li><a class='l-a' href="/company/brands/agent_level_list/">{% trans '经销商等级' %}</a></li>
                        </ul>
                    </li>
                    <li>
                        <a>
                            <i class="fa fa-calendar"></i> {% trans '任务考核' %} <span class="fa fa-chevron-down"></span>
                        </a>
                        <ul class="nav child_menu">
                            <li><a class='l-a' href="/company/sale_task/">{% trans '任务设置' %}</a></li>
                            <!-- <li><a class='l-a' href="/company/sale_task/record/">{% trans '任务记录' %}</a></li> -->
                        </ul>
                    </li>
                    <li>
                        <a>
                            <i class="fa fa-pencil"></i> {% trans '页面管理' %} <span class="fa fa-chevron-down"></span>
                        </a>
                        <ul class="nav child_menu">
                            <li><a class='l-a' href="/company/page_banners/">{% trans '轮播图管理' %}</a></li>
                            <li><a class='l-a' href="/company/news/">{% trans '新闻资讯' %}</a></li>
                        </ul>
                    </li>
                    {% endifequal %}



                    {% ifequal user.company.id 16687 %}
                        {% ifnotequal request.user.id 4967 %}
                        <li>
                            <a>
                                <i class="fa fa-shopping-bag"></i> {% trans '铭牌权益' %} <span
                                    class="fa fa-chevron-down"></span>
                            </a>
                            <ul class="nav child_menu">
                                <li><a class='l-a' href="/company/benefit/">{% trans '权益管理' %}</a></li>
                                <li><a class='l-a' href="/company/brands/">{% trans '铭牌管理' %}</a></li>
                                <li><a class='l-a' href="/company/brands/agent_level_list/">{% trans '经销商等级' %}</a></li>
                            </ul>
                        </li>
                        <li>
                            <a>
                                <i class="fa fa-calendar"></i> {% trans '任务考核' %} <span class="fa fa-chevron-down"></span>
                            </a>
                            <ul class="nav child_menu">
                                <li><a class='l-a' href="/company/sale_task/">{% trans '任务设置' %}</a></li>
                                <!-- <li><a class='l-a' href="/company/sale_task/record/">{% trans '任务记录' %}</a></li> -->
                            </ul>
                        </li>
                        <li>
                            <a>
                                <i class="fa fa-pencil"></i> {% trans '页面管理' %} <span class="fa fa-chevron-down"></span>
                            </a>
                            <ul class="nav child_menu">
                                <li><a class='l-a' href="/company/page_banners/">{% trans '轮播图管理' %}</a></li>
                                <li><a class='l-a' href="/company/news/">{% trans '新闻资讯' %}</a></li>
                            </ul>
                        </li>
                        {% endifnotequal %}
                    {% endifequal %}

                </ul>
            </div>


            {% if request.user.company.cfg_company.mes_mgt %}
            <div class="menu_section">
                <h3>{% trans '生产管理' %}</h3>
                <ul class="nav side-menu">
                    <li><a><i class="fa fa-building"></i> {% trans '物料信息' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">  
                            <li><a class="l-a" href="/obj/list/companyunit/">{% trans '计量单位' %}</a></li>
                            <li><a class="l-a" href="/obj/list/materials/">{% trans '原材料' %}</a></li>
                            <li><a class="l-a" href="/obj/list/semifinishedgoogs/">{% trans '半成品' %}</a></li>
                            <li><a class="l-a" href="/obj/list/packaging/">{% trans '包装物料' %}</a></li>                            
                            <li><a class="l-a" href="/obj/list/storehouse/">{% trans '仓库信息' %}</a></li>
                            <li><a class="l-a" href="/obj/list/bom/">{% trans '物料清单' %}</a></li>
                        </ul>  
                    </li>
                    <li><a><i class="fa fa-bar-chart-o"></i> {% trans '库存管理' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">  
                            <li><a class="l-a" href="/mes/list/batch/25/">{% trans '原材料入库' %}</a></li>
                            <li><a class="l-a" href="/mes/list/batch/26/">{% trans '原材料出库' %}</a></li>
                            <li><a class="l-a" href="/mes/list/batch/33/">{% trans '半成品入库' %}</a></li>
                            <li><a class="l-a" href="/mes/list/batch/34/">{% trans '半成品出库' %}</a></li>
                            <li><a class="l-a" href="/mes/list/batch/29/">{% trans '包装材料入库' %}</a></li>
                            <li><a class="l-a" href="/mes/list/batch/30/">{% trans '包装材料出库' %}</a></li>
                            <li><a class="l-a" href="/mes/list/batch/37/">{% trans '产成品入库' %}</a></li>
                            <li><a class="l-a" href="/mes/list/batch/38/">{% trans '产成品出库' %}</a></li>
                        </ul>  
                    </li>
                    <li><a><i class="fa fa-calendar"></i> {% trans '订单管理' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">  
                            <li><a class="l-a" href="/mes/list/order/">{% trans '生产订单' %}</a></li>
                           
                        </ul>  
                    </li>
                    <li><a><i class="fa fa-users"></i> {% trans '供应商与客户' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">  
                            <li><a class="l-a" href="/mes/list/vendor/">{% trans '供应商' %}</a></li>
                            <li><a class="l-a" href="/mes/list/customer/">{% trans '代工客户' %}</a></li>                           
                        </ul>  
                    </li>
                    
                </ul> 
            </div>
            {% endif %}





            <div class="menu_section">
                <h3>{% trans '物流管理' %}</h3>
                <ul class="nav side-menu">
                    <li><a><i class="fa fa-list"></i> {% trans '进销存报表' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                            {% ifequal user.company.level_id 1%}
                                {% if request.user.company.cfg_company.stack_mgt %}
                                    <li><a class="l-a" href="/obj/list/stack/">{% trans '垛位列表' %}</a></li>
                                {% endif %}
                            {% if perms.company.stk_inbound %}
                            <li><a class="l-a" href="/inventory/batch/grn/">{% trans '成品入库' %}</a></li>
                            <li><a class="l-a" href="/inventory/batch/gdn/">{% trans '销售出库' %}</a></li>   

                            {% if request.user.company.level.sn < 1 %} <li><a class="l-a" href="/inventory/batch/gtn/">{% trans '成品转库' %}</a>
                    </li>
                    <li><a class="l-a" href="/inventory/batch/gwn/">{% trans '销售退库' %}</a></li>
                    {% endif %}
                    {% ifequal user.company.id 1 %}
                    <li><a class="l-a" href="/inventory/batch/gcn/">{% trans '标签退库' %}</a></li>
                    <li><a class="l-a" href="/inventory/bottlecap/output/">{% trans '瓶盖绑定产量查询' %}</a></li>
                    {% endifequal %}
                    {% endif %}
                    {% if perms.company.stk_delivery %}
                    <li><a class="l-a" href="/inventory/stock/">{% trans '出入库列表' %}</a></li>
                    {% ifnotequal request.user.company.id 1 %}
                    <li><a class="l-a" href="/inventory/stock/agents/">{% trans '经销商现有库存' %}</a></li>
                    <li><a class="l-a" href="/inventory/agent/list/"> {% trans '经销商出入库查询' %}</a></li>
                    {% endifnotequal %}
                    {% endif %}
                    {% else %}
                    <li><a class="l-a" href="/inventory/batch/grn/">{% trans '成品入库' %}</a></li>
                    <li><a class="l-a" href="/inventory/batch/gdn/">{% trans '销售出库' %}</a></li>                    

                    {% endifequal %}
                </ul>
                </li>
                <li><a><i class="fa fa-paw"></i> {% trans '物流查询' %} <span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
                        <li><a class="l-a" href="/inventory/html/label_query/">{% trans '标签查询' %}</a></li>
                        {% ifequal request.user.company.id 1%}
                        {% if perms.company.sys_admin %}
                        <li><a class="l-a" href="/inventory/query/label_query/">{% trans '批量查询' %}</a></li>
                        {% endif %}
                        {% endifequal %}
                        {% if perms.company.stk_delivery %}
                        {% ifequal user.company.level_id 1 %}
                        <li><a class="l-a" href="/inventory/stock/err/list/">{% trans '标签检查' %}</a></li>
                        <li><a class="l-a" href="/inventory/stock/err/product/">{% trans '品名检查' %}</a></li>
                        {% endifequal %}
                        {% endif %}

                        {% ifequal request.user.company.level_id 1%}
                        {% if request.user.company.cfg_company.auth_area %}
                        <li><a class="l-a" href="/obj/list/bugsell/">{% trans '窜货预警' %}</a></li>
                        {% endif %}
                        {% endifequal%}

                    </ul>
                </li>


                {% ifequal request.user.company.level_id 1 %}
                <li><a><i class="fa fa-wrench"></i> {% trans '物流工具' %} <span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
                        {% ifequal user.company.id 19318 %}
                            <li><a class="l-a" href="/obj/list/inventoryticket/">{% trans '销售启票' %}</a></li>
                        {% endifequal %}
                        {% ifequal user.company.id 16716 %}
                            <li><a class="l-a" href="/inventory/ticketinfo/">{% trans '入库启票' %}</a></li>
                        {% endifequal %}
                            

                        {% if not request.user.company.is_microboss %}
                        {% if not request.user.company.parent %}
                        {% if perms.company.sys_admin %}
                        {% if request.user.company.is_manufacturing %}
                        <li><a class="l-a" href="/inventory/html/label_replace/">{% trans '上传标签替换TXT' %}</a></li>
                        {% endif %}
                        {% endif %}
                        {% endif %}
                        {% endif %}
                        {% if perms.company.sys_admin %}
                        <li><a class="l-a" href="/inventory/upload/inv/">{% trans '上传发货TXT文件' %}</a></li>
                        {% endif %}
                        {% if perms.company.sys_admin %}
                        <li><a class="l-a" href="/inventory/stock/transfer/">{% trans '经销商库存转移' %}</a></li>
                        {% endif %}
                    </ul>
                </li>
                {% endifequal %}


                {% ifequal request.user.company.id 1 %}
                {% if perms.company.sys_admin %}
                <li><a><i class="fa fa-database"></i> {% trans '在线绑定' %} <span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">                       
                        <li><a class="l-a" href="/inventory/bottlecap/output/">{% trans '瓶盖绑定产量查询' %}</a></li>                      
                        <li><a class="l-a" href="/inventory/online/list_binding/">{% trans '待入库产品列表' %}</a></li>                        
                    </ul>
                </li>
                {% endif %}
                {% endifequal %}







            
                {% ifequal request.user.ancestor_id 1644 %}
                    <li><a><i class="fa fa-book"></i> {% trans '领用核销' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                            <li><a class="l-a" href="/obj/list/entapplication/">{% trans '招待用酒核销' %}</a></li>    
                            <li><a class="l-a" href="/obj/list/actapplication/">{% trans '会议(活动)用酒核销' %}</a></li>  
                            <li><a class="l-a" href="/obj/list/giftapplication/">{% trans '赠酒核销' %}</a></li>  
                            <li><a class="l-a" href="/obj/list/entwriteoff/">{% trans '扫码明细记录' %}</a></li>                              
                        </ul>
                    </li>
                {% else %}
                    {% ifequal request.user.company.level_id 1 %}
                    {% ifnotequal request.user.company.id 19257 %}
                    <li><a><i class="fa fa-book"></i> {% trans '领用核销' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                        <!--
                                    <li><a class="l-a" href="/obj/list/proprj/" >{% trans '核销项目列表' %}</a></li>                                
                                    <li><a class="l-a" href="/obj/list/recipient/">{% trans '业务员领用记录' %}</a></li>                                
                                    <li><a class="l-a" href="#">{% trans '核销记录' %}</a></li>
                                -->
                            <li><a class="l-a" href="/obj/list/giftsscheme/">{% trans '礼品活动方案' %}</a></li>
                            <li><a class="l-a" href="/obj/list/giftsapplication/">{% trans '礼品申请列表' %}</a></li>
                            <li><a class="l-a" href="/obj/list/giftsrequisition/">{% trans '礼品领用列表' %}</a></li>
                            <li><a class="l-a" href="/sales/agents/writeoff/">{% trans '经销商核销列表' %}</a></li>
                        </ul>
                    </li>
                    {% endifnotequal %}
                    {% else %}
                    {% if user.company.is_expense_account %}
                    <li><a><i class="fa fa-book"></i> {% trans '领用核销' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                        <li><a class="l-a" href="/obj/list/giftsscheme/">{% trans '礼品活动方案' %}</a></li>
                        <li><a class="l-a" href="/obj/list/giftsapplication/">{% trans '礼品申请列表' %}</a></li>
                        <li><a class="l-a" href="/obj/list/giftsrequisition/">{% trans '礼品领用列表' %}</a></li>

                        </ul>
                    </li>
                    {% endif %}
                    {% endifequal %}
                {% endifequal %}







                </ul>
            </div>
            <div class="menu_section">
                <h3>{% trans '营销管理' %}</h3>
                <ul class="nav side-menu">
                    <li><a><i class="fa fa-line-chart"></i> {% trans '销售报表' %} <span
                                class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                            {% ifequal request.user.company.id 1644 %}
                            <li><a class="l-a" href="/sales/agents/scan/">{% trans '经销商扫码' %}</a></li>
                            {% endifequal %}
                            <li><a class="l-a" href="/sales/query/month/">{% trans '月度图表' %}</a></li>
                            <li><a class="l-a" href="/sales/query/date/">{% trans '时间段图表' %}</a></li>
                            {% ifequal request.user.company.id 19257 %}
                            <li id="test"><a class="l-a" href="/inventory/period/config/">{% trans '库存期结' %}</a></li>
                            <li id="test"><a class="l-a" href="/product/sendout/">{% trans '库存与销售图' %}</a></li>
                            <li id="test"><a class="l-a" href="/product/inventory/in/">{% trans '环比图' %}</a></li>
                            <li id="test"><a class="l-a" href="/product/sellout/">{% trans '同比图' %}</a></li>
                            {% endifequal %}
                            {% ifequal request.user.company.id 16687 %}
                            <li id="test"><a class="l-a" href="/inventory/period/config/">{% trans '库存期结' %}</a></li>
                            <li id="test"><a class="l-a" href="/product/sendout/">{% trans '库存与销售图' %}</a></li>
                            <li id="test"><a class="l-a" href="/product/inventory/in/">{% trans '环比图' %}</a></li>
                            <li id="test"><a class="l-a" href="/product/sellout/">{% trans '同比图' %}</a></li>
                            {% endifequal %}
                        </ul>
                    </li>

                    {% ifequal user.company.level_id 1 %}
                    <li><a><i class="fa fa-qrcode"></i> {% trans '营销活动' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                            <li><a class="l-a" href="/obj/list/award/">{% trans '奖品设置' %}</a></li>
                            <li><a class="l-a" href="/obj/list/activities/">{% trans '活动设置' %}</a></li>
                            <li><a class='l-a' href="/obj/list/consumerwinner/">{% trans '中奖记录' %}</a></li>
                            {% ifequal user.id 1 %}
                            <li><a class='l-a' href="/obj/list/consumerredeem/">{% trans '兑奖情况' %}</a></li>
                            <li><a class='l-a' href="/sales/status/">{% trans '状态监测' %}</a></li>
                            {% endifequal %}
                            {% ifequal user.id 2 %}
                            <li><a class='l-a' href="/obj/list/consumerredeem/">{% trans '兑奖情况' %}</a></li>
                            {% endifequal %} 
                            <li><a class='l-a' href="/sales/lotteryseeds/">{% trans '奖池布奖' %}</a></li>
                            <li><a class='l-a' href="/sales/consumer/appeal_page/">{% trans '消费者申诉' %}</a></li>

                        </ul>
                    </li>
                    {% endifequal %}

                    {% ifequal user.id 4574 %}
                    <li><a><i class="fa fa-qrcode"></i> {% trans '求真酒业功能' %}
                        <!-- <span style="border-radius:5px;font-size:0.8rem;background:linear-gradient(to top, #dd3838,#e05454);padding:0.2rem 1rem;">新</span> -->
                         <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                            <li><a class='l-a' href="/obj/list/qz_consumerwinner/">{% trans '红包发放明细' %}</a></li>
                            <li><a class='l-a' href="/obj/list/qz_brandrecommender/">{% trans '品牌推荐官返利明细' %}</a></li>
                            <li><a class='l-a' href="/obj/list/qz_brandrecommender_redpack_record/">{% trans '品牌推荐官红包发放情况' %}</a></li>
                            <li><a class='l-a' href="/obj/list/qz_anniversary/">{% trans '逢整返利明细' %}</a></li>
                            <li><a class='l-a' href="/obj/list/qz_rebatenumber/">{% trans '红包领取汇总情况' %}</a></li>
                            <li><a class='l-a' href="/obj/list/qz_redpacksendfail/">{% trans '✨ 普通红包发放失败记录' %}</a></li>
                            
                        </ul>
                    </li>
                    {% endifequal%}

                    {% ifequal request.user.company.cfg_company.membership 1 %}
                        <li><a><i class="fa fa-user"></i> {% trans '会员管理' %} <span class="fa fa-chevron-down"></span></a>
                            <ul class="nav child_menu">
                                <li><a class="l-a" href="/list/set/member/">{% trans '会员列表' %}</a></li>
                                {% ifequal user.company.id 19257 %}
                                <li><a class="l-a" href="/obj/set/memberlevel/">{% trans '会员设置' %}</a></li>
                                <!--                            <li><a class="l-a" href="/list/set/productputon/" >{% trans '产品上架' %}</a></li>-->
                                <li><a class='l-a' href="/holiday/list/">{% trans '节假日列表' %}</a></li>
                                {% endifequal %}
                                {% ifequal user.company.id 16687 %}
                                <li><a class="l-a" href="/obj/set/memberlevel/">{% trans '会员设置' %}</a></li>
                                <li><a class='l-a' href="/holiday/list/">{% trans '节假日列表' %}</a></li>
                                {% endifequal %}
                                <li><a class="l-a" href="/sales/label_scan/list/">{% trans '微信扫码统计' %}</a></li>
                                <li><a class="l-a" href="/company/leave_message/list/">{% trans '消息留言' %}</a></li>
                            </ul>
                        </li>
                    {% endifequal %}
                        {% ifequal user.company.id 19257 %}
                        <li>
                            <a><i class="fa fa-legal"></i> {% trans '奖品核销' %} <span class="fa fa-chevron-down"></span></a>
                            <ul class="nav child_menu">
                                <li><a class='l-a' href="/sales/hexiao_record/">{% trans '核销记录' %}</a></li>
                                <li><a class='l-a' href="/sales/hexiao_dispatch_record/">{% trans '配送记录' %}</a></li>
                                <li><a class='l-a' href="/sales/hexiao_returned_money/">{% trans '返现记录' %}</a></li>
                            </ul>
                        </li>
                        {% endifequal %}
                        {% ifequal user.company.id 16687 %}
                        <li>
                            <a><i class="fa fa-legal"></i> {% trans '奖品核销' %} <span class="fa fa-chevron-down"></span></a>
                            <ul class="nav child_menu">
                                <li><a class='l-a' href="/sales/hexiao_record/">{% trans '核销记录' %}</a></li>
                                <li><a class='l-a' href="/sales/hexiao_dispatch_record/">{% trans '配送记录' %}</a></li>
                                <li><a class='l-a' href="/sales/hexiao_returned_money/">{% trans '返现记录' %}</a></li>
                            </ul>
                        </li>
                        {% endifequal %}
                        {% ifequal user.company.id 19318 %}
                        <li>
                            <a><i class="fa fa-legal"></i> {% trans '奖品核销' %} <span class="fa fa-chevron-down"></span></a>
                            <ul class="nav child_menu">
                                <li><a class='l-a' href="/sales/hexiao_record/">{% trans '核销记录' %}</a></li>
                                <li><a class='l-a' href="/sales/hexiao_dispatch_record/">{% trans '配送记录' %}</a></li>
                                <li><a class='l-a' href="/sales/hexiao_returned_money/">{% trans '返现记录' %}</a></li>
                            </ul>
                        </li>
                        {% endifequal %}




                    <li><a><i class="fa fa-random"></i> {% trans '渠道促销' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">

                            {% ifequal user.company.level_id 1 %}
                            <li><a class="l-a" href="/obj/list/channelpromotions/">{% trans '扫码奖励方案' %}</a></li>
                            {% ifequal user.company.cfg_company.saldiv_report 1 %}
                            <li><a class="l-a" href="/sales/saldiv/rebate/">{% trans '战区扫码汇总' %}</a></li>
                            {% endifequal %}
                            <li><a class="l-a" href="/sales/channelrebate/summary/agent/">{% trans '经销商扫码奖励汇总' %}</a>
                            </li>
                            {% else %}
                            {% if user.staffsaldiv %}
                            <li><a class="l-a" href="/sales/saldiv/rebate/">{% trans '战区扫码汇总' %}</a></li>
                            {% endif %}
                            {% endifequal %}

                            <li><a class="l-a" href="/sales/channelpromotion/list/batch/">{% trans '扫码奖励明细' %}</a></li>

                            {% ifequal user.company.level_id 1 %}
                                <li><a class="l-a" href="/sales/channelretate/period/redeem/">{% trans '奖励结算与核销' %}</a></li>
                            {% else %}
                                    {% if user.company.is_expense_account %}
                                        <li><a class="l-a" href="/sales/channelretate/period/redeem/">{% trans '奖励结算与核销' %}</a></li>                                        
                                    {% endif %}
                            {% endifequal %}


                            {% ifequal user.company.cfg_company.channelrebate_consumer_scan 1 %}
                                <li><a class="l-a" href="/sales/list/consumerchannelrebate/">{% trans '消费者扫码层级奖励明细' %}</a></li>
                            {% endifequal %}

                            {% ifequal user.company.cfg_company.rebateinvoicecheck 1 %}
                                <li><a class="l-a" href="/obj/list/rebateinvoice/">{% trans '发票信息录入' %}</a></li>
                            {% endifequal %}
                        </ul>
                    </li>
                </ul>
            </div>
            {% endifequal %}
            {% endifequal %}
            {% endifequal %}

            <!--2021-02-03 -->
            {% endifequal %}




            {% ifequal user.company.id 19257 %}
            <div class="menu_section">
                <h3>{% trans '积分商城' %}</h3>
                <ul class="nav side-menu">
                    <li>
                        <a><i class="fa fa-cog"></i> {% trans '基础设置' %} <span class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                            <li><a class="l-a" href="/mall/settings/">{% trans '商城设置' %}</a></li>
                            <li><a class="l-a" href="/mall/banners/">{% trans '轮播管理' %}</a></li>
                            <li><a class="l-a" href="/mall/points_product/">{% trans '商品管理' %}</a></li>
                            <li><a class="l-a" href="/mall/boards/">{% trans '咨询发布' %}</a></li>
                        </ul>
                    </li>
                    <li>
                        <a><i class="fa fa-calendar-minus-o"></i> {% trans '订单管理' %} <span
                                class="fa fa-chevron-down"></span></a>
                        <ul class="nav child_menu">
                            <li><a class="l-a" href="/mall/orders/">{% trans '积分订单' %}</a></li>
                            <li><a class="l-a" href="/mall/orders/comments/">{% trans '订单评论' %}</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
            {% endifequal %}

            {% ifequal user.company.id 16687 %}
                {% ifnotequal request.user.id 4967 %}
                <div class="menu_section">
                    <h3>{% trans '积分商城' %}</h3>
                    <ul class="nav side-menu">
                        <li>
                            <a><i class="fa fa-cog"></i> {% trans '基础设置' %} <span class="fa fa-chevron-down"></span></a>
                            <ul class="nav child_menu">
                                <li><a class="l-a" href="/mall/settings/">{% trans '商城设置' %}</a></li>
                                <li><a class="l-a" href="/mall/banners/">{% trans '轮播管理' %}</a></li>
                                <li><a class="l-a" href="/mall/points_product/">{% trans '商品管理' %}</a></li>
                                <li><a class="l-a" href="/mall/boards/">{% trans '咨询发布' %}</a></li>
                            </ul>
                        </li>
                        <li>
                            <a><i class="fa fa-calendar-minus-o"></i> {% trans '订单管理' %} <span
                                    class="fa fa-chevron-down"></span></a>
                            <ul class="nav child_menu">
                                <li><a class="l-a" href="/mall/orders/">{% trans '积分订单' %}</a></li>
                                <li><a class="l-a" href="/mall/orders/comments/">{% trans '订单评论' %}</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
                {% endifnotequal %}
            {% endifequal %}

        </div>
        <!-- /sidebar menu -->


        <!-- /menu footer buttons -->
        <div class="sidebar-footer hidden-small">
            <a data-toggle="tooltip" data-placement="top" title="Settings">
                <span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
            </a>
            <a data-toggle="tooltip" data-placement="top" title="{% trans '全屏显示' %}">
                <span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
            </a>
            <a data-toggle="tooltip" data-placement="top" title="Lock">
                <span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
            </a>
            <a data-toggle="tooltip" data-placement="top" title="{% trans '退出登录' %}" href="/user/logout/">
                <span class="glyphicon glyphicon-off" aria-hidden="true"></span>
            </a>
        </div>

        <!-- /menu footer buttons -->

    </div>

</div>
