<div class="panel panel-default">
    <!--标题-->
    <div class="panel-title">
        <nav aria-label="breadcrumb">
            <ol class="breadcrumb">
                <!-- TODO -->
                <li class="breadcrumb-item">毕业论文答辩管理</li>
                <li class="breadcrumb-item active" aria-current="page">毕业论文答辩审核</li>
            </ol>
        </nav>
    </div>
    <div class="panel-body ml-sm" [hidden]="editShowType=='only' || editShowType=='authQuery'  || editShowType=='stdResume'">
        <div class="card card-default">
            <div class="card-body">
                <!--查询条件-->
                <div class="row mb-3 ml-1" [hidden]="editShowType=='only' || editShowType=='authQuery'  || editShowType=='stdResume'">
                    <div class="col-lg-12">
                        <form (ngSubmit)="framePager.goSearch()" class="form-inline">
                            <table>
                            <tr>
                                <td>
                                <div class="input-group mr-1 input-group-sm">
                                <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;关键字：</label>
                                <input name="keyword" [(ngModel)]="query.query" class="input-sm form-control" type="text"
                                            value="" maxlength="50" placeholder="请输入查询关键字" style="width:200px;">
                            </div>
                        </td>
                           
                            <td>
                            <div class="input-group mr-1 input-group-sm">
                                <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;专业：</label>
                                <flex-select [allowClear]="true"
                                    [(items)] = "majorList"
                                    respDataPath= "array"
                                    optionValueField="id"
                                    optionTextField="major_full_name"
                                    [(ngModel)]="query.majorId"
                                    placeholder="请选择"
                                    [ngModelOptions]="{standalone: true}"
                                    width = "150"
                                    noResultsFound = "无数据"
                                    >
                                </flex-select>
                            </div>
                        </td>
                            
                            <td>
                            <!--时间批次 -->                             
                            <div class="input-group mr-1 input-group-sm">
                                <label class="ml-sm">毕业批次：</label>
                                <flex-select [allowClear]="true"
                                            [url]= "'pl/plExamTime/listPlExamTimeForBy.htm'"
                                            respDataPath= "array"
                                            optionValueField="id"
                                            optionTextField="exam_year_month"
                                            [(ngModel)]="query.examTimeId"
                                            placeholder="请选择"
                                            [ngModelOptions]="{standalone: true}"
                                            width = "100"
                                            noResultsFound = "无数据"
                                            >
                                </flex-select>
                            </div>
                        </td>   
                        </tr>
                        <tr>
                            <td>
                            <div class="input-group mr-1 input-group-sm">
                                <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;状态：</label>
                                <select name="status" 
                                    width = "100"
                                    [(ngModel)]="query.status" 
                                    frameDict [dictName]="'PaperApplyStatus'" 
                                    [ngModelOptions]="{standalone: true}"
                                    class="form-control">
                                </select>
                            </div>
                        </td>
                        <td>
                            <div class="input-group mr-1 input-group-sm">
                                <label>主考学校：</label>
                                <flex-select [allowClear]="true"
                                    [(items)] = "masterSchoolList"
                                    respDataPath= "array"
                                    optionValueField="id"
                                    optionTextField="org_name"
                                    [(ngModel)]="query.masterSchoolId"
                                    placeholder="请选择"
                                    [ngModelOptions]="{standalone: true}"
                                    width = "150"
                                    noResultsFound = "无数据"
                                    >
                                </flex-select>
                            </div>
                        </td>
                        <td>
                            <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="framePager.goSearch()">
                                <i class="fa fa-search"></i> 查询</button>
                                <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="resetdata()">
                                        <i class="fa fa-undo"></i> 重置</button>
                            </td>  
                            </tr> 
                            </table>
                            </form>
                    </div>
                </div>

                <!-- 工具栏 -->
                <div class="row mb-2" [hidden]="editShowType=='only' || editShowType=='authQuery'  || editShowType=='stdResume'">
                    <div class="col-lg-12">
                        <div class="pull-left" style="text-align: right;">
                            <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
                                (click)="showEditWin()" title="审核">
                                <i class="fa fa-paint-brush"></i> 审核</button>                                    
                            <button class="btn btn-primary mr-1 btn-sm" (click)="printPaper()" data-toggle="tooltip"
                                data-placement="left" title="毕业登记表">
                                <i class="fa icon-cloud-download"></i> 毕业论文答辩申请表</button>
                            <button class="btn btn-primary mr-1 btn-sm" (click)="showStdRefDialog(stdRefModal);" data-toggle="tooltip"
                                data-placement="left" title="毕业申请">
                                <i class="fa fa-snowflake"></i> 毕业论文答辩申请</button>
                           
                            <button class="btn btn-primary mr-1 btn-sm" (click)="downApplyXls();" data-toggle="tooltip"
                                data-placement="left" title="导出">
                                <i class="fa icon-cloud-download"></i> 导出</button>
                                <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
                                (click)="callBackApply()" title="撤回">
                                <i class="fa fa-paint-brush"></i> 撤回</button>  
                                
                        </div>

                    </div>
                </div>

                <!--表格-->
                <div class="row">
                    <div class="col-lg-12 ml-0" [hidden]="editShowType=='only' || editShowType=='authQuery'  || editShowType=='stdResume'">
                        <table class="table table-sm table-striped table-hover table-bordered bg-white">
                            <thead>
                                <tr>
                                    <th>
                                        <div class="checkbox c-checkbox">
                                            <label>
                                                <input type="checkbox" (change)="framePager.checkedMasterToggle($event)" />
                                                <span class="fa fa-check"></span>
                                            </label>
                                        </div>
                                    </th>
                                    <th>序号</th>
                                    <th align="center">准考证</th>
                                   
                                    <th>姓名</th>
                                   
                                    <th>专业名称</th>
                                   
                                    <th>主考学校</th>
                                    <th>申报论题</th>
                                    
                                    <th>状态</th>
                                    <th align="center">是否驳回</th>
                                    <th style="width: 70px;" align="center">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr *ngFor="let item of framePager.getRecords(); let i = index">
                                    <td>
                                        <div class="checkbox c-checkbox input-group-sm">
                                            <label>
                                                <input type="checkbox" [value]="item.id" [(checked)]="item.isChecked"
                                                    [(ngModel)]="item.isChecked" />
                                                <span class="fa fa-check"></span>
                                            </label>
                                        </div>
                                    </td>
                                    <td>{{framePager.pageStart + i}}</td>
                                    <td align="center">{{item.ticket_no}}</td>
                                    
                                    <td>{{item.std_name}}</td>
                                    
                                    <td>{{item.major_code}}-{{item.major_name}}</td>
                                    
                                    <td>{{item.org_code}}-{{item.org_name}}</td>
                                    <td>{{item.paper_title}}</td>
                                    <td [innerHTML]="item.status | frameDict:'PaperApplyStatus'"></td>
                                    <td align="center">
                                        <div *ngIf="item.is_auth_back==0" class="text-muted">
                                            {{item.is_auth_back| frameDict:  'YesOrNo' }}</div>
                                        <div *ngIf="item.is_auth_back==1" class="text-danger">
                                            {{item.is_auth_back| frameDict: 'YesOrNo' }}</div>
                                    </td>
                                    <td align="center">
                                        <a href="#" (click)="showEditWin(item)" title="审核"><em
                                                class="fa-lg fas fa-edit mr-1"></em></a>
                                        <a href="#" (click)="deleteApply(item)" title="删除"><em class="fa-lg fas fa-trash mr-1"
                                            style="color:#F56D6D"></em></a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        <!-- TODO -->
                        <frame-pager [url]="QUERY_URL" [autoLoad]="false" hideSearch="true" hasCheck="true" #framePager (preReqEvent)="search($event)"></frame-pager>
                    </div>

                    <!-- 编辑页面 -->
                    <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType!='modal'">
                        <ng-container *ngTemplateOutlet="editTemplateModal">
                        </ng-container>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- only 审核界面-->
    <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType =='only'">
        <ng-container *ngTemplateOutlet="editTemplateModal">
        </ng-container>
    </div>
    <!-- authQuery 审核记录查询-->
    <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType =='authQuery'">
        <ng-container *ngTemplateOutlet="authQueryModal">
        </ng-container>
    </div>
    <!--录入分数界面-->
    <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType =='input'">
        <ng-container *ngTemplateOutlet="manualInputModal">
        </ng-container>
    </div>
    <!--课程顶替界面-->
    <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType =='repl'">
        <ng-container *ngTemplateOutlet="courseReplModal">
        </ng-container>
    </div>
    <!--创建毕业申请-考生引用界面-->
    <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType =='stdRef'">
        <ng-container *ngTemplateOutlet="stdRefModal">
        </ng-container>
    </div>
    <!-- 考生简历修改 -->
    <div class="col-lg-12" *ngIf="editShowType != null && editShowType =='stdResume'">
        <ng-container *ngTemplateOutlet="stdResumeModal">
        </ng-container>
    </div>
