<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;
    }

    .rt-align-left {
        text-align: left !important;
    }

    .rt-align-right {
        text-align: right !important;
    }

    #misstarget .col-sm-2 input {
        width: 30%;
        border: 1px solid #ccc;
        height: 34px;
    }
</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-5">
            </div>
            <div class="col-sm-1">
                <button class="btn btn-primary" ng-click="vm.showReportButton()">查询</button>
            </div>
            <div class="col-sm-1">
                <button class="btn btn-primary" ng-click='vm.actions.export({},"VisitDurationAnalysisExport","代表拜访时长分析")'>导出
                </button>
            </div>
        </div>
        <div class="form-group">
            <rt-bu-tree-lookup rt-title="部门" rt-multiple="true" ng-model="vm.nodeSelected" rt-col="8" rt-label-col="2"></rt-bu-tree-lookup>
        </div>
    </form>
</div>
<div class="row">
    <rt-data-grid rt-page-record-count="vm.recordCount" rt-get-data="vm.showReport()" rt-page-index="vm.index" rt-page-size="vm.pageSize"
        rt-rows="vm.reportData">
        <table class="table table-condensed table-hover ng-scope" style="white-space: nowrap;" id="rt-report-header">
            <thead>
                <tr>
                    <th class="rt-text-align">事业部</th>
                    <th class="rt-text-align">大区</th>
                    <th class="rt-text-align">地区</th>
                    <th class="rt-text-align">代表</th>
                    <th class="rt-number-align">拜访天数</th>
                    <th class="rt-number-align">日均拜访</th>
                    <th class="rt-number-align">每次均拜访</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="row in vm.reportData">
                    <td class="rt-text-align">
                        {{row.BuIdName}}
                    </td>
                    <td class="rt-text-align">
                        {{row.BigDeptIdName}}
                    </td>
                    <td class="rt-text-align">
                        {{row.BusinessUnitIdName}}
                    </td>
                    <td class="rt-text-align">
                        {{row.OwnerIdName}}
                    </td>
                    <td class="rt-number-align">{{row.workdays|toFixNumber:0}}天</td>
                    <td class="rt-number-align">{{row.avgDay|toFixNumber:1}}小时</td>
                    <td class="rt-number-align">{{row.avgtime|toFixNumber:0}}分钟</td>
                </tr>
            </tbody>
        </table>
    </rt-data-grid>
</div>