<style>
    #report-header>thead>tr>th {
        vertical-align: inherit;
        border: 1px solid #f0f0f0;
        color: #555;
        font-weight: 500;
    }

    #report-header>tbody>tr>td {
        vertical-align: inherit;
        border: 1px solid #f0f0f0;
        color: #555;
        font-weight: 500;
    }
</style>

<div class="row">
    <form class="form-horizontal">
        <div class="form-group">
            <rt-datetime ng-model="vm.sYm" rt-type="month" rt-title="开始年月" rt-required="true" rt-col="3" rt-label-col="2">
            </rt-datetime>
            <rt-datetime ng-model="vm.eYm" 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.showReportData()">查询</button>
            </div>
            <div class="col-sm-1">
                <button class="btn btn-primary" ng-click='vm.actions.export({},"DoctorDCReportExport","医生DC量统计")'>导出</button>
            </div>
        </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="report-header">
            <thead>
                <tr>
                    <th rowspan="2" class="rt-number-align">
                        年月
                    </th>
                    <th rowspan="2" class="rt-text-align">
                        医院
                    </th>
                    <th rowspan="2" class="rt-text-align">
                        科室
                    </th>
                    <th rowspan="2" class="rt-text-align">
                        医生
                    </th>
                    <th rowspan="2" class="rt-text-align">
                        医生分级
                    </th>
                    <th rowspan="2" class="rt-text-align">
                        药品品类
                    </th>
                    <th rowspan="2" class="rt-number-align">
                        DC量
                    </th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="row in vm.reportData.DataList ">
                    <td class="rt-number-align">{{row.year_month}}</td>
                    <td class="rt-text-align">{{row.accountidName}}</td>
                    <td class="rt-text-align">{{row.departmentidName}}</td>
                    <td class="rt-text-align">{{row.contactidName}}</td>
                    <td class="rt-text-align">{{row.contact_levelName}}</td>
                    <td class="rt-text-align">{{row.product_categoryidName}}</td>
                    <td class="rt-number-align">{{row.qty}}</td>
                </tr>
            </tbody>
        </table>
    </rt-data-grid>
</div>