<!DOCTYPE html>


<html lang="cn">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    {% load i18n %}
    <title>{% trans '海南天鉴-物流系统' %}</title>
    <link rel="icon" href="/static/image/favicon.ico">
    <link rel="shortcut icon" href="/static/images/favicon.ico" type="image/x-icon" />
   
    

    <!-- Bootstrap -->
    <link href="/static/assets/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="/static/assets/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <!-- NProgress -->
    <link href="/static/assets/vendors/nprogress/nprogress.css" rel="stylesheet">
    <!-- iCheck -->
    <link href="/static/assets/vendors/iCheck/skins/flat/green.css" rel="stylesheet">
	
    <!-- bootstrap-progressbar -->
    <link href="/static/assets/vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet">
    <!-- JQVMap -->
    <link href="/static/assets/vendors/jqvmap/dist/jqvmap.min.css" rel="stylesheet"/>
    <!-- bootstrap-daterangepicker -->
    <link href="/static/assets/vendors/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">


    <!-- Datatables -->    
    <link href="/static/assets/vendors/datatables.net-bs/css/dataTables.bootstrap.min.css" rel="stylesheet">
    <link href="/static/assets/vendors/datatables.net-buttons-bs/css/buttons.bootstrap.min.css" rel="stylesheet">
    <link href="/static/assets/vendors/datatables.net-fixedheader-bs/css/fixedHeader.bootstrap.min.css" rel="stylesheet">
    <link href="/static/assets/vendors/datatables.net-responsive-bs/css/responsive.bootstrap.min.css" rel="stylesheet">
    <link href="/static/assets/vendors/datatables.net-scroller-bs/css/scroller.bootstrap.min.css" rel="stylesheet">
    


    


    <link href="/static/js/jquery-ui/css/ui-redmond/jquery-ui-1.10.4.custom.min.css" rel="Stylesheet" />
    <link  href="/static/js/toastr-master/build/toastr.min.css" rel="stylesheet">
    
    <!-- Custom Theme Style -->
    <link href="/static/assets/css/custom.min.css" rel="stylesheet">




    
    <link type="text/css" href="/static/js/datetimepicker-master/build/jquery.datetimepicker.min.css" rel="Stylesheet" />
    <link type="text/css" href="/static/js/ySelect/ySelect.css" rel="Stylesheet" />


    
    
    <style>
        #toast-container{           
            position:absolute;
            top:180px;
            left:600px;
        }

        #data-content .panel_toolbox {
            float: right;
            min-width: 40px
        }   
        
        #data-content input[type="file"]{
            display:inline-block;
        }
        #data-content table tbody td a:hover{
            color:blue;          
        }
		.left_col{
			position:fixed;
			top:0;
			height:100%;
			overflow:auto;
		}
		
    </style>
    


  </head>

  <body class="nav-md">
    <div class="container body">
      <div class="main_container">

        <!-- ajax加载载画面 -->
        <div id='ajax_loading2' style="display:none;z-index:10;position: absolute;top:39%;left:54%;">
            <img src='/static/images/y_uploading.gif' width="100%" />
            <p>载入中</p>
        </div>
        
        <!--弹出模式对话框-->
        <div id="dlgDiv">
            <div class='dlgcontent'></div>
        </div>  



        <!--Bootstrap模式对话框 大-->
        <div class="modal fade bs-example-modal-lg" id='bg-modal' tabindex="-1" role="dialog" aria-hidden="true">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
                        <h4 class="modal-title" id="bgModalLabel"></h4>
                    </div>
                    <div class="modal-body"> </div>
                    <div class="modal-footer">
                          <button type="button" class="btn btn-default" data-dismiss="modal">{% trans   '关闭' %}</button>    
                    </div>
                </div>
            </div>
        </div>

        <!--Bootstrap模式确认对话框 大-->
        <div class="modal fade bs-example-modal-bg" id='confirm-modal' tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-bg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
                    <h4 class="modal-title" id="cfModalLabel"></h4>
                </div>
                <div class="modal-body"> </div>
                <div class="modal-footer">                    
                    <button type="button" class="btn btn-primary btn-confirm"  data-dismiss="modal">{% trans '确定' %}</button>

                    <!--
                    <button type="button" class="btn btn-default" data-dismiss="modal">{% trans '取消' %}</button> 
                    -->
                </div>
            </div>
        </div>
        </div> 

        <!--Bootstrap模式确认对话框 AJAX 大-->
        <div class="modal fade bs-example-modal-lg" id='confirm-url-modal' tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
                    <h4 class="modal-title" id="urlcfModalLabel"></h4>
                </div>
                <div class="modal-body"> </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary btn-confirm" ></button>
                    <button type="button" class="btn btn-default btn-cancel"  data-dismiss="modal"></button>    
                </div>
            </div>
        </div>
        </div> 

        <!--Bootstrap自定义对话框 AJAX 大-->
        <div class="modal fade bs-example-modal-lg" id='custom-url-modal' tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
                    <h4 class="modal-title"></h4>
                </div>
                <div class="modal-body"> </div>
                <div class="modal-footer"></div>
            </div>
        </div>
        </div> 


        



    <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}}" style='height:50px;'>
                    <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;'>
                {% for m in menuitems %}
                <div class="menu_section">
                    <h3>{{ m.title }}</h3>
                    {% for c in m.children %}
                    <ul class="nav side-menu">                       
                        <li><a><i class="{{c.icon}}"></i> {{c.title}}
                                {% if c.children %} <span class="fa fa-chevron-down"></span>{% endif %}
                            </a>
                            <ul class="nav child_menu">
                                {% for cc in c.children %}
                                    {% ifequal cc.url 'https://davis.china315net.com/static/tj/bigscreen2/index.html#/rador/jinchengmingpin' %}
                                        <li><a target='_blank' href="{{cc.url}}">{{cc.title}}</a></li>
                                    {% else %}
                                        <li><a class="l-a" href="{{cc.url}}">{{cc.title}}</a></li>
                                    {% endifequal %}



                                {% endfor %}
                            </ul>
                        </li>                    
                    </ul>     
                    {% endfor %}
                </div>
                {% endfor %}
            </div>
        </div>
    </div>


        {% include 'top.html' %}
        
        
        <!-- page content -->
        <div class="right_col" role="main" id="data-content"> </div>
        <!-- /page content -->


        <!-- footer content -->
        <footer>
          <div class="pull-right">
           技术支持： <a href="http://www.china315net.com/">海南天鉴防伪科技有限公司 </a> &nbsp;&nbsp;   电话：0898-68647196
          </div>
          <div class="clearfix"></div>
        </footer>
        <!-- /footer content -->
      </div>
    </div>

    <!-- jQuery -->
    <script src="/static/assets/vendors/jquery/dist/jquery.min.js"></script>
    <script src="/static/js/jquery-ui/js/jquery-ui-1.10.4.custom.js"></script>
    <script src='/static/js/date_picker_zh.js'></script>
    <script src="/static/js/jquery.form.min.js"></script>
    <script src="/static/js/jquery.cookie.js"></script>
    

    <!-- Bootstrap -->
    <script src="/static/assets/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="/static/assets/vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="/static/assets/vendors/nprogress/nprogress.js"></script>
    <!-- Chart.js -->
    <script src="/static/assets/vendors/Chart.js/dist/Chart.min.js"></script>
    <!-- gauge.js -->
    <script src="/static/assets/vendors/gauge.js/dist/gauge.min.js"></script>
    <!-- bootstrap-progressbar -->
    <script src="/static/assets/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
    <!-- iCheck -->
    <script src="/static/assets/vendors/iCheck/icheck.min.js"></script>
    <!-- Skycons -->
    <script src="/static/assets/vendors/skycons/skycons.js"></script>
    <!-- Flot -->
    <script src="/static/assets/vendors/Flot/jquery.flot.js"></script>
    <script src="/static/assets/vendors/Flot/jquery.flot.pie.js"></script>
    <script src="/static/assets/vendors/Flot/jquery.flot.time.js"></script>
    <script src="/static/assets/vendors/Flot/jquery.flot.stack.js"></script>
    <script src="/static/assets/vendors/Flot/jquery.flot.resize.js"></script>
    <!-- Flot plugins -->
    <script src="/static/assets/vendors/flot.orderbars/js/jquery.flot.orderBars.js"></script>
    <script src="/static/assets/vendors/flot-spline/js/jquery.flot.spline.min.js"></script>
    <script src="/static/assets/vendors/flot.curvedlines/curvedLines.js"></script>
    <!-- DateJS -->
    <script src="/static/assets/vendors/DateJS/build/date.js"></script>
    <!-- JQVMap -->
    <script src="/static/assets/vendors/jqvmap/dist/jquery.vmap.js"></script>
    <script src="/static/assets/vendors/jqvmap/dist/maps/jquery.vmap.world.js"></script>
    <script src="/static/assets/vendors/jqvmap/examples/js/jquery.vmap.sampledata.js"></script>
    <!-- bootstrap-daterangepicker -->
    <script src="/static/assets/vendors/moment/min/moment.min.js"></script>
    <script src="/static/assets/vendors/bootstrap-daterangepicker/daterangepicker.js"></script>




    



    <script src="/static/js/toastr-master/build/toastr.min.js"></script>
   





    <!-- Datatables -->    
    <script src="/static/js/jquerydatatable/DataTables-1.10.20/js/jquery.dataTables.min.js"></script>

    <script src="/static/js/jquerydatatable/Buttons-1.6.1/js/dataTables.buttons.min.js"></script>
    <script src="/static/js/jquerydatatable/Buttons-1.6.1/js/buttons.html5.min.js"></script>
    <script src="/static/js/jquerydatatable/Buttons-1.6.1/js/jszip.min.js"></script>
    <script src="/static/js/jquerydatatable/Buttons-1.6.1/js/buttons.print.min.js"></script>   
    <script src="/static/assets/vendors/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>  
    <script src="/static/assets/vendors/datatables.net-buttons-bs/js/buttons.bootstrap.min.js"></script>
   
     <!-- Datatables -->
    <script src="/static/js/jquerydatatable/lng.js"></script>

    




    <!-- Custom Theme Scripts -->
    <script src="/static/assets/js/custom.min.js"></script>
    <script src="/static/js/wangEditor.min.js"></script>


    
    <script type="text/javascript" src='/static/js/datetimepicker-master/build/jquery.datetimepicker.full.min.js'></script> 
    <script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=2GhQS9lyRH5X9RmVH3DjqImFMt0ndmBq"></script>

    <script type="text/javascript" src="https://api.map.baidu.com/library/TextIconOverlay/1.2/src/TextIconOverlay_min.js"></script>
    <script type="text/javascript" src="https://api.map.baidu.com/library/MarkerClusterer/1.2/src/MarkerClusterer_min.js"></script>
    <script type="text/javascript" src='/static/js/ySelect/ySelect.js'></script> 
	<script type="text/javascript" src='/static/js/table-editor.js'></script>



    <!--富文本编辑器  
    <script type="text/javascript" src="//unpkg.com/wangeditor/dist/wangEditor.min.js"></script>
    -->  


