<div ng-controller="ReviewBatchPaperCtrl">
	<p class="text-success font-bold">{{batchSummary}}</p>
	<ul class="nav nav-pills padder">
         <li ui-sref-active="active" class="active"><a ui-sref="batch.info.review" >试卷信息</a></li>
         <li ui-sref-active="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">
			<button ui-sref="batch.info.addReviewPaper" class="btn btn-default">
				<i class="glyphicon glyphicon-plus"> 选择复审试卷</i>
			</button>
			<div class="btn-group">
				<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
				   <i class="glyphicon glyphicon-print"></i>&nbsp;&nbsp;打印 <span class="caret"></span>
				</button>
				<ul class="dropdown-menu">
				 	<li><a target="_blank" href="examPaper/printAllCodeInfo/{{batch.id}}">打印试卷条码</a></li>
					<li><a target="_blank" href="examPaper/printAllAnswerCodeInfo/{{batch.id}}">打印答案条码</a></li>
				   	<li role="separator" class="divider"></li>
					<li><a target="_blank" href="examPaper/recordByBatchId/{{batch.id}}">打印工作登记表</a></li>
				</ul>
			</div>
			
			<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>
						<th width="3%">标答</th>
						<th width="3%">分卷</th>
						<th width="3%">专卡</th>
						<th width="3%">转印</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.wpaperUploaded">
					            <option value=""></option>
					            <option value="true" class="text-success font-bold">&radic;</option>
					            <option value="false" class="text-danger font-bold">X</option>
					        </select>
						</th>
						<th>
							<select ng-model="search.standardAnswerUploaded">
					            <option value=""></option>
					            <option value="true" class="text-success font-bold">&radic;</option>
					            <option value="false" class="text-danger font-bold">X</option>
					        </select>
						</th>
						<th>
							<select ng-model="search.separatePaperUploaded">
					            <option value=""></option>
					            <option value="true" class="text-success font-bold">&radic;</option>
					            <option value="false" class="text-danger font-bold">X</option>
					        </select>
						</th>
						<th>
							<select ng-model="search.answerSheetUploaded">
					            <option value=""></option>
					            <option value="true" class="text-success font-bold">&radic;</option>
					            <option value="false" class="text-danger font-bold">X</option>
					        </select>
						</th>
						<th>
							<select ng-model="search.zyUploaded">
					            <option value=""></option>
					            <option value="true" class="text-success font-bold">&radic;</option>
					            <option value="false" class="text-danger font-bold">X</option>
					        </select>
						</th>
						<th></th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="row in papers | filter:search">
						<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.wPaperPath != null ? 'text-success' : 'text-warning'}} font-bold">{{row.wPaperPath != null ? '&radic;' : 'X'}}</td>
						<td align="center" class="{{row.standardAnswerPath!= null ? 'text-success' : 'text-danger'}} font-bold">{{row.standardAnswerPath != null ? '&radic;' : 'X'}}</td>
						<td align="center" class="{{row.separatePaperPath != null ? 'text-success' : 'text-warning'}} font-bold">{{row.separatePaperPath != null ? '&radic;' : '-'}}</td>
						<td align="center" class="{{row.answerSheetPath != null ? 'text-success' : (row.isSpecialAnswerSheet == 1 ? 'text-danger' : 'text-warning')}} font-bold">{{row.answerSheetPath != null ? '&radic;' : (row.isSpecialAnswerSheet == 1 ? 'X' : '-')}}</td>
						<td align="center" class="{{row.zyPath != null ? 'text-success' : 'text-warning'}} font-bold">{{row.zyPath != null ? '&radic;' : '-'}}</td>
						<td align="center"><a ng-show="row.status=='DRAFT'" ng-click="removePaperFromBatch(row, batch.id)" tooltip="移出试卷"> <i class="glyphicon glyphicon-trash"></i></a></td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
</div>
