{% load i18n %}




<ol class="breadcrumb">
        <li>  {% trans "进出存报表" %}</li> 
        <li>  {% trans "经销商库存列表" %}</li> 
</ol>



<script type="text/javascript">
    $(document).ready(function(){
       
        var table=$('#tb').DataTable({
            dom: 'Bfrtip',
            autoWidth: false,
            buttons: [{extend:'excelHtml5',text:'导出到Excel'}],           
            language:lng,           
            data:{{stock|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').on("click","td a",function(){  
            event.preventDefault();
            var cname=$(this).text();
            $.OpenDlg($(this).attr('href'),"经销商库存明细列表-"+cname,1100,700);
        });        





    });
</script>


<div id="inventory-list" class="table-responsive">
    <div class='x_panel'>
    <table id="tb" class="table table-striped table-bordered dt-responsive" width="100%"  style='font-size:90%;'>
        <thead>
            <tr>
                <th  style='width:20%'>{% trans "经销商名称" %}</th>
                <th  style='width:8%'>{% trans "层级" %}</th>                
                <th  style='width:20%'>{% trans "产品名称" %}</th>
                <th  style='width:10%'>{% trans "库存数量" %}</th>                     
            </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>                   
        </tfoot>
    </table>    
    </div>
</div>
