<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%">
        <ion-list class="activity-title">
            <ion-item>
                <ion-label>审核管理</ion-label>
                <ion-select [(ngModel)]="option.type" cancelText="取消" okText="确定" placeholder="选择"
                            (ngModelChange)="changeOption()">
                    <ng-container *ngFor="let item of option.list">
                        <ion-option [value]="item.type">{{item.name}}</ion-option>
                    </ng-container>
                </ion-select>
            </ion-item>
        </ion-list>

        <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: 160px">
        <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>
