<div class="content-heading  justify-content-between">
  <div style="font-weight: bold;">形体录入打印
    <span *ngIf="step === 'Checking' && total?.std_total>0">共【{{total?.std_total}}】考生
              <span *ngIf="total.checkin_total">  ，已录入【<span class="text-success">{{total?.checkin_total}}</span>】,还差【
              <span class="text-danger">{{total?.no_checkin_total}}</span>】</span>
      </span>
  </div>
  <div class="float-right" *ngIf="step === 'Checking'">
    <div class="row">
      <div>
        <ngx-select [items]="printOption" [(ngModel)]="printDevice" class="wd-wide"
                    optionValueField="name" optionTextField="name"></ngx-select>
      </div>
      <div class="mr-3  form-check" style="padding-top: 0.5rem;">
        <div class="checkbox c-checkbox">
          <label>
            <input type="checkbox" [(ngModel)]="autoPrint"/>
            <span class="fa fa-check"></span>自动打印
          </label>
        </div>
      </div>
      <div class="mr-3">
        <button type="button" class="btn btn-primary" (click)="goPrint()">打印</button>
      </div>


      <div class="btn-group mb-1 mr-1 ml-3" dropdown>
        <button class="btn dropdown-toggle btn-secondary btn-lg" type="button" dropdownToggle>功能
          <span class="caret"></span>
        </button>
        <div *dropdownMenu class="dropdown-menu modal-lg" role="menu">
          <a class="dropdown-item" href="#" (click)="goInit()">选择分组</a>
          <div class="dropdown-divider"></div>
        </div>
      </div>

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

<!--选择批次日期分组-->
<div class="card card-default" *ngIf="step === 'Init'">
  <div class="card-body">
    <div class="form-horizontal" method="get">

      <fieldset>
        <div class="form-group row">
          <label class="col-lg-3 col-form-label text-right">请选择学校</label>
          <div class="col-lg-9">
            <div class="">
              <ngx-select [items]="schoolArr" [(ngModel)]="checkin.school_id"
                          (ngModelChange)="listBatch(checkin.school_id)"
                          [autoClearSearch]="true" optionValueField="school_id"
                          optionTextField="school_name"></ngx-select>
            </div>
          </div>
        </div>
      </fieldset>


      <fieldset>
        <div class="form-group row">
          <label class="col-lg-3 col-form-label text-right">请选择批次</label>
          <div class="col-lg-9">
            <div class="">
              <ngx-select [items]="batchArr" [(ngModel)]="checkin.batch_id"
                          (ngModelChange)="listExamDate(checkin.batch_id)"
                          [autoClearSearch]="true" optionValueField="batch_id"
                          optionTextField="batch_name"></ngx-select>
            </div>
          </div>
        </div>
      </fieldset>

      <fieldset *ngIf="checkin.batch_id !== undefined">
        <div class="form-group row">
          <label class="col-lg-3 col-form-label text-right">请选择考试日期</label>
          <div class="col-lg-9">
            <div>
              <ngx-select [items]="dateArr" [(ngModel)]="checkin.exam_date"
                          (ngModelChange)="listGroup(checkin.batch_id,checkin.exam_date)"
                          [autoClearSearch]="true" optionValueField="exam_date"
                          optionTextField="exam_date"></ngx-select>
            </div>
          </div>
        </div>
      </fieldset>

      <fieldset *ngIf="checkin.exam_date !== undefined && timeArr.length > 1 ">
        <div class="form-group row">
          <label class="col-lg-3 col-form-label text-right">请选择时段</label>
          <div class="col-lg-9">
            <div>
              <ngx-select [items]="timeArr" [(ngModel)]="checkin.time_type"
                          [autoClearSearch]="true" optionValueField="dict_value"
                          optionTextField="dict_text"></ngx-select>
            </div>
          </div>
        </div>
      </fieldset>

      <fieldset>
        <div class="form-group row mb">
          <label class="col-lg-3 col-form-label text-right">开考时段范围</label>
          <div class="col-lg-9">
            <div class="row">
              <div class="col-md-6">
                <input class="form-control" type="text" [(ngModel)]="checkin.start_time" maxlength="5"
                       id="startTime"/>
              </div>
              <div class="col-md-6">
                <input class="form-control" type="text" [(ngModel)]="checkin.end_time" maxlength="5"
                       id="endTime"/>
              </div>
            </div>
          </div>
        </div>
      </fieldset>

      <fieldset *ngIf="groupArr && groupArr.length > 0 ">
        <div class="form-group row">
          <label class="col-lg-3 col-form-label text-right">请选择需要录入的分组 <br/>
            <div class="form-check">
              <div class="checkbox c-checkbox">
                <label>
                  <input type="checkbox" [(ngModel)]="checkin.checked" (change)="checkAllGroup()"/>
                  <span class="fa fa-check"></span>全选</label>
              </div>
            </div>
          </label>

          <div class="col-lg-9">
            <div class="row">
              <div class="col-lg-6" *ngFor="let s of groupArr">
                <div class="form-check">
                  <div class="checkbox c-checkbox">
                    <label>
                      <input type="checkbox" [(ngModel)]="s.checked"/>
                      <span class="fa fa-check"></span>{{s.group_name}}</label>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </fieldset>

      <fieldset *ngIf="groupArr && groupArr.length > 0">
        <div class="d-flex justify-content-center">
          <button class="btn btn-primary" type="button" (click)="startCheckin()">开始录入</button>
        </div>
      </fieldset>
    </div>

  </div>
