<div ng-controller="ReviewTaskListCtrl" class="wrapper">
	<div class="panel panel-default">
		<div class="panel-body">
			<div class="m-b form-inline">
				<button ui-sref="batch.info.reviewTaskUpload" class="btn btn-default" ng-if="curUserRole.code=='processManagement'">
					<i class="glyphicon glyphicon-import"> 导入复审任务</i>
				</button>
				<button ng-click="showAddReviewTaskModal()" class="btn btn-default" ng-if="curUserRole.code=='processManagement'">
					<i class="glyphicon glyphicon-plus"> 添加复审任务</i>
				</button>
				
				<button ng-click="showUploadModal()" class="btn btn-default" ng-if="curUserRole.code=='processManagement'">
					<i class="glyphicon glyphicon-plus"> 上传附件</i>
				</button>
				
				<button ng-click="exportAllFiles()" class="btn btn-default" ng-if="curUserRole.code=='processManagement'">
					<i class="glyphicon glyphicon-export"> 导出试卷及答案</i>
				</button>
				
				<!-- <input type="file" style="display:inline;" nv-file-select="" uploader="uploader" accept=".zip;"/>
				<button ng-show="files.length > 0" class="btn btn-default" ng-click="upload()">
					<i class="glyphicon glyphicon-import"></i>&nbsp;上传附件
				</button> -->
				<div class="input-group col-md-3">
		      		<div class="input-group-addon"><i class="glyphicon glyphicon-search"></i></div>
					<input type="text" class="form-control" ng-model="search.taskNo" placeholder="试卷编号" ng-change="search={taskNo:search.taskNo};matchType = false;"/>
				</div>
			</div>
			<table class="table table-striped">
				<thead>
					<tr>
						<th>试卷编号</th>
						<th>状态</th>
						<th>当前处理人</th>
						<th>网评卷</th>
						<th>答案</th>
						<!-- <th>专卡</th> -->
						<th>转印说明</th>
						<th class="{{isBusinessManager ? 'col-md-4' : 'col-md-3'}}">操作</th>
					</tr>										
				</thead>
				<tbody>
					<tr ng-repeat="row in array | filter:search:matchType | orderBy: 'taskNo'">
						<td title="点击查看任务详情" class="text-info" ng-click="showTaskDetail(row)">
							<a>
								{{row.taskNo}}
								<i class="glyphicon glyphicon-eye-open text-info"></i>
							</a>
						</td>
						<td>{{row.reviewStatusName}}</td>
						<td title="{{row.auditTeacherBean.name}}(命题教师) {{row.primarySecretaryBean.name}}(学科秘书) {{row.typesetterBean.name}}(排版员)">
							{{row.curDealerBean.name}}
							<i class="glyphicon glyphicon-info-sign text-info"></i>
						</td>
						<td>
							<span ng-if="row.pagerConstruct.lastWangpingWord != null">有</span>
						</td>
						<td>
							<span ng-if="row.pagerConstruct.lastAnswerWord != null">有</span>
						</td>
						<!-- 
						<td>
							<span ng-if="row.pagerConstruct.lastTikaWord != null">有</span>
						</td>
						 -->
						<td>
							<span ng-if="row.pagerConstruct.tikaType=='SPECIAL' && row.pagerConstruct.lastZhuanyinWord != null">有</span>
						</td>
						<td nowrap="nowrap">
							<button ng-if="curUserRole.code=='processManagement'" ng-click="showAddReviewTaskModal(row)" class="btn btn-primary btn-xs">
								修改相关人员
							</button>
							<button ng-click="deleteTask(row)" class="btn btn-danger btn-xs">
								<i class="glyphicon glyphicon-trash"> 删除</i>
							</button>
							<!-- <button ng-click="viewPaper(row)" class="btn {{row.paperId > 0 ? 'btn-default' : 'btn-disabled'}} btn-xs">
								查看试卷								
							</button> -->
							<!-- <button ng-click="uploadZipAtt(row)" class="btn {{row.paperId > 0 ? 'btn-default' : 'btn-disabled'}} btn-xs">
								上传附件
							</button> -->
							<button ng-if="!row.pagerConstruct.startTime" ng-click="showEnableModal(row)" class="btn btn-success btn-xs">
								启用试卷								
							</button>
						</td>
					</tr>
				</tbody>

			</table>
		</div>
	</div>
</div>