<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<link rel="stylesheet" href="/lib/app/css/app.min.css">
<link rel="stylesheet" href="/lib/simple-line-icons/css/simple-line-icons.css">
<link rel="stylesheet" href="/lib/bootable/bootstrap-table.css">
<link rel="stylesheet" href="/lib/webo/css/ui.css">
<link rel="stylesheet" href="/lib/toastr/toastr.css">
<link rel="stylesheet" href="/lib/app/css/site.min.css">
<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css" type="text/css"/>
<style>
    .app-content, .app-footer {
        margin-left: 0px;
    }
    .app-content {
        position: absolute;
        top: 42px;
        height: auto;
        width: 100% !important;
    }
    @media (min-width: 768px) {
        .navbar {
            min-height: 40px
        }

        .navbar-nav > li > a {
            font-size: 14px;
            padding-top: 11px;
            padding-bottom: 11px
        }
        .navbar-brand {
            padding-top: 0;
            padding-bottom: 0;
            line-height: 42px;
            height: 42px
        }
    }
    @media (min-width: 1200px){
        .col-lg-3 {
            width: 20%;
        }
    }
    .odoo{
        border: 1px solid #ced4da;
        height: 71px;
        margin: 8px 8px;
        padding: 0 15px 0 0
    }
    .padd10{
        padding-top: 10px;
    }
    #type .form-control{
        border-top-style: none;
        border-right-style: none;
        border-left-style: none;
        border-bottom: 2px solid #cacaca;
        border-radius:0;
    }
    .btn-primary{
        background-color: #00a09d;
        border-color:#00a09d;
    }
</style>
<body>
<div class="app app-header-fixed app-aside-fixed">
    <header id="header" class="app-header navbar" role="menu">
        {{template "com/nav.tpl" .}}
    </header>
    <div id="content" class="app-content" role="main" style="padding-left: 150px">
        <div class="row">
            <div class="col-md-8">
                <a id="add_item" class="btn btn-primary">创建</a>
            </div>
            <div class="col-md-4">
                <div class="row">
                    <div class="col-md-12" id="type">
                        <input type="text" class="input-block-level form-control" name="type" autocomplete="off" value=""
                               data-validate="{required: false, number:false,  messages:{required:'请输入'}}"
                               style="margin: 0 0 5px 0;height: 30px;padding: 1px 0;width: 50%;background-color: #f0f3f4" placeholder="街道"/>
                    </div>
                    <div class="col-md-12">
                        <ul class="nav navbar-nav active">
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-filter"></i>筛选<span class="caret"></span></a>
                                <ul class="dropdown-menu" role="menu">
                                    <li><a href="#" data-tab="tab-chrome">任务管理</a></li>
                                    <li><a href="#" data-tab="tab-firefox">信息管理</a></li>
                                    <li><a href="#" data-tab="tab-safari">工时管理</a></li>
                                    <li><a href="#" data-tab="tab-opera">合同管理</a></li>
                                    <li><a href="#" data-tab="tab-ie">产品管理</a></li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-bars"></i>分组<span class="caret"></span></a>
                                <ul class="dropdown-menu" role="menu">
                                    <li><a href="#" data-tab="tab-chrome">任务管理</a></li>
                                    <li><a href="#" data-tab="tab-firefox">信息管理</a></li>
                                    <li><a href="#" data-tab="tab-safari">工时管理</a></li>
                                    <li><a href="#" data-tab="tab-opera">合同管理</a></li>
                                    <li><a href="#" data-tab="tab-ie">产品管理</a></li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-star"></i>收藏<span class="caret"></span></a>
                                <ul class="dropdown-menu" role="menu">
                                    <li><a href="#" data-tab="tab-chrome">任务管理</a></li>
                                    <li><a href="#" data-tab="tab-firefox">信息管理</a></li>
                                    <li><a href="#" data-tab="tab-safari">工时管理</a></li>
                                    <li><a href="#" data-tab="tab-opera">合同管理</a></li>
                                    <li><a href="#" data-tab="tab-ie">产品管理</a></li>
                                </ul>
                            </li>

                        </ul>
                    </div>
                </div>
            </div>

        </div>
        <div class="row col-lg-3 col-md-3 col-sm-3 col-xs-12 odoo">
            <div class="media">
                <div class="media-body">
                    <div class="media" href="/index?url=/agreement/ui/list">
                        <a class="media-left">
                            <img src="/static/images/crm.jpg" width="70" height="70"/>
                        </a>
                        <div class="media-body padd10">
                            <h5 class="media-heading"><b>无锡兴诺电气有限公司</b></h5>
                            <a style="border: 1px solid #00a09d;border-radius:8px;padding: 2px;"><i class="fa fa-fw fa-shopping-cart"></i>0</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row col-lg-3 col-md-3 col-sm-3 col-xs-12 odoo">
            <div class="media">
                <div class="media-body">
                    <div class="media" href="/index?url=/checks/ui/opticlist">
                        <a class="media-left">
                            <img src="/static/images/account_accountant.jpg" width="70" height="70"/>
                        </a>
                        <div class="media-body padd10">
                            <h5 class="media-heading"><b>上海马拉松电机[MP-140-4A]</b></h5>
                            <a style="border: 1px solid #00a09d;border-radius:8px;padding: 2px;"><i class="fa fa-fw fa-shopping-cart"></i>0</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row col-lg-3 col-md-3 col-sm-3 col-xs-12 odoo">
            <div class="media">
                <div class="media-body">
                    <div class="media" href="/index?url=/commission/ui/sale/noreview/list">
                        <a class="media-left">
                            <img src="/static/images/appraisal.jpg" width="70" height="70"/>
                        </a>
                        <div class="media-body padd10">
                            <h5 class="media-heading"><b>上海马拉松电机[MP-140-4A]</b></h5>
                            <a style="border: 1px solid #00a09d;border-radius:8px;padding: 2px;"><i class="fa fa-fw fa-shopping-cart"></i>0</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row col-lg-3 col-md-3 col-sm-3 col-xs-12 odoo">
            <div class="media">
                <div class="media-body">
                    <div class="media" href="/index?url=/account/ui/list">
                        <a class="media-left">
                            <img src="/static/images/crm.jpg" width="70" height="70"/>
                        </a>
                        <div class="media-body padd10">
                            <h5 class="media-heading"><b>上海马拉松电机[MP-140-4A]</b></h5>
                            <a style="border: 1px solid #00a09d;border-radius:8px;padding: 2px;"><i class="fa fa-fw fa-shopping-cart"></i>0</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row col-lg-3 col-md-3 col-sm-3 col-xs-12 odoo">
            <div class="media">
                <div class="media-body">
                    <div class="media" href="/index?url=/payment/ui/wait/list">
                        <a class="media-left">
                            <img src="/static/images/helpdesk.jpg" width="70" height="70"/>
                        </a>
                        <div class="media-body padd10">
                            <h5 class="media-heading"><b>上海马拉松电机[MP-140-4A]</b></h5>
                            <a style="border: 1px solid #00a09d;border-radius:8px;padding: 2px;"><i class="fa fa-fw fa-shopping-cart"></i>0</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row col-lg-3 col-md-3 col-sm-3 col-xs-12 odoo">
            <div class="media">
                <div class="media-body">
                    <div class="media" href="/index?url=/payment/ui/ticket/list">
                        <a class="media-left">
                            <img src="/static/images/hr.jpg" width="70" height="70"/>
                        </a>
                        <div class="media-body padd10">
                            <h5 class="media-heading"><b>上海马拉松电机[MP-140-4A]</b></h5>
                            <a style="border: 1px solid #00a09d;border-radius:8px;padding: 2px;"><i class="fa fa-fw fa-shopping-cart"></i>0</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- /content -->