</div>


<!-- 检录主窗口 -->
<div class="card card-default" *ngIf="step === 'Checking'">
  <div class="card-body">
    <fieldset>
      <div class="form-group row">
        <div class="col-lg-12">
          <div class="d-flex align-items-center mb-3">
            <input class="form-control mt-1 cert_field" [(ngModel)]="checkin.cert_id" maxlength="18"
                   [readOnly]="this.checkin.requesting === true" onfocus="this.select()"
                   onmouseover="this.focus()"
                   [value]="420117200304281217"
                   autocomplete="false" #certid (keyup.enter)="changeCertId()"
                   placeholder="请输入身份证号"/>
          </div>
        </div>
      </div>
    </fieldset>

    <fieldset>
      <div class="row">


        <div class="col-lg-10 col-xs-10" [formGroup]="detailForm" *ngIf="currentStd">
          <div class="card-header">
            <div class="card-title" style="text-align: center">请输入考生信息</div>
          </div>
          <div class="card card-default" style="text-align: center">
            <div class="card-body">
              <div class="form-group row">
                <!--                <div class="col-lg-5 col-xs-5" *ngIf="currentStd && currentStd.std_image">-->
                <!--                  <div class="text-center">-->
                <!--                    <div class="">-->
                <!--                      <img class="img-fluid rounded " style="width:256px;height:300px;"-->
                <!--                           [src]="FrameService.getParamValue('EnrolMaterialPath')+currentStd.std_image" alt=""-->
                <!--                           ngxViewer/>-->
                <!--                    </div>-->
                <!--                  </div>-->
                <!--                </div>-->

                <label class="col-lg-2 col-form-label text-lg-right">姓名</label>
                <div class="col-lg-4 col-md-4 text-lg-left" style="line-height: 36px;">
                  {{currentStd.std_name}}
                </div>
                <label class="col-lg-2 col-form-label text-lg-right">身份证</label>
                <div class="col-lg-4 col-md-4 text-lg-left" style="line-height: 36px;">
                  {{currentStd.cert_id}}
                </div>
              </div>
              <div class="form-group row">
                <label class="col-lg-2 col-form-label text-lg-right">性别</label>
                <div class="col-lg-4 col-md-4 text-lg-left" style="line-height: 36px;">
                  {{currentStd.std_sex}}
                </div>
                <label class="col-lg-2 col-form-label text-lg-right">准考证</label>
                <div class="col-lg-4 col-md-4 text-lg-left" style="line-height: 36px;">
                  {{currentStd.ticket_no}}
                </div>

              </div>
              <div class="form-group row">
                <label class="col-lg-2 col-form-label text-lg-right">入座号</label>
                <div class="col-lg-4 col-md-4 text-lg-left" style="line-height: 36px;">
                 {{currentEntity.real_checkin_random}}
                </div>

              </div>
              <div class="form-group row">
                <label class="col-lg-2 col-form-label text-lg-right">身高（cm）</label>
                <div class="col-lg-4 col-md-4">
                  <input class="form-control" type="number" formControlName="std_height"
                         [(ngModel)]="currentEntity.std_height"/>
                  <form-valid [form]="detailForm" fieldName="std_height"></form-valid>
                </div>

                <label class="col-lg-2 col-form-label text-lg-right">体重（kg）</label>
                <div class="col-lg-4 col-md-4">
                  <input class="form-control" type="number" formControlName="std_weight"
                         [(ngModel)]="currentEntity.std_weight"/>
                  <form-valid [form]="detailForm" fieldName="std_weight"></form-valid>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-lg-2 col-form-label text-lg-right">上半身长（cm）</label>
                <div class="col-lg-4 col-md-4">
                  <input class="form-control" type="number" formControlName="height"
                         [(ngModel)]="currentEntity.height"/>
                  <form-valid [form]="detailForm" fieldName="height"></form-valid>
                </div>

                <label class="col-lg-2 col-form-label text-lg-right">下半身长度（cm）</label>
                <div class="col-lg-4 col-md-4">
                  <input class="form-control" type="number" formControlName="lower_body_length"
                         [(ngModel)]="currentEntity.lower_body_length"/>
                  <form-valid [form]="detailForm" fieldName="lower_body_length"></form-valid>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-lg-2 col-form-label text-lg-right">差值（下身长-上身长）cm</label>
                <div class="col-lg-4 col-md-4 text-lg-left" style="line-height: 36px;">
                  {{currentEntity.height && currentEntity.lower_body_length ? (currentEntity.lower_body_length-currentEntity.height).toFixed (1) : ''}}
                </div>

              </div>
              <div class="form-group row">
                <label class="col-lg-2 col-form-label text-lg-right">肩宽（cm）</label>
                <div class="col-lg-4 col-md-4">
                  <input class="form-control" type="number" formControlName="shoulder_width"
                         [(ngModel)]="currentEntity.shoulder_width"/>
                  <form-valid [form]="detailForm" fieldName="shoulder_width"></form-valid>
                </div>

                <label class="col-lg-2 col-form-label text-lg-right">胸围（cm）</label>
                <div class="col-lg-4 col-md-4">
                  <input class="form-control" type="number" formControlName="chest_size"
                         [(ngModel)]="currentEntity.chest_size"/>
                  <form-valid [form]="detailForm" fieldName="chest_size"></form-valid>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-lg-2 col-form-label text-lg-right">腰围（cm）</label>
                <div class="col-lg-4 col-md-4">
                  <input class="form-control" type="number" formControlName="girth_size"
                         [(ngModel)]="currentEntity.girth_size"/>
                  <form-valid [form]="detailForm" fieldName="girth_size"></form-valid>
                </div>

                <label class="col-lg-2 col-form-label text-lg-right">臀围（cm）</label>
                <div class="col-lg-4 col-md-4">
                  <input class="form-control" type="number" formControlName="hip_measurement"
                         [(ngModel)]="currentEntity.hip_measurement"/>
                  <form-valid [form]="detailForm" fieldName="hip_measurement"></form-valid>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-lg-2 col-form-label text-lg-right">上臂围（cm）</label>
                <div class="col-lg-4 col-md-4">
                  <input class="form-control" type="number" formControlName="upper_arm_circumference"
                         [(ngModel)]="currentEntity.upper_arm_circumference"/>
                  <form-valid [form]="detailForm" fieldName="upper_arm_circumference"></form-valid>
                </div>

                <label class="col-lg-2 col-form-label text-lg-right">大腿围（cm）</label>
                <div class="col-lg-4 col-md-4">
                  <input class="form-control" type="number" formControlName="thigh_circumference"
                         [(ngModel)]="currentEntity.thigh_circumference"/>
                  <form-valid [form]="detailForm" fieldName="thigh_circumference"></form-valid>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-lg-2 col-form-label text-lg-right">小腿围（cm）</label>
                <div class="col-lg-4 col-md-4">
                  <input class="form-control" type="number" formControlName="calf_circumference"
                         [(ngModel)]="currentEntity.calf_circumference"/>
                  <form-valid [form]="detailForm" fieldName="calf_circumference"></form-valid>
                </div>

                <label class="col-lg-2 col-form-label text-lg-right">踝围（cm）</label>
                <div class="col-lg-4 col-md-4">
                  <input class="form-control" type="number" formControlName="ankle_circumference"
                         [(ngModel)]="currentEntity.ankle_circumference"/>
                  <form-valid [form]="detailForm" fieldName="ankle_circumference"></form-valid>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-lg-2 col-form-label text-lg-right">备注</label>
                <div class="col-lg-6 col-md-6">
                  <!--                    <input class="form-control" type="text" formControlName="remark"-->
                  <!--                           [(ngModel)]="currentEntity.remark" />-->
                  <textarea class="form-control" type="text" formControlName="remark" rows="2"
                            [(ngModel)]="currentEntity.remark"></textarea>
                  <form-valid [form]="detailForm" fieldName="remark"></form-valid>
                </div>
              </div>


            </div>
            <div class="card-footer">
              <button class="btn btn-primary" type="button"
                      (click)="submitForm('ex/exStdEntryInfo/add.htm', {successMsg: '考生信息添加成功!',autoClose:false},goPrint)">
                保存并打印考生信息
              </button>
            </div>
          </div>
        </div>


      </div>
    </fieldset>
  </div>

