<ion-header>
    <ion-navbar>
        <ion-title>变更登记</ion-title>
    </ion-navbar>
</ion-header>

<ion-content>
    <!--    事业单位-->
    <ng-container *ngIf="type == '1'">
        <ng-container *ngFor="let item of changeMatters">
            <!--      名称变更      -->
            <ng-container *ngIf="item.afterUnitName">
                <div class="table">
                    <table border="1">
                        <thead>
                        <tr>
                            <th colspan="3">
                                名称变更
                            </th>
                        </tr>
                        <tr>
                            <th></th>
                            <th>变更前</th>
                            <th>变更后</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>名称</td>
                            <td>{{item.preUnitName}}</td>
                            <td>{{item.afterUnitName}}</td>
                        </tr>
                        <tr>
                            <td>批文号</td>
                            <td colspan="3">{{item.approvalNumber}}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </ng-container>
            <!--      法定代表人变更      -->
            <ng-container *ngIf="item.afterName">
                <div class="table">
                    <table border="1">
                        <thead>
                        <tr>
                            <th colspan="3">
                                法定代表人变更
                            </th>
                        </tr>
                        <tr>
                            <th></th>
                            <th>变更前</th>
                            <th>变更后</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>名称</td>
                            <td>{{item.preName}}</td>
                            <td>{{item.afterName}}</td>
                        </tr>
                        <tr>
                            <td>批文号</td>
                            <td colspan="3">沪发办发[2019] 31</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </ng-container>
            <!--      住所变更      -->
            <ng-container *ngIf="item.afterNature">
                <div class="table">
                    <table border="1">
                        <thead>
                        <tr>
                            <th colspan="3">
                                住所变更
                            </th>
                        </tr>
                        <tr>
                            <th></th>
                            <th>变更前</th>
                            <th>变更后</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>名称</td>
                            <td>{{item.preResidence}}</td>
                            <td>{{item.afterResidence}}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </ng-container>
            <!--        开办资金变更        -->
            <ng-container *ngIf="item.afterStartFunds">
                <div class="table">
                    <table border="1">
                        <thead>
                        <tr>
                            <th colspan="3">
                                开办资金变更
                            </th>
                        </tr>
                        <tr>
                            <th></th>
                            <th>变更前</th>
                            <th>变更后</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>开办资金</td>
                            <td>{{item.preStartFunds}}</td>
                            <td>{{item.afterStartFunds}}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </ng-container>
            <!--     宗旨和业务范围变更       -->
            <ng-container *ngIf="item.afterRangeChange">
                <div class="table">
                    <table border="1">
                        <thead>
                        <tr>
                            <th colspan="3">
                                宗旨和业务范围变更
                            </th>
                        </tr>
                        <tr>
                            <th></th>
                            <th>变更前</th>
                            <th>变更后</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>举办单位</td>
                            <td>{{item.preRangeChange}}</td>
                            <td>{{item.afterRangeChange}}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </ng-container>
            <!--      举办单位变更      -->
            <ng-container *ngIf="item.afterHostUnit">
                <div class="table">
                    <table border="1">
                        <thead>
                        <tr>
                            <th colspan="3">
                                举办单位变更
                            </th>
                        </tr>
                        <tr>
                            <th></th>
                            <th>变更前</th>
                            <th>变更后</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>举办单位</td>
                            <td>{{item.preHostUnit}}</td>
                            <td>{{item.afterHostUnit}}</td>
                        </tr>
                        <tr>
                            <td>批文号</td>
                            <td colspan="3">{{item.approvalNumber}}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </ng-container>
            <!--      经费来源变更      -->
            <ng-container *ngIf="item.afterFundingSources">
                <div class="table">
                    <table border="1">
                        <thead>
                        <tr>
                            <th colspan="3">
                                经费来源变更
                            </th>
                        </tr>
                        <tr>
                            <th></th>
                            <th>变更前</th>
                            <th>变更后</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>经费来源</td>
                            <td>{{item.preFundingSources}}</td>
                            <td>{{item.afterFundingSources}}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </ng-container>
            <!--      编制数变更      -->
            <ng-container *ngIf="item.afterCompilationNumber">
                <div class="table">
                    <table border="1">
                        <thead>
                        <tr>
                            <th colspan="3">
                                编制数变更
                            </th>
                        </tr>
                        <tr>
                            <th></th>
                            <th>变更前</th>
                            <th>变更后</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>编制数</td>
                            <td>{{item.preCompilationNumber}}</td>
                            <td>{{item.afterCompilationNumber}}</td>
                        </tr>
                        <tr>
                            <td>批文号</td>
                            <td colspan="3">{{item.approvalNumber}}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </ng-container>
        </ng-container>
        <div class="content">
            <div class="item-box">
                <div class="left">变更原因:</div>
                <div class="right">
                    <span>{{changeRecordVO?.changeReasons || '-'}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">联系人:</div>
                <div class="right">
                    <span>{{changeRecordVO?.contacts || '-'}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">联系电话:</div>
                <div class="right">
                    <span>{{changeRecordVO?.contactNumber || '-'}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">手机号码:</div>
                <div class="right">
                    <span>{{changeRecordVO?.phoneNumber || '-'}}</span>
                </div>
            </div>
        </div>
    </ng-container>

    <ng-container *ngIf="type == '2'">
        <ng-container *ngFor="let item of changeBusiness">
            <div class="changeBusiness">
                <!--     机构名称       -->
                <ng-container *ngIf="item.changeOrganizationName">
                    <p>机构名称</p>
                    <div class="item-box">
                        <div class="left">现机构名称:</div>
                        <div class="right">
                            <span>{{item?.nowOrganizationName || '-'}}</span>
                        </div>
                    </div>
                    <div class="item-box">
                        <div class="left">拟变更机构名称:</div>
                        <div class="right">
                            <span>{{item?.changeOrganizationName || '-'}}</span>
                        </div>
                    </div>
                    <div class="item-box">
                        <div class="left">机构名称变更批文:</div>
                        <div class="right">
                            <span>{{item?.organizationApprovals || '-'}}</span>
                        </div>
                    </div>
                </ng-container>
                <!--     负责人       -->
                <ng-container *ngIf="item.changeLeadingCadre">
                    <p>负责人</p>
                    <div class="item-box">
                        <div class="left">现负责人姓名:</div>
                        <div class="right">
                            <span>{{item?.nowLeadingCadre || '-'}}</span>
                        </div>
                    </div>
                    <div class="item-box">
                        <div class="left">拟变更负责人姓名:</div>
                        <div class="right">
                            <span>{{item?.changeLeadingCadre || '-'}}</span>
                        </div>
                    </div>
                    <div class="item-box">
                        <div class="left">现身份证号:</div>
                        <div class="right">
                            <span>{{item?.nowIdentityCard || '-'}}</span>
                        </div>
                    </div>
                    <div class="item-box">
                        <div class="left">拟变更身份证号:</div>
                        <div class="right">
                            <span>{{item?.changeIdentityCard || '-'}}</span>
                        </div>
                    </div>
                    <div class="item-box">
                        <div class="left">负责人任职批文:</div>
                        <div class="right">
                            <span>{{item?.postApproval || '-'}}</span>
                        </div>
                    </div>
                </ng-container>
                <!--     机构性质       -->
                <ng-container *ngIf="item.changeNature && !item.changeAddress">
                    <p>机构性质</p>
                    <div class="item-box">
                        <div class="left">现机构性质:</div>
                        <div class="right">
                            <span>{{item?.nowNature || '-'}}</span>
                        </div>
                    </div>
                    <div class="item-box">
                        <div class="left">拟变更机构地址:</div>
                        <div class="right">
                            <span>{{item?.changeNature || '-'}}</span>
                        </div>
                    </div>

                </ng-container>
                <!--     机构地址       -->
                <ng-container *ngIf="item.changeAddress">
                    <p>机构地址</p>
                    <div class="item-box">
                        <div class="left">现机构地址:</div>
                        <div class="right">
                            <span>{{item?.nowAddress || '-'}}</span>
                        </div>
                    </div>
                    <div class="item-box">
                        <div class="left">拟变更机构地址:</div>
                        <div class="right">
                            <span>{{item?.changeAddress || '-'}}</span>
                        </div>
                    </div>
                    <div class="item-box">
                        <div class="left">现邮编:</div>
                        <div class="right">
                            <span>{{item?.nowPostalCode || '-'}}</span>
                        </div>
                    </div>
                    <div class="item-box">
                        <div class="left">拟变更邮编:</div>
                        <div class="right">
                            <span>{{item?.changePostalCode || '-'}}</span>
                        </div>
                    </div>
                    <div class="item-box">
                        <div class="left">现房屋建筑性质:</div>
                        <div class="right">
                            <span>{{item?.newNature || '-'}}</span>
                        </div>
                    </div>
                    <div class="item-box">
                        <div class="left">拟变更房屋建筑性质:</div>
                        <div class="right">
                            <span>{{item?.changeNature || '-'}}</span>
                        </div>
                    </div>

                </ng-container>
            </div>
        </ng-container>
        <!--     机关群团       -->
        <div class="content">
            <div class="item-box">
                <div class="left">批准机构:</div>
                <div class="right">
                    <span>{{changeBusinessVO?.approvingBody || '-'}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">批准文号:</div>
                <div class="right">
                    <span>{{changeBusinessVO?.approvalNumber || '-'}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">备注（原组织机构代码号）:</div>
                <div class="right">
                    <span>{{changeBusinessVO?.organizationCode || '-'}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">联系人:</div>
                <div class="right">
                    <span>{{changeBusinessVO?.contacts || '-'}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">联系人电话:</div>
                <div class="right">
                    <span>{{changeBusinessVO?.contactNumber || '-'}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">联系人手机号:</div>
                <div class="right">
                    <span>{{changeBusinessVO?.contactMobile || '-'}}</span>
                </div>
            </div>
            <div class="item-box">
                <div class="left">联系人身份证号:</div>
                <div class="right">
                    <span>{{changeBusinessVO?.contactsIDCard || '-'}}</span>
                </div>
            </div>
        </div>
    </ng-container>
</ion-content>
