<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>
		<div class="form-group">
			<label class="col-sm-2 control-label">事业部</label>
			<div class="col-sm-3">
				<ui-select allow-clear ng-model="vm.buidSelected" theme="bootstrap">
					<ui-select-match>{{ $select.selected.name }}</ui-select-match>
					<ui-select-choices repeat="item in vm.buidList|filter:$select.search">
						<span ng-bind-html="item.name | highlight: $select.search"></span>
					</ui-select-choices>
				</ui-select>
			</div>
			<label class="col-sm-2 control-label">业务线/大区</label>
			<div class="col-sm-3">
				<ui-select allow-clear ng-model="vm.bigDepSelected" theme="bootstrap">
					<ui-select-match>{{ $select.selected.name }}</ui-select-match>
					<ui-select-choices repeat="item in vm.bigDepList |filter:$select.search">
						<span ng-bind-html="item.name | highlight: $select.search"></span>
					</ui-select-choices>
				</ui-select>
			</div>
			<div class="col-sm-1">
				<button class="btn btn-primary" ng-click="vm.search()">查询</button>
			</div>
			<div class="col-sm-1">
				<button class="btn btn-primary" ng-click='vm.actions.export({
                        "BuIdName":"事业部",
                        "BigDeptIdName":"业务线/大区",
                        "BusinessUnitIdName":"地区",
                        "OwnerIdName":"负责人",
                        "Coach_Done_Count":"协访客户数",
                        "visit_avg_times":"团队平均拜访客户数",
                        "Top_Contact_Count":"TOP10客户数",
                        "Coach_Top_Count":"TOP10协访覆盖数",
                        "top_coverage_per":"TOP10覆盖率",
						"weekly_report_qty":"周例会"
                        },"RegionManagerVisitReportExport","地区经理拜访统计(按医生)")'>导出</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.search()" rt-rows="vm.data"
		rt-auto-height=" {{tableMaxHeight}}  ">
		<table class="table table-condensed table-hover ng-scope" style="white-space: nowrap;" id="rt-report-header">
			<thead>
				<tr>
					<th class="rt-align-left">
						事业部
					</th>
					<th class="rt-align-left">
						大区
					</th>
					<th class="rt-align-left">
						地区
					</th>
					<th class="rt-align-left">
						负责人
					</th>
					<th class="rt-align-right">
						协访客户数
					</th>
					<th class="rt-align-right">
						团队平均拜访客户数
					</th>
					<th class="rt-align-right">
						TOP10客户数
					</th>
					<th class="rt-align-right">
						TOP10协访覆盖数
					</th>
					<th class="rt-align-right">
						TOP10覆盖率
					</th>
					<th class="rt-align-right">
						周例会
					</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="row in vm.data ">
					<td class="rt-align-left">{{row.BuIdName}}</td>
					<td class="rt-align-left">{{row.BigDeptIdName}}</td>
					<td class="rt-align-left">{{row.BusinessUnitIdName}}</td>
					<td class="rt-align-left">{{row.OwnerIdName!=null?row.OwnerIdName:'-'}}</td>
					<td class="rt-align-right">{{row.Coach_Done_Count!=null?row.Coach_Done_Count:0}}</td>
					<td class="rt-align-right">{{row.Visit_AVG_Times!=null?row.Visit_AVG_Times:0 | number:0}}</td>
					<td class="rt-align-right">{{row.Top_Contact_Count!=null?row.Top_Contact_Count:0}}</td>
					<td class="rt-align-right">{{row.Coach_Top_Count!=null?row.Coach_Top_Count:0}}</td>
					<td class="rt-align-right">{{row.Top_acc_per!=null?row.Top_acc_per:0 | number:0}}%</td>
					<td class="rt-align-right">{{row.weekly_report_qty!=null?row.weekly_report_qty:0}}</td>
				</tr>
			</tbody>
		</table>
	</rt-data-grid>
</div>