<div class="save add display_flex align-items_center justify-content_flex-center">
  <div class="modalBody">
    <div class="title">更多搜索<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
    </div>
    <div class="content">
      <form nz-form [formGroup]="validateForm" class="addForm">
        <nz-form-item [hidden]="!fieldConfig.config.workHourParent">
          <nz-form-label [nzSpan]="6" nzFor="workHourParentId">工时大类</nz-form-label>
          <nz-form-control [nzSpan]="16" nzErrorTip="请选择工时大类!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeWorkHourParentInp($event)" formControlName="workHourParentId" nzPlaceHolder="请选择工时大类" (nzOpenChange)="openChangeWorkHourParent($event)" (ngModelChange)="setIsSelecting(true)">
              <ng-container *ngFor="let option of workHourParentList">
                <nz-option *ngIf="!isLoading" [nzLabel]="option.workName" [nzValue]="option.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 [hidden]="!fieldConfig.config.workHourSmall">
				  <nz-form-label [nzSpan]="6" nzFor="workHourSmallId">工时小类</nz-form-label>
				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择工时小类!">
				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeWorkHourSmallInp($event)" formControlName="workHourSmallId" nzPlaceHolder="请选择工时小类" (nzOpenChange)="openChangeWorkHourSmall($event)" (ngModelChange)="setIsSelecting(true)">
				      <ng-container *ngFor="let option of workHourSmallList">
				        <nz-option *ngIf="!isLoading" [nzLabel]="option.workName" [nzValue]="option.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 [hidden]="!fieldConfig.config.group">
          <nz-form-label [nzSpan]="6" nzFor="groupId">维修分组</nz-form-label>
          <nz-form-control [nzSpan]="16" nzErrorTip="请选择维修分组!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeGroupInp($event)" formControlName="groupId" nzPlaceHolder="请选择维修分组" (nzOpenChange)="openChangeGroup($event)" (ngModelChange)="changeGroup($event)">
              <ng-container *ngFor="let option of groupList">
                <nz-option *ngIf="!isLoading" [nzLabel]="option.groupName" [nzValue]="option.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 [hidden]="!fieldConfig.config.groupAndUser">
          <nz-form-label [nzSpan]="6" nzFor="groupId">维修分组</nz-form-label>
          <nz-form-control [nzSpan]="16" nzErrorTip="请选择维修分组!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeGroupInp($event)" formControlName="groupId" nzPlaceHolder="请选择维修分组" (nzOpenChange)="openChangeGroup($event)" (ngModelChange)="changeGroup($event)">
              <ng-container *ngFor="let option of groupList">
                <nz-option *ngIf="!isLoading" [nzLabel]="option.groupName" [nzValue]="option.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 [hidden]="!fieldConfig.config.groupAndUser">
          <nz-form-label [nzSpan]="6" nzFor="userId">维修人员</nz-form-label>
          <nz-form-control [nzSpan]="16" nzErrorTip="请选择维修人员!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeUserInp($event)" formControlName="userId" nzPlaceHolder="请选择维修人员" (nzOpenChange)="openChangeUser($event)" (ngModelChange)="setIsSelecting(true)">
              <ng-container *ngFor="let option of userList">
                <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.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 [hidden]="!fieldConfig.config.category123">
          <nz-form-label [nzSpan]="6" nzFor="category1Id">一级分类</nz-form-label>
          <nz-form-control [nzSpan]="16" nzErrorTip="请选择一级分类!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeCategory1Inp($event)" formControlName="category1Id" nzPlaceHolder="请选择一级分类" (nzOpenChange)="openChangeCategory1($event)" (ngModelChange)="changeCategory1($event)">
              <ng-container *ngFor="let option of category1List">
                <nz-option *ngIf="!isLoading" [nzLabel]="option.category" [nzValue]="option.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 [hidden]="!fieldConfig.config.category123">
          <nz-form-label [nzSpan]="6" nzFor="category2Id">二级分类</nz-form-label>
          <nz-form-control [nzSpan]="16" nzErrorTip="请选择二级分类!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeCategory2Inp($event)" formControlName="category2Id" nzPlaceHolder="请选择二级分类" (nzOpenChange)="openChangeCategory2($event)" (ngModelChange)="changeCategory2($event)">
              <ng-container *ngFor="let option of category2List">
                <nz-option *ngIf="!isLoading" [nzLabel]="option.category" [nzValue]="option.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 [hidden]="!fieldConfig.config.category123">
          <nz-form-label [nzSpan]="6" nzFor="category3Id">三级分类</nz-form-label>
          <nz-form-control [nzSpan]="16" nzErrorTip="请选择三级分类!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeCategory3Inp($event)" formControlName="category3Id" nzPlaceHolder="请选择三级分类" (nzOpenChange)="openChangeCategory3($event)" (ngModelChange)="setIsSelecting(true)">
              <ng-container *ngFor="let option of category3List">
                <nz-option *ngIf="!isLoading" [nzLabel]="option.category" [nzValue]="option.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 [hidden]="!fieldConfig.config.source">
          <nz-form-label [nzSpan]="6" nzFor="sourceId">故障来源</nz-form-label>
          <nz-form-control [nzSpan]="16" nzErrorTip="请选择故障来源!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="sourceId" nzPlaceHolder="请选择故障来源">
              <ng-container *ngFor="let option of sourceList">
                <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.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 [hidden]="!fieldConfig.config.buildingAndFloor">
          <nz-form-label [nzSpan]="6" nzFor="buildingId">楼<span style="visibility: hidden;">囧囧</span>栋</nz-form-label>
          <nz-form-control [nzSpan]="16" nzErrorTip="请选择楼栋!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeBuildingInp($event)" formControlName="buildingId" nzPlaceHolder="请选择楼栋" (nzOpenChange)="openChangeBuilding($event)" (ngModelChange)="changeBuilding($event)">
              <ng-container *ngFor="let option of buildingList">
                <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName + '-' + option.buildingName" [nzValue]="option.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 [hidden]="!fieldConfig.config.buildingAndFloor">
          <nz-form-label [nzSpan]="6" nzFor="floorId">楼<span style="visibility: hidden;">囧囧</span>层</nz-form-label>
          <nz-form-control [nzSpan]="16" nzErrorTip="请选择楼层!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeFloorInp($event)" formControlName="floorId" nzPlaceHolder="请选择楼层" (nzOpenChange)="openChangeFloor($event)" (ngModelChange)="setIsSelecting(true)">
              <ng-container *ngFor="let option of floorList">
                <nz-option *ngIf="!isLoading" [nzLabel]="option.floorName" [nzValue]="option.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 [hidden]="!fieldConfig.config.company">
          <nz-form-label [nzSpan]="6" nzFor="companyId">三方公司</nz-form-label>
          <nz-form-control [nzSpan]="16" nzErrorTip="请选择三方公司!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeCompanyInp($event)" formControlName="companyId" nzPlaceHolder="请选择三方公司" (nzOpenChange)="openChangeCompany($event)" (ngModelChange)="setIsSelecting(true)">
              <ng-container *ngFor="let option of companyList">
                <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.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 [hidden]="!fieldConfig.config.repairDept">
          <nz-form-label [nzSpan]="6" nzFor="repairDeptId">报修科室</nz-form-label>
          <nz-form-control [nzSpan]="16" nzErrorTip="请选择报修科室!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" formControlName="repairDeptId" nzPlaceHolder="请选择报修科室" (nzOpenChange)="openChangeRepairDept($event)" (ngModelChange)="setIsSelecting(true)">
              <ng-container *ngFor="let option of repairDeptList">
                <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.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 [hidden]="!fieldConfig.config.repairUser">
				  <nz-form-label [nzSpan]="6" nzFor="repairUserId">报修人</nz-form-label>
				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择报修人!">
				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changerepairUserInp($event)" formControlName="repairUserId" nzPlaceHolder="请选择报修人" (nzOpenChange)="openChangerepairUser($event)" (ngModelChange)="setIsSelecting(true)">
				      <ng-container *ngFor="let option of repairUserList">
				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name +'('+ option.account +')'" [nzValue]="option.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 [hidden]="!fieldConfig.config.deptType">
				  <nz-form-label [nzSpan]="6" nzFor="deptTypeId">科室类型</nz-form-label>
				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择科室类型!">
				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzShowSearch formControlName="deptTypeId" nzPlaceHolder="请选择科室类型" (nzOpenChange)="openChangeDeptType($event)">
				      <ng-container *ngFor="let option of deptTypeList">
				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.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 [hidden]="!fieldConfig.config.evaluate">
				  <nz-form-label [nzSpan]="6" nzFor="evaluateId">评价</nz-form-label>
				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择评价!">
				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="evaluateId" nzPlaceHolder="请选择评价">
				      <ng-container *ngFor="let option of evaluateList">
				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.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 [hidden]="!fieldConfig.config.consumable">
				  <nz-form-label [nzSpan]="6" nzFor="consumableId">耗材</nz-form-label>
				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择耗材!">
				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeConsumableInp($event)" formControlName="consumableId" nzPlaceHolder="请选择耗材" (nzOpenChange)="openChangeConsumable($event)" (ngModelChange)="setIsSelecting(true)">
				      <ng-container *ngFor="let option of consumableList">
				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name +'-'+ option.model +'-'+ option.unit +'-'+ option.price" [nzValue]="option.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 [hidden]="!fieldConfig.config.isHang">
				  <nz-form-label [nzSpan]="6" nzFor="isHangId">是否挂起</nz-form-label>
				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择是否挂起!">
				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="isHangId" nzPlaceHolder="请选择是否挂起">
				      <ng-container *ngFor="let option of isHangList">
				        <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
				      </ng-container>
				    </nz-select>
				  </nz-form-control>
				</nz-form-item>
				
				<nz-form-item [hidden]="!fieldConfig.config.code">
				  <nz-form-label [nzSpan]="6" nzFor="codeNum">单号</nz-form-label>
				  <nz-form-control [nzSpan]="16" nzErrorTip="请输入单号!">
				    <input class="width-200" type="text" placeHolder="请输入单号" nz-input formControlName="codeNum" />
				  </nz-form-control>
				</nz-form-item>
				
				<nz-form-item [hidden]="!fieldConfig.config.overtime">
				  <nz-form-label [nzSpan]="6" nzFor="overtimeId">超时工单</nz-form-label>
				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择超时工单!">
				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="overtimeId" nzPlaceHolder="请选择超时工单">
				      <ng-container *ngFor="let option of overtimeList">
				        <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
				      </ng-container>
				    </nz-select>
				  </nz-form-control>
				</nz-form-item>
      </form>
    </div>
    <div class="display_flex justify-content_flex-center">
      <button nz-button nzType="default" (click)="hideModal()">取消</button>
      <button nzType="primary" nz-button (click)="submitForm()">确认</button>
    </div>
  </div>
</div>