<script type="text/javascript">    
    $(document).ready(function(){
        //2020-09-15 
        var map;

            /*
            $.ajaxSetup({data: {csrfmiddlewaretoken: '{{ csrf_token }}' }});

            function getCookie(name) {
                var cookieValue = null;
                if (document.cookie && document.cookie !== '') {
                    var cookies = document.cookie.split(';');
                    for (var i = 0; i < cookies.length; i++) {
                        var cookie = jQuery.trim(cookies[i]);
                        // Does this cookie string begin with the name we want?
                        if (cookie.substring(0, name.length + 1) === (name + '=')) {
                            cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                            break;
                        }
                    }
                }
                return cookieValue;
            }
            var csrftoken = getCookie('csrftoken');

            function csrfSafeMethod(method) {
                // 这些HTTP方法不要求CSRF包含
                return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
            }
            $.ajaxSetup({
                beforeSend: function(xhr, settings) {
                    if (!csrfSafeMethod(settings.type) && !this.crossDomain) {
                        xhr.setRequestHeader("X-CSRFToken", csrftoken);
                    }
                }
            });
            */    
               





    //2021-03-24
    $.ajaxSetup({
        beforeSend:function (xhr,settings) {
            xhr.setRequestHeader("X-CSRFtoken",$.cookie("csrftoken"))
        }
    });




    $('#data-content').on('click','.collapse-link', function() {
        var $BOX_PANEL = $(this).closest('.x_panel'),
            $ICON = $(this).find('i'),
            $BOX_CONTENT = $BOX_PANEL.find('.x_content');        
        // fix for some div with hardcoded fix class
        if ($BOX_PANEL.attr('style')) {
            $BOX_CONTENT.slideToggle(200, function(){
                $BOX_PANEL.removeAttr('style');
            });
        } else {
            $BOX_CONTENT.slideToggle(200); 
            $BOX_PANEL.css('height', 'auto');  
        }
        $ICON.toggleClass('fa-chevron-up fa-chevron-down');
    });
    $('#data-content').on('click','.close-link',function () {
        var $BOX_PANEL = $(this).closest('.x_panel');
        $BOX_PANEL.remove();
    });

    
    jQuery.OpenCfmDlg=function(title,content,callback){
        $('#cfModalLabel').html(title);        
        $('#confirm-modal .modal-body').html(content);                
        $("#confirm-modal")
            .modal('show')
            .one('click', '.btn-confirm', callback);     
    };

    jQuery.OpenUrlCfmDlg=function(url,title,sBtnConfirm,sBtnCancel){
        $.ajax({
            type:'GET',
            processData: false,
            contentType: 'application/json; charset=utf-8',
            url:url,
            success:function(html){
                $('#confirm-url-modal .btn-confirm').text(sBtnConfirm);
                $('#confirm-url-modal .btn-cancel').text(sBtnCancel);
                $("#confirm-url-modal .modal-body").html(html);
                $('#urlcfModalLabel').html(title);


                //2020-09-16
                $("#bconfirm-url-modal .modal-footer").show();
        
                $("#confirm-url-modal").modal('show');  
            },
            error: function(XMLHttpRequest, textStatus, errorThrown) {
                alert('连接服务器失败');
                return;
            }
        });        
    };
    jQuery.OpenUrlCustomDlg=function(url,title,buttons){
        var dlgId='#custom-url-modal';
        var footer='';
        $.each(buttons,function(idx,btn){            
            footer=footer+'<button type="button" class="btn '+btn.clss.join(' ')+'">'+btn.title+'</button>';
　　    });     
        $(dlgId+" .modal-footer").html(footer);
        $(dlgId+" .modal-title").html(title);
        $.ajax({
            type:'GET',
            processData: false,
            contentType: 'application/json; charset=utf-8',
            url:url,
            success:function(html){                
                $(dlgId+" .modal-body").html(html);        
                $(dlgId).modal('show');  
            },
            error: function(XMLHttpRequest, textStatus, errorThrown) {
                alert('连接服务器失败');
                return;
            }
        });        
    };     



    jQuery.OpenDlg=function(url,title,w,h){
                $.ajax({
                    type:'GET',
                    processData: false,
                    contentType: 'application/json; charset=utf-8',
                    url:url,
                    success:function(html){
                        $("#bg-modal .modal-body").html(html);
						$("#bg-modal").attr('data-url',url);

                        $('#bgModalLabel').html(title);
                        
                        //2020-09-16
                        $("#bg-modal .modal-footer").show();
                        

                        $("#bg-modal").modal('show');
                        
                      
                    },
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
                        alert('连接服务器失败');
                        return;
                    }
                 });
    };            


        jQuery.RefreshContent = function (url) {
                $.ajax({
                    type:'GET',
                    processData: false,
                    contentType: 'application/json; charset=utf-8',
                    url:url,
                    success: function (html) { 
                        $('#data-content').html(html);
                        scrollToTop();
                        return;
                    },
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
                        alert('连接服务器失败');
                        return;
                    }
                 });
    };           
            var scrollToTop = function() {
                let sTop = document.documentElement.scrollTop || document.body.scrollTop
                if (sTop > 0) {
                    window.requestAnimationFrame(scrollToTop)
                    window.scrollTo(0, sTop - sTop / 8)
                }
            } 

        jQuery.SubmitForm = function (form, url,callback) {
                $(form).ajaxSubmit({
                    type: 'post',
                    url: url,    
                    success: function(html) {
                        $('.btn-save').show();

                        $('#data-content').html(html);         
                        if (callback) {
                            callback();
                        }
                    },
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
                        $('.btn-save').show();
                        
                        alert('连接服务器失败');                        
                    }
                    //$(this).resetForm(); // 提交后重置表单
                });
                return; // 阻止表单自动提交事件
    };

    $(document).ajaxStart(function(){
 	             $('#ajax_loading2').show();
 	             //$('#data-content').css('filter','blur(2px)');
    });
    $(document).ajaxStop(function(){
	            $('#ajax_loading2').hide();
	            //$('#data-content').css('filter', '');
    });
    




    $('#sidebar-menu').on( "click", ".l-a", function(e){                
                event.preventDefault();
                $.RefreshContent($(this).attr('href'));
    });
    $( document).on( "click", " .l-lnk", function(e){
                $.RefreshContent($(this).attr('lnk'));
    });



    jQuery.isEmpty=function (value){
                if(value == null || value == "" || value == "undefined" || value == undefined || value == "null"){
                    return true;
                }
                else{
                    value = value.replace(/\s/g,"");
                    if(value == ""){
                        return true;
                    }
                    return false;
                }
    };



    //2020-11-21
    jQuery.fn.dataTable.Api.register( 'sum()', function ( ) {
        return this.flatten().reduce( function ( a, b ) {
                if ( typeof a === 'string' ) {
                    a = a.replace(/[^\d.-]/g, '') * 1;
                }
                if ( typeof b === 'string' ) {
                    b = b.replace(/[^\d.-]/g, '') * 1;
                }

                return a + b;
        }, 0 );
    });
    jQuery.formatNum=function(num,n){  
            //参数说明：num 要格式化的数字 n 保留小数位 
            num = String(num.toFixed(n));      
            var re = /(-?\d+)(\d{3})/;      
            while(re.test(num)) {  
                num = num.replace(re,"$1,$2"); 
            }  
            return num;  
    };  


    //2020-11-30
    jQuery.MergeCell=function(columnIndex,tableFilter) {
        var markspan = 0;//标记单元格中相同数据出现的次数        
        if (tr < 2) { ; } else {            
            for (var i = 0; i < tr; i++) {
                var comparerowindex = parseInt(parseInt(i) - markspan);
                var nextindex = i + 1;
                var curcell = $(tableFilter + "  tr:eq(" + comparerowindex + ") td:eq(" + columnIndex + ")");
                var nextcell = $(tableFilter + "  tr:eq(" + nextindex + ") td:eq(" + columnIndex + ")");    
                var currspan = curcell.attr("rowspan");
                if (currspan == undefined || currspan == "") { curcell.attr("rowspan", 1); currspan = 1; }
                if (curcell.text() == nextcell.text()) {
                    markspan += 1;
                    curcell.attr("rowspan", (parseInt(currspan) + 1));
                    nextcell.remove();
                } else { 
                    markspan = 0; 
                }                               
            }
        } 
    };



    //2020-12-23
    jQuery.isNumber=function isNumber(val){
        var regPos = /^\d+(\.\d+)?$/; //非负浮点数
        var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
        if(regPos.test(val) || regNeg.test(val)){
            return true;
        }else{
            return false;
        }
    };
    jQuery.isIntNum=function isIntNum(val){
        var regPos = / ^\d+$/; // 非负整数
        var regNeg = /^\-[1-9][0-9]*$/; // 负整数
        if(regPos.test(val) || regNeg.test(val)){
            return true;
        }else{
            return false;
        }
    };



        
});




     
</script>
	
  </body>
</html>
