{% load i18n %}




<script type="text/javascript">
    $(document).ready(function(){
       
        var table=$('#tb-dlgs').DataTable({
            dom: 'Bfrtip',
            autoWidth: false,
            buttons: [{extend:'excelHtml5',text:'导出到Excel'}],           
            language:lng,           
            data:{{data|safe}}
        });       
        
        table.columns().every( function () {                        
            var that = this;             
            $('input', this.footer() ).on( 'keyup change clear', function () {
                if ( that.search() !== this.value ) {
                    that.search( this.value ).draw();
                }
            });
        });  
        
        /*
        $('#tb-dlg').on("click","td a",function(){
           $("#bg-modal").modal('hide'); 
           $.RefreshContent($(this).attr('href'));  
            return false;
        }); 
        */
    });
</script>


<div id="inventory-list" class="table-responsive">
    
    <table id="tb-dlgs" class="table table-striped table-bordered dt-responsive" width="100%">
        <thead>
            <tr>
                <th  style='width:6%'>{% trans "日期" %}</th>
                <th  style='width:6%'>{% trans "单据" %}</th>                
                <th  style='width:6%'>{% trans "编号" %}</th>
                <th  style='width:20%'>{% trans "产品名称" %}</th>  
                <th  style='width:20%'>{% trans "客户名称" %}</th> 
                <th  style='width:6%'>{% trans "操作" %}</th> 
                <th  style='width:5%'>{% trans "箱" %}</th> 
                
                {% ifequal request.user.company_id 113677 %}
                    <th  style='width:4%'>{% trans "条" %}</th>
                    <th  style='width:4%'>{% trans "盒" %}</th> 
                {% else %}
                    <th  style='width:4%'>{% trans "盒" %}</th> 
                    <th  style='width:4%'>{% trans "瓶" %}</th>
                {% endifequal %}
            </tr>            
        </thead>
        <tbody></tbody>
        <tfoot>            
            <th><input type="text" placeholder="{% trans "日期时间" %}"></th>
            <th><input type="text" placeholder="{% trans "单据类别" %}"></th>
            <th><input type="text" placeholder="{% trans "单据编号" %}"></th>
            <th><input type="text" placeholder="{% trans "产品名称" %}"></th>
            <th><input type="text" placeholder="{% trans "客户名称" %}"></th> 
            <th><input type="text" placeholder="{% trans "操作人" %}"></th> 
            <th><input type="text" placeholder="{% trans "箱" %}"></th> 
           
            {% ifequal request.user.company_id  113677 %}
                 <th><input type="text" placeholder="{% trans "条" %}"></th>
                  <th><input type="text" placeholder="{% trans "盒" %}"></th> 
            {% else %}
                <th><input type="text" placeholder="{% trans "盒" %}"></th> 
                 <th><input type="text" placeholder="{% trans "瓶" %}"></th>
            {% endifequal %}
        </tfoot>
    </table> 
  
</div>
