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

{% block css %}
    {{ block.super }}    
   
{% endblock %}



{% block js %}
    {{ block.super }}
    $('.btn-save').click(function(){
        $.SubmitForm('#obj_form form','{{request.path}}');
    });
	
	
	{% ifequal user.id 11624 %} 
			$("#id_agent option[value='32220']").remove(); 
		
		
	{% endifequal %}
   
{% endblock %}

 
{% block subtitle-1 %}
    {% trans '康年皇冠' %}
{% endblock %}
{% block subtitle-2 %}
    {% trans '库存管理' %}
{% endblock %}   

    


{% block form_content %}
    {{ block.super }}
    
    
	{% ifnotequal user.id 11624 %} 
		<div class="form-group ">
			<label class="col-sm-2 control-label ">{% trans '仓库:' %} </label>
			<div class="col-sm-10">{{ form.storehouse }}</div>
		</div>  
	{% endifnotequal %}
    
	<div class="form-group ">
        <label class="col-sm-2 control-label ">操作: </label>
        <div class="col-sm-10">
            <select class="form-control" name="method" id="">
				{% ifequal user.id 11624 %}
                <option value="2">展台出库</option>
                <option value="4">退库</option>
				{% else %}
				
                <option value="1">出库</option>
                <option value="4">退库</option>
				
				{% endifequal %}
            </select>
        </div>
    </div>
	
	{% ifnotequal user.id 11642 %} 
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '门店:' %} </label>
        <div class="col-sm-10">{{ form.agent }}</div>
    </div>    
	{% else %}
		
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '门店:' %} </label>
        <div class="col-sm-10"> 
            <select class="form-control" name="agent" id="id_agent"> 
                <option value="32220">康年皇冠花园酒店1F大堂</option> 
            </select>
		</div>
    </div>    
		
	{% endifnotequal %}
	
	
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '变更原因:' %} </label>
        <div class="col-sm-10">{{ form.reason }}</div>
    </div>      
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '产品:' %} </label>
        <div class="col-sm-10">{{ form.product }}</div>
    </div>   
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '数量' %} </label>
        <div class="col-sm-10">{{ form.amount }}</div>
    </div>   
    <!-- <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '更新时间 (无需填写):' %} </label>
        <div class="col-sm-10">{{ form.update_tm }}</div>
    </div>  
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '时间戳:' %} </label>
        <div class="col-sm-10">{{ form.tm }}</div>
    </div>   -->

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

{% endblock %}
