<div class="panel panel-default mg" ng-controller="reviewTaskDetailCtrl">
	<div class="panel-body">
		
		<div class="row">
			<div class="col-md-10">相关人员：{{task.auditTeacherBean.name}}（命题教师）
							&nbsp;&nbsp;{{task.primarySecretaryBean.name}}（学科秘书）
							&nbsp;&nbsp;{{task.typesetterBean.name}}（排版员）</div>
		</div>
		
		<div class="m-t">
			<div class="row m-b">
				<div class="col-md-3 "><strong>试卷编号：{{task.taskNo}}</strong></div>
				<div class="col-md-2"><strong>当前处理人：{{task.curDealerBean.name}}</strong></div>
				<div class="col-md-3"><strong>状态：{{task.statusName}}</strong></div>
			</div>
		</div>
		<div>
			<button type="button" class="btn {{row.finished ? 'btn-success' : 'btn-default'}} btn-arrow-right" ng-repeat="row in reviewTaskStatus">
				{{row.value}}
			</button>
		</div>
		
		<div class="m-t panel panel-info">
			<div class="panel-heading">试卷与细目表信息</div>
			<div class="panel-body">
				<span>
					<button class="btn btn-small btn-default" ng-click="showBatchDetail()" ng-if="curUserRole.code == 'processManagement'">
						<i class="glyphicon glyphicon-th-list"> 查看试卷</i>
					</button>
					<button class="btn btn-small btn-default" ng-click="showTaskDetail()" ng-if="curUserRole.code != 'processManagement'">
						<i class="glyphicon glyphicon-th-list"> 查看试卷</i>
					</button>
				</span>
				
				<!-- 提交排版审核（录入员） -->
				<span ng-if="(task.status=='TO_AUDIT_PAPER_REVIEW') && task.curDealer == curUser.id">
					<button class="btn btn-small btn-primary" ng-click="submitByTypeset()">审核试卷</button>
				</span>
				
				<!-- <span ng-if="(task.status=='TO_ARCHIVE_REVIEW') && task.curDealer == curUser.id">
   					<button class="btn btn-small btn-primary myMargin3" ng-click="submitByTypeset()">提交试卷归档</button>
   				</span> -->
   				
   				<span ng-if="(task.status=='TO_AUDIT_PAPER_REVIEW' && task.curDealer == task.primarySecretary) && task.curDealer == curUser.id">
   					<button class="btn btn-small btn-primary myMargin3" ng-click="showWorkflowArchiveModal()">归档试卷</button>
   				</span>
				
				<!-- 试卷查看按钮 -->
				<div class="btn-group m-l" ng-if="task.pagerConstruct.lastWangpingWord != null">
					<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
					<i class="glyphicon glyphicon-download">&nbsp;查看文档</i> <span class="caret"></span>
					</button>
					<ul class="dropdown-menu">
						<li ng-if="task.pagerConstruct.lastWangpingWord != null && (task.pagerConstruct.lastWangpingWord - 0) > 0">
							<a ng-click="downloadWangpingWord()"> 最新网评卷 </a>
						</li>
						<li ng-if="task.pagerConstruct.lastPaperWord != null && (task.pagerConstruct.lastPaperWord - 0) > 0">
							<a ng-click="downloadPaperWord()"> 原始合卷</a>
						</li>
						<li ng-if="task.pagerConstruct.lastAnswerWord != null && (task.pagerConstruct.lastAnswerWord - 0) > 0">
							<a ng-click="downloadAnswerWord()"> 最新答案 </a>
						</li>
						<!-- 
						<li ng-if="task.pagerConstruct.lastTikaWord != null && (task.pagerConstruct.lastTikaWord - 0) > 0">
							<a ng-click="downloadTikaWord()"> 最新专卡 </a>
						</li>
						 -->
						<li ng-if="task.typesetter == task.curDealer && task.pagerConstruct.tikaType=='SPECIAL' && task.pagerConstruct.lastZhuanyinWord != null && (task.pagerConstruct.lastZhuanyinWord - 0) > 0">
							<a ng-click="downloadZhuanyin(true,1)"> 最新转印说明 </a>
						</li>
						<li ng-if="task.typesetter != task.curDealer && task.pagerConstruct.tikaType=='SPECIAL' && task.pagerConstruct.lastZhuanyinWord != null && (task.pagerConstruct.lastZhuanyinWord - 0) > 0">
							<a ng-click="downloadZhuanyin(false,1)"> 最新转印说明 </a>
						</li>
					</ul>
				</div>
				
				<!-- 原始文档查看按钮 -->
				<div class="btn-group m-l" ng-if="task.pagerConstruct.wangpingWordHistories.length > 0 && false">
					<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
					<i class="glyphicon glyphicon-download">&nbsp;查看原始文档</i> <span class="caret"></span>
					</button>
					<ul class="dropdown-menu">
						<li ng-if="task.pagerConstruct.wangpingWordHistories != null && (task.pagerConstruct.wangpingWordHistories.length - 0) > 0">
							<a ng-click="historyWangpingWord()"> 原始网评卷 </a>
						</li>
						<li ng-if="task.pagerConstruct.paperWordHistories != null && (task.pagerConstruct.paperWordHistories.length - 0) > 0">
							<a ng-click="historyPaperWord()"> 原始试卷</a>
						</li>
						<li ng-if="task.pagerConstruct.answerWordHistories != null && (task.pagerConstruct.answerWordHistories.length - 0) > 0">
							<a ng-click="historyAnswerWord()"> 原始答案 </a>
						</li>
						<!-- 
						<li ng-if="task.pagerConstruct.tikaWordHistories != null && (task.pagerConstruct.tikaWordHistories.length - 0) > 0">
							<a ng-click="historyTikaWord()"> 原始专卡 </a>
						</li>
						 -->
					</ul>
				</div>
				
				<!-- 专卡上传按钮
				<span>
					<button class="btn btn-default dropdown-toggle" ng-click="showUploadModal('ZK')" ng-if="task.curDealer == curUser.id 
										&& task.status == 'TO_AUDIT_PAPER_REVIEW' && openWordStatus == '2'">
						<i class="glyphicon glyphicon-upload">&nbsp;上传专卡</i>
					</button>
				</span>
				 -->
				
				<!-- 试卷上传按钮 -->
				<div class="btn-group" ng-if="task.curDealer == curUser.id && openWordStatus == '1'
										&& task.status == 'TO_AUDIT_PAPER_REVIEW'">
					<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
					<i class="glyphicon glyphicon-upload">&nbsp;上传文档</i> <span class="caret"></span>
					</button>
					<ul class="dropdown-menu">
						<li ng-if="task.pagerConstruct.lastWangpingWord != null && (task.pagerConstruct.lastWangpingWord - 0) > 0">
							<a ng-click="showUploadModal('WPJ')"> 网评卷 </a>
						</li>
						<!-- 
						<li ng-if="task.pagerConstruct.lastPaperWord != null && (task.pagerConstruct.lastPaperWord - 0) > 0">
							<a ng-click="showUploadModal('HJ')"> 试卷</a>
						</li>
						 -->
						<li ng-if="task.pagerConstruct.lastAnswerWord != null && (task.pagerConstruct.lastAnswerWord - 0) > 0">
							<a ng-click="showUploadModal('DA')"> 答案 </a>
						</li>
						<!-- 
						<li ng-if="task.pagerConstruct.lastTikaWord != null && (task.pagerConstruct.lastTikaWord - 0) > 0">
							<a ng-click="showUploadModal('ZK')"> 专卡 </a>
						</li>
						 -->
					</ul>
				</div>
				
			</div>	
		</div>
		<div class="m-t panel panel-info">
			<div class="panel-heading">复审流程跟踪</div>
			<div class="panel-body">
				<ul class="list-group">
					<li class="list-group-item" ng-repeat="flow in task.flows">
						{{flow.createdTime | date:'yyyy-MM-dd HH:mm:ss'}}
						<span class="text-success">{{flow.createdByBean.name}}</span>
						{{flow.operName}}
						{{flow.remark != null && flow.remark != '' && flow.remark != 'null' ? '备注:'+ flow.remark : ''}}
					</li>
				</ul>
			</div>	
		</div>
		
		<iframe style="width:0; height:0;" id="wordFrame" name="wordFrame" src="" scrolling="no"></iframe>
	</div>
</div>
