<div class="panel panel-default" ng-controller="BatchInfoSupplyScanTaskCtrl">
<div cg-busy="{promise:loading,message:'正在加载...'}">
<div ng-show="!printStatus.result" class="alert alert-warning text-lg" >
	<strong>警告：{{printStatus.msg}} </strong>
</div>
<div ng-show="availProvsCount > 0" class="alert alert-warning text-lg" >
	<strong>警告：尚有 {{availProvsCount}} 个省份未分配 </strong>
</div>
<div class="panel-body">
<!-- 
<button class="btn btn-default"><i class="fa fa-refresh" ></i>
<span class="padder" ng-click="autoAssign()" ng-if="printStatus.result">自动分配</span></button>
 -->
<a href="scantasks/exportData/{{batchId}}" class="btn btn-default">
	<i class="glyphicon glyphicon-export"> 导出封装任务数据</i>
</a>
	<table class="table table-striped">
		<thead>
			<tr>
				<th>封装人</th>
				<th>课程数</th>
				<th>省份数</th>
				<th>负责省份</th>
				<th width="120">操作</th>
			</tr>
		</thead>
		<tbody>
			<tr ng-repeat="row in tasks">
				<td>{{row.name}}</td>
				<td>{{sum(row.tasks)}}</td>
				<td>{{row.tasks.length}}</td>
				<td>
					<span class="" ng-repeat="p in row.tasks">{{p.provName}}({{p.courseCount}})
						<a href="javascript:void(0)" ng-click="removeTask(row,$index)" >
							<i class="glyphicon glyphicon-remove"></i>
						</a>&nbsp;
					</span>
				</td>
				<td>
					<a href="javascript:void(0)"  ng-click="show(row)" ng-if="printStatus.result">
						<i class="glyphicon glyphicon-plus"></i>&nbsp;添加省份
					</a>
				</td>
			</tr>
		</tbody>
	</table>
</div>
</div>
</div>
