<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="10%">排序号</th>
                <th nzWidth="18%">项目名称</th>
                <th nzWidth="18%">项目编码</th>
                <th nzWidth="18%">标本类型</th>
                <th nzWidth="18%">试管类型</th>
                <th nzWidth="18%">检验科室</th>
              </tr>
            </thead>
            <tbody>
              <tr *ngFor="let data of dataList;let i = index">
                <td>{{data.orders}}</td>
                <td>{{data.name}}</td>
                <td>{{data.value}}</td>
                <td>{{data.dictionaryDTO?data.dictionaryDTO.name:''}}</td>
                <td>{{data.extra5DTO?data.extra5DTO.name:''}}</td>
                <td>{{data.dept.join(',')}}</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="value">项目编码</nz-form-label>
				  <nz-form-control [nzSpan]="17" nzErrorTip="请输入项目编码!">
				    <nz-input-group>
				      <input formControlName="value" 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 [nzSpan]="7" nzRequired nzFor="extra5">试管类型</nz-form-label>
				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择试管类型!">
				    <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="extra5" nzPlaceHolder="请选择试管类型" nzServerSearch>
				      <ng-container *ngFor="let data of tubeTypeList">
				        <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 [nzSpan]="7" nzRequired nzFor="extra7">检验科室</nz-form-label>
          <nz-form-control [nzSpan]="17" nzErrorTip="请选择检验科室!">
            <nz-select nzMode="multiple" [nzDropdownMatchSelectWidth]="false" formControlName="extra7" nzPlaceHolder="请选择检验科室" nzServerSearch (nzOnSearch)="changeInp($event)">
              <ng-container *ngFor="let data of deptList">
                <nz-option *ngIf="!isLoading" [nzLabel]="data.dept" [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 [nzSpan]="7" nzRequired nzFor="desc">备注</nz-form-label>
				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择备注!">
				     <textarea formControlName="desc" nz-input rows="3" placeholder="请输入备注"></textarea>
				  </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>
