<div class="row rt-margin-bottom-before-box">
    <div class="col-sm-8">
    </div>
    <div class="col-sm-4">
        <form class="input-group">
            <input type="search" placeholder="搜索..." class="form-control" ng-model="vm.view.searchText" />
            <span class="input-group-btn" ng-click="vm.view.search(1)">
                    <button type="submit" class="btn btn-default">
                        <i class="fa fa-search"></i>
                    </button>
                </span>
        </form>
    </div>
</div>

<div class="box box-primary">
    <div class="box-header with-border" style="cursor: move;">
        <div class="pull-left">
            <div class="btn-group">
                <button class="btn btn-default dropdown-toggle" id="dropdownMenuViewSelect" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    {{vm.view.selectedView.ViewName}}
                     <span class="caret"></span>
                </button>
                <ul class="dropdown-menu" aria-labelledby="dropdownMenuViewSelect">
                    <li ng-repeat="view in vm.view.list track by view.Id" ng-click="vm.view.select(view)"><a href="javascript:void(0)">{{view.ViewName}}</a></li>
                </ul>
            </div>

            <button class="btn btn-default" ng-class="{true:'active',false:'inactive'}[vm.view.isShowSearchList]" ng-click="vm.view.isShowSearchList = !vm.view.isShowSearchList;overHeightTable();">
                <i class="fa fa-filter"></i> 更多筛选 <i class="fa fa-angle-double-down"></i>
            </button>
        </div>
    </div>
    <div ng-show="vm.view.isShowSearchList" class="box box-widget">
        <!-- form start -->
        <form class="form-horizontal">
            <div class="box-body">
                <div class="form-group" style="padding-left: 20px; margin-bottom: 0px;">
                    <div class="col-sm-2" style="padding-top: 5px;"><input type="radio" name="object_type_name" value="" ng-checked="true">所有</label>
                    </div>
                    <div class="col-sm-2" style="padding-top: 5px;"><input type="radio" name="object_type_name" value="daily_report">日报</label>
                    </div>
                    <div class="col-sm-2" style="padding-top: 5px;"><input type="radio" name="object_type_name" value="weekly_report">周报</label>
                    </div>
                    <div class="col-sm-2" style="padding-top: 5px;"><input type="radio" name="object_type_name" value="monthly_report">月报</label>
                    </div>
                    <div class="btn-group" class="col-sm-2">
                        <button class="btn btn-primary" ng-click="vm.actions.filterReport()">查询</button>
                    </div>
                </div>
            </div>
            <!-- /.box-body -->
        </form>
    </div>
    <div class="nav-tabs-custom">
        <div class="tab-content">
            <rt-data-grid rt-page-record-count="vm.page.recordCount"  rt-page-index="vm.page.index" rt-page-size="vm.page.size" rt-get-data="vm.view.search()" rt-sort-field="vm.view.sortField"
                rt-rows="vm.data" rt-selected-ids="vm.view.selectedIds" rt-auto-height="vm.view.autoHeight">
                <table class="table table-condensed table-hover">
                    <thead>
                        <tr>
                            <th>
                                <rt-header-checkbox></rt-header-checkbox>
                            </th>
                            <!-- @@ 视图表头 -->
                            <th rt-field-code="object_type_name">报告性质</th>
                            <th ng-if="vm.view.selectedView.Id!='170D0035-E401-4094-BAB8-B9E44D4D2307'">提交人</th>
                            <th ng-if="vm.view.selectedView.Id!='170D0035-E401-4094-BAB8-B9E44D4D2307'">提交时间</th>
                            <th ng-if="vm.view.selectedView.Id=='170D0035-E401-4094-BAB8-B9E44D4D2307'">发送给</th>
                            <th ng-if="vm.view.selectedView.Id=='170D0035-E401-4094-BAB8-B9E44D4D2307'">提交时间</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-repeat="row in vm.data track by row.Id">
                            <td>
                                <rt-data-checkbox value="{{row.Id}}" />
                            </td>
                            <!-- @@ 视图列表值 -->
                            <td ng-if="vm.view.type=='default'&&row.object_type_name=='daily_report'">
                                <a id="{{row.Id}}" data-toggle="sidebar" data-target=".sidebar-right" ui-sref=".edit1({id:row.object_id})" ui-sref-opts="{location:true}">日报</a>
                            </td>
                            <td ng-if="vm.view.type=='default'&&row.object_type_name=='weekly_report'">
                                <a id="{{row.Id}}" data-toggle="sidebar" data-target=".sidebar-right" ui-sref=".edit2({id:row.object_id})" ui-sref-opts="{location:true}">周报</a>
                            </td>
                            <td ng-if="vm.view.type=='default'&&row.object_type_name=='monthly_report'">
                                <a id="{{row.Id}}" data-toggle="sidebar" data-target=".sidebar-right" ui-sref=".edit3({id:row.object_id})" ui-sref-opts="{location:true}">月报</a>
                            </td>
                            <td ng-if="vm.view.selectedView.Id!='170D0035-E401-4094-BAB8-B9E44D4D2307'">
                                {{row.SubmittedByName}}
                            </td>
                            <td ng-if="vm.view.selectedView.Id!='170D0035-E401-4094-BAB8-B9E44D4D2307'">
                                {{row.SubmittedOn| date:'yyyy-MM-dd HH:mm'}}
                            </td>
                            <td ng-if="vm.view.selectedView.Id=='170D0035-E401-4094-BAB8-B9E44D4D2307'">
                                {{row.ReadByName}}
                            </td>
                            <td ng-if="vm.view.selectedView.Id=='170D0035-E401-4094-BAB8-B9E44D4D2307'">
                                {{row.SubmittedOn| date:'yyyy-MM-dd HH:mm'}}
                            </td>
                        </tr>
                    </tbody>
                </table>
            </rt-data-grid>
        </div>
    </div>
</div>

<div class="sidebar sidebar-right sidebar-animate rt-shadow-border-left content-wrapper" ng-if="vm.view.type=='default'">
    <div ui-view class="content"></div>
</div>