瀏覽代碼

项目档案

chenc 4 年之前
父節點
當前提交
7dae85a883

+ 4 - 2
src/app/routes/project-manage-archives/add/add.component.html

@@ -2,19 +2,21 @@
   <nz-tabset nzTabPosition="left">
     <!-- 基本信息 -->
     <nz-tab nzTitle="{{'essential.information'|translate}}">
-      <app-project-manage-archives-add-essential-information #essentialInformation>
+      <app-project-manage-archives-add-essential-information #essentialInformation (projectManageArchivesaEntiy)="projectManageArchivesaEntiy($event)">
 
       </app-project-manage-archives-add-essential-information>
     </nz-tab>
     <!-- 商务 -->
     <nz-tab nzTitle="{{'business.affairs'|translate}}">
-      <app-project-manage-archives-add-business-affairs #businessAffairs>
+      <app-project-manage-archives-add-business-affairs #businessAffairs (remittanceInformationChange)="remittanceInformationChange($event)">
 
       </app-project-manage-archives-add-business-affairs>
     </nz-tab>
     <!-- 实施 -->
     <nz-tab nzTitle="{{'implementation'|translate}}">
+      <app-project-manage-archives-add-implementation #implementation>
 
+      </app-project-manage-archives-add-implementation>
     </nz-tab>
     <!-- 开发 -->
     <nz-tab nzTitle="{{'development'|translate}}">

+ 48 - 1
src/app/routes/project-manage-archives/add/add.component.ts

@@ -3,6 +3,8 @@ import { NzModalRef, NzMessageService, NzDrawerRef } from 'ng-zorro-antd';
 import { _HttpClient } from '@delon/theme';
 import { ProjectManageArchivesAddEssentialInformationComponent } from './essential-information/essential-information.component';
 import { ProjectManageArchivesAddBusinessAffairsComponent } from './business-affairs/business-affairs.component';
