<div ng-controller="ReviewBatchPaperCtrl">
	<p class="text-success font-bold">{{batchSummary}}</p>
	<ul class="nav nav-pills padder">
         <li ui-sref-active="active"><a ui-sref="batch.info.review" >试卷信息</a></li>
         <li ui-sref-active="active"  class="active"><a ui-sref="batch.info.reviewOut">出库</a></li>
         <li ui-sref-active="active"><a ui-sref="batch.info.reviewIn">回库</a></li>
	</ul>
	<div class="panel panel-default">
		<div class="panel-body">
			<a href="examPaper/downloadPaper/{{batch.id}}" class="btn btn-default" ng-show="downloadPapers"><i class="glyphicon glyphicon-download"> 下载电子试卷</i></a>
			<button type="button" class="btn btn-default" disabled="disabled" ng-show="!downloadPapers" title="没有可用的下载密码"><i class="glyphicon glyphicon-download"> 下载电子试卷</i></button>
			
			<a target="_blank" href="examPaper/batchPaperInfoPrint/{{batch.id}}" class="btn btn-default">
				<i class="glyphicon glyphicon-print"> 打印试卷信息</i>
			</a>			
			
			<a href="examPaper/downloadDBF/{{batch.id}}" class="btn btn-default">
				<i class="glyphicon glyphicon-export"> 导出DBF</i>
			</a>
			
			<button ui-sref="batch.info.reviewOutScan" class="btn btn-default">
				<i class="glyphicon glyphicon-barcode"> 出库扫描</i>
			</button>
			
			<table class="paper-table m-t table-striped"  style="width:100%">
				<thead>
					<tr>
						<th>#</th>
						<th width="10%">试卷编号</th>
						<th width="7%">试卷状态</th>
						<th>专卡</th>
						<th width="7%">课程代码</th>
						<th width="10%">课程</th>
						<th width="10%">教材</th>
						<th>编者</th>
						<th width="10%">出版社</th>
						<th>版次</th>
						<th width="10%">学校</th>
						<th width="3%">出库扫描</th>
					</tr>
					<tr>
						<th></th>
						<th><input type="text" placeholder="试卷代码" class="input-sm form-control" ng-model="search.code" /></th>
						<th><select ng-model="search.status">
								<option value=""></option>
								<option value="DRAFT">毛坯</option>
								<option value="FORMAL">清样</option>
								<option value="USED">启用</option>
						</select></th>
						<th></th>
						<th><input type="text" placeholder="课程代码" class="input-sm form-control" ng-model="search.courseCode" /></th>
						<th colspan="6"></th>
						<th>
							<select ng-model="search.isOutBoundScanned">
								<option value=""></option>
								<option value="1" class="text-success font-bold">&radic;</option>
								<option value="0" class="text-danger font-bold">X</option>
							</select>
						</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="row in papers | filter:search | orderBy:'code'">
						<td>{{$index+1}}</td>
						<td>{{row.code}}</td>
						<td>{{row.status | paperStatus}}</td>
						<td>{{row.isSpecialAnswerSheet == 1?'有':'无'}}</td>
						<td>{{row.courseCode}}</td>
						<td title="{{row.courseName}}">{{row.courseName}}</td>
						<td title="{{row.bookName}}">{{row.bookName}}</td>
						<td title="{{row.bookAuthor}}">{{row.bookAuthor}}</td>
						<td title="{{row.bookPress}}">{{row.bookPress}}</td>
						<td title="{{row.bookPressYear}}">{{row.bookPressYear}}</td>
						<td title="{{row.school}}">{{row.school}}</td>
						<td align="center" class="{{row.isOutBoundScanned == 1 ? 'text-success' : 'text-danger'}} font-bold">{{row.isOutBoundScanned == 1 ? '&radic;' : 'X'}}</td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
</div>
