<ion-header>
    <ion-navbar>
        <ion-title>信息查询</ion-title>
    </ion-navbar>
</ion-header>

<ion-content>
    <div class="content">
        <ng-container *ngIf="type == 1 || type == 0">
            <div class="item-box">
                <div class="left">统一社会信用代码:</div>
                <div class="right">
                    <span>{{ infoObj.xydm}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">单位名称:</div>
                <div class="right">
                    <span>{{ infoObj.mc}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">宗旨和业务范围:</div>
                <div class="right">
                    <span>{{ infoObj.zzyw}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">住所:</div>
                <div class="right">
                    <span>{{ infoObj.txdz}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">{{type != 0 ? '法定代表人': '负责人'}}:</div>
                <div class="right">
                    <span>{{ infoObj.frmc}}</span>
                </div>
            </div>
            <div class="item-box" *ngIf="type != 0">
                <div class="left">经费来源:</div>
                <div class="right">
                    <span>{{ infoObj.jfxsLabel}}</span>
                </div>
            </div>
            <div class="item-box" *ngIf="type != 0">
                <div class="left">开办资金:</div>
                <div class="right">
                    <span>{{ infoObj.kbzj}}万元</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">举办单位:</div>
                <div class="right">
                    <span>{{ infoObj.zgbm}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">证书有效期:</div>
                <div class="right">
                    <span>{{ infoObj.printStartTimeStr }} -- {{ infoObj.printEndTimeStr }}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">{{type != 0 ? '原事证号' : '归档号'}}:</div>
                <div class="right">
                    <span>{{ infoObj.zsh}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">设立文号:</div>
                <div class="right">
                    <span>{{ infoObj.pzwh}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">批准文号:</div>
                <div class="right">
                    <span>{{ infoObj.newpw}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">机构类别:</div>
                <div class="right">
                    <span>{{ infoObj.unitCatetory}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">机构级别:</div>
                <div class="right">
                    <span>{{ infoObj.jggg}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">编制数:</div>
                <div class="right">
                    <span>{{ infoObj.bzrs}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">最近上报在编人数({{nowDate}}):</div>
                <div class="right">
                    <span>{{ infoObj.syrs}}  现有人数({{ infoObj.syrs_now}})</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">领导职数:</div>
                <div class="right">
                    <span>{{ infoObj.leaderCount}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">正职领导数:</div>
                <div class="right">
                    <span>{{ infoObj.zzlds}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">副职领导数:</div>
                <div class="right">
                    <span>{{ infoObj.fzlds}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">联系人1:</div>
                <div class="right">
                    <span>{{infoObj?.lxr || "-"}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">联系电话1:</div>
                <div class="right">
                    <span>{{infoObj?.lxrphone || "-"}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">联系人2:</div>
                <div class="right">
                    <span>{{infoObj?.lxr2 || "-"}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">联系电话2:</div>
                <div class="right">
                    <span>{{infoObj?.lxrphone2 || "-"}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">批准内设机构数:</div>
                <div class="right">
                    <span>{{ infoObj.pznsjg}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">批准内设机构批文:</div>
                <div class="right">
                    <span>{{ infoObj.pwNo}}</span>
                </div>
            </div>
            <div class="item-box" *ngIf="infoObj.filenumber">
                <div class="left">备注:</div>
                <div class="right">
                    <span>根据{{infoObj.filenumber}}文事业单位建制撤销</span>
                </div>
            </div>
            <p>人员信息情况</p>
            <div class="item-box">
                <div class="left width50">管理岗位(参公)</div>
                <div (click)="openDetail('管理岗位(参公)')" class="choose right">
                    详情
                </div>
            </div>
            <div class="item-box">
                <div class="left width50">管理岗位(非参公)</div>
                <div (click)="openDetail('管理岗位(非参公)')" class="choose right">
                    详情
                </div>
            </div>
            <div class="item-box">
                <div class="left width50">专业技术岗位</div>
                <div (click)="openDetail('专业技术岗位')" class="choose right">
                    详情
                </div>
            </div>
            <div class="item-box">
                <div class="left width50">工勤技能岗位</div>
                <div (click)="openDetail('工勤技能岗位')" class="choose right">
                    详情
                </div>
            </div>
            <div class="item-box">
                <div class="left width50">按学历、年龄分布</div>
                <div (click)="openDetail('按学历、年龄分布')" class="choose right">
                    详情
                </div>
            </div>
            <div class="item-box">
                <div class="left width50">工龄结构</div>
                <div (click)="openDetail('工龄结构')" class="choose right">
                    详情
                </div>
            </div>

            <p>年度报告情况</p>
            <div>
                <ng-container *ngFor="let year of infoObj?.ndbgUnitList">
                    <div class="item-box" (click)="goToYearReport(year)">
                        <div class="left">{{year.year}}</div>
                        <div class="right year">
                            <span
                                    [ngClass]="{'select':year.is_public == '0'}">{{ year.is_public == '0' ? '未上报' : '已公开'}}</span>
                        </div>
                    </div>
                </ng-container>
            </div>
        </ng-container>
        <ng-container *ngIf="type == 2">
            <div class="item-box">
                <div class="left">机构名称:</div>
                <div class="right">
                    <span>{{infoObj?.name || "-"}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">机构地址:</div>
                <div class="right">
                    <span>{{infoObj?.jgdz || "-"}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">机构性质:</div>
                <div class="right">
                    <span>{{infoObj?.jgxzStr || "-"}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">负责人:</div>
                <div class="right">
                    <span>{{infoObj?.fzr || "-"}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">统一社会信用代码:</div>
                <div class="right">
                    <span>{{infoObj?.xydm || "-"}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">颁发日期:</div>
                <div class="right">
                    <span>{{infoObj?.issueDateStr || "-"}}</span>
                </div>
            </div>
            <div class="item-box" *ngIf="infoObj?.jgxzStr == '事业单位非法人'">
                <div class="left">有效期至:</div>
                <div class="right">
                    <span>{{infoObj?.endDateStr || "-"}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">联系人:</div>
                <div class="right">
                    <span>{{infoObj?.lxr || "-"}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">联系电话:</div>
                <div class="right">
                    <span>{{infoObj?.lxrsj || "-"}}</span>
                </div>
            </div>
        </ng-container>
    </div>
</ion-content>