+import { ProjectManageArchivesAddImplementationComponent } from './implementation/implementation.component';
+import { DictService } from 'app/services/dict.service';
 
 @Component({
   selector: 'app-project-manage-archives-add',
@@ -27,10 +29,12 @@ export class ProjectManageArchivesAddComponent implements OnInit {
   
 
   constructor(
-    private drawerRef:NzDrawerRef
+    private drawerRef:NzDrawerRef,
+    private dictService:DictService
   ) { }
 
   ngOnInit(): void {
+    this.getPlanType();
   }
 
   isLoadingSave=false;//保存加载
@@ -38,6 +42,49 @@ export class ProjectManageArchivesAddComponent implements OnInit {
   @ViewChild('essentialInformation') essentialInformation: ProjectManageArchivesAddEssentialInformationComponent;
   //商务
   @ViewChild('businessAffairs') businessAffairs: ProjectManageArchivesAddBusinessAffairsComponent;
+  //实施
+  @ViewChild('implementation') implementation: ProjectManageArchivesAddImplementationComponent;
+
+  /**
+   * 计划类型查询
+   */
+  getPlanType(){
+    return new Promise((resolve)=>{
+      this.dictService.getByDictCode('plan_type').then(response => {
+        //商务计划类型
+        this.businessAffairs.planList = response.result;
+        resolve();
+      });
+    })
+  }
+
+  /**
+   * 根据类型id回写数据到实施、开发、服务页签的汇款信息
+   * @param data 计划对象
+   */
+  remittanceInformationChange(data){
+    //实施页签
+    if(data.planId==="2"){
+      this.implementation.remittanceInformation=data;
+    }else if(data.planId==="3"){
+
+    }else if(data.planId==="4"){
+
+    }
+  }
+
+  /**
+   * 基本信息的信息回写到其他页签
+   */
+  projectManageArchivesaEntiy(event){
+    //商务
+    this.businessAffairs.projectManageArchives=event;
+    //实施
+    this.implementation.projectManageArchives=event;
+    //开发
+
+    //服务
+  }
 
   save(){
     this.essentialInformation.submitForm();

+ 157 - 46
src/app/routes/project-manage-archives/add/business-affairs/business-affairs.component.html

@@ -4,25 +4,25 @@
     <div nz-col [nzSpan]="6">
       <nz-form-item>
         <nz-form-label [nzSpan]="6">客户编码</nz-form-label>
-        <nz-form-control [nzSm]="18" [nzXs]="24">{{projectManageArchivesa.proCode}}</nz-form-control>
+        <nz-form-control [nzSm]="18" [nzXs]="24">{{projectManageArchives.cusCode}}</nz-form-control>
       </nz-form-item>
     </div>
     <div nz-col [nzSpan]="6">
       <nz-form-item>
         <nz-form-label [nzSpan]="6">客户名称</nz-form-label>
-        <nz-form-control [nzSm]="18" [nzXs]="24">{{projectManageArchivesa.cusName}}</nz-form-control>
+        <nz-form-control [nzSm]="18" [nzXs]="24">{{projectManageArchives.cusName}}</nz-form-control>
       </nz-form-item>
     </div>
     <div nz-col [nzSpan]="6">
       <nz-form-item>
         <nz-form-label [nzSpan]="6">销售经理</nz-form-label>
-        <nz-form-control [nzSm]="18" [nzXs]="24">{{projectManageArchivesa.saleManager}}</nz-form-control>
+        <nz-form-control [nzSm]="18" [nzXs]="24">{{projectManageArchives.saleManager}}</nz-form-control>
       </nz-form-item>
     </div>
     <div nz-col [nzSpan]="6">
       <nz-form-item>
         <nz-form-label [nzSpan]="6">业务员</nz-form-label>
-        <nz-form-control [nzSm]="18" [nzXs]="24">{{projectManageArchivesa.saleMan}}</nz-form-control>
+        <nz-form-control [nzSm]="18" [nzXs]="24">{{projectManageArchives.saleMan}}</nz-form-control>
       </nz-form-item>
     </div>
   </div>
@@ -30,13 +30,13 @@
     <div nz-col [nzSpan]="6">
       <nz-form-item>
         <nz-form-label [nzSpan]="6">项目总金额</nz-form-label>
-        <nz-form-control [nzSm]="18" [nzXs]="24">{{projectManageArchivesa.totalPrice}}</nz-form-control>
+        <nz-form-control [nzSm]="18" [nzXs]="24">{{projectManageArchives.totalPrice}}</nz-form-control>
       </nz-form-item>
     </div>
     <div nz-col [nzSpan]="6">
       <nz-form-item>
         <nz-form-label [nzSpan]="6">已汇款金额</nz-form-label>
-        <nz-form-control [nzSm]="18" [nzXs]="24">{{projectManageArchivesa.proCode}}</nz-form-control>
+        <nz-form-control [nzSm]="18" [nzXs]="24">{{projectManageArchives.proCode}}</nz-form-control>
       </nz-form-item>
     </div>
   </div>
@@ -68,18 +68,18 @@
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                <nz-option *ngFor="let i of planList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>
             <td style="width: 4%;">
-              <nz-input-number [(ngModel)]="data.price1" [nzMin]="1" [nzStep]="1" [nzFormatter]="formatterDollar"
+              <nz-input-number [(ngModel)]="data.price1" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
                 [nzParser]="parserDollar"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId1" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
@@ -87,13 +87,13 @@
             </td>
             <td style="width: 4%;">第二笔</td>
             <td style="width: 4%;">
-              <nz-input-number [(ngModel)]="data.price2" [nzMin]="1" [nzStep]="1" [nzFormatter]="formatterDollar"
+              <nz-input-number [(ngModel)]="data.price2" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
                 [nzParser]="parserDollar"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId2" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
@@ -101,13 +101,13 @@
             </td>
             <td style="width: 4%;">第三笔</td>
             <td style="width: 4%;">
-              <nz-input-number [(ngModel)]="data.price3" [nzMin]="1" [nzStep]="1" [nzFormatter]="formatterDollar"
+              <nz-input-number [(ngModel)]="data.price3" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
                 [nzParser]="parserDollar"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId3" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
@@ -115,13 +115,13 @@
             </td>
             <td style="width: 4%;">第四笔</td>
             <td style="width: 4%;">
-              <nz-input-number [(ngModel)]="data.price4" [nzMin]="1" [nzStep]="1" [nzFormatter]="formatterDollar"
+              <nz-input-number [(ngModel)]="data.price4" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
                 [nzParser]="parserDollar"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId4" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
@@ -129,13 +129,13 @@
             </td>
             <td style="width: 4%;">第五笔</td>
             <td style="width: 4%;">
-              <nz-input-number [(ngModel)]="data.price5" [nzMin]="1" [nzStep]="1" [nzFormatter]="formatterDollar"
+              <nz-input-number [(ngModel)]="data.price5" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
                 [nzParser]="parserDollar"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId5" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
@@ -178,19 +178,19 @@
           <tr *ngFor="let data of basicTable2.data">
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data)">
+                <nz-option *ngFor="let i of planList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>
             <td style="width: 4%;">
-              <nz-input-number [(ngModel)]="data.price1" [nzMin]="1" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar"></nz-input-number>
+              <nz-input-number [(ngModel)]="data.price1" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
+                [nzParser]="parserDollar"  ></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId1" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="getRemittanceInformationChange(data)">
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
@@ -198,13 +198,13 @@
             </td>
             <td style="width: 4%;">第二笔</td>
             <td style="width: 4%;">
-              <nz-input-number [(ngModel)]="data.price2" [nzMin]="1" [nzStep]="1" [nzFormatter]="formatterDollar"
+              <nz-input-number [(ngModel)]="data.price2" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
                 [nzParser]="parserDollar"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId2" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="getRemittanceInformationChange(data)">
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
@@ -212,13 +212,13 @@
             </td>
             <td style="width: 4%;">第三笔</td>
             <td style="width: 4%;">
-              <nz-input-number [(ngModel)]="data.price3" [nzMin]="1" [nzStep]="1" [nzFormatter]="formatterDollar"
+              <nz-input-number [(ngModel)]="data.price3" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
                 [nzParser]="parserDollar"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId3" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="getRemittanceInformationChange(data)">
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
@@ -226,13 +226,13 @@
             </td>
             <td style="width: 4%;">第四笔</td>
             <td style="width: 4%;">
-              <nz-input-number [(ngModel)]="data.price4" [nzMin]="1" [nzStep]="1" [nzFormatter]="formatterDollar"
+              <nz-input-number [(ngModel)]="data.price4" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
                 [nzParser]="parserDollar"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId4" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="getRemittanceInformationChange(data)">
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
@@ -240,13 +240,13 @@
             </td>
             <td style="width: 4%;">第五笔</td>
             <td style="width: 4%;">
-              <nz-input-number [(ngModel)]="data.price5" [nzMin]="1" [nzStep]="1" [nzFormatter]="formatterDollar"
+              <nz-input-number [(ngModel)]="data.price5" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
                 [nzParser]="parserDollar"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId5" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="getRemittanceInformationChange(data)">
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
@@ -290,18 +290,18 @@
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                <nz-option *ngFor="let i of planList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>
             <td style="width: 4%;">
-              <nz-input-number [(ngModel)]="data.price1" [nzMin]="1" [nzStep]="1" [nzFormatter]="formatterDollar"
+              <nz-input-number [(ngModel)]="data.price1" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
                 [nzParser]="parserDollar"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId1" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
@@ -309,13 +309,13 @@
             </td>
             <td style="width: 4%;">第二笔</td>
             <td style="width: 4%;">
-              <nz-input-number [(ngModel)]="data.price2" [nzMin]="1" [nzStep]="1" [nzFormatter]="formatterDollar"
+              <nz-input-number [(ngModel)]="data.price2" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
                 [nzParser]="parserDollar"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId2" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
@@ -323,13 +323,13 @@
             </td>
             <td style="width: 4%;">第三笔</td>
             <td style="width: 4%;">
-              <nz-input-number [(ngModel)]="data.price3" [nzMin]="1" [nzStep]="1" [nzFormatter]="formatterDollar"
+              <nz-input-number [(ngModel)]="data.price3" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
                 [nzParser]="parserDollar"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId3" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
@@ -337,13 +337,13 @@
             </td>
             <td style="width: 4%;">第四笔</td>
             <td style="width: 4%;">
-              <nz-input-number [(ngModel)]="data.price4" [nzMin]="1" [nzStep]="1" [nzFormatter]="formatterDollar"
+              <nz-input-number [(ngModel)]="data.price4" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
                 [nzParser]="parserDollar"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId4" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
@@ -351,13 +351,13 @@
             </td>
             <td style="width: 4%;">第五笔</td>
             <td style="width: 4%;">
-              <nz-input-number [(ngModel)]="data.price5" [nzMin]="1" [nzStep]="1" [nzFormatter]="formatterDollar"
+              <nz-input-number [(ngModel)]="data.price5" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
                 [nzParser]="parserDollar"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId5" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false">
-                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
@@ -370,4 +370,115 @@
       </nz-table>
     </div>
   </div>
+</nz-card>
+
+
+<!-- 付款情况 -->
+<nz-card nzTitle="付款情况" nzSize="small">
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="24">
+      <!-- 新增按钮 -->
+      <button (click)="paymentStatusAdd()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
+    </div>
+  </div>
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="24">
+      <nz-table style="padding-top: 5px;" nzSize="small" class="tableTdPadding" #basicTable4
+        [nzData]="paymentStatusList" [nzFrontPagination]="false" [nzShowPagination]="false"
+        [nzScroll]="{x:'123vw'}">
+        <!-- <thead>
+          <tr>
+            <th>{{ 'customer.contacts.name' | translate }}</th>
+            <th>{{ 'customer.contacts.telephone' | translate }}</th>
+            <th>{{ 'customer.contacts.mail' | translate }}</th>
+            <th>{{ 'customer.is.it.default' | translate }}</th>
+            <th>{{ 'customer.contacts.client.address' | translate }}</th>
+            <th>{{ 'table.operation' | translate }}</th>
+          </tr>
+        </thead> -->
+        <tbody>
+          <tr *ngFor="let data of basicTable4.data">
+            <td style="width: 7%;">
+              <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
+                [nzDropdownMatchSelectWidth]="false">
+                <nz-option *ngFor="let i of planList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
+              </nz-select>
+            </td>
+            <td style="width: 4%;">第一笔</td>
+            <td style="width: 4%;">
+              <nz-input-number [(ngModel)]="data.price1" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
+                [nzParser]="parserDollar"></nz-input-number>
+            </td>
+            <td style="width: 5%;">
+              <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId1" nzPlaceHolder="请选择"
+                [nzDropdownMatchSelectWidth]="false">
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
+              </nz-select>
+            </td>
+            <td style="width: 5%;">
+              <input [(ngModel)]="data.desc1" nz-input />
+            </td>
+            <td style="width: 4%;">第二笔</td>
+            <td style="width: 4%;">
+              <nz-input-number [(ngModel)]="data.price2" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
+                [nzParser]="parserDollar"></nz-input-number>
+            </td>
+            <td style="width: 5%;">
+              <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId2" nzPlaceHolder="请选择"
+                [nzDropdownMatchSelectWidth]="false">
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
+              </nz-select>
+            </td>
+            <td style="width: 5%;">
+              <input [(ngModel)]="data.desc2" nz-input />
+            </td>
+            <td style="width: 4%;">第三笔</td>
+            <td style="width: 4%;">
+              <nz-input-number [(ngModel)]="data.price3" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
+                [nzParser]="parserDollar"></nz-input-number>
+            </td>
+            <td style="width: 5%;">
+              <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId3" nzPlaceHolder="请选择"
+                [nzDropdownMatchSelectWidth]="false">
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
+              </nz-select>
+            </td>
+            <td style="width: 5%;">
+              <input [(ngModel)]="data.desc3" nz-input />
+            </td>
+            <td style="width: 4%;">第四笔</td>
+            <td style="width: 4%;">
+              <nz-input-number [(ngModel)]="data.price4" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
+                [nzParser]="parserDollar"></nz-input-number>
+            </td>
+            <td style="width: 5%;">
+              <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId4" nzPlaceHolder="请选择"
+                [nzDropdownMatchSelectWidth]="false">
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
+              </nz-select>
+            </td>
+            <td style="width: 5%;">
+              <input [(ngModel)]="data.desc4" nz-input />
+            </td>
+            <td style="width: 4%;">第五笔</td>
+            <td style="width: 4%;">
+              <nz-input-number [(ngModel)]="data.price5" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
+                [nzParser]="parserDollar"></nz-input-number>
+            </td>
+            <td style="width: 5%;">
+              <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId5" nzPlaceHolder="请选择"
+                [nzDropdownMatchSelectWidth]="false">
+                <nz-option *ngFor="let i of milestoneList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
+              </nz-select>
+            </td>
+            <td style="width: 5%;">
+              <input [(ngModel)]="data.desc5" nz-input />
+            </td>
+            <td nzRight="0"><a nz-popconfirm nzTitle="是否删除?"
+              (nzOnConfirm)="paymentStatusDelete(data.sort)">{{'table.delete'|translate}}</a></td>
+          </tr>
+        </tbody>
+      </nz-table>
+    </div>
+  </div>
 </nz-card>

+ 55 - 3
src/app/routes/project-manage-archives/add/business-affairs/business-affairs.component.ts

@@ -1,4 +1,4 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, Output, EventEmitter } from '@angular/core';
 import { NzModalRef, NzMessageService } from 'ng-zorro-antd';
 import { _HttpClient } from '@delon/theme';
 import { ProjectManageArchives } from 'app/entity/project-manage-archives/project-manage-archives';
@@ -18,10 +18,11 @@ export class ProjectManageArchivesAddBusinessAffairsComponent implements OnInit
     
   }
 
-  projectManageArchivesa:ProjectManageArchives={}//项目档案实体对象
+  projectManageArchives:ProjectManageArchives={}//项目档案实体对象
   collectionPlanList=[];//收款计划数据
   paymentCollectionList=[];//回款情况数据
   paymentPlanList=[];//付款计划
+  paymentStatusList=[];//付款情况
   planList=[];//计划下来集合数据
   formatterDollar = (value: number) => `$ ${value}`;
   parserDollar = (value: string) => value.replace('$ ', '');
@@ -106,7 +107,58 @@ export class ProjectManageArchivesAddBusinessAffairsComponent implements OnInit
    * 付款计划删除按钮
    */
   paymentPlanDelete(sort){
-    this.paymentCollectionList = this.paymentCollectionList.filter(d => d.sort !== sort);
+    this.paymentPlanList = this.paymentPlanList.filter(d => d.sort !== sort);
   }
+
+
+  /**
+   * 付款情况
+   */
+  paymentStatusSort=0;
+  paymentStatusAdd(){
+    this.paymentStatusList = [
+      ...this.paymentStatusList,
+      {
+        price1:0,
+        price2:0,
+        price3:0,
+        price4:0,
+        price5:0,
+        sort:this.paymentPlanSort,
+        planType:"3"
+      },
+    ];
+    this.paymentPlanSort++;
+  }
+
+  /**
+   * 付款情况删除按钮
+   */
+  paymentStatusDelete(sort){
+    this.paymentStatusList = this.paymentStatusList.filter(d => d.sort !== sort);
+  }
+
   
+  /**
+   * 类型触发事件
+   */
+  planIdChange(data){
+    //获取类型名称
+    this.planList.forEach(element => {
+      if(element.value===data.planId){
+        data.planName=element.text;
+      }
+    });
+    //回写数据到实施、开发、服务页签的回款信息
+    this.getRemittanceInformationChange(data);
+  }
+
+  /**
+   * 回写数据到实施、开发、服务页签的回款信息
+   * @param 对象
+   */
+  @Output() remittanceInformationChange= new EventEmitter<{}>();
+  getRemittanceInformationChange(data){
+    this.remittanceInformationChange.emit(data)
+  }
 }

+ 14 - 9
src/app/routes/project-manage-archives/add/essential-information/essential-information.component.html

@@ -5,10 +5,14 @@
       <nz-form-item>
         <nz-form-label [nzSpan]="'vertical' ? 24 : null" nzRequired>项目编码</nz-form-label>
         <nz-form-control [nzSm]="24" [nzXs]="24">
-          <nz-select style="widows: 100%;" nzShowSearch nzAllowClear formControlName="proId" id="proId"
+          <!-- <nz-select style="widows: 100%;" nzShowSearch nzAllowClear formControlName="proId" id="proId"
             [(ngModel)]="projectManageArchivesa.proId" nzPlaceHolder="请选择">
             <nz-option *ngFor="let i of proList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
-          </nz-select>
+          </nz-select> -->
+          <nz-tree-select style="width: 100%" [nzNodes]="proList" nzShowSearch [nzMultiple]="false"
+            formControlName="proId" id="proId" nzPlaceHolder="请选择" [(ngModel)]="projectManageArchivesa.proId"
+            [nzMaxTagCount]="3" [nzAllowClear]="true" (ngModelChange)="proChange($event)">
+          </nz-tree-select>
           <nz-form-explain *ngIf="validateForm.get('proId')?.dirty && validateForm.get('proId')?.errors">
             请选择项目
           </nz-form-explain>
@@ -28,8 +32,8 @@
         <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24">客户编码</nz-form-label>
         <nz-form-control [nzSm]="24" [nzXs]="24">
           <nz-select style="widows: 100%;" nzShowSearch nzAllowClear formControlName="cusId" id="cusId"
-            [(ngModel)]="projectManageArchivesa.cusId" nzPlaceHolder="请选择">
-            <nz-option *ngFor="let i of cusList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
+            [(ngModel)]="projectManageArchivesa.cusId" nzPlaceHolder="请选择" (ngModelChange)="cusChange($event)">
+            <nz-option *ngFor="let i of cusList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
           </nz-select>
           <nz-form-explain *ngIf="validateForm.get('cusId')?.dirty && validateForm.get('cusId')?.errors">
             请选择客户
@@ -52,7 +56,8 @@
         <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24" nzRequired>项目总金额</nz-form-label>
         <nz-form-control [nzSm]="24" [nzXs]="24">
           <nz-input-number [(ngModel)]="projectManageArchivesa.totalPrice" formControlName="totalPrice" id="totalPrice"
-            [nzMin]="1" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar"></nz-input-number>
+            [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar"
+            (keyup)="getProjectManageArchivesa()"></nz-input-number>
         </nz-form-control>
         <nz-form-explain *ngIf="validateForm.get('totalPrice')?.dirty && validateForm.get('totalPrice')?.errors">
           请输入项目总金额
@@ -65,10 +70,10 @@
       <nz-form-item>
         <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24">销售经理</nz-form-label>
         <nz-form-control [nzSm]="24" [nzXs]="24">
-          <nz-select style="widows: 100%;" nzShowSearch nzAllowClear formControlName="saleManagerId" id="saleManagerId"
-            [(ngModel)]="projectManageArchivesa.saleManagerId" nzPlaceHolder="请选择">
-            <nz-option *ngFor="let i of personnelList" [nzValue]="i.id" [nzLabel]="i.code"></nz-option>
-          </nz-select>
+          <nz-tree-select style="width: 100%" [nzNodes]="personnelList" nzShowSearch [nzMultiple]="false"
+            formControlName="saleManagerId" id="saleManagerId" nzPlaceHolder="请选择"
+            [(ngModel)]="projectManageArchivesa.saleManagerId" [nzMaxTagCount]="3" [nzAllowClear]="true">
+          </nz-tree-select>
         </nz-form-control>
       </nz-form-item>
     </div>

+ 108 - 25
src/app/routes/project-manage-archives/add/essential-information/essential-information.component.ts

@@ -1,19 +1,26 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, Output, EventEmitter } from '@angular/core';
 import { NzModalRef, NzMessageService } from 'ng-zorro-antd';
 import { _HttpClient } from '@delon/theme';
 import { Validators, FormGroup, FormBuilder } from '@angular/forms';
 import { ProjectManageArchives } from 'app/entity/project-manage-archives/project-manage-archives';
+import { BaseArchivesProjectApproval } from 'app/entity/basedata/base-archives-project-approval';
+import { BaseArchivesProjectApprovalService } from 'app/services/basedata/base-archives-project-approval.service';
+import { Customer } from 'app/entity/basedata/customer';
+import { CustomerService } from 'app/services/basedata/customer.service';
+import { PersonnelService } from 'app/services/basedata/personnel.service';
+import { recursiveQuery } from '@shared/utils/yuan copy';
 
 @Component({
   selector: 'app-project-manage-archives-add-essential-information',
   templateUrl: './essential-information.component.html',
 })
 export class ProjectManageArchivesAddEssentialInformationComponent implements OnInit {
-  
-
   constructor(
-    private fb: FormBuilder
-  ) { }
+    private fb: FormBuilder,
+    private baseArchivesProjectApprovalService: BaseArchivesProjectApprovalService,
+    private customerService: CustomerService,
+    private personnelService:PersonnelService
+  ) {}
 
   ngOnInit(): void {
     //初始化表单
@@ -21,38 +28,114 @@ export class ProjectManageArchivesAddEssentialInformationComponent implements On
       proId: [null, [Validators.required]],
       cusId: [null, [Validators.required]],
       totalPrice: [null, [Validators.required]],
-      saleManagerId:[null],
-      saleManIds:[null],
-      impManagerId:[null],
-      impConsultantIds:[null],
-      deManagerId:[null],
-      deEngineerIds:[null],
-      seManagerId:[null],
-      seEngineerIds:[null]
+      saleManagerId: [null],
+      saleManIds: [null],
+      impManagerId: [null],
+      impConsultantIds: [null],
+      deManagerId: [null],
+      deEngineerIds: [null],
+      seManagerId: [null],
+      seEngineerIds: [null],
     });