</div>

<!--******************************************************毕业审核详情界面****************************************************-->
<ng-template #editFormTemplate>
<form [formGroup]="formModel" *ngIf="item" class="form-validate form-horizontal" novalidate="">
        <input type="hidden" class="form-control" formControlName="id" [(ngModel)]="item.id" [formControl]="formModel.controls['id']" />
        <div class="row mb-1" style="padding-bottom: 0px; ">
            <!-- 学生基础信息 -->
            <table class="table table-sm table-striped table-hover table-bordered bg-white" style="margin-bottom: 5px;padding-bottom: 0px; ">
                <tbody>
                    <tr>
                        <td style="text-align: right" width="9%">姓名</td>
                        <td width="23%"><input class="form-control" type="text" [(ngModel)]="item.std_name" [ngModelOptions]="{standalone: true}" readonly/></td>
                        <td style="text-align: right" width="7%">身份证</td>
                        <td width="23%"><input class="form-control" type="text" [(ngModel)]="item.cert_no" [ngModelOptions]="{standalone: true}" readonly/></td>
                        <td rowspan="5" style="width:19%;text-align: center">
                            <div *ngIf="item.photo_path" class="text-muted" style="vertical-align:middle;width: 180px;height: 240px;border:solid 1.5px #000000;">
                                <img  [src]="item.photo_path" style="width: 100%;height: 100%;" >
                            </div>
                        </td>
                        <td rowspan="5" style="width:19%;text-align: center">
                            <div *ngIf="item.by_photo_path" class="text-muted" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
                                <img [src]="item.by_photo_path" style="width: 100%;height: 100%;" alt="替换照片" (click)="uploadByPhoto(item.id);">
                            </div>
                            <div *ngIf="!item.by_photo_path" class="text-muted" style="align-content: center;">
                                <button class="btn btn-info" (click)="uploadByPhoto(item.id); " >
                                    <i class="fa fa-info-circle"> </i> 上传照片
                                </button>
                            </div>
                        </td>
                    </tr>
                        <tr>
                            <td style="text-align: right">准考证</td>
                            <td><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.ticket_no" readonly/></td>
                            <td style="text-align: right">性别</td>
                            <td>
                                <select [ngModelOptions]="{standalone: true}"
                                    [(ngModel)]="item.std_sex" 
                                    frameDict [dictName]="'StdSexType'" 
                                    class="form-control">
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: right">民族</td>
                            <td>
                                <select [ngModelOptions]="{standalone: true}"
                                    [(ngModel)]="item.nation" 
                                    frameDict [dictName]="'std_nation'" 
                                    class="form-control">
                                </select>
                            </td>
                            <td style="text-align: right">出生日期</td>
                            <td>
                                <input class="form-control" type="text"  [formControl]="formModel.controls['std_birth']"  DateTimePicker [dpType]="'date'" [dpValue]="item.std_birth" [(ngModel)]="item.std_birth"/>
                            </td>
                        </tr>
                       
                        <tr>
                            <td style="text-align: right">联系电话</td>
                            <td><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.telephone" maxlength="11"/></td>
                            <td style="text-align: right">邮政编码</td>
                            <td><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.post_code" maxlength="6"/></td>
                     
                        </tr>
                        <tr>
                            <td style="text-align: right">QQ号码</td>
                            <td><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.qq" maxlength="16"/></td>
                            <td style="text-align: right"></td>
                            <td></td>
                     
                        </tr>

                        <tr>
                            <td style="text-align: right">工作单位</td>
                            <td colspan="3"><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.work_unit" maxlength="30"/></td>
                             
                        </tr>

                        <tr>
                            <td style="text-align: right">通讯地址</td>
                            <td colspan="3"><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.address" maxlength="75"/></td>
                           
                        </tr>

                        <tr>
                            <td style="text-align: right">申报论题</td>
                            <td colspan="3"><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.paper_title" maxlength="50"/></td>
                           
                        </tr>

                        
                        <tr>
                            <td style="text-align: right">何类应考者</td>
                            <td><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.std_type" maxlength="30"/></td>
                            <td style="text-align: right">专(本)科何专业及发证单位</td>
                            <td><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.pre_edu" maxlength="30"/></td>
                        </tr>

                        <tr>
                                <td style="text-align: right">备注</td>
                                <td colspan="3"><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.remark" maxlength="75"/></td>
                               
                            </tr>

                        <tr>
                                <td style="text-align: right">主考学校</td>
                                <td><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.org_name" readonly/></td>
    
                               
                                <td style="text-align: right">专业</td>
    
                                <td>
                                        {{item.major_code}}-{{item.major_name}}
                                </td>
                               
                            </tr>
                            <tr>
                                   
                                    <td style="text-align: right">专业层次</td>
        
                                    <td>
                                      <input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="majorLevel" readonly/>

                                       
                                    </td>
                                   
                                </tr>
                       
                       
                </tbody>
            </table>
        </div>
        <div class="row mb-1" style="padding-top: 0px; ">
            
            <div  style="margin-bottom: 8px; padding-left: 10px;width: 100%;">
                <div style="text-align: right;">
                   
                    <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left" (click)="saveBaseInfo();" title="保存">
                        <i class="fa fa-save"></i> 保存基本信息</button>

                        <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left" (click)="resetByScore();" title="重新下载毕业成绩">
                            <i class="fa fa-save"></i> 重新下载毕业成绩</button>
                    
                </div>

               
               
            </div>

            
        </div>

       
        <div class="row mb-1" style="padding-top: 0px; padding-left: 10px;padding-right: 10px;">
           
            <!-- 成绩列表 -->
            <table class="table table-sm table-striped table-hover table-bordered bg-white">
                <thead>
                    <tr>
                       
                        <th nowrap>序号</th>
                        <th nowrap align="center">课程代码</th>
                        <th nowrap>课程名称</th>
                        <th nowrap>课程性质</th>
                        <th nowrap align="center">学分</th>
                        <th nowrap>成绩来源</th>
                        <th nowrap>成绩性质</th>
                        <th nowrap align="center">成绩</th>
                        <th nowrap align="center">合格</th>
                        <th nowrap>主考学校</th>
                        <th nowrap>备注</th>
                       
                    </tr>
                </thead>
                <tbody>
                    <tr *ngFor="let it of scoreList; let i = index">
                      

                         <td nowrap *ngIf="it && it.course_code!='-1' && (!it.is_passed || it.is_passed=='0'||it.score_type=='7')" bgcolor="#33CCFF">{{i+1}}</td>
                         <td nowrap *ngIf="it && it.course_code!='-1' && !(!it.is_passed || it.is_passed=='0'||it.score_type=='7')">{{i+1}}</td>
 
                         <td nowrap *ngIf="it && it.course_code=='-1'"></td>
 
                         <td nowrap align="center" *ngIf="it && it.course_code!='-1'&& (!it.is_passed || it.is_passed=='0'||it.score_type=='7')" bgcolor="#33CCFF" title="如有括号，括号里的课程代码是专业计划的课程代码。">{{it.course_code}}</td>
                         <td nowrap align="center" *ngIf="it && it.course_code!='-1'&& !(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" title="如有括号，括号里的课程代码是专业计划的课程代码。">{{it.course_code}}</td>
                         
                         <td nowrap *ngIf="it && it.course_code=='-1'"></td>
 
                         <td *ngIf="it.course_code!='-1'&&(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" bgcolor="#33CCFF">{{it.course_name}}</td>
                         <td *ngIf="it.course_code=='-1'||!(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" >{{it.course_name}}</td>
 
                         <td *ngIf="it.course_code!='-1'&&(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" bgcolor="#33CCFF" [innerHTML]="it.course_nature | frameDict:'CourseNature'"></td>
                         <td *ngIf="it.course_code=='-1'||!(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" [innerHTML]="it.course_nature | frameDict:'CourseNature'"></td>
 
                         <td align="right" *ngIf="it.course_code!='-1'&&(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" bgcolor="#33CCFF" title="顶替、转入关联的课程学分，取专业计划的课程学分；关联准考证、手工录入的课程学分，取关联准考证、手工录入的课程的学分，如手工录入的课程没有学分，则学分为空。">{{it.course_score}}</td>
                         <td align="right" *ngIf="it.course_code=='-1'||!(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" title="顶替、转入关联的课程学分，取专业计划的课程学分；关联准考证、手工录入的课程学分，取关联准考证、手工录入的课程的学分，如手工录入的课程没有学分，则学分为空。">{{it.course_score}}</td>
                         
                         <td *ngIf="it.course_code!='-1'&&(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" bgcolor="#33CCFF" [innerHTML]="it.score_type | frameDict:'ByScoreType'"></td>
                         <td *ngIf="it.course_code=='-1'||!(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" [innerHTML]="it.score_type | frameDict:'ByScoreType'"></td>
                        
                         <td *ngIf="it.course_code!='-1'&&(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" bgcolor="#33CCFF" [innerHTML]="it.score_source | frameDict:'ScoreSource'"></td>
                         <td *ngIf="it.course_code=='-1'||!(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" [innerHTML]="it.score_source | frameDict:'ScoreSource'"></td>
 
                         <td  align="right" *ngIf="it && it.score_type =='6'&&it.course_code!='-1'&&(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" bgcolor="#33CCFF"><a href="#" (click)="showAssoDialog(assoModal,it.asso_ticket_no,it.course_code_temp)" title="查看关联准成绩">{{formateFinalScore(it)}}</a></td>
                         <td  align="right" *ngIf="it && it.score_type =='6'&&(it.course_code=='-1'||!(!it.is_passed || it.is_passed=='0'||it.score_type=='7'))" ><a href="#" (click)="showAssoDialog(assoModal,it.asso_ticket_no,it.course_code_temp)" title="查看关联准成绩">{{formateFinalScore(it)}}</a></td>
 
                         <td align="right" *ngIf="it && it.score_type =='9'&&it.course_code!='-1'&&(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" bgcolor="#33CCFF"><a href="#" (click)="showAssoDialog2(assoModal2,it.asso_ticket_no,it.course_code_temp)" title="查看关联准成绩">{{formateFinalScore(it)}}</a></td>
                         <td align="right" *ngIf="it && it.score_type =='9'&&(it.course_code=='-1'||!(!it.is_passed || it.is_passed=='0'||it.score_type=='7'))" ><a href="#" (click)="showAssoDialog2(assoModal2,it.asso_ticket_no,it.course_code_temp)" title="查看关联准成绩">{{formateFinalScore(it)}}</a></td>
 
                         <td align="right" *ngIf="(!it || !(it.score_type =='6'||it.score_type =='9'))&&it.course_code!='-1'&&(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" bgcolor="#33CCFF">{{formateFinalScore(it)}}</td>
                         <td align="right" *ngIf="(!it || !(it.score_type =='6'||it.score_type =='9'))&&(it.course_code=='-1'||!(!it.is_passed || it.is_passed=='0'||it.score_type=='7'))" >{{formateFinalScore(it)}}</td>
 
                         <td  align="center" *ngIf="it.course_code!='-1'&&(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" bgcolor="#33CCFF" [innerHTML]="it.is_passed | frameDict:'YesOrNo'" title="不合格的成绩，允许删除。不合格的成绩不会显示在毕业登记表。"></td>
                         <td align="center" *ngIf="it.course_code=='-1'||!(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" [innerHTML]="it.is_passed | frameDict:'YesOrNo'" title="不合格的成绩，允许删除。不合格的成绩不会显示在毕业登记表。"></td>
 
                         <td *ngIf="it.course_code!='-1'&&(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" bgcolor="#33CCFF" title="原则上，成绩对应的主考学校要与毕业申请的主考学校一致。">{{it.org_name}}</td>
                         <td *ngIf="it.course_code=='-1'||!(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" title="原则上，成绩对应的主考学校要与毕业申请的主考学校一致。">{{it.org_name}}</td>
                         <!--<td>{{it.major_name}}</td>-->

                         <td *ngIf="it.course_code!='-1'&&(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" bgcolor="#33CCFF" >{{it.remark}}</td>
                         <td *ngIf="it.course_code=='-1'||!(!it.is_passed || it.is_passed=='0'||it.score_type=='7')" >{{it.remark}}</td>
                        
 
                        
                    </tr>
                </tbody>
            </table>
        </div>

        
        <div class="row" style="text-align: center">
            <label class="col-lg-2 col-form-label text-lg-left">审核记录</label>
        </div>
        <div class="row mb-1">
            <!-- 审核流程列表 -->
            <table class="table table-sm table-striped table-hover table-bordered bg-white">
                <thead>
                    <tr>
                        <th width="10%">序号</th>
                        <th width="20%">审核类型</th>
                        <th width="15%" align="center">审核时间</th>
                        <th width="20%">受理单位</th>
                        <th width="35%">审核意见</th>
                    </tr>
                </thead>
                <tbody>
                    <tr *ngFor="let it of authList; let i = index">
                        <td>{{i+1}}</td>
                        <td>{{it.auth_type | frameDict:'ByPaperAuthType'}}</td>
                        <td align="center">{{it.auth_time}}</td>
                        <td>{{it.optr_name}}</td>
                        <td>{{it.auth_remark}}</td>
                    </tr>
                </tbody>
            </table>
        </div>    

        <div class="row mb-1" *ngIf="item && item.status=='1'">
            <!-- 审核状态 -->
            <label class="col-lg-2 col-form-label text-lg-right">审批类型：</label>
            <div class="col-lg-8 col-form-label">
                <label class="radio-inline c-radio" style="margin: 0px !important">
                        <input type="radio" name="radioSelect" value="0" [(ngModel)]="radioSelect" 
                            formControlName="radioSelect" [formControl]="formModel.controls['radioSelect']" (click)="this.item.auth_remark='审批通过'"/>&nbsp;审批通过&nbsp;
                        <span class="fa fa-circle" style="margin: 0px !important"></span>
                </label>&nbsp;&nbsp;
                <label class="radio-inline c-radio" style="margin: 0px !important">
                        <input type="radio" name="radioSelect" value="1" [(ngModel)]="radioSelect" 
                            formControlName="radioSelect" [formControl]="formModel.controls['radioSelect']" (click)="this.item.auth_remark='审批驳回'"/>&nbsp;审批驳回&nbsp;
                        <span class="fa fa-circle" style="margin: 0px !important"></span>
                </label>
                <span class="text-danger" *ngIf="formModel.get('radioSelect').hasError('required') && (formModel.get('radioSelect').dirty || formModel.get('radioSelect').touched)">请选择审批类型</span>
            </div>
        </div>
        <div class="row mb-1" *ngIf="item && item.status=='1'">
            <!-- 审核意见 -->
            <label class="col-lg-2 col-form-label text-lg-right">审核意见：</label>
            <div class="col-lg-8">
                <textarea class="form-control" [(ngModel)]="item.auth_remark" [formControl]="formModel.controls['auth_remark']" formControlName="remark" rows="3"></textarea>
            </div>
            <span class="text-danger" *ngIf="formModel.get('auth_remark').hasError('required') && (formModel.get('auth_remark').dirty || formModel.get('auth_remark').touched)">请输入审批意见</span>
        </div>

        <div class="row mb-1" *ngIf="item && item.status=='2'">
            <!-- 审核状态 -->
            <label class="col-lg-2 col-form-label text-lg-right">审批类型：</label>
            <div class="col-lg-8 col-form-label">
                <label class="radio-inline c-radio" style="margin: 0px !important">
                        <input type="radio" name="radioSelect" value="2" [(ngModel)]="radioSelect" 
                            formControlName="radioSelect" [formControl]="formModel.controls['radioSelect']" (click)="this.item.auth_remark='审批通过'"/>&nbsp;审批通过&nbsp;
                        <span class="fa fa-circle" style="margin: 0px !important"></span>
                </label>&nbsp;&nbsp;
                <label class="radio-inline c-radio" style="margin: 0px !important">
                        <input type="radio" name="radioSelect" value="3" [(ngModel)]="radioSelect" 
                            formControlName="radioSelect" [formControl]="formModel.controls['radioSelect']" (click)="this.item.auth_remark='审批不通过'"/>&nbsp;审批不通过&nbsp;
                        <span class="fa fa-circle" style="margin: 0px !important"></span>
                </label>
                <span class="text-danger" *ngIf="formModel.get('radioSelect').hasError('required') && (formModel.get('radioSelect').dirty || formModel.get('radioSelect').touched)">请选择审批类型</span>
            </div>
        </div>
        <div class="row mb-1" *ngIf="item && item.status=='2'">
            <!-- 审核意见 -->
            <label class="col-lg-2 col-form-label text-lg-right">审核意见：</label>
            <div class="col-lg-8">
                <textarea class="form-control" [(ngModel)]="item.auth_remark" [formControl]="formModel.controls['auth_remark']" formControlName="remark" rows="3"></textarea>
            </div>
            <span class="text-danger" *ngIf="formModel.get('auth_remark').hasError('required') && (formModel.get('auth_remark').dirty || formModel.get('auth_remark').touched)">请输入审批意见</span>
        </div>

