<style>
    .form-group .control-label {
        font-weight: 500;
        color: #555;
    }

    #rt-report-header>thead>tr>th {
        text-align: center;
        vertical-align: inherit;
        border: 1px solid #f0f0f0;
        color: #555;
        font-weight: 500;
        white-space: nowrap;
    }

    #rt-report-header>tbody>tr>td {
        text-align: center;
        vertical-align: inherit;
        border: 1px solid #f0f0f0;
        color: #555;
        font-weight: 500;
        white-space: nowrap;
    }
</style>
<div class="row">
    <form class="form-horizontal">
        <div class="form-group">
            <rt-datetime ng-model="vm.ym" rt-type="month" rt-title="查询年月" rt-required="true" rt-col="3" rt-label-col="2">
            </rt-datetime>
            <div class="col-sm-1">
                <button class="btn btn-primary" ng-click="vm.getReportData()">查询</button>
            </div>
            <div class="col-sm-1">
                <button class="btn btn-primary" ng-click='vm.actions.export({},"AttendanceReportExport","代表签到查询")'>导出</button>
            </div>
        </div>
        <div class="form-group">
            <rt-bu-tree-lookup rt-title="部门" ng-model="vm.nodeSelected" rt-col="8"></rt-bu-tree-lookup>
        </div>
        <div class="form-group">
            <rt-lookup2 rt-title="代表" rt-multiple="true" ng-model="vm.ownerSelected" rt-get-data-name="UserInfo.GetUserByOption"
                rt-order-by="name asc" rt-col-list="[{Code:'name',Name:'姓名'},{Code:'code',Name:'编号'}]" rt-params="{'@buId':'','@bigDepId':'','@depId':vm.nodeSelected?vm.nodeSelected.ids:''}"
                rt-col="8"></rt-lookup2>
        </div>
    </form>
</div>
<div class="row">
    <rt-data-grid rt-page-record-count="vm.recordCount" rt-page-index="vm.pageIndex" rt-page-size="vm.pageSize" rt-get-data="vm.getReportData()" rt-rows="vm.reportData"
        rt-auto-height=" {{tableMaxHeight}}  ">
        <table class="table table-condensed table-hover ng-scope" style="white-space: nowrap;" id="rt-report-header">
            <thead>
                <tr>
                    <th rowspan="4">
                        部门
                    </th>
                    <th rowspan="4">
                        代表
                    </th>
                    <th rowspan="4">
                        签到类型
                    </th>
                    <th rowspan="4">
                        签到时间
                    </th>
                    <th rowspan="4">
                        签到地址
                    </th>
                    <th rowspan="4">
                        签退时间
                    </th>
                    <th rowspan="4">
                        签退地址
                    </th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="row in vm.reportData.DataList ">
                    <td>{{row.BusinessUnitIdName}}</td>
                    <td>{{row.OwnerIdName}}</td>
                    <td>{{row.attendanceType}}</td>
                    <td>{{row.start_time|date:'yyyy-MM-dd HH:mm:ss'}}</td>
                    <td>{{row.start_addr}}</td>
                    <td>{{row.end_time== null ? "-" :row.end_time|date:'yyyy-MM-dd HH:mm:ss'}}</td>
                    <td>{{row.end_addr== null ? "-" :row.end_addr}}</td>
                </tr>
            </tbody>
        </table>
    </rt-data-grid>
</div>