<form class="form-horizontal">
	<div class="form-group">
		<label class="col-sm-1 control-label"><span style="color:red;">*</span>药品名称</label>
		<div class="col-sm-3">
			<ui-select allow-clear ng-model="vm.productSelected" theme="bootstrap">
				<ui-select-match>{{ $select.selected.Name }}</ui-select-match>
				<ui-select-choices repeat="item in vm.productList|filter:$select.search">
					<span ng-bind-html="item.Name | highlight: $select.search"></span>
				</ui-select-choices>
			</ui-select>
		</div>
		<label class="col-sm-1 control-label"><span style="color:red;">*</span>省份</label>
		<div class="col-sm-3">
			<ui-select allow-clear ng-model="vm.provinceSelected" theme="bootstrap">
				<ui-select-match>{{ $select.selected.NAME }}</ui-select-match>
				<ui-select-choices repeat="item in vm.provinceList |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.showReport()">查询</button>
		</div>
	</div>
	<div class="form-group">
		<rt-datetime ng-model="vm.startYM"
					 rt-type="month"
					 rt-title="开始年月" rt-required="true" rt-col="3" rt-label-col="1"></rt-datetime>
		<rt-datetime ng-model="vm.endYM"
					 rt-type="month"
					 rt-title="结束年月" rt-required="true" rt-col="3" rt-label-col="1"></rt-datetime>
	</div>
	<div class="form-group">
		<label class="col-sm-1 control-label"><span style="color:red;">*</span>窜入/窜出</label>
		<div class="col-sm-3">
			<ui-select allow-clear ng-model="vm.cWaySelected" theme="bootstrap">
				<ui-select-match>{{ $select.selected.Name }}</ui-select-match>
				<ui-select-choices repeat="item in vm.cWayList|filter:$select.search">
					<span ng-bind-html="item.Name | highlight: $select.search"></span>
				</ui-select-choices>
			</ui-select>
		</div>
	</div>

</form>
<ul class="nav nav-tabs">
	<li class="active" ng-click="selectTab('tab1')">
		<a href="#c1"
		   onclick="return false;"
		   data-toggle="tab">窜货省份排名</a>
	</li>
	<li ng-click="selectTab('tab2')">
		<a href="#c2"
		   onclick="return false;"
		   data-toggle="tab">窜货商业排名</a>
	</li>
</ul>
<div class="tab-content">
	<div class="tab-pane active" id="c1">
		<div class="row" style="border-top: 1px dotted #d5c4c4; padding-top: 20px">
			<div class="col-sm-12">
				<div id="reportP" style="height:600px;" ng-style="{width: chartWidth + 'px'}" />
			</div>
		</div>
	</div>
	<div class="tab-pane" id="c2">
		<div class="row" style="border-top: 1px dotted #d5c4c4; padding-top: 20px">
			<div class="col-sm-12">
				<div id="reportB" style="height:600px;" ng-style="{width: chartWidth + 'px'}" />
			</div>
		</div>
	</div>
</div>
<div class="row" style="border-top: 1px dotted #d5c4c4; padding-top: 20px">
	<ul class="nav nav-tabs">
		<li class="active">
			<a href="#d1"
			   onclick="return false;"
			   data-toggle="tab">窜货企业明细</a>
		</li>
	</ul>
	<div class="col-sm-12">
		<rt-data-grid rt-page-record-count="vm.reportData.totalCount"
					  rt-page-index="vm.pageIndex" rt-page-size="vm.pageSize"
					  rt-get-data="vm.getCrossDataByPage()"
					  rt-rows="vm.reportData.TabData"
					  rt-auto-height=" ">
			<table class="table table-hover">
				<thead>
				<tr>
					<th>#</th>
					<th>上传年月</th>
					<th>上游发货企业</th>
					<th>上游省市</th>
					<th>窜货数量</th>
					<th>下游企业</th>
					<th>下游省市</th>
					<th>下游类型</th>
				</tr>
				</thead>
				<tbody>
				<tr ng-repeat="row in vm.reportData.TabData">
					<td>{{ $index+1 }}</td>
					<td>{{ row.BillDate }}</td>
					<td>{{ row.FromEntInfoName }}</td>
					<td>{{ row.FromProvName }}</td>
					<td>{{ row.CrossCount }}</td>
					<td>{{ row.ToEntInfoName }}</td>
					<td>{{ row.ToProvName }}</td>
					<td>{{ row.ToEntTypeName }}</td>
				</tr>
				</tbody>
			</table>
		</rt-data-grid>

	</div>
</div>