</form>
<div class="row">
    <frame-uploader #uploader [silenceUpload]="true" [autoUpload]="true" [(uploadUrl)]="UPLOAD_URL"></frame-uploader>
</div>
</ng-template>

<ng-template #editTemplateModal>
<div class="modal-content">
    <div class="modal-header info-success-qm">
        <div class="pull-left">
            <em class="fa-lg fas fa-edit "></em> 毕业论文答辩审核
        </div>
        <button type="button" class="close" (click)="hideModal();">×</button>
    </div>

    <!-- 1@3 -->
    <div class="modal-body">
        <div [ngTemplateOutlet]="editFormTemplate"></div>
    </div>

    <div class="modal-footer" style="text-align: center">
        <button class="btn btn-info" (click)="doAudit()" *ngIf="item && item.status=='1' || item.status=='2'">
                <i class="fa fa-info-circle"> </i> 提交
            </button>
       
        <button class="btn btn-default" (click)="hideModal();">
            <i class="icon-close"> </i> 关闭
        </button>
    </div>
</div>
</ng-template>

<!-- ***********************************************审核记录查询框******************************************************* -->
<ng-template #authQueryModal>
<div class="modal-content">
    <div class="modal-header info-success-qm">
        <div class="pull-left">
            <em class="fa-lg fas fa-edit "></em> 查看页面
        </div>
        <button type="button" class="close" (click)="hideModal()">×</button>
    </div>

    <!-- 1@3 -->
    <div class="modal-body">
        <div [ngTemplateOutlet]="authQueryTemplate"></div>
    </div>

    <div class="modal-footer" style="text-align: center">
        <button class="btn btn-default" (click)="hideModal()">
            <i class="icon-close"> </i> 关闭
        </button>
    </div>
