<form class="form-horizontal">
	<div class="form-group">
		<rt-lookup2 rt-title="药品名称"
					ng-model="vm.productSelected"
					rt-get-data-name="Product.GetProduct"
					rt-order-by="name"
					rt-col-list="[{Code:'name',Name:'药品名称'},{Code:'code',Name:'编码'}]"
					rt-label-col="2"
					rt-col="9"
					rt-multiple="true"
					rt-required="true">
		</rt-lookup2>
		<div class="col-sm-1">
			<button class="btn btn-primary" ng-click="vm.showReport()">查询</button>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label">省份<span style="color:red;">*</span></label>
		<div class="col-sm-9">
			<ui-select class="form" multiple allow-clear sortable="true" theme="bootstrap" close-on-select="false" ng-model="vm.provinceSelected">
				<ui-select-match>{{$item.NAME}}</ui-select-match>
				<ui-select-choices repeat="item in vm.provinceList | filter: {NAME: $select.search}">
					<span ng-bind-html="item.NAME | highlight: $select.search"></span>
				</ui-select-choices>
			</ui-select>
		</div>

	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label">最近<span style="color:red;">*</span></label>
		<div class="col-sm-3">
			<ui-select allow-clear ng-model="vm.lastTimeSelected" theme="bootstrap">
				<ui-select-match>{{$select.selected.Name}}</ui-select-match>
				<ui-select-choices repeat="item in vm.lastTimeList | filter: $select.search">
					<span ng-bind-html="item.Name | highlight: $select.search"></span>
				</ui-select-choices>
			</ui-select>
		</div>
	</div>

</form>

<div class="row" style="border-top: 1px dotted #d5c4c4; padding-top: 20px">
	<div class="col-sm-6">
		<ul class="nav nav-tabs">
			<li class="active">
				<a href="#" onclick="return false;" data-toggle="tab">终端流失城市占比</a>
			</li>
		</ul>
		<div id="report" style="height:400px;"></div>
	</div>
	<div class="col-sm-6">
		<ul class="nav nav-tabs">
			<li class="active">
				<a href="#" onclick="return false;" data-toggle="tab">流失终端最后交易</a>
			</li>
		</ul>
		<table class="table table-hover">
			<thead>
				<tr>
					<th>#</th>
					<th>城市名</th>
					<th>终端名</th>
					<th>最后交易年月</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="row in vm.reportData.TabList">
					<td>{{ $index+1 }}</td>
					<td>{{row.CityName}}</td>
					<td>{{ row.EntName }}</td>
					<td>{{ row.LastBillTime }}</td>
				</tr>
			</tbody>
		</table>
	</div>


</div>