{% extends 'obj_form.html' %}
{% load i18n %}
{% load tj_filters %}




{% block js %}
    {{ block.super }}
    {% if form.instance.id %}        
        $('#id_company').val('{{form.instance.company.id}}');
    {% endif %}

    $('.btn-save').click(function(){
        $.SubmitForm('#obj_form form','{{request.path}}');
    });  
{% endblock %}
    {% block subtitle-1 %}
        {% trans "公司管理" %}
    {% endblock %}
    {% block subtitle-2 %}
        {% trans "公司设置" %}
    {% endblock %}

    <span style="margin-left:10px; color:green; ">
        {% block subtitle-3 %}
            {% if form.instance.id %}
                {% trans "修改" %}
            {% else %}
                {% trans "新建" %}
            {% endif %}
        {% endblock %}
{#        {% if form.instance.id %}#}
{#            {% block subtitle-3 %}#}
{#                {% trans "修改" %}#}
{#            {% endblock %}#}
{#        {% else %}#}
{#            {% block subtitle-3 %}#}
{#                {% trans "新建" %}#}
{#            {% endblock %}#}
{#        {% endif %}#}
    </span>



{% block form_content %}
    {{ block.super }}
    
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '企业名称' %} </label>
        <div class="col-sm-4">{{ form.company }}</div>
        <label class="col-sm-2 control-label ">{% trans '企业菜单' %} </label>
        <div class="col-sm-4">{{ form.menu_type}}</div>
    </div> 


    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '微信公众号' %} </label>
        <div class="col-sm-4">{{ form.wx_account }}</div>  
        <label class="col-sm-2 control-label ">{% trans '微信小程序名称' %} </label>
        <div class="col-sm-4">{{ form.app_name }}</div>
    </div> 
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '小程序是否开启扫码功能' %} </label>
        <div class="col-sm-4">{{ form.mp_scanner_enabled }}</div>  
    </div> 
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '天鉴静默授权' %} </label>
        <div class="col-sm-4">{{ form.tjfwbase_oauth }}</div>    
        <label class="col-sm-2 control-label ">{% trans '天鉴代授权' %} </label>
        <div class="col-sm-4">{{ form.tjfw_oauth }}</div>
    </div>    
     <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '录入产品图片' %} </label>
        <div class="col-sm-4">{{ form.product_photo }}</div>    
        <label class="col-sm-2 control-label ">{% trans '录入产品价格' %} </label>
        <div class="col-sm-4">{{ form.product_price }}</div>
    </div>    
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '显示产品授权' %} </label>
        <div class="col-sm-4">{{ form.auth_product }}</div>  
        <label class="col-sm-2 control-label ">{% trans '显示区域授权' %} </label>
        <div class="col-sm-4">{{ form.auth_area }}</div>
    </div>   

    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '库存管理' %} </label>
        <div class="col-sm-4">{{ form.inv_mgt }}</div>  
        <label class="col-sm-2 control-label ">{% trans '跨段绑定表名' %} </label>
        <div class="col-sm-4">{{ form.label_binding }}</div>
        
    </div> 
     <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '一级经销自动入库' %} </label>
        <div class="col-sm-4">{{ form.inbound_auto_lv1 }}</div>    
        <label class="col-sm-2 control-label ">{% trans '允许一级经销商入库' %} </label>
        <div class="col-sm-4">{{ form.perm_inbound_lv1 }}</div>
    </div>  
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '一级经销入库规则' %} </label>
        <div class="col-sm-4">{{ form.inbound_cretiria_lv1 }}</div>    
         <label class="col-sm-2 control-label ">{% trans '一级出库规则' %} </label>
        <div class="col-sm-4">{{ form.outbound_cretiria_lv1 }}</div>
        
    </div>        

    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '二级经销入库规则' %} </label>
        <div class="col-sm-4">{{ form.inbound_cretiria_lv2 }}</div>         
        <label class="col-sm-2 control-label ">{% trans '二级出库规则' %} </label>
        <div class="col-sm-4">{{ form.outbound_cretiria_lv2 }}</div>
    </div>  

    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '有经销商属于多个父级' %} </label>
        <div class="col-sm-4">{{ form.multi_parents }}</div>
        <label class="col-sm-2 control-label ">{% trans '一级可按瓶发货' %} </label>
        <div class="col-sm-4">{{ form.lv1_pkg_split }}</div>          
    </div>            
    
    
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '终端店注册自动通过' %} </label>
        <div class="col-sm-4">{{ form.terminal_register_automatic_approve }}</div>
        <label class="col-sm-2 control-label ">{% trans '短信签名' %} </label>
        <div class="col-sm-4">{{ form.sms_sign }}</div>
       
    </div>   

    <div class="form-group ">
         <label class="col-sm-2 control-label ">{% trans '二级经销自动入库' %} </label>
        <div class="col-sm-4">{{ form.inbound_auto_lv2 }}</div>    
        <label class="col-sm-2 control-label ">{% trans '第三方信息同步' %} </label>
        <div class="col-sm-4">{{ form.thirdparty_sync }}</div>    

    </div>  

    <div class="form-group ">
         <label class="col-sm-2 control-label ">{% trans '终端店(下级经销商)退货规则' %} </label>
        <div class="col-sm-4">{{ form.terminal_return }}</div>              

    </div>   
    
    



    <div>
        <a class="btn btn-primary btn-save" type="submit" style="float:right;">{% trans '保存' %}</a>
    </div>
{% endblock %}