</div>
</ng-template>

<ng-template #authQueryTemplate>
<form [formGroup]="formModel" *ngIf="item" class="form-validate form-horizontal" novalidate="">
        <input type="hidden" class="form-control" formControlName="id" [(ngModel)]="item.id" [formControl]="formModel.controls['id']" />
        <div class="row mb-1">
            <!-- 学生基础信息 -->
            <table class="table table-sm table-striped table-hover table-bordered bg-white">
                <tbody>
                    <tr>
                        <td colspan="2">准考证号：{{item.ticket_no}}</td>
                    </tr>
                    <tr>
                        <td>姓名：{{item.std_name}}</td>
                        <td>性别：{{item.std_sex | frameDict:'StdSexType'}}</td>
                    </tr>
                    <tr>
                        <td>主考学校：{{item.school_name}}</td>
                        <td>专业：{{item.major_name}}</td>
                    </tr>
                    <tr>
                        <td>身份证号码：{{item.cert_no}}</td>
                        <td>联系电话：{{item.telephone}}</td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="row mb-1" style="text-align: center">
            <label class="col-lg-2 col-form-label text-lg-left">审核流程信息</label>
        </div>
        <div class="row mb-1">
            <!-- 审核流程列表 -->
            <table class="table table-sm table-striped table-hover table-bordered bg-white">
                <thead>
                    <tr>
                        <th width="10%">序号</th>
                        <th width="20%">审核类型</th>
                        <th width="15%">审核时间</th>
                        <th width="20%">受理单位</th>
                        <th width="35%">审核意见</th>
                    </tr>
                </thead>
                <tbody>
                    <tr *ngFor="let it of authList; let i = index">
                        <td>{{i+1}}</td>
                        <td>{{it.auth_type | frameDict:'ByPaperAuthType'}}</td>
                        <td>{{it.auth_time}}</td>
                        <td>{{it.optr_name}}</td>
                        <td>{{it.auth_remark}}</td>
                    </tr>
                </tbody>
            </table>
        </div>
        