+    this.getProList();
+    this.getCusList();
+    this.getPersonnelList();
   }
 
   validateForm!: FormGroup;
-  projectManageArchivesa:ProjectManageArchives={
-    totalPrice:0
-  };//项目档案主表对象
-  proList=[];//项目立项档案数据集合
-  cusList=[];//客户档案数据集合
+  projectManageArchivesa: ProjectManageArchives = {
+    totalPrice: 0,
+  }; //项目档案主表对象
+  proList: any = []; //项目立项档案数据集合
+  cusList = []; //客户档案数据集合
   //金额格式化
   formatterDollar = (value: number) => `$ ${value}`;
   parserDollar = (value: string) => value.replace('$ ', '');
-  saleManIds=[];//业务员id绑定
-  personnelList=[];//人员下拉数据
-  impConsultantIds=[];//实施顾问下拉选择绑定
-  deEngineerIds=[];//开发工程师下拉选择绑定
-  seEngineerIds=[];//服务工程师下拉选择绑定
+  saleManIds = []; //业务员id绑定
+  personnelList = []; //人员下拉数据
+  impConsultantIds = []; //实施顾问下拉选择绑定
+  deEngineerIds = []; //开发工程师下拉选择绑定
+  seEngineerIds = []; //服务工程师下拉选择绑定
+
+  /**
+   * 查询项目立项
+   */
+  getProList() {
+    return new Promise(resolve => {
+      let baseArchivesProjectApproval = new BaseArchivesProjectApproval();
+      baseArchivesProjectApproval.pkOrg = sessionStorage.getItem('pkOrg');
+      this.baseArchivesProjectApprovalService.getTreeList(baseArchivesProjectApproval).then(response => {
+        this.proList = response.result;
+        resolve();
+      });
+    });
+  }
+
+  /**
+   * 项目立项选择事件
+   * @param event 立项id
+   */
+  proChange(event) {
+    this.proList.forEach(element => {
+      if (event === element.id) {
+        this.projectManageArchivesa.proCode = element.code;
+        this.projectManageArchivesa.proName = element.title;
+      }
+    });
+  }
+
+  /**
+   * 客户档案数据
+   */
+  getCusList() {
+    return new Promise(resolve => {
+      let customer = new Customer();
+      customer.pkOrg = sessionStorage.getItem('pkOrg');
+      customer.pageSize = 20000;
+      this.customerService.getCustomer1(customer).then(response => {
+        this.cusList = response.result.records;
+        resolve();
+      });
+    });
+  }
 
