<div class="box box-primary">
    <div class="box-header with-border">
        <h3 class="box-title">筛选</h3>
        <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-widget="collapse">
                <i class="fa fa-minus"></i>
            </button>
        </div>
    </div>
    <form class="form-horizontal">
        <div class="box-body">
            <div class="form-group">
                <rt-datetime ng-model="startDate" rt-type="date" rt-title="开始时间" rt-required="true" rt-col="3" rt-label-col="1">
                </rt-datetime>
                <rt-datetime ng-model="endDate" rt-type="date" rt-title="结束时间" rt-required="true" rt-col="3" rt-label-col="1">
                </rt-datetime>
            </div>
            <div class="form-group">
                <rt-lookup2 rt-title="代表" ng-model="filterOwnerId" rt-get-data-name="UserInfo.GetAllUser" rt-order-by="name asc"
                    rt-col-list="[{Code:'name',Name:'姓名'},{Code:'code',Name:'编号'}]" rt-required="true" rt-col="3" rt-label-col="1"></rt-lookup2>
            </div>
        </div>
        <div class="box-footer">
            <div class="btn-group pull-right">
                <button type="button" class="btn btn-primary" ng-click="vm.view.search()">查询</button>
                <button type="button" class="btn btn-default" ng-click='vm.download()'>下载</button>
            </div>
        </div>
    </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-rows="vm.data" rt-auto-height="{{vm.view.autoHeight}}">
            <div ng-repeat="item in vm.data track by $index" ng-if='item.IdList!=null'>
                <div class="rt-img-title">
                    <span>{{item.CreatedOn|date:'MM-dd'}}</span>
                </div>
                <div style="white-space:normal;">
                    <span ng-repeat="id in item.IdList">
                        <img class="rt-img-attachment" ng-src="{{baseUrl}}/FileDownloadHandler.ashx?fileid={{id}}&moduletype=attachment" ng-click="vm.view.preview(id);"
                        />
                    </span>
                </div>
            </div>
        </rt-data-grid>
    </div>
</div>