</form>
</ng-template>


<!--**********************************毕业申请-手工引用考生*******************************************************************-->
<ng-template #stdRefModal>
<div class="modal-content">
    <div class="modal-header info-success-qm">
        <div class="pull-left">
            <em class="fa-lg fas fa-edit "></em> 毕业论文答辩申请
        </div>
        <button type="button" class="close" (click)="stdRefWin.hide()">×</button>
    </div>

    <!-- 1@3 -->
    <div class="modal-body">
        <div [ngTemplateOutlet]="stdRefTemplate"></div>
    </div>

    <div class="modal-footer">
        <button class="btn btn-info" (click)="selectStdRef()">
            <i class="fa fa-info-circle"> </i> 提交申请
        </button>
        <button class="btn btn-default" (click)="stdRefWin.hide()">
            <i class="icon-close"> </i> 取消
        </button>
    </div>
</div>
</ng-template>

<ng-template #stdRefTemplate>
<div class="row mb-3 ml-1">
    <div class="col-lg-10  ml-0 form-inline">
        <div class="input-group mr-1 input-group-sm">
            <label>准考证：</label>
            <input name="ticketNo" [(ngModel)]="stdRefQuery.ticketNo" class="input-sm form-control" type="text"
                        value="" maxlength="30" placeholder="请输入准考证号" width="40">
        </div>
        <div class="input-group mr-1 input-group-sm">
            <label>身份证：</label>
            <input name="certNo" [(ngModel)]="stdRefQuery.certNo" class="input-sm form-control" type="text"
                        value="" maxlength="30" placeholder="请输入身份证号" width="40">
        </div>
        <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="findStdRefList();">
                <i class="fa fa-search"></i> 查询</button>
    </div>
