<div class="content priority">
  <div class="contentInner">
    <div class="list-template" id="wechatTable">
      <div class="list-template__content">
        <div class="list-template__bottom">
          <div class="list-template__top" nz-row>
            <div nz-col nzXl='17' class="list-template__searchBox">
            </div>
            <div nz-col nzXl="7" class="list-template__btns">
              <button nz-button class="btn default" (click)="addWechatModal()">新增</button>
            </div>
          </div>
          <nz-table class="list-template__nzTable" [nzData]="dataList" nzSize="middle" [nzShowPagination]="false"
            [nzLoading]="loading1" [nzScroll]="{ y: tableWechatHeight + 'px' }">
            <thead>
              <tr class="thead">
                <th nzWidth="7%">排序号</th>
                <th nzWidth="30%">退回原因</th>
                <th nzWidth="12%">退回标本状态</th>
                <th nzWidth="12%">是否开启</th>
                <th nzWidth="12%">是否消除单号</th>
                <th nzWidth="12%">验证方式</th>
                <th nzWidth="15%">操作</th>
              </tr>
            </thead>
            <tbody>
              <tr *ngFor="let data of dataList;let i = index">
                <td>{{data.orders}}</td>
                <td>{{data.name}}</td>
                <td>{{data.dictionaryDTO?.name}}</td>
                <td>{{data.extra5 == 1 ? '是' : '否'}}</td>
                <td>{{data.extra6 == 1 ? '是' : '否'}}</td>
                <td>{{data.extra7 == 1 ? '科室码' : (data.extra7 == 2 ? '动态码' : (data.extra7 == 3 ? '填写工号' : '无'))}}</td>
                <td>
                  <div class="coop">
                    <span (click)="showDelModal(data,'您确认要删除吗？','删除','del')">删除</span>
                    <span (click)="editWechat(data)">编辑</span>
                  </div>
                </td>
              </tr>
            </tbody>
          </nz-table>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- 操作成功/失败提示框 -->
<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  [info]="promptInfo">
</app-prompt-modal>

<!-- 删除模态框 -->
<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
(confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>

<!-- 新增/编辑模态框 -->
<div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="modalWechat">
  <div class="modalBody">
    <div class="title">{{modelName}}<i class="icon_transport transport-guanbi" (click)="hideWechatModal()"></i></div>
    <div class="content">
      <form nz-form [formGroup]="validateForm" class="addForm">
        <nz-form-item>
          <nz-form-label [nzSpan]="7" nzRequired nzFor="orders">排序号</nz-form-label>
          <nz-form-control [nzSpan]="17" nzErrorTip="请输入排序号!">
            <nz-input-group>
              <nz-input-number class="w100" formControlName="orders" nzPlaceHolder="请输入排序号" [nzMin]="0" [nzStep]="1" [nzPrecision]="0"></nz-input-number>
            </nz-input-group>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item>
          <nz-form-label [nzSpan]="7" nzRequired nzFor="name">退回原因</nz-form-label>
          <nz-form-control [nzSpan]="17" nzErrorTip="请输入退回原因!">
            <nz-input-group>
              <input formControlName="name" nz-input placeholder="请输入退回原因">
            </nz-input-group>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item>
          <nz-form-label [nzSpan]="7" nzRequired nzFor="extra4">退回标本状态</nz-form-label>
          <nz-form-control [nzSpan]="17" nzErrorTip="请选择退回标本状态!">
            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="extra4" nzPlaceHolder="请选择退回标本状态" nzServerSearch>
              <ng-container *ngFor="let data of typeList">
                <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
              </ng-container>
              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
              </nz-option>
            </nz-select>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item>
          <nz-form-label style="line-height:40px;" [nzSpan]="7" nzRequired nzFor="extra5">是否开启</nz-form-label>
          <nz-form-control [nzSpan]="17" nzErrorTip="请选择是否开启!">
            <nz-radio-group formControlName="extra5">
              <label nz-radio nzValue="1">是</label>
              <label nz-radio nzValue="0">否</label>
            </nz-radio-group>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item>
          <nz-form-label style="line-height:40px;" [nzSpan]="7" nzRequired nzFor="extra6">是否消除单号</nz-form-label>
          <nz-form-control [nzSpan]="17" nzErrorTip="请选择是否消除单号!">
            <nz-radio-group formControlName="extra6">
              <label nz-radio nzValue="1">是</label>
              <label nz-radio nzValue="0">否</label>
            </nz-radio-group>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item>
          <nz-form-label [nzSpan]="7" nzRequired nzFor="extra7">验证方式</nz-form-label>
          <nz-form-control [nzSpan]="17" nzErrorTip="请选择验证方式!">
            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="extra7" nzPlaceHolder="请选择验证方式" nzServerSearch>
              <nz-option *ngFor="let data of extra7List" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
            </nz-select>
          </nz-form-control>
        </nz-form-item>
      </form>
    </div>
    <div class=" display_flex justify-content_flex-center">
      <button nzType="primary" nz-button (click)="submitWechatForm()" [nzLoading]="btnLoading">确认</button>
      <button class="btn cancel" nz-button nzType="default" (click)="hideWechatModal()">取消</button>
    </div>
  </div>
</div>