-  submitForm(){
+  /**
+   * 客户档案选择事件
+   */
+  cusChange(event){
+    this.cusList.forEach(element => {
+      if(event===element.id){
+        this.projectManageArchivesa.cusCode=element.code;
+        this.projectManageArchivesa.cusName=element.name;
+      }
+    });
+    this.getProjectManageArchivesa();
+  }
+
+  /**
+   * 人员下拉查询
+   */
+  getPersonnelList(){
+    return new Promise(resolve => {
+      this.personnelService.queryApprover(sessionStorage.getItem("pkOrg")).then(response => {
+        this.personnelList = JSON.parse(JSON.stringify(response.result));
+        recursiveQuery(this.personnelList);
+        resolve();
+      });
+    });
+  }
+
+  //基本信息回写到其他页签
+  @Output() projectManageArchivesaEntiy= new EventEmitter<{}>();
+  getProjectManageArchivesa(){
+    this.projectManageArchivesaEntiy.emit(this.projectManageArchivesa);
+  }
+
+  submitForm() {
     for (const i in this.validateForm.controls) {
       this.validateForm.controls[i].markAsDirty();
       this.validateForm.controls[i].updateValueAndValidity();
     }
     let valid = this.validateForm.valid;
   }
-
 }

+ 130 - 14
src/app/routes/project-manage-archives/add/implementation/implementation.component.html