</div>
<div class="row mb-4">
    <div class="col-lg-12 ml-0">
        <!-- 审核流程列表 -->
        <table class="table table-sm table-striped table-hover table-bordered bg-white">
            <thead>
                <tr>
                    <th width="6%">
                        <div class="checkbox c-checkbox">
                            <label>
                            </label>
                        </div>
                    </th>
                    <th width="6%">序号</th>
                    <th>考生姓名</th>
                    <th>身份证</th>
                    <th align="center">准考证号</th>
                    <th>考生来源</th>
                    <th>学校</th>
                    <th align="center">性别</th>
                    <th align="center">手机号码</th>
                    <th>地址</th>
                </tr>
            </thead>
            <tbody>
                <tr *ngFor="let it of stdRefList; let i = index">
                    <td>
                        <div class="checkbox c-checkbox input-group-sm">
                            <label class="radio-inline c-radio" style="margin: 0px !important">
                                <input type="radio" name="radio" [value]="it.id"  [(ngModel)]="radioItem.id"/>
                                <span class="fa fa-circle" style="margin: 0px !important"></span>
                              </label>
                        </div>
                    </td>
                    <td>{{i+1}}</td>
                    <td>{{it.std_name}}</td>
                    <td>{{it.cert_no}}</td>
                    <td align="center">{{it.ticket_no}}</td>
                    <td [innerHTML]="it.std_source| frameDict:'StudentType'"></td>
                    <td>{{it.school_name}}</td>
                    <td align="center" [innerHTML]="it.std_sex| frameDict:'StdSexType'"></td>
                    <td align="center">{{it.std_mobile}}</td>
                    <td>{{it.std_address}}</td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