</div>
<script src="/lib/app/js/app.min.js"></script>
<script src="/lib/bootable/bootstrap-table.js"></script>
<script src="/lib/webo/js/ui.js"></script>
<script src="/lib/toastr/toastr.js"></script>
<script src="/lib/jquery/jquery/validate/jquery.metadata.js"></script>
<script src="/lib/jquery/jquery/jquery.form.js"></script>
<script src="/lib/jquery/jquery-ui/jquery-ui.min.js"></script>
<script src="/lib/webo/js/validate.js"></script>
<script>
    var $table = $("#item_table");
    $(function () {
        $table.bootstrapTable({
            url: "/product/item/list",
            method: "post",
            sidePagination: "server",
            pagination: true,
            height: getTableHeight(),
            fixedColumns: true,
            fixedNumber: 1
        });
        $("#add_item").on("click", function () {
            window.location.href = "/product/ui/contact/add"
        });
        $(window).resize(function () {
            $table.bootstrapTable('resetView', {
                height: getTableHeight()
            });
        });
    });
    function getTableHeight() {
        return 800;
        var window_height = $(window).height();
        var obj_off_y = $(".fit-body").offset().top();
        var result_height = window_height - obj_off_y;
        return result_height;
    }
    function refreshContent(options) {
        $table.bootstrapTable("refresh")
    }
    function actionFormatter(value, row) {
        str ='<a class ="update text-primary" href="javascript:" title="修改" style="margin-right: 5px;">修改</a>';
        return str
    }
    window.actionEvents = {
        'click .update': function (e, value, row) {
            window.location = "/product/ui/update?sn=" + row.sn
        }
    }
</script>
</body>
</html>