@@ -1,14 +1,130 @@
-<div class="modal-header">
-  <div class="modal-title">查看 {{ record.id }} 信息</div>
-</div>
-<nz-spin *ngIf="!i" class="modal-spin"></nz-spin>
-<div sv-container *ngIf="i">
-  <sv label="姓名">{{ i.owner }}</sv>
-  <sv label="会员卡号">32943898021309809423</sv>
-  <sv label="身份证">3321944288191034921</sv>
-  <sv label="联系方式">18112345678</sv>
-  <sv label="联系地址">曲丽丽 18100000000 浙江省杭州市西湖区黄姑山路工专路交叉路口</sv>
-</div>
-<div class="modal-footer">
-  <button nz-button type="button" (click)="close()">关闭</button>
-</div>
+<!-- 商务 -->
+<form nz-form>
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="6">客户编码</nz-form-label>
+        <nz-form-control [nzSm]="18" [nzXs]="24">{{projectManageArchives.proCode}}</nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="6">客户名称</nz-form-label>
+        <nz-form-control [nzSm]="18" [nzXs]="24">{{projectManageArchives.cusName}}</nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="6">实施经理</nz-form-label>
+        <nz-form-control [nzSm]="18" [nzXs]="24">{{projectManageArchives.impManager}}</nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="6">实施顾问</nz-form-label>
+        <nz-form-control [nzSm]="18" [nzXs]="24">{{projectManageArchives.impConsultant}}</nz-form-control>
+      </nz-form-item>
+    </div>
+  </div>
+</form>
+
+<!-- 汇款信息 -->
+<nz-card nzTitle="汇款信息" nzSize="small">
+  <nz-table nzBordered nzSize="small" [nzNoResult]="' '" [nzShowPagination]="false">
+    <tbody>
+      <tr>
+        <td><strong>实施金额</strong></td>
+        <td>第一笔</td>
+        <td>{{remittanceInformation.price1}}</td>
+        <td>第二笔</td>
+        <td>{{remittanceInformation.price2}}</td>
+        <td>第三笔</td>
+        <td>{{remittanceInformation.price3}}</td>
+        <td>第四笔</td>
+        <td>{{remittanceInformation.price4}}</td>
+        <td>第五笔</td>
+        <td>{{remittanceInformation.price5}}</td>
+      </tr>
+      <tr>
+        <td><strong>实际回款</strong></td>
+        <td>{{remittanceInformation.milestone1}}</td>
+        <td>{{remittanceInformation.desc1}}</td>
+        <td>{{remittanceInformation.milestone2}}</td>
+        <td>{{remittanceInformation.desc2}}</td>
+        <td>{{remittanceInformation.milestone3}}</td>
+        <td>{{remittanceInformation.desc3}}</td>
+        <td>{{remittanceInformation.milestone4}}</td>
+        <td>{{remittanceInformation.desc4}}</td>
+        <td>{{remittanceInformation.milestone5}}</td>
+        <td>{{remittanceInformation.desc5}}</td>
+      </tr>
+    </tbody>
+  </nz-table>
+</nz-card>
+
+<!-- 实施计划 -->
+<nz-card nzTitle="实施计划" nzSize="small">
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="24">
+      <!-- 新增按钮 -->
+      <button (click)="addParent()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
+    </div>
+  </div>
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="24">
+      <nz-table style="padding-top: 5px;" nzSize="small" class="tableTdPadding" #expandTable [nzData]="listOfMapData"
+        nzTableLayout="fixed" [nzShowPagination]="false" [nzFrontPagination]="false">
+        <thead>
+          <tr>
+            <th style="width: 10%;">里程碑</th>
+            <th style="width: 20%;">开始时间</th>
+            <th style="width: 20%;">结束时间</th>
+            <th style="width: 10%;">计划人天</th>
+            <th style="width: 20%;">执行人</th>
+            <th style="width: 10%;">实际人天</th>
+            <th style="width: 10%;">操作</th>
+          </tr>
+        </thead>
+        <tbody>
+          <ng-container *ngFor="let data of expandTable.data">
+            <ng-container *ngFor="let item of mapOfExpandedData[data.key]">
+
+
+              <tr *ngIf="(item.parent && item.parent.expand) || !item.parent">
+                <td [nzIndentSize]="item.level! * 20" [nzShowExpand]="!!item.children" [(nzExpand)]="item.expand"
+                  (nzExpandChange)="collapse(mapOfExpandedData[data.key], item, $event)">
+                  {{ item.muilesId }}
+                </td>
+                <td>
+                  <nz-date-picker [(ngModel)]="item.startDate"></nz-date-picker>
+                </td>
+                <td>
+                  <nz-date-picker [(ngModel)]="item.endDate"></nz-date-picker>
+                </td>
+                <td>
+                  <nz-input-number [(ngModel)]="item.planTime" [nzMin]="0" [nzStep]="1"></nz-input-number>
+                </td>
+                <td>
+                  <nz-select style="width: 100%;" [nzMaxTagCount]="3" nzMode="multiple" nzPlaceHolder="请选择"
+                    [(ngModel)]="item.executor">
+                    <nz-option *ngFor="let item of personnelList" [nzLabel]="item.id" [nzValue]="item.name"></nz-option>
+                  </nz-select>
+                </td>
+                <td>
+                  <nz-input-number [(ngModel)]="item.realTime" [nzMin]="0" [nzStep]="1"></nz-input-number>
+                </td>
+                <td>
+                  <a (click)="addChild(item.key)">{{ 'button.leve.lower' | translate }}</a>
+                  <nz-divider nzType="vertical"></nz-divider>
+                  <a nz-popconfirm nzTitle="{{'isdelete'|translate}}" nzOkText="{{ 'yes' | translate }}"
+                    nzCancelText="{{ 'no' | translate }}"
+                    (nzOnConfirm)="deleteRow(mapOfExpandedData[data.key],item,item.key)">{{ 'milestone.delete' | translate }}</a>
+                </td>
+              </tr>
+            </ng-container>
+          </ng-container>
+        </tbody>
+      </nz-table>
+    </div>
+  </div>
+</nz-card>