<div class="row mb-2">
    <div class="col-lg-12 ml-0 form-inline">
        <div class="input-group mr-1 input-group-sm">
            <label>专业：</label>
            <flex-select [allowClear]="true"
                [(items)] = "majorList"
                respDataPath= "array"
                optionValueField="id"
                optionTextField="major_full_name"
                [(ngModel)]="stdRefQuery.majorId"
                placeholder="请选择"
                (ngModelChange) ="freshSchoolInfo($event)"
                [ngModelOptions]="{standalone: true}"
                width = "120"
                noResultsFound = "无数据"
                >
            </flex-select>
        </div>&nbsp;&nbsp;
        <div class="input-group mr-1 input-group-sm">
            <label>主考学校：</label>
            <flex-select [allowClear]="true"
                [(items)] = "masterSchoolList"
                respDataPath= "array"
                optionValueField="id"
                optionTextField="org_name"
                [(ngModel)]="stdRefQuery.masterSchoolId"
                placeholder="请选择"
                [ngModelOptions]="{standalone: true}"
                width = "120"
                noResultsFound = "无数据"
                >
            </flex-select>
        </div>&nbsp;&nbsp;
    </div>
</div>
<div class="row mb-2">
    <div class="col-lg-12 ml-0 form-inline">
        <table class="table table-sm table-striped table-hover table-bordered bg-white">
            <tbody>
                <tr *ngFor="let it of selectOldMajorList; let i = index">
                    <td>对应旧专业：({{it.major_code}}){{it.major_name}}</td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
</ng-template>