</div>

<!--打印内容-->

<div #printContent *ngIf="currentStd" style="display: none">
  <div style="font-size: medium;font-weight: 500;text-align: -webkit-center;">
    <div style="font-size: large;text-align: center;margin-bottom: 20px;margin-top: 30px;font-weight: 550;">广西2024年表（导）演类服装表演方向形体数据测量表
    </div>
    <table style="border-collapse: collapse; ">
      <tbody>
      <tr height="126" style='height:47.25pt;'>
        <td style='height:47.25pt;width:108.05pt;border: 1px solid #000000;font-weight: 500;'>姓名</td>
        <td style='width:139.85pt;height:47.25pt;border: 1px solid #000000;'>{{currentStd.std_name}}</td>
        <td style='width:85.45pt;height:47.25pt;border: 1px solid #000000;font-weight: 500;'>性别</td>
        <td style='width:133.50pt;height:47.25pt;border: 1px solid #000000;'>{{currentStd.std_sex}}</td>
      </tr>
      <tr height="126" style='height:47.25pt;'>
        <td height="126" style='border: 1px solid #000000;height:47.25pt;font-weight: 500;'>准考证号</td>
        <td style='border: 1px solid #000000;'>{{currentStd.ticket_no}}</td>
        <td style='border: 1px solid #000000;font-weight: 500;'>身份证号</td>
        <td style='border: 1px solid #000000;'>{{currentStd.cert_id}}</td>
      </tr>
      <tr height="126" style='height:47.25pt;'>
        <td height="126" style='border: 1px solid #000000;height:47.25pt;font-weight: 500;'>身高（cm）</td>
        <td style='border: 1px solid #000000;'>{{currentEntity.std_height}}</td>
        <td style='border: 1px solid #000000;font-weight: 500;'>体重（kg）</td>
        <td style='border: 1px solid #000000;'>{{currentEntity.std_weight}}</td>
      </tr>
      <tr height="126" style='height:47.25pt;'>
        <td height="126" style='border: 1px solid #000000;height:47.25pt;font-weight: 500;'>上半身长（cm）</td>
        <td style='border: 1px solid #000000;'>{{currentEntity.height}}</td>
        <td style='border: 1px solid #000000;font-weight: 500;'>下身长（cm）</td>
        <td style='border: 1px solid #000000;'>{{currentEntity.lower_body_length}}</td>
      </tr>
      <tr height="126" style='height:47.25pt;'>
        <td height="126" style='border: 1px solid #000000;height:47.25pt;font-weight: 500;'>差值（下身长-上身长）cm</td>
        <td style='border: 1px solid #000000;'
            colspan="3">{{currentEntity.height && currentEntity.lower_body_length ? (currentEntity.lower_body_length-currentEntity.height).toFixed (1) : ''}}</td>
      </tr>
      <tr height="126" style='height:47.25pt;'>
        <td height="126" style='border: 1px solid #000000;height:47.25pt;font-weight: 500;'>肩宽（cm）</td>
        <td style='border: 1px solid #000000;'>{{currentEntity.shoulder_width}}</td>
        <td style='border: 1px solid #000000;font-weight: 500;'>胸围（cm）</td>
        <td style='border: 1px solid #000000;'>{{currentEntity.chest_size}}</td>
      </tr>
      <tr height="126" style='height:47.25pt;'>
        <td height="126" style='border: 1px solid #000000;height:47.25pt;font-weight: 500;'>腰围（cm）</td>
        <td style='border: 1px solid #000000;'>{{currentEntity.girth_size}}</td>
        <td style='border: 1px solid #000000;font-weight: 500;'>臀围（cm）</td>
        <td style='border: 1px solid #000000;'>{{currentEntity.hip_measurement}}</td>
      </tr>
      <tr height="126" style='height:47.25pt;'>
        <td height="126" style='border: 1px solid #000000;height:47.25pt;font-weight: 500;'>上臂围（cm）</td>
        <td style='border: 1px solid #000000;'>{{currentEntity.upper_arm_circumference}}</td>
        <td style='border: 1px solid #000000;font-weight: 500;'>大腿围（cm）</td>
        <td style='border: 1px solid #000000;'>{{currentEntity.thigh_circumference}}</td>
      </tr>
      <tr height="126" style='height:47.25pt;'>
        <td height="126" style='border: 1px solid #000000;height:47.25pt;font-weight: 500;'>小腿围（cm）</td>
        <td style='border: 1px solid #000000;'>{{currentEntity.calf_circumference}}</td>
        <td style='border: 1px solid #000000;font-weight: 500;'>踝围（cm）</td>
        <td style='border: 1px solid #000000;'>{{currentEntity.ankle_circumference}}</td>
      </tr>
      <tr height="148" style='height:55.50pt;'>
        <td height="148" style='border: 1px solid #000000;height:55.50pt;font-weight: 500;'>其他备注</td>
        <td style='border: 1px solid #000000;' colspan="3">{{currentEntity.remark}}</td>
      </tr>
      </tbody>
    </table>
    <table>
      <tbody>
      <tr height="126" style='height:47.25pt;'>
        <td height="126" colspan="4" style='height:47.25pt;font-weight: 500;'>
          以上测量数据真实有效，本人认可并无异议。
        </td>
      </tr>
      <tr height="126" style='height:47.25pt;'>
        <td height="126" colspan="4" style='height:47.25pt;text-align: right;font-weight: 500;'>考生签名：</td>
      </tr>
      <tr height="126" style='height:47.25pt;'>
        <td height="126" colspan="4" style='height:47.25pt;text-align: right;font-weight: 500;'>日期：</td>
      </tr>
      </tbody>
    </table>
  </div>
</div>