+ 230 - 8
src/app/routes/project-manage-archives/add/implementation/implementation.component.ts

@@ -1,26 +1,248 @@
 import { Component, OnInit } from '@angular/core';
 import { NzModalRef, NzMessageService } from 'ng-zorro-antd';
 import { _HttpClient } from '@delon/theme';
+import { ProjectManageArchives } from 'app/entity/project-manage-archives/project-manage-archives';
+import { ProjectNodeTree } from '../../project-node-tree';
 
 @Component({
   selector: 'app-project-manage-archives-add-implementation',
   templateUrl: './implementation.component.html',
 })
 export class ProjectManageArchivesAddImplementationComponent implements OnInit {
-  record: any = {};
-  i: any;
+  
 
   constructor(
-    private modal: NzModalRef,
-    public msgSrv: NzMessageService,
-    public http: _HttpClient
+    
   ) { }
 
   ngOnInit(): void {
-    this.http.get(`/user/${this.record.id}`).subscribe(res => this.i = res);
+    this.getTreeList();
   }
+  
 
-  close() {
-    this.modal.destroy();
+  projectManageArchives:ProjectManageArchives={};//项目档案主表实体
+  listOfMapData=[];//树形集合
+  personnelList=[];//人员下拉列表
+  remittanceInformation:any={};//回款信息实体
+
+
+  /**
+   * 获取树形集合
+   */
+  getTreeList() {
+    // this.baseArchivesMilestone.pkOrg=sessionStorage.getItem("pkOrg");//组织
+    // this.baseArchivesMilestoneService.getTreeList(this.baseArchivesMilestone).then((response)=>{
+    //   this.listOfMapData=response.result
+    //   this.getLoding();
+    // })
+
+    this.listOfMapData = [
+      {
+        key: `1`,
+        id:"1",
+        muilesId: '001',
+        parentId:"0",
+        children: [
+          {
+            key: `1-1`,
+            id:"1-1",
+            muilesId: '001',
+            parentId:"1",
+            children:null
+          },
+        ],
+      },
+      {
+        key: `2`,
+        id:"2",
+        parentId:"0",
+        muilesId: '002',
+        children:null
+      }
+    ];
+    this.getLoding();
+  }
+
+  /**
+   * 初始化树形
+   */
+  getLoding(){
+    this.listOfMapData.forEach(item => {
+      this.mapOfExpandedData[item.key] = this.convertTreeToList(item);
+    });
+  }
+
+  /**
+   * 新增父级
+   */
+  //uuid
+  S4() {
+    return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
+  };
+  guid() {
+    return (this.S4() + this.S4() + this.S4() + this.S4() + this.S4() + this.S4() + this.S4() + this.S4());
+  };
+  // 随机数
+  add() {
+    return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
+  };
+  adding() {
+    return (this.add() + this.add() + this.add() + this.add() + this.add() + this.add() + this.add() + this.add());
+  };
+  addParent(){
+    this.listOfMapData=[
+      ...this.listOfMapData,
+      {key:this.adding()}
+    ]
+    // this.getLoding();
+    this.initialValue();
+  }
+
+  /**
+   * 新增子集
+   * @param parentId 父级id
+   * @param data 操作对象
+   */
+  addChild(parentId){
+    this.getChild(this.listOfMapData, parentId);
+    this.initialValue();
+  }
+
+  /**
+   * 递归查询子集增加
+   */
+  getChild(children, parentId) {
+    var keyId = this.adding();
+    children.forEach(element => {
+      // 是否和点击的数据相等
+      // 相等则在此条数据加子数据
+      if (element.id == parentId) {
+        // 是否存在自数据不存在则创建child
+        if (element.children == null) {
+          element.children = []
+        }
+        // 添加一条空的子数据到child
+        element.children = [
+          ...element.children,
+          { key: keyId, parentId: parentId}
+        ]
+        // this.mapOfExpandedData[element.key] = this.convertTreeToList(null);
+        // this.initialValue();
+      } else {
+        if (element.children != null) {
+          this.getChild(element.children, parentId);
+        }
+      }
+    });
+  }
+
+ /**
+   * 删除行
+   */
+  deleteRow(array: ProjectNodeTree[], data: ProjectNodeTree, key){
+    this.getdeleteRow(key, this.listOfMapData);
+    this.initialValue()
+  }
+
+  /**
+   * 递归删除
+   * @param itemsId 对象id
+   * @param list 需要删除对象的集合
+   * @param parent 父级对象
+   */
+  getdeleteRow(itemsId: string, list?: any,parent?:any) {
+    list.forEach((element, i) => {
+      //判断选中得数据是否有找到
+      if (element.key == itemsId) {
+        //找到则先判断对象是否有子集,有则删除
+        if (element.children != null && element.children.length > 0) {
+          element.children.splice(0, element.children.length);
+        }
+        //然后删除父极对象
+        list.splice(i, 1);
+        //判断父极是否存在子集
+        if (list.length == 0&&parent) {
+          parent.children = null;
+        }
+        this.listOfMapData=[
+          ...this.listOfMapData
+        ]
+        // this.getDataInitialization2();
+        // this.initialValue();
+      } else {
+        //没有则判断是否有子集 有则递归同样判断
+        if (element.children != null && element.children.length > 0) {
+          this.getdeleteRow(itemsId, element.children,element);
+        }
+      }
+    });
+  }
+
+
+
+  initialValue(){
+    this.listOfMapData.forEach(item => {
+      const data = this.mapOfExpandedData[item.key];
+      this.mapOfExpandedData[item.key] = this.convertTreeToList(item);
+      const mapData = this.mapOfExpandedData[item.key];
+      if (data && mapData) {
+        mapData.forEach(el => {
+          data.forEach(element => {
+            if (element.key === el.key) {
+              el.muilesId = element.muilesId;
+              el.muilesName = element.muilesName;
+              el.startDate = element.startDate;
+              el.endDate = element.endDate;
+              el.planTime = element.planTime;
+              el.executor = element.executor;
+              el.realTime = element.realTime;
+            }
+          })
+        })
+      }
+    });
+  }
+
+  ///////////////////////////树形配置
+  mapOfExpandedData: { [key: string]: ProjectNodeTree[] } = {};
+
+  collapse(array: ProjectNodeTree[], data: ProjectNodeTree, $event: boolean): void {
+    if (!$event) {
+      if (data.children) {
+        data.children.forEach(d => {
+          const target = array.find(a => a.key === d.key)!;
+          target.expand = false;
+          this.collapse(array, target, false);
+        });
+      } else {
+        return;
+      }
+    }
+  }
+
+  convertTreeToList(root: ProjectNodeTree): ProjectNodeTree[] {
+    const stack: ProjectNodeTree[] = [];
+    const array: ProjectNodeTree[] = [];
+    const hashMap = {};
+    stack.push({ ...root, level: 0, expand: true });
+
+    while (stack.length !== 0) {
+      const node = stack.pop()!;
+      this.visitNode(node, hashMap, array);
+      if (node.children) {
+        for (let i = node.children.length - 1; i >= 0; i--) {
+          stack.push({ ...node.children[i], level: node.level! + 1, expand: true, parent: node });
+        }
+      }
+    }
+
+    return array;
+  }
+
+  visitNode(node: ProjectNodeTree, hashMap: { [key: string]: boolean }, array: ProjectNodeTree[]): void {
+    if (!hashMap[node.key]) {
+      hashMap[node.key] = true;
+      array.push(node);
+    }
   }
 }

+ 18 - 0
src/app/routes/project-manage-archives/project-node-tree.ts

@@ -0,0 +1,18 @@
+export interface ProjectNodeTree {
+    key: string;
+    code: string;
+    name?: string;
+    type?: string;
+    expand?: boolean;
+    children?: ProjectNodeTree[];
+    parent?: ProjectNodeTree;
+    level?: number;
+    muilesId?:string;
+    muilesName?:string;
+    startDate?:string;
+    endDate?:string;
+    planTime?:string;
+    executor?:[];
+    realTime?:string;
+    parentId?:string;
+  }

+ 2 - 2
src/app/services/basedata/personnel.service.ts

@@ -56,8 +56,8 @@ export class PersonnelService {
   }
 
   //查询审批人员信息
-  async queryApprover(): Promise<BaseResponse<any>> {
-    return await this.http.get<BaseResponse<any>>('basedata/fdPersonnel/queryApprover').toPromise();
+  async queryApprover(pkOrg:string): Promise<BaseResponse<any>> {
+    return await this.http.get<BaseResponse<any>>('basedata/fdPersonnel/queryApprover',{params:{pkOrg:pkOrg}}).toPromise();
   }
 
   //自写修改

+ 27 - 0
src/app/shared/utils/yuan copy.ts

@@ -0,0 +1,27 @@
+import { formatNumber } from '@angular/common';
+
+/**
+ * @description: 格式化
+ * @param {type} 
+ * @author: 
+ */
+export function yuan(value: any): string {
+  if (value) {
+    return formatNumber(value, 'en_US', '1.2-2');
+  }
+}
+
+/**
+ * @description: 递归查询
+ * @param {type} 
+ * @author: 
+ */
+export function recursiveQuery(data: any): string {
+  data.forEach(element => {
+    if (element.children && element.children.length > 0) {
+      element.disabled = true;
+      recursiveQuery(element.children);
+    }
+  });
+  return data;
+}