<ion-header>
    <ion-navbar>
        <ion-title class="padding-0" text-center>审批审核</ion-title>
    </ion-navbar>
</ion-header>
<ion-content class="content">
    <div ion-fixed style="width: 100%">
        <div class="searchbar" >
            <div class="approval">
                <span>审核类型:</span>
                <span>{{searchObj.approvalObj?.name }}</span>
            </div>
            <div class="area">
                <ng-container *ngIf="globleArea?.name == '市属'">
                    <span>区域:</span>
                    <span>{{searchObj.areaObj?.name}}</span>
                </ng-container>
            </div>
            <div class="filter" (click)="openFilter()">
                <img src="./assets/imgs/filter.png" alt="">
                <span>筛选</span>
            </div>
        </div>
        <div class="content-box">
            <div class="content-box-item ">
                <p class="item-title {{type.option == 0?'bgc-5991CA':''}} ">全部</p>
                <p class="item-count">{{type.allList.length}}</p>
            </div>
            <div class="content-box-item " (click)="changeType(1)">
                <p class="item-title {{type.option == 1?'bgc-5991CA':''}} ">设立</p>
                <p class="item-count">{{type.setList.length}}</p>
            </div>
            <div class="content-box-item" (click)="changeType(2)">
                <p class="item-title {{type.option == 2?'bgc-5991CA':''}}">变更</p>
                <p class="item-count">{{type.changeList.length}}</p>
            </div>
            <div class="content-box-item" (click)="changeType(3)">
                <p class="item-title {{type.option == 3?'bgc-5991CA':''}}">注销</p>
                <p class="item-count">{{type.cancelList.length}}</p>
            </div>
            <div class="content-box-item" (click)="changeType(4)">
                <p class="item-title {{type.option == 4?'bgc-5991CA':''}}">补领</p>
                <p class="item-count">{{type.getList.length}}</p>
            </div>
        </div>
    </div>

    <div class="list" style="margin-top: 135px">
        <div *ngFor="let item of type.list">
            <div class="group">
                <div class="inner-group" (click)="goToDetail(item)">
                    <div class="item-box">
                        <p class="person-name">{{item?.title}}</p>
                    </div>
                </div>
                <div class="inner-button">
                    <div class="text-right">
                        <span (click)="goToDetail(item)" *ngIf="item.status == '1'" class="btn color1">受理</span>
                        <span (click)="handleClick(item,$event)"
                              *ngIf="item.status == '1' && mineInfo.roles == 1 && item.dbtype == '0'"
                              class="btn color1 db">督办事项</span>
                        <span (click)="goToDetail(item)" *ngIf="item.status == '2'" class="btn color2">审核</span>
                        <span (click)="goToDetail(item)" *ngIf="item.status == '3'" class="btn color3">审批</span>
                        <span (click)="goToDetail(item)" *ngIf="item.status == '4'" class="btn color4">办证</span>
                        <span (click)="goToDetail(item)" *ngIf="item.status == '5'" class="btn color5">发证</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</ion-content>
