<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" ><a ui-sref="batch.info.reviewOut">出库</a></li>
         <li ui-sref-active="active"  class="active"><a ui-sref="batch.info.reviewIn">回库</a></li>
	</ul>
	<div class="panel panel-default">
		<div class="panel-body">
			<div ng-show="allOutScanned">
				<button ui-sref="batch.info.reviewUploadPapers" class="btn btn-default">
					<i class="glyphicon glyphicon-upload"> 上传清样电子试卷</i>
				</button>
				
				<button ui-sref="batch.info.reviewInScan" class="btn btn-default">
					<i class="glyphicon glyphicon-barcode"> 回库扫描</i>
				</button>
			</div>
			<div ng-show="!allOutScanned" class="text-danger">
				所有试卷都出库扫描后才能进行回库操作。
			</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="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="5"></th>
						<th>
							<select ng-model="search.isPaperReturn">
					            <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>
						<th>
							<select ng-model="search.isStandadAnswerReturn">
					            <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>
						<th>
							<select ng-model="search.isSeparatePaperReturn">
					            <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>
						<th>
							<select ng-model="search.isWPaperReturn">
					            <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>
						<th>
							<select ng-model="search.isAnswerSheetReturn">
					            <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>
						<th>
							<select ng-model="search.isStorageScanned">
								<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 align="center" class="{{row.isWPaperReturn == 1 ? 'text-success' : (row.wPaperPath != null ? 'text-danger' : 'text-warning')}} font-bold">{{row.isWPaperReturn == 1 ? '&radic;' : (row.wPaperPath != null ? 'X' : '-')}}</td>
						<td align="center" class="{{row.isStandadAnswerReturn == 1 ? 'text-success' : 'text-danger'}} font-bold">{{row.isStandadAnswerReturn == 1 ? '&radic;' : 'X'}}</td>
						<td align="center" class="{{row.isSeparatePaperReturn == 1 ? 'text-success' : (row.separatePaperPath != null ? 'text-danger' : 'text-warning')}} font-bold">{{row.isSeparatePaperReturn == 1 ? '&radic;' : (row.separatePaperPath != null ? 'X' : '-')}}</td>
						<td align="center" class="{{row.isAnswerSheetReturn == 1 ? 'text-success' : (row.answerSheetPath != null ? 'text-danger' : 'text-warning')}} font-bold">{{row.isAnswerSheetReturn == 1 ? '&radic;' : (row.answerSheetPath != null ? 'X' : '-')}}</td>
						<td align="center" class="{{row.isZyReturn == 1 ? 'text-success' : (row.zyPath != null ? 'text-danger' : 'text-warning')}} font-bold">{{row.isZyReturn == 1 ? '&radic;' : (row.zyPath != null ? 'X' : '-')}}</td>
						<td align="center" class="{{row.isStorageScanned == 1 ? 'text-success' : 'text-danger'}} font-bold">{{row.isStorageScanned == 1 ? '&radic;' : 'X'}}</td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
</div>
