Browse Source

详情 报表

chenc 4 năm trước cách đây
mục cha
commit
feb0e4fa21
57 tập tin đã thay đổi với 2302 bổ sung117 xóa
  1. 2 0
      src/app/routes/basedata/base-archives-collection-line/base-archives-collection-line.component.html
  2. 25 0
      src/app/routes/basedata/base-archives-collection-line/base-archives-collection-line.component.ts
  3. 12 0
      src/app/routes/basedata/base-archives-collection-line/view/view.component.html
  4. 24 0
      src/app/routes/basedata/base-archives-collection-line/view/view.component.spec.ts
  5. 38 0
      src/app/routes/basedata/base-archives-collection-line/view/view.component.ts
  6. 2 0
      src/app/routes/basedata/base-archives-cost/base-archives-cost.component.html
  7. 25 0
      src/app/routes/basedata/base-archives-cost/base-archives-cost.component.ts
  8. 12 0
      src/app/routes/basedata/base-archives-cost/view/view.component.html
  9. 24 0
      src/app/routes/basedata/base-archives-cost/view/view.component.spec.ts
  10. 39 0
      src/app/routes/basedata/base-archives-cost/view/view.component.ts
  11. 6 2
      src/app/routes/basedata/basedata.module.ts
  12. 1 1
      src/app/routes/down-payment-management/payment-slip/add/add.component.html
  13. 1 1
      src/app/routes/down-payment-management/payment-slip/add/add.component.ts
  14. 1 1
      src/app/routes/down-payment-management/receipt/add/add.component.html
  15. 1 1
      src/app/routes/down-payment-management/receipt/add/add.component.ts
  16. 1 1
      src/app/routes/down-payment-management/receipt/update/update.component.html
  17. 1 1
      src/app/routes/down-payment-management/receipt/update/update.component.ts
  18. 3 3
      src/app/routes/project-manage-archives/add/development/development.component.html
  19. 72 2
      src/app/routes/project-manage-archives/add/development/development.component.ts
  20. 3 3
      src/app/routes/project-manage-archives/add/implementation/implementation.component.html
  21. 72 2
      src/app/routes/project-manage-archives/add/implementation/implementation.component.ts
  22. 3 3
      src/app/routes/project-manage-archives/add/serviceta/serviceta.component.html
  23. 72 2
      src/app/routes/project-manage-archives/add/serviceta/serviceta.component.ts
  24. 2 0
      src/app/routes/project-manage-archives/list/list.component.html
  25. 24 0
      src/app/routes/project-manage-archives/list/list.component.ts
  26. 13 1
      src/app/routes/project-manage-archives/project-manage-archives.module.ts
  27. 2 2
      src/app/routes/project-manage-archives/project-node-tree.ts
  28. 1 1
      src/app/routes/project-manage-archives/update/business-affairs/business-affairs.component.html
  29. 1 1
      src/app/routes/project-manage-archives/update/business-affairs/business-affairs.component.ts
  30. 3 3
      src/app/routes/project-manage-archives/update/development/development.component.html
  31. 72 2
      src/app/routes/project-manage-archives/update/development/development.component.ts
  32. 4 4
      src/app/routes/project-manage-archives/update/implementation/implementation.component.html
  33. 97 43
      src/app/routes/project-manage-archives/update/implementation/implementation.component.ts
  34. 3 3
      src/app/routes/project-manage-archives/update/serviceta/serviceta.component.html
  35. 72 2
      src/app/routes/project-manage-archives/update/serviceta/serviceta.component.ts
  36. 360 0
      src/app/routes/project-manage-archives/view/business-affairs/business-affairs.component.html
  37. 24 0
      src/app/routes/project-manage-archives/view/business-affairs/business-affairs.component.spec.ts
  38. 25 0
      src/app/routes/project-manage-archives/view/business-affairs/business-affairs.component.ts
  39. 118 0
      src/app/routes/project-manage-archives/view/development/development.component.html
  40. 24 0
      src/app/routes/project-manage-archives/view/development/development.component.spec.ts
  41. 77 0
      src/app/routes/project-manage-archives/view/development/development.component.ts
  42. 135 0
      src/app/routes/project-manage-archives/view/essential-information/essential-information.component.html
  43. 24 0
      src/app/routes/project-manage-archives/view/essential-information/essential-information.component.spec.ts
  44. 20 0
      src/app/routes/project-manage-archives/view/essential-information/essential-information.component.ts
  45. 116 0
      src/app/routes/project-manage-archives/view/implementation/implementation.component.html
  46. 24 0
      src/app/routes/project-manage-archives/view/implementation/implementation.component.spec.ts
  47. 75 0
      src/app/routes/project-manage-archives/view/implementation/implementation.component.ts
  48. 117 0
      src/app/routes/project-manage-archives/view/serviceta/serviceta.component.html
  49. 24 0
      src/app/routes/project-manage-archives/view/serviceta/serviceta.component.spec.ts
  50. 77 0
      src/app/routes/project-manage-archives/view/serviceta/serviceta.component.ts
  51. 40 0
      src/app/routes/project-manage-archives/view/view.component.html
  52. 24 0
      src/app/routes/project-manage-archives/view/view.component.spec.ts
  53. 131 0
      src/app/routes/project-manage-archives/view/view.component.ts
  54. 86 8
      src/app/routes/report-form/project-statistics/project-statistics.component.html
  55. 26 24
      src/app/routes/report-form/project-statistics/project-statistics.component.ts
  56. 2 0
      src/app/routes/routes-routing.module.ts
  57. 19 0
      src/app/services/report-form/project-statistics.service.ts

+ 2 - 0
src/app/routes/basedata/base-archives-collection-line/base-archives-collection-line.component.html

@@ -51,6 +51,8 @@
             <td>{{ data.code }}</td>
             <td>{{ data.name }}</td>
             <td>
+              <a (click)="view(data)" acl [acl-ability]="'base-archives-collection-line:view'">详情</a>
+              <nz-divider nzType="vertical" acl [acl-ability]="'base-archives-collection-line:view'"></nz-divider>
               <a (click)="update(data)" acl [acl-ability]="'base-archives-collection-line:update'">修改</a>
               <nz-divider nzType="vertical" acl [acl-ability]="'base-archives-collection-line:update'"></nz-divider>
               <a (click)="delete(data.id)" acl [acl-ability]="'base-archives-collection-line:delete'">删除</a>

+ 25 - 0
src/app/routes/basedata/base-archives-collection-line/base-archives-collection-line.component.ts

@@ -7,6 +7,7 @@ import { NzModalService, NzNotificationService } from 'ng-zorro-antd';
 import { BasedataBaseArchivesCollectionLineAddComponent } from './add/add.component';
 import { BaseArchivesCollectionLineService } from 'app/services/basedata/base-archives-collection-line.service';
 import { I18NService } from '@core';
+import { BasedataBaseArchivesCollectionLineViewComponent } from './view/view.component';
 
 @Component({
   selector: 'app-basedata-base-archives-collection-line',
@@ -126,6 +127,30 @@ export class BasedataBaseArchivesCollectionLineComponent implements OnInit {
     })
   }
 
+
+  /**
+   * 修改按钮
+   */
+  view(item){
+    const modalRef = this.modalService.create({
+      nzTitle: "详情",
+      nzContent: BasedataBaseArchivesCollectionLineViewComponent,
+      nzWidth: 600,
+      nzComponentParams:{
+        id:item.id
+      },
+      nzFooter: [
+        {
+          label: "关闭",
+          type: "default",
+          onClick: addModel => {
+            addModel.close()
+          }
+        }
+      ]
+    })
+  }
+
   /**
    * 删除按钮
    */

+ 12 - 0
src/app/routes/basedata/base-archives-collection-line/view/view.component.html

@@ -0,0 +1,12 @@
+<form nz-form>
+  <nz-form-item>
+    <nz-form-label [nzSm]="5" [nzXs]="24" >条线编码</nz-form-label>
+    <nz-form-control [nzSm]="4" [nzXs]="24" >
+      {{baseArchivesCollectionLine.code}}
+    </nz-form-control>
+    <nz-form-label [nzSm]="5" [nzXs]="24" >条线名称</nz-form-label>
+    <nz-form-control [nzSm]="10" [nzXs]="24" >
+      {{baseArchivesCollectionLine.name}}
+    </nz-form-control>
+  </nz-form-item>
+</form>

+ 24 - 0
src/app/routes/basedata/base-archives-collection-line/view/view.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { BasedataBaseArchivesCollectionLineViewComponent } from './view.component';
+
+describe('BasedataBaseArchivesCollectionLineViewComponent', () => {
+  let component: BasedataBaseArchivesCollectionLineViewComponent;
+  let fixture: ComponentFixture<BasedataBaseArchivesCollectionLineViewComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ BasedataBaseArchivesCollectionLineViewComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(BasedataBaseArchivesCollectionLineViewComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 38 - 0
src/app/routes/basedata/base-archives-collection-line/view/view.component.ts

@@ -0,0 +1,38 @@
+import { Component, OnInit } from '@angular/core';
+import { NzModalRef, NzMessageService } from 'ng-zorro-antd';
+import { _HttpClient } from '@delon/theme';
+import { BaseArchivesCollectionLine } from 'app/entity/basedata/base-archives-collection-line';
+import { BaseArchivesCollectionLineService } from 'app/services/basedata/base-archives-collection-line.service';
+
+@Component({
+  selector: 'app-basedata-base-archives-collection-line-view',
+  templateUrl: './view.component.html',
+})
+export class BasedataBaseArchivesCollectionLineViewComponent implements OnInit {
+  record: any = {};
+  i: any;
+
+  constructor(
+    private modal: NzModalRef,
+    private baseArchivesCollectionLineService:BaseArchivesCollectionLineService
+  ) { }
+
+  ngOnInit(): void {
+    this.getById();
+  }
+
+  baseArchivesCollectionLine: BaseArchivesCollectionLine = {}; //对象
+  id = '';
+  /**
+   * 根据id查询
+   */
+  getById(){
+    this.baseArchivesCollectionLineService.getById(this.id).then((response)=>{
+      this.baseArchivesCollectionLine=response.result;
+    })
+  }
+
+  close() {
+    this.modal.destroy();
+  }
+}

+ 2 - 0
src/app/routes/basedata/base-archives-cost/base-archives-cost.component.html

@@ -50,6 +50,8 @@
             <td>{{ data.code }}</td>
             <td>{{ data.name }}</td>
             <td>
+              <a (click)="view(data)" acl [acl-ability]="'base-archives-cost:view'">详情</a>
+              <nz-divider nzType="vertical" acl [acl-ability]="'base-archives-cost:view'"></nz-divider>
               <a (click)="update(data)" acl [acl-ability]="'base-archives-cost:update'">修改</a>
               <nz-divider nzType="vertical" acl [acl-ability]="'base-archives-cost:update'"></nz-divider>
               <a (click)="delete(data.id)" acl [acl-ability]="'base-archives-cost:delete'">删除</a>

+ 25 - 0
src/app/routes/basedata/base-archives-cost/base-archives-cost.component.ts

@@ -7,6 +7,7 @@ import { BaseArchivesCost } from 'app/entity/basedata/base-archives-cost';
 import { BasedataBaseArchivesCostAddComponent } from './add/add.component';
 import { BaseArchivesCostService } from 'app/services/basedata/base-archives-cost.service';
 import { I18NService } from '@core';
+import { BasedataBaseArchivesCostViewComponent } from './view/view.component';
 
 @Component({
   selector: 'app-basedata-base-archives-cost',
@@ -126,6 +127,30 @@ export class BasedataBaseArchivesCostComponent implements OnInit {
     })
   }
 
+  /**
+   * 详情按钮
+   */
+  view(item){
+    const modalRef = this.modalService.create({
+      nzTitle: "详情",
+      nzContent: BasedataBaseArchivesCostViewComponent,
+      nzWidth: 600,
+      nzComponentParams:{
+        id:item.id
+      },
+      nzFooter: [
+        {
+          label: "关闭",
+          type: "default",
+          onClick: addModel => {
+            addModel.close()
+          }
+        }
+      ]
+    })
+  }
+
+
   /**
    * 删除按钮
    */

+ 12 - 0
src/app/routes/basedata/base-archives-cost/view/view.component.html

@@ -0,0 +1,12 @@
+<form nz-form >
+  <nz-form-item>
+    <nz-form-label [nzSm]="5" [nzXs]="24" >费用编码</nz-form-label>
+    <nz-form-control [nzSm]="4" [nzXs]="24" >
+      {{baseArchivesCost.code}}
+    </nz-form-control>
+    <nz-form-label [nzSm]="5" [nzXs]="24" >费用名称</nz-form-label>
+    <nz-form-control [nzSm]="10" [nzXs]="24" >
+      {{baseArchivesCost.name}}
+    </nz-form-control>
+  </nz-form-item>
+</form>

+ 24 - 0
src/app/routes/basedata/base-archives-cost/view/view.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { BasedataBaseArchivesCostViewComponent } from './view.component';
+
+describe('BasedataBaseArchivesCostViewComponent', () => {
+  let component: BasedataBaseArchivesCostViewComponent;
+  let fixture: ComponentFixture<BasedataBaseArchivesCostViewComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ BasedataBaseArchivesCostViewComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(BasedataBaseArchivesCostViewComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 39 - 0
src/app/routes/basedata/base-archives-cost/view/view.component.ts

@@ -0,0 +1,39 @@
+import { Component, OnInit } from '@angular/core';
+import { NzModalRef, NzMessageService } from 'ng-zorro-antd';
+import { _HttpClient } from '@delon/theme';
+import { BaseArchivesCost } from 'app/entity/basedata/base-archives-cost';
+import { BaseArchivesCostService } from 'app/services/basedata/base-archives-cost.service';
+
+@Component({
+  selector: 'app-basedata-base-archives-cost-view',
+  templateUrl: './view.component.html',
+})
+export class BasedataBaseArchivesCostViewComponent implements OnInit {
+  record: any = {};
+  i: any;
+
+  constructor(
+    private modal: NzModalRef,
+    private baseArchivesCostService:BaseArchivesCostService
+  ) { }
+
+  ngOnInit(): void {
+    this.getById();
+  }
+
+  baseArchivesCost: BaseArchivesCost = {}; //对象
+  id = '';
+
+  /**
+   * 根据id查询
+   */
+  getById(){
+    this.baseArchivesCostService.getById(this.id).then((response)=>{
+      this.baseArchivesCost=response.result;
+    })
+  }
+
+  close() {
+    this.modal.destroy();
+  }
+}

+ 6 - 2
src/app/routes/basedata/basedata.module.ts

@@ -20,7 +20,9 @@ import { BasedataBaseArchivesCollectionLineAddComponent } from './base-archives-
 import { BasedataBaseArchivesCostComponent } from './base-archives-cost/base-archives-cost.component';
 import { BasedataBaseArchivesCostAddComponent } from './base-archives-cost/add/add.component';
 import { BasedataMilestoneCategoryComponent } from './milestone-category/milestone-category.component';
-import { BasedataMilestoneCategoryEditComponent } from './milestone-category/edit/edit.component';
+import { BasedataMilestoneCategoryEditComponent } from './milestone-category/edit/edit.component';
+import { BasedataBaseArchivesCollectionLineViewComponent } from './base-archives-collection-line/view/view.component';
+import { BasedataBaseArchivesCostViewComponent } from './base-archives-cost/view/view.component';
 
 const COMPONENTS = [
   BasedataCustomerComponent,
@@ -41,7 +43,9 @@ const COMPONENTS_NOROUNT = [BasedataCustomerEditComponent,
   BasedataBaseArchivesMilestoneAddComponent,
   BasedataBaseArchivesCollectionLineAddComponent,
   BasedataBaseArchivesCostAddComponent,
-  BasedataMilestoneCategoryEditComponent];
+  BasedataMilestoneCategoryEditComponent,
+  BasedataBaseArchivesCollectionLineViewComponent,
+  BasedataBaseArchivesCostViewComponent];
 
 @NgModule({
   imports: [

+ 1 - 1
src/app/routes/down-payment-management/payment-slip/add/add.component.html

@@ -99,7 +99,7 @@
               <td style="width: 20%;">
                 <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.invoiceId" nzPlaceHolder="请选择"
                 >
-                <nz-option *ngFor="let i of invoiceIdList" [nzValue]="i.id" [nzLabel]="i.proName"></nz-option>
+                <nz-option *ngFor="let i of invoiceIdList" [nzValue]="i.id" [nzLabel]="i.billcode"></nz-option>
               </nz-select>
               </td>
               <td ><a nz-popconfirm nzTitle="是否删除?"

+ 1 - 1
src/app/routes/down-payment-management/payment-slip/add/add.component.ts

@@ -263,7 +263,7 @@ export class DownPaymentManagementPaymentSlipAddComponent implements OnInit {
             if(element.invoiceId){
               this.invoiceIdList.forEach(invoice => {
                 if(invoice.id===element.invoiceId){
-                  element.invoice=invoice.proName;
+                  element.invoice=invoice.billcode;
                 }
               });
             }

+ 1 - 1
src/app/routes/down-payment-management/receipt/add/add.component.html

@@ -99,7 +99,7 @@
               <td style="width: 20%;">
                 <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.invoiceId" nzPlaceHolder="请选择"
                 >
-                <nz-option *ngFor="let i of invoiceIdList" [nzValue]="i.id" [nzLabel]="i.proName"></nz-option>
+                <nz-option *ngFor="let i of invoiceIdList" [nzValue]="i.id" [nzLabel]="i.billcode"></nz-option>
               </nz-select>
               </td>
               <td ><a nz-popconfirm nzTitle="是否删除?"

+ 1 - 1
src/app/routes/down-payment-management/receipt/add/add.component.ts

@@ -263,7 +263,7 @@ export class DownPaymentManagementReceiptAddComponent implements OnInit {
             if(element.invoiceId){
               this.invoiceIdList.forEach(invoice => {
                 if(invoice.id===element.invoiceId){
-                  element.invoice=invoice.proName;
+                  element.invoice=invoice.billcode;
                 }
               });
             }

+ 1 - 1
src/app/routes/down-payment-management/receipt/update/update.component.html

@@ -99,7 +99,7 @@
               <td style="width: 20%;">
                 <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.invoiceId" nzPlaceHolder="请选择"
                 >
-                <nz-option *ngFor="let i of invoiceIdList" [nzValue]="i.id" [nzLabel]="i.proName"></nz-option>
+                <nz-option *ngFor="let i of invoiceIdList" [nzValue]="i.id" [nzLabel]="i.billcode"></nz-option>
               </nz-select>
               </td>
               <td ><a nz-popconfirm nzTitle="是否删除?"

+ 1 - 1
src/app/routes/down-payment-management/receipt/update/update.component.ts

@@ -285,7 +285,7 @@ export class DownPaymentManagementReceiptUpdateComponent implements OnInit {
             if(element.invoiceId){
               this.invoiceIdList.forEach(invoice => {
                 if(invoice.id===element.invoiceId){
-                  element.invoice=invoice.proName;
+                  element.invoice=invoice.billcode;
                 }
               });
             }

+ 3 - 3
src/app/routes/project-manage-archives/add/development/development.component.html

@@ -106,13 +106,13 @@
                   </ng-container>
                 </td>
                 <td>
-                  <nz-date-picker [(ngModel)]="item.startDate"></nz-date-picker>
+                  <nz-date-picker [(ngModel)]="item.startDate" (ngModelChange)="startChange(item,$event)"></nz-date-picker>
                 </td>
                 <td>
-                  <nz-date-picker [(ngModel)]="item.endDate"></nz-date-picker>
+                  <nz-date-picker [(ngModel)]="item.endDate" (ngModelChange)="startChange(item,$event)"></nz-date-picker>
                 </td>
                 <td>
-                  <nz-input-number [(ngModel)]="item.planTime" [nzMin]="0" [nzStep]="1"></nz-input-number>
+                  <nz-input-number [(ngModel)]="item.planTime" [nzMin]="0" [nzStep]="1" (nzBlur)="planTimeKeyup(item)"></nz-input-number>
                 </td>
                 <td>
                   <!-- <nz-select style="width: 100%;" [nzMaxTagCount]="3" nzMode="multiple" nzPlaceHolder="请选择"

+ 72 - 2
src/app/routes/project-manage-archives/add/development/development.component.ts

@@ -1,10 +1,11 @@
 import { Component, OnInit } from '@angular/core';
-import { NzModalRef, NzMessageService } from 'ng-zorro-antd';
+import { NzModalRef, NzMessageService, NzNotificationService } from 'ng-zorro-antd';
 import { _HttpClient } from '@delon/theme';
 import { BaseArchivesMilestoneService } from 'app/services/basedata/base-archives-milestone.service';
 import { ProjectManageArchives } from 'app/entity/project-manage-archives/project-manage-archives';
 import { BaseArchivesMilestone } from 'app/entity/basedata/base-archives-milestone';
 import { ProjectNodeTree } from '../../project-node-tree';
+import { DatePipe } from '@angular/common';
 
 @Component({
   selector: 'app-project-manage-archives-add-development',
@@ -14,7 +15,9 @@ export class ProjectManageArchivesAddDevelopmentComponent implements OnInit {
   
 
   constructor(
-    private baseArchivesMilestoneService:BaseArchivesMilestoneService
+    private baseArchivesMilestoneService:BaseArchivesMilestoneService,
+    private nzNotificationService: NzNotificationService,
+    private datePipe: DatePipe
   ) { }
 
   ngOnInit(): void {
@@ -188,6 +191,73 @@ export class ProjectManageArchivesAddDevelopmentComponent implements OnInit {
     });
   }
 
+  /**
+   * 时间选择事件
+   * 验证开始时间和结束时间是否在父级时间的范围内
+   */
+  startChange(item, date) {
+    if (item.parent) {
+      let parent = item.parent; //父级对象
+      if (parent.startDate && parent.endDate) {
+        let startDatePar = new Date(this.datePipe.transform(parent.startDate, 'yyyy-MM-dd')); //父级开始时间
+        let endDatePar = new Date(this.datePipe.transform(parent.endDate, 'yyyy-MM-dd')); //父级结束时间
+        let d = new Date(this.datePipe.transform(date, 'yyyy-MM-dd')); //选择的时间
+        let isb = false;
+        if (d.getTime() < startDatePar.getTime()) {
+          //不能小于父级开始时间
+          this.nzNotificationService.warning('不能小于父级开始时间', '');
+          isb = true;
+        }
+        if (d.getTime() > endDatePar.getTime()) {
+          //不能大于父级结束时间
+          this.nzNotificationService.warning('不能大于父级结束时间', '');
+          isb = true;
+        }
+        //如果验证到错误则清空时间
+        if (isb) {
+          //如果是操作的开始时间则清除开始时间
+          if (d.getTime() === new Date(this.datePipe.transform(item.startDate, 'yyyy-MM-dd')).getTime()) {
+            item.startDate = null;
+          }
+          //如果是操作的结束时间则清除结束时间
+          if (d.getTime() === new Date(this.datePipe.transform(item.endDate, 'yyyy-MM-dd')).getTime()) {
+            item.endDate = null;
+          }
+          this.initialValue();
+        }
+      }
+    }
+  }
+
+  /**
+   * 计划人天鼠标离开事件
+   * 验证子级计划人天不得大于父级计划人天
+   */
+  planTimeKeyup(item) {
+    if (item.parent) {
+      let parent = item.parent; //父级对象
+      //判断父级计划人天是否为空
+      if (parent.planTime) {
+        let planTimePar = Number(parent.planTime); //父级计划人天
+        //循环父级的所有子集数据
+        let planTimeChildTotal = 0; //所有子集计划人天
+        //循环父级节点下的子级
+        this.mapOfExpandedData[item.parent.key].forEach(child => {
+          //判断是否父级下的子级 排除子子级
+          if(child.level===parent.level+1){
+            planTimeChildTotal = planTimeChildTotal + Number(child.planTime);
+          }
+        });
+        //判断是否大于父级的计划人天
+        if (planTimeChildTotal > planTimePar) {
+          //子级计划人天总和不能大于父级计划人天
+          this.nzNotificationService.warning('子级计划人天总和不能大于父级计划人天', '');
+          item.planTime = 0;
+        }
+      }
+    }
+  }
+
   ///////////////////////////树形配置
   mapOfExpandedData: { [key: string]: ProjectNodeTree[] } = {};
 

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

@@ -107,13 +107,13 @@
                   </ng-container>
                 </td>
                 <td>
-                  <nz-date-picker [(ngModel)]="item.startDate"></nz-date-picker>
+                  <nz-date-picker [(ngModel)]="item.startDate" (ngModelChange)="startChange(item,$event)"></nz-date-picker>
                 </td>
                 <td>
-                  <nz-date-picker [(ngModel)]="item.endDate"></nz-date-picker>
+                  <nz-date-picker [(ngModel)]="item.endDate" (ngModelChange)="startChange(item,$event)"></nz-date-picker>
                 </td>
                 <td>
-                  <nz-input-number [(ngModel)]="item.planTime" [nzMin]="0" [nzStep]="1"></nz-input-number>
+                  <nz-input-number [(ngModel)]="item.planTime" [nzMin]="0" [nzStep]="1" (nzBlur)="planTimeKeyup(item)"></nz-input-number>
                 </td>
                 <td>
                   <!-- <nz-select style="width: 100%;" [nzMaxTagCount]="3" nzMode="multiple" nzPlaceHolder="请选择"

+ 72 - 2
src/app/routes/project-manage-archives/add/implementation/implementation.component.ts

@@ -1,10 +1,11 @@
 import { Component, OnInit } from '@angular/core';
-import { NzModalRef, NzMessageService } from 'ng-zorro-antd';
+import { NzModalRef, NzMessageService, NzNotificationService } 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';
 import { BaseArchivesMilestone } from 'app/entity/basedata/base-archives-milestone';
 import { BaseArchivesMilestoneService } from 'app/services/basedata/base-archives-milestone.service';
+import { DatePipe } from '@angular/common';
 
 @Component({
   selector: 'app-project-manage-archives-add-implementation',
@@ -14,7 +15,9 @@ export class ProjectManageArchivesAddImplementationComponent implements OnInit {
   
 
   constructor(
-    private baseArchivesMilestoneService:BaseArchivesMilestoneService
+    private baseArchivesMilestoneService:BaseArchivesMilestoneService,
+    private nzNotificationService: NzNotificationService,
+    private datePipe: DatePipe
   ) { }
 
   ngOnInit(): void {
@@ -188,6 +191,73 @@ export class ProjectManageArchivesAddImplementationComponent implements OnInit {
     });
   }
 
+  /**
+   * 时间选择事件
+   * 验证开始时间和结束时间是否在父级时间的范围内
+   */
+  startChange(item, date) {
+    if (item.parent) {
+      let parent = item.parent; //父级对象
+      if (parent.startDate && parent.endDate) {
+        let startDatePar = new Date(this.datePipe.transform(parent.startDate, 'yyyy-MM-dd')); //父级开始时间
+        let endDatePar = new Date(this.datePipe.transform(parent.endDate, 'yyyy-MM-dd')); //父级结束时间
+        let d = new Date(this.datePipe.transform(date, 'yyyy-MM-dd')); //选择的时间
+        let isb = false;
+        if (d.getTime() < startDatePar.getTime()) {
+          //不能小于父级开始时间
+          this.nzNotificationService.warning('不能小于父级开始时间', '');
+          isb = true;
+        }
+        if (d.getTime() > endDatePar.getTime()) {
+          //不能大于父级结束时间
+          this.nzNotificationService.warning('不能大于父级结束时间', '');
+          isb = true;
+        }
+        //如果验证到错误则清空时间
+        if (isb) {
+          //如果是操作的开始时间则清除开始时间
+          if (d.getTime() === new Date(this.datePipe.transform(item.startDate, 'yyyy-MM-dd')).getTime()) {
+            item.startDate = null;
+          }
+          //如果是操作的结束时间则清除结束时间
+          if (d.getTime() === new Date(this.datePipe.transform(item.endDate, 'yyyy-MM-dd')).getTime()) {
+            item.endDate = null;
+          }
+          this.initialValue();
+        }
+      }
+    }
+  }
+
+  /**
+   * 计划人天鼠标离开事件
+   * 验证子级计划人天不得大于父级计划人天
+   */
+  planTimeKeyup(item) {
+    if (item.parent) {
+      let parent = item.parent; //父级对象
+      //判断父级计划人天是否为空
+      if (parent.planTime) {
+        let planTimePar = Number(parent.planTime); //父级计划人天
+        //循环父级的所有子集数据
+        let planTimeChildTotal = 0; //所有子集计划人天
+        //循环父级节点下的子级
+        this.mapOfExpandedData[item.parent.key].forEach(child => {
+          //判断是否父级下的子级 排除子子级
+          if(child.level===parent.level+1){
+            planTimeChildTotal = planTimeChildTotal + Number(child.planTime);
+          }
+        });
+        //判断是否大于父级的计划人天
+        if (planTimeChildTotal > planTimePar) {
+          //子级计划人天总和不能大于父级计划人天
+          this.nzNotificationService.warning('子级计划人天总和不能大于父级计划人天', '');
+          item.planTime = 0;
+        }
+      }
+    }
+  }
+
   ///////////////////////////树形配置
   mapOfExpandedData: { [key: string]: ProjectNodeTree[] } = {};
 

+ 3 - 3
src/app/routes/project-manage-archives/add/serviceta/serviceta.component.html

@@ -106,13 +106,13 @@
                   </ng-container>
                 </td>
                 <td>
-                  <nz-date-picker [(ngModel)]="item.startDate"></nz-date-picker>
+                  <nz-date-picker [(ngModel)]="item.startDate" (ngModelChange)="startChange(item,$event)"></nz-date-picker>
                 </td>
                 <td>
-                  <nz-date-picker [(ngModel)]="item.endDate"></nz-date-picker>
+                  <nz-date-picker [(ngModel)]="item.endDate" (ngModelChange)="startChange(item,$event)"></nz-date-picker>
                 </td>
                 <td>
-                  <nz-input-number [(ngModel)]="item.planTime" [nzMin]="0" [nzStep]="1"></nz-input-number>
+                  <nz-input-number [(ngModel)]="item.planTime" [nzMin]="0" [nzStep]="1" (nzBlur)="planTimeKeyup(item)"></nz-input-number>
                 </td>
                 <td>
                   <!-- <nz-select style="width: 100%;" [nzMaxTagCount]="3" nzMode="multiple" nzPlaceHolder="请选择"

+ 72 - 2
src/app/routes/project-manage-archives/add/serviceta/serviceta.component.ts

@@ -1,17 +1,20 @@
 import { Component, OnInit } from '@angular/core';
-import { NzModalRef, NzMessageService } from 'ng-zorro-antd';
+import { NzModalRef, NzMessageService, NzNotificationService } from 'ng-zorro-antd';
 import { _HttpClient } from '@delon/theme';
 import { BaseArchivesMilestoneService } from 'app/services/basedata/base-archives-milestone.service';
 import { ProjectManageArchives } from 'app/entity/project-manage-archives/project-manage-archives';
 import { BaseArchivesMilestone } from 'app/entity/basedata/base-archives-milestone';
 import { ProjectNodeTree } from '../../project-node-tree';
+import { DatePipe } from '@angular/common';
 
 @Component({
   selector: 'app-project-manage-archives-add-serviceta',
   templateUrl: './serviceta.component.html',
 })
 export class ProjectManageArchivesAddServicetaComponent implements OnInit {
-  constructor(private baseArchivesMilestoneService: BaseArchivesMilestoneService) {}
+  constructor(private baseArchivesMilestoneService: BaseArchivesMilestoneService,
+    private nzNotificationService: NzNotificationService,
+    private datePipe: DatePipe) {}
 
   ngOnInit(): void {
     this.getTreeList();
@@ -173,6 +176,73 @@ export class ProjectManageArchivesAddServicetaComponent implements OnInit {
     });
   }
 
+  /**
+   * 时间选择事件
+   * 验证开始时间和结束时间是否在父级时间的范围内
+   */
+  startChange(item, date) {
+    if (item.parent) {
+      let parent = item.parent; //父级对象
+      if (parent.startDate && parent.endDate) {
+        let startDatePar = new Date(this.datePipe.transform(parent.startDate, 'yyyy-MM-dd')); //父级开始时间
+        let endDatePar = new Date(this.datePipe.transform(parent.endDate, 'yyyy-MM-dd')); //父级结束时间
+        let d = new Date(this.datePipe.transform(date, 'yyyy-MM-dd')); //选择的时间
+        let isb = false;
+        if (d.getTime() < startDatePar.getTime()) {
+          //不能小于父级开始时间
+          this.nzNotificationService.warning('不能小于父级开始时间', '');
+          isb = true;
+        }
+        if (d.getTime() > endDatePar.getTime()) {
+          //不能大于父级结束时间
+          this.nzNotificationService.warning('不能大于父级结束时间', '');
+          isb = true;
+        }
+        //如果验证到错误则清空时间
+        if (isb) {
+          //如果是操作的开始时间则清除开始时间
+          if (d.getTime() === new Date(this.datePipe.transform(item.startDate, 'yyyy-MM-dd')).getTime()) {
+            item.startDate = null;
+          }
+          //如果是操作的结束时间则清除结束时间
+          if (d.getTime() === new Date(this.datePipe.transform(item.endDate, 'yyyy-MM-dd')).getTime()) {
+            item.endDate = null;
+          }
+          this.initialValue();
+        }
+      }
+    }
+  }
+
+  /**
+   * 计划人天鼠标离开事件
+   * 验证子级计划人天不得大于父级计划人天
+   */
+  planTimeKeyup(item) {
+    if (item.parent) {
+      let parent = item.parent; //父级对象
+      //判断父级计划人天是否为空
+      if (parent.planTime) {
+        let planTimePar = Number(parent.planTime); //父级计划人天
+        //循环父级的所有子集数据
+        let planTimeChildTotal = 0; //所有子集计划人天
+        //循环父级节点下的子级
+        this.mapOfExpandedData[item.parent.key].forEach(child => {
+          //判断是否父级下的子级 排除子子级
+          if(child.level===parent.level+1){
+            planTimeChildTotal = planTimeChildTotal + Number(child.planTime);
+          }
+        });
+        //判断是否大于父级的计划人天
+        if (planTimeChildTotal > planTimePar) {
+          //子级计划人天总和不能大于父级计划人天
+          this.nzNotificationService.warning('子级计划人天总和不能大于父级计划人天', '');
+          item.planTime = 0;
+        }
+      }
+    }
+  }
+
   ///////////////////////////树形配置
   mapOfExpandedData: { [key: string]: ProjectNodeTree[] } = {};
 

+ 2 - 0
src/app/routes/project-manage-archives/list/list.component.html

@@ -54,6 +54,8 @@
             <td>{{ data.cusName }}</td>
             <td>{{ data.totalPrice }}</td>
             <td>
+              <a (click)="view(data)" acl [acl-ability]="'project-manage-archives:view'">详情</a>
+              <nz-divider nzType="vertical" acl [acl-ability]="'project-manage-archives:view'"></nz-divider>
               <a (click)="update(data)" acl [acl-ability]="'project-manage-archives:update'">修改</a>
               <nz-divider nzType="vertical" acl [acl-ability]="'project-manage-archives:update'"></nz-divider>
               <a (click)="delete(data.id)" acl [acl-ability]="'project-manage-archives:delete'">删除</a>

+ 24 - 0
src/app/routes/project-manage-archives/list/list.component.ts

@@ -8,6 +8,7 @@ import { I18NService } from '@core';
 import { ProjectManageArchivesAddComponent } from '../add/add.component';
 import { ProjectManageArchivesService } from 'app/services/project-manage-archives/project-manage-archives.service';
 import { ProjectManageArchivesUpdateComponent } from '../update/update.component';
+import { ProjectManageArchivesViewComponent } from '../view/view.component';
 
 @Component({
   selector: 'app-project-manage-archives-list',
@@ -107,6 +108,29 @@ export class ProjectManageArchivesListComponent implements OnInit {
     });
   }
 
+ /**
+   * 修改
+   */
+  view(data){
+    const drawerRef = this.nzDrawerService.create<ProjectManageArchivesViewComponent, { id: string }, string>({
+      nzTitle: this.i18NService.fanyi("table.view"),//详情标题
+      nzContent: ProjectManageArchivesViewComponent,
+      nzWidth: window.innerWidth,
+      nzBodyStyle: { height: 'calc(100% - 55px)', overflow: 'auto', 'padding-bottom': '53px' },
+      nzContentParams: {
+        //模板id
+        id: data.id
+      }
+    });
+
+    //关闭抽屉的回调
+    drawerRef.afterClose.subscribe((isRefresh) => {
+      if (isRefresh) {//刷新list列表
+        this.getList();
+      }
+    });
+  }
+
   /**
    * 删除按钮
    */

+ 13 - 1
src/app/routes/project-manage-archives/project-manage-archives.module.ts

@@ -14,6 +14,12 @@ import { ProjectManageArchivesUpdateDevelopmentComponent } from './update/develo
 import { ProjectManageArchivesUpdateEssentialInformationComponent } from './update/essential-information/essential-information.component';
 import { ProjectManageArchivesUpdateImplementationComponent } from './update/implementation/implementation.component';
 import { ProjectManageArchivesUpdateServicetaComponent } from './update/serviceta/serviceta.component';
+import { ProjectManageArchivesViewComponent } from './view/view.component';
+import { ProjectManageArchivesViewEssentialInformationComponent } from './view/essential-information/essential-information.component';
+import { ProjectManageArchivesViewBusinessAffairsComponent } from './view/business-affairs/business-affairs.component';
+import { ProjectManageArchivesViewImplementationComponent } from './view/implementation/implementation.component';
+import { ProjectManageArchivesViewDevelopmentComponent } from './view/development/development.component';
+import { ProjectManageArchivesViewServicetaComponent } from './view/serviceta/serviceta.component';
 
 const COMPONENTS = [
   ProjectManageArchivesListComponent
@@ -30,7 +36,13 @@ const COMPONENTS_NOROUNT = [
   ProjectManageArchivesUpdateDevelopmentComponent,
   ProjectManageArchivesUpdateEssentialInformationComponent,
   ProjectManageArchivesUpdateImplementationComponent,
-  ProjectManageArchivesUpdateServicetaComponent];
+  ProjectManageArchivesUpdateServicetaComponent,
+  ProjectManageArchivesViewComponent,
+  ProjectManageArchivesViewEssentialInformationComponent,
+  ProjectManageArchivesViewBusinessAffairsComponent,
+  ProjectManageArchivesViewImplementationComponent,
+  ProjectManageArchivesViewDevelopmentComponent,
+  ProjectManageArchivesViewServicetaComponent];
 
 @NgModule({
   imports: [

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

@@ -11,9 +11,9 @@ export interface ProjectNodeTree {
     muilesName?:string;
     startDate?:string;
     endDate?:string;
-    planTime?:string;
+    planTime?:number;
     executors?:[];
-    realTime?:string;
+    realTime?:number;
     parentId?:string;
     executor?:string;
     executorId?:string;

+ 1 - 1
src/app/routes/project-manage-archives/update/business-affairs/business-affairs.component.html

@@ -401,7 +401,7 @@
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'4')">
-                <nz-option *ngFor="let i of planList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
+                <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>

+ 1 - 1
src/app/routes/project-manage-archives/update/business-affairs/business-affairs.component.ts

@@ -128,7 +128,7 @@ export class ProjectManageArchivesUpdateBusinessAffairsComponent implements OnIn
         price4: 0,
         price5: 0,
         sort: this.paymentPlanSort,
-        planType: '3',
+        planType: '4',
       },
     ];
     this.paymentPlanSort++;

+ 3 - 3
src/app/routes/project-manage-archives/update/development/development.component.html

@@ -106,13 +106,13 @@
                   </ng-container>
                 </td>
                 <td>
-                  <nz-date-picker [(ngModel)]="item.startDate"></nz-date-picker>
+                  <nz-date-picker [(ngModel)]="item.startDate" (ngModelChange)="startChange(item,$event)"></nz-date-picker>
                 </td>
                 <td>
-                  <nz-date-picker [(ngModel)]="item.endDate"></nz-date-picker>
+                  <nz-date-picker [(ngModel)]="item.endDate" (ngModelChange)="startChange(item,$event)"></nz-date-picker>
                 </td>
                 <td>
-                  <nz-input-number [(ngModel)]="item.planTime" [nzMin]="0" [nzStep]="1"></nz-input-number>
+                  <nz-input-number [(ngModel)]="item.planTime" [nzMin]="0" [nzStep]="1" (nzBlur)="planTimeKeyup(item)"></nz-input-number>
                 </td>
                 <td>
                   <!-- <nz-select style="width: 100%;" [nzMaxTagCount]="3" nzMode="multiple" nzPlaceHolder="请选择"

+ 72 - 2
src/app/routes/project-manage-archives/update/development/development.component.ts

@@ -1,16 +1,19 @@
 import { Component, OnInit } from '@angular/core';
-import { NzModalRef, NzMessageService } from 'ng-zorro-antd';
+import { NzModalRef, NzMessageService, NzNotificationService } from 'ng-zorro-antd';
 import { _HttpClient } from '@delon/theme';
 import { BaseArchivesMilestoneService } from 'app/services/basedata/base-archives-milestone.service';
 import { ProjectManageArchives } from 'app/entity/project-manage-archives/project-manage-archives';
 import { ProjectNodeTree } from '../../project-node-tree';
+import { DatePipe } from '@angular/common';
 
 @Component({
   selector: 'app-project-manage-archives-update-development',
   templateUrl: './development.component.html',
 })
 export class ProjectManageArchivesUpdateDevelopmentComponent implements OnInit {
-  constructor(private baseArchivesMilestoneService: BaseArchivesMilestoneService) {}
+  constructor(private baseArchivesMilestoneService: BaseArchivesMilestoneService,
+    private nzNotificationService: NzNotificationService,
+    private datePipe: DatePipe) {}
 
   ngOnInit(): void {
     this.getTreeList();
@@ -169,6 +172,73 @@ export class ProjectManageArchivesUpdateDevelopmentComponent implements OnInit {
     });
   }
 
+  /**
+   * 时间选择事件
+   * 验证开始时间和结束时间是否在父级时间的范围内
+   */
+  startChange(item, date) {
+    if (item.parent) {
+      let parent = item.parent; //父级对象
+      if (parent.startDate && parent.endDate) {
+        let startDatePar = new Date(this.datePipe.transform(parent.startDate, 'yyyy-MM-dd')); //父级开始时间
+        let endDatePar = new Date(this.datePipe.transform(parent.endDate, 'yyyy-MM-dd')); //父级结束时间
+        let d = new Date(this.datePipe.transform(date, 'yyyy-MM-dd')); //选择的时间
+        let isb = false;
+        if (d.getTime() < startDatePar.getTime()) {
+          //不能小于父级开始时间
+          this.nzNotificationService.warning('不能小于父级开始时间', '');
+          isb = true;
+        }
+        if (d.getTime() > endDatePar.getTime()) {
+          //不能大于父级结束时间
+          this.nzNotificationService.warning('不能大于父级结束时间', '');
+          isb = true;
+        }
+        //如果验证到错误则清空时间
+        if (isb) {
+          //如果是操作的开始时间则清除开始时间
+          if (d.getTime() === new Date(this.datePipe.transform(item.startDate, 'yyyy-MM-dd')).getTime()) {
+            item.startDate = null;
+          }
+          //如果是操作的结束时间则清除结束时间
+          if (d.getTime() === new Date(this.datePipe.transform(item.endDate, 'yyyy-MM-dd')).getTime()) {
+            item.endDate = null;
+          }
+          this.initialValue();
+        }
+      }
+    }
+  }
+
+  /**
+   * 计划人天鼠标离开事件
+   * 验证子级计划人天不得大于父级计划人天
+   */
+  planTimeKeyup(item) {
+    if (item.parent) {
+      let parent = item.parent; //父级对象
+      //判断父级计划人天是否为空
+      if (parent.planTime) {
+        let planTimePar = Number(parent.planTime); //父级计划人天
+        //循环父级的所有子集数据
+        let planTimeChildTotal = 0; //所有子集计划人天
+        //循环父级节点下的子级
+        this.mapOfExpandedData[item.parent.key].forEach(child => {
+          //判断是否父级下的子级 排除子子级
+          if(child.level===parent.level+1){
+            planTimeChildTotal = planTimeChildTotal + Number(child.planTime);
+          }
+        });
+        //判断是否大于父级的计划人天
+        if (planTimeChildTotal > planTimePar) {
+          //子级计划人天总和不能大于父级计划人天
+          this.nzNotificationService.warning('子级计划人天总和不能大于父级计划人天', '');
+          item.planTime = 0;
+        }
+      }
+    }
+  }
+
   ///////////////////////////树形配置
   mapOfExpandedData: { [key: string]: ProjectNodeTree[] } = {};
 

+ 4 - 4
src/app/routes/project-manage-archives/update/implementation/implementation.component.html

@@ -106,13 +106,13 @@
                   </ng-container>
                 </td>
                 <td>
-                  <nz-date-picker [(ngModel)]="item.startDate" (ngModelChange)="startChange(item)"></nz-date-picker>
+                  <nz-date-picker [(ngModel)]="item.startDate" (ngModelChange)="startChange(item,$event)"></nz-date-picker>
                 </td>
                 <td>
-                  <nz-date-picker [(ngModel)]="item.endDate"></nz-date-picker>
+                  <nz-date-picker [(ngModel)]="item.endDate" (ngModelChange)="startChange(item,$event)"></nz-date-picker>
                 </td>
                 <td>
-                  <nz-input-number [(ngModel)]="item.planTime" [nzMin]="0" [nzStep]="1"></nz-input-number>
+                  <nz-input-number [(ngModel)]="item.planTime" [nzMin]="0" [nzStep]="1"(nzBlur)="planTimeKeyup(item)"></nz-input-number>
                 </td>
                 <td>
                   <!-- <nz-select style="width: 100%;" [nzMaxTagCount]="3" nzMode="multiple" nzPlaceHolder="请选择"
@@ -124,7 +124,7 @@
                   </nz-tree-select>
                 </td>
                 <td>
-                  <nz-input-number [(ngModel)]="item.realTime" [nzMin]="0" [nzStep]="1"></nz-input-number>
+                  <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>

+ 97 - 43
src/app/routes/project-manage-archives/update/implementation/implementation.component.ts

@@ -1,9 +1,10 @@
 import { Component, OnInit } from '@angular/core';
-import { NzModalRef, NzMessageService } from 'ng-zorro-antd';
+import { NzModalRef, NzMessageService, NzNotificationService } from 'ng-zorro-antd';
 import { _HttpClient } from '@delon/theme';
 import { BaseArchivesMilestoneService } from 'app/services/basedata/base-archives-milestone.service';
 import { ProjectManageArchives } from 'app/entity/project-manage-archives/project-manage-archives';
 import { ProjectNodeTree } from '../../project-node-tree';
+import { DatePipe } from '@angular/common';
 
 @Component({
   selector: 'app-project-manage-archives-update-implementation',
@@ -11,19 +12,19 @@ import { ProjectNodeTree } from '../../project-node-tree';
 })
 export class ProjectManageArchivesUpdateImplementationComponent implements OnInit {
   constructor(
-    private baseArchivesMilestoneService:BaseArchivesMilestoneService
-  ) { }
+    private datePipe: DatePipe,
+    private baseArchivesMilestoneService: BaseArchivesMilestoneService,
+    private nzNotificationService: NzNotificationService,
+  ) {}
 
   ngOnInit(): void {
     this.getTreeList();
   }
-  
-
-  projectManageArchives:ProjectManageArchives={};//项目档案主表实体
-  listOfMapData:any=[];//树形集合
-  personnelList=[];//人员下拉列表
-  remittanceInformation:any={};//回款信息实体
 
+  projectManageArchives: ProjectManageArchives = {}; //项目档案主表实体
+  listOfMapData: any = []; //树形集合
+  personnelList = []; //人员下拉列表
+  remittanceInformation: any = {}; //回款信息实体
 
   /**
    * 获取树形集合
@@ -43,7 +44,7 @@ export class ProjectManageArchivesUpdateImplementationComponent implements OnIni
   /**
    * 初始化树形
    */
-  getLoding(){
+  getLoding() {
     this.listOfMapData.forEach(item => {
       this.mapOfExpandedData[item.key] = this.convertTreeToList(item);
     });
@@ -55,25 +56,22 @@ export class ProjectManageArchivesUpdateImplementationComponent implements OnIni
   //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());
-  };
+    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(){
+    return this.add() + this.add() + this.add() + this.add() + this.add() + this.add() + this.add() + this.add();
+  }
+  addParent() {
     this.listOfMapData.forEach(item => {
       console.log(this.mapOfExpandedData[item.key]);
     });
-    this.listOfMapData=[
-      ...this.listOfMapData,
-      {key:this.adding()}
-    ]
+    this.listOfMapData = [...this.listOfMapData, { key: this.adding(), planTime: 0 }];
     // this.getLoding();
     this.initialValue();
   }
@@ -83,7 +81,7 @@ export class ProjectManageArchivesUpdateImplementationComponent implements OnIni
    * @param parentId 父级id
    * @param data 操作对象
    */
-  addChild(parentId){
+  addChild(parentId) {
     this.getChild(this.listOfMapData, parentId);
     this.initialValue();
   }
@@ -99,13 +97,10 @@ export class ProjectManageArchivesUpdateImplementationComponent implements OnIni
       if (element.key == parentId) {
         // 是否存在自数据不存在则创建child
         if (element.children == null) {
-          element.children = []
+          element.children = [];
         }
         // 添加一条空的子数据到child
-        element.children = [
-          ...element.children,
-          { key: keyId, parentId: parentId,children:null}
-        ]
+        element.children = [...element.children, { key: keyId, parentId: parentId, children: null, planTime: 0 }];
         // this.mapOfExpandedData[element.key] = this.convertTreeToList(null);
         // this.initialValue();
       } else {
@@ -116,12 +111,12 @@ export class ProjectManageArchivesUpdateImplementationComponent implements OnIni
     });
   }
 
- /**
+  /**
    * 删除行
    */
-  deleteRow(array: ProjectNodeTree[], data: ProjectNodeTree, key){
+  deleteRow(array: ProjectNodeTree[], data: ProjectNodeTree, key) {
     this.getdeleteRow(key, this.listOfMapData);
-    this.initialValue()
+    this.initialValue();
   }
 
   /**
@@ -130,7 +125,7 @@ export class ProjectManageArchivesUpdateImplementationComponent implements OnIni
    * @param list 需要删除对象的集合
    * @param parent 父级对象
    */
-  getdeleteRow(itemsId: string, list?: any,parent?:any) {
+  getdeleteRow(itemsId: string, list?: any, parent?: any) {
     list.forEach((element, i) => {
       //判断选中得数据是否有找到
       if (element.key == itemsId) {
@@ -141,26 +136,22 @@ export class ProjectManageArchivesUpdateImplementationComponent implements OnIni
         //然后删除父极对象
         list.splice(i, 1);
         //判断父极是否存在子集
-        if (list.length == 0&&parent) {
+        if (list.length == 0 && parent) {
           parent.children = null;
         }
-        this.listOfMapData=[
-          ...this.listOfMapData
-        ]
+        this.listOfMapData = [...this.listOfMapData];
         // this.getDataInitialization2();
         // this.initialValue();
       } else {
         //没有则判断是否有子集 有则递归同样判断
         if (element.children != null && element.children.length > 0) {
-          this.getdeleteRow(itemsId, element.children,element);
+          this.getdeleteRow(itemsId, element.children, element);
         }
       }
     });
   }
 
-
-
-  initialValue(){
+  initialValue() {
     this.listOfMapData.forEach(item => {
       const data = this.mapOfExpandedData[item.key];
       this.mapOfExpandedData[item.key] = this.convertTreeToList(item);
@@ -177,14 +168,77 @@ export class ProjectManageArchivesUpdateImplementationComponent implements OnIni
               el.executors = element.executors;
               el.realTime = element.realTime;
             }
-          })
-        })
+          });
+        });
       }
     });
   }
 
-  startChange(item){
-    console.log(item)
+  /**
+   * 时间选择事件
+   * 验证开始时间和结束时间是否在父级时间的范围内
+   */
+  startChange(item, date) {
+    if (item.parent) {
+      let parent = item.parent; //父级对象
+      if (parent.startDate && parent.endDate) {
+        let startDatePar = new Date(this.datePipe.transform(parent.startDate, 'yyyy-MM-dd')); //父级开始时间
+        let endDatePar = new Date(this.datePipe.transform(parent.endDate, 'yyyy-MM-dd')); //父级结束时间
+        let d = new Date(this.datePipe.transform(date, 'yyyy-MM-dd')); //选择的时间
+        let isb = false;
+        if (d.getTime() < startDatePar.getTime()) {
+          //不能小于父级开始时间
+          this.nzNotificationService.warning('不能小于父级开始时间', '');
+          isb = true;
+        }
+        if (d.getTime() > endDatePar.getTime()) {
+          //不能大于父级结束时间
+          this.nzNotificationService.warning('不能大于父级结束时间', '');
+          isb = true;
+        }
+        //如果验证到错误则清空时间
+        if (isb) {
+          //如果是操作的开始时间则清除开始时间
+          if (d.getTime() === new Date(this.datePipe.transform(item.startDate, 'yyyy-MM-dd')).getTime()) {
+            item.startDate = null;
+          }
+          //如果是操作的结束时间则清除结束时间
+          if (d.getTime() === new Date(this.datePipe.transform(item.endDate, 'yyyy-MM-dd')).getTime()) {
+            item.endDate = null;
+          }
+          this.initialValue();
+        }
+      }
+    }
+  }
+
+  /**
+   * 计划人天鼠标离开事件
+   * 验证子级计划人天不得大于父级计划人天
+   */
+  planTimeKeyup(item) {
+    if (item.parent) {
+      let parent = item.parent; //父级对象
+      //判断父级计划人天是否为空
+      if (parent.planTime) {
+        let planTimePar = Number(parent.planTime); //父级计划人天
+        //循环父级的所有子集数据
+        let planTimeChildTotal = 0; //所有子集计划人天
+        //循环父级节点下的子级
+        this.mapOfExpandedData[item.parent.key].forEach(child => {
+          //判断是否父级下的子级 排除子子级
+          if(child.level===parent.level+1){
+            planTimeChildTotal = planTimeChildTotal + Number(child.planTime);
+          }
+        });
+        //判断是否大于父级的计划人天
+        if (planTimeChildTotal > planTimePar) {
+          //子级计划人天总和不能大于父级计划人天
+          this.nzNotificationService.warning('子级计划人天总和不能大于父级计划人天', '');
+          item.planTime = 0;
+        }
+      }
+    }
   }
 
   ///////////////////////////树形配置

+ 3 - 3
src/app/routes/project-manage-archives/update/serviceta/serviceta.component.html

@@ -105,13 +105,13 @@
                   </ng-container>
                 </td>
                 <td>
-                  <nz-date-picker [(ngModel)]="item.startDate"></nz-date-picker>
+                  <nz-date-picker [(ngModel)]="item.startDate" (ngModelChange)="startChange(item,$event)"></nz-date-picker>
                 </td>
                 <td>
-                  <nz-date-picker [(ngModel)]="item.endDate"></nz-date-picker>
+                  <nz-date-picker [(ngModel)]="item.endDate" (ngModelChange)="startChange(item,$event)"></nz-date-picker>
                 </td>
                 <td>
-                  <nz-input-number [(ngModel)]="item.planTime" [nzMin]="0" [nzStep]="1"></nz-input-number>
+                  <nz-input-number [(ngModel)]="item.planTime" [nzMin]="0" [nzStep]="1" (nzBlur)="planTimeKeyup(item)"></nz-input-number>
                 </td>
                 <td>
                   <!-- <nz-select style="width: 100%;" [nzMaxTagCount]="3" nzMode="multiple" nzPlaceHolder="请选择"

+ 72 - 2
src/app/routes/project-manage-archives/update/serviceta/serviceta.component.ts

@@ -1,16 +1,19 @@
 import { Component, OnInit } from '@angular/core';
-import { NzModalRef, NzMessageService } from 'ng-zorro-antd';
+import { NzModalRef, NzMessageService, NzNotificationService } from 'ng-zorro-antd';
 import { _HttpClient } from '@delon/theme';
 import { BaseArchivesMilestoneService } from 'app/services/basedata/base-archives-milestone.service';
 import { ProjectManageArchives } from 'app/entity/project-manage-archives/project-manage-archives';
 import { ProjectNodeTree } from '../../project-node-tree';
+import { DatePipe } from '@angular/common';
 
 @Component({
   selector: 'app-project-manage-archives-update-serviceta',
   templateUrl: './serviceta.component.html',
 })
 export class ProjectManageArchivesUpdateServicetaComponent implements OnInit {
-  constructor(private baseArchivesMilestoneService: BaseArchivesMilestoneService) {}
+  constructor(private baseArchivesMilestoneService: BaseArchivesMilestoneService,
+    private nzNotificationService: NzNotificationService,
+    private datePipe: DatePipe) {}
 
   ngOnInit(): void {
     this.getTreeList();
@@ -170,6 +173,73 @@ export class ProjectManageArchivesUpdateServicetaComponent implements OnInit {
     });
   }
 
+  /**
+   * 时间选择事件
+   * 验证开始时间和结束时间是否在父级时间的范围内
+   */
+  startChange(item, date) {
+    if (item.parent) {
+      let parent = item.parent; //父级对象
+      if (parent.startDate && parent.endDate) {
+        let startDatePar = new Date(this.datePipe.transform(parent.startDate, 'yyyy-MM-dd')); //父级开始时间
+        let endDatePar = new Date(this.datePipe.transform(parent.endDate, 'yyyy-MM-dd')); //父级结束时间
+        let d = new Date(this.datePipe.transform(date, 'yyyy-MM-dd')); //选择的时间
+        let isb = false;
+        if (d.getTime() < startDatePar.getTime()) {
+          //不能小于父级开始时间
+          this.nzNotificationService.warning('不能小于父级开始时间', '');
+          isb = true;
+        }
+        if (d.getTime() > endDatePar.getTime()) {
+          //不能大于父级结束时间
+          this.nzNotificationService.warning('不能大于父级结束时间', '');
+          isb = true;
+        }
+        //如果验证到错误则清空时间
+        if (isb) {
+          //如果是操作的开始时间则清除开始时间
+          if (d.getTime() === new Date(this.datePipe.transform(item.startDate, 'yyyy-MM-dd')).getTime()) {
+            item.startDate = null;
+          }
+          //如果是操作的结束时间则清除结束时间
+          if (d.getTime() === new Date(this.datePipe.transform(item.endDate, 'yyyy-MM-dd')).getTime()) {
+            item.endDate = null;
+          }
+          this.initialValue();
+        }
+      }
+    }
+  }
+
+  /**
+   * 计划人天鼠标离开事件
+   * 验证子级计划人天不得大于父级计划人天
+   */
+  planTimeKeyup(item) {
+    if (item.parent) {
+      let parent = item.parent; //父级对象
+      //判断父级计划人天是否为空
+      if (parent.planTime) {
+        let planTimePar = Number(parent.planTime); //父级计划人天
+        //循环父级的所有子集数据
+        let planTimeChildTotal = 0; //所有子集计划人天
+        //循环父级节点下的子级
+        this.mapOfExpandedData[item.parent.key].forEach(child => {
+          //判断是否父级下的子级 排除子子级
+          if(child.level===parent.level+1){
+            planTimeChildTotal = planTimeChildTotal + Number(child.planTime);
+          }
+        });
+        //判断是否大于父级的计划人天
+        if (planTimeChildTotal > planTimePar) {
+          //子级计划人天总和不能大于父级计划人天
+          this.nzNotificationService.warning('子级计划人天总和不能大于父级计划人天', '');
+          item.planTime = 0;
+        }
+      }
+    }
+  }
+
   ///////////////////////////树形配置
   mapOfExpandedData: { [key: string]: ProjectNodeTree[] } = {};
 

+ 360 - 0
src/app/routes/project-manage-archives/view/business-affairs/business-affairs.component.html

@@ -0,0 +1,360 @@
+<!-- 开发 -->
+<form nz-form>
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">客户编码</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.cusCode}}</nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">客户名称</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.cusName}}</nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">销售经理</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.saleManager}}</nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">业务员</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.saleMan}}</nz-form-control>
+      </nz-form-item>
+    </div>
+  </div>
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">项目总金额</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.totalPrice}}</nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">已回款金额</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.received}}</nz-form-control>
+      </nz-form-item>
+    </div>
+  </div>
+</form>
+<!-- 收款计划 -->
+<nz-card nzTitle="收款计划" nzSize="small">
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="24">
+      <nz-table style="padding-top: 5px;" nzSize="small"  #basicTable
+        [nzData]="collectionPlanList" [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 basicTable.data">
+            <td style="width: 7%;">
+              {{data.planName}}
+            </td>
+            <td style="width: 4%;">第一笔</td>
+            <td style="width: 4%;">
+              {{data.price1}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone1}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc1}}
+            </td>
+            <td style="width: 4%;">第二笔</td>
+            <td style="width: 4%;">
+              {{data.price2}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone2}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc2}}
+            </td>
+            <td style="width: 4%;">第三笔</td>
+            <td style="width: 4%;">
+              {{data.price3}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone3}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc3}}
+            </td>
+            <td style="width: 4%;">第四笔</td>
+            <td style="width: 4%;">
+              {{data.price4}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone4}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc4}}
+            </td>
+            <td style="width: 4%;">第五笔</td>
+            <td style="width: 4%;">
+              {{data.price5}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone5}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc5}}
+            </td>
+          </tr>
+        </tbody>
+      </nz-table>
+    </div>
+  </div>
+</nz-card>
+
+
+<!-- 回款情况 -->
+<nz-card nzTitle="回款情况" nzSize="small">
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="24">
+      <nz-table style="padding-top: 5px;" nzSize="small"  #basicTable2
+        [nzData]="paymentCollectionList" [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 basicTable2.data">
+            <td style="width: 7%;">
+              {{data.planName}}
+            </td>
+            <td style="width: 4%;">第一笔</td>
+            <td style="width: 4%;">
+              {{data.price1}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone1}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc1}}
+            </td>
+            <td style="width: 4%;">第二笔</td>
+            <td style="width: 4%;">
+              {{data.price2}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone2}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc2}}
+            </td>
+            <td style="width: 4%;">第三笔</td>
+            <td style="width: 4%;">
+              {{data.price3}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone3}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc3}}
+            </td>
+            <td style="width: 4%;">第四笔</td>
+            <td style="width: 4%;">
+              {{data.price4}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone4}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc4}}
+            </td>
+            <td style="width: 4%;">第五笔</td>
+            <td style="width: 4%;">
+              {{data.price5}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone5}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc5}}
+            </td>
+          </tr>
+        </tbody>
+      </nz-table>
+    </div>
+  </div>
+</nz-card>
+
+
+<!-- 付款计划 -->
+<nz-card nzTitle="付款计划" nzSize="small">
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="24">
+      <nz-table style="padding-top: 5px;" nzSize="small"  #basicTable3
+        [nzData]="paymentPlanList" [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 basicTable3.data">
+            <td style="width: 7%;">
+              {{data.planName}}
+            </td>
+            <td style="width: 4%;">第一笔</td>
+            <td style="width: 4%;">
+              {{data.price1}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone1}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc1}}
+            </td>
+            <td style="width: 4%;">第二笔</td>
+            <td style="width: 4%;">
+              {{data.price2}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone2}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc2}}
+            </td>
+            <td style="width: 4%;">第三笔</td>
+            <td style="width: 4%;">
+              {{data.price3}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone3}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc3}}
+            </td>
+            <td style="width: 4%;">第四笔</td>
+            <td style="width: 4%;">
+              {{data.price4}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone4}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc4}}
+            </td>
+            <td style="width: 4%;">第五笔</td>
+            <td style="width: 4%;">
+              {{data.price5}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone5}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc5}}
+            </td>
+          </tr>
+        </tbody>
+      </nz-table>
+    </div>
+  </div>
+</nz-card>
+
+
+<!-- 付款情况 -->
+<nz-card nzTitle="付款情况" nzSize="small">
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="24">
+      <nz-table style="padding-top: 5px;" nzSize="small" #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%;">
+              {{data.planName}}
+            </td>
+            <td style="width: 4%;">第一笔</td>
+            <td style="width: 4%;">
+              {{data.price1}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone1}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc1}}
+            </td>
+            <td style="width: 4%;">第二笔</td>
+            <td style="width: 4%;">
+              {{data.price2}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone2}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc2}}
+            </td>
+            <td style="width: 4%;">第三笔</td>
+            <td style="width: 4%;">
+              {{data.price3}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone3}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc3}}
+            </td>
+            <td style="width: 4%;">第四笔</td>
+            <td style="width: 4%;">
+              {{data.price4}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone4}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc4}}
+            </td>
+            <td style="width: 4%;">第五笔</td>
+            <td style="width: 4%;">
+              {{data.price5}}
+            </td>
+            <td style="width: 5%;">
+              {{data.milestone5}}
+            </td>
+            <td style="width: 5%;">
+              {{data.desc5}}
+            </td>
+          </tr>
+        </tbody>
+      </nz-table>
+    </div>
+  </div>
+</nz-card>

+ 24 - 0
src/app/routes/project-manage-archives/view/business-affairs/business-affairs.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { ProjectManageArchivesViewBusinessAffairsComponent } from './business-affairs.component';
+
+describe('ProjectManageArchivesViewBusinessAffairsComponent', () => {
+  let component: ProjectManageArchivesViewBusinessAffairsComponent;
+  let fixture: ComponentFixture<ProjectManageArchivesViewBusinessAffairsComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ProjectManageArchivesViewBusinessAffairsComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ProjectManageArchivesViewBusinessAffairsComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 25 - 0
src/app/routes/project-manage-archives/view/business-affairs/business-affairs.component.ts

@@ -0,0 +1,25 @@
+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';
+
+@Component({
+  selector: 'app-project-manage-archives-view-business-affairs',
+  templateUrl: './business-affairs.component.html',
+})
+export class ProjectManageArchivesViewBusinessAffairsComponent implements OnInit {
+  
+
+  constructor(
+  ) { }
+
+  ngOnInit(): void {
+  }
+
+  projectManageArchives: ProjectManageArchives = {}; //项目档案实体对象
+  collectionPlanList = []; //收款计划数据
+  paymentCollectionList = []; //回款情况数据
+  paymentPlanList = []; //付款计划
+  paymentStatusList = []; //付款情况
+  
+}

+ 118 - 0
src/app/routes/project-manage-archives/view/development/development.component.html

@@ -0,0 +1,118 @@
+<!-- 商务 -->
+<form nz-form>
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">客户编码</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.cusCode}}</nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">客户名称</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.cusName}}</nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">开发项目经理</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.deManager}}</nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">开发工程师</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.deEngineer}}</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">
+      <nz-table style="padding-top: 5px;" nzSize="small" #expandTable [nzData]="listOfMapData"
+        nzTableLayout="fixed" [nzShowPagination]="false" [nzFrontPagination]="false">
+        <thead>
+          <tr>
+            <th style="width: 8%;" ></th>
+            <th style="width: 5%;">编码</th>
+            <th style="width: 12%;">里程碑</th>
+            <th style="width: 10%;">开始时间</th>
+            <th style="width: 10%;">结束时间</th>
+            <th style="width: 10%;">计划人天</th>
+            <th style="width: 20%;">执行人</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)">*
+                </td>
+                <td>{{item.muilesCode}}</td>
+                <td>
+                  {{item.muilesName}}
+                </td>
+                <td>
+                  {{item.startDate}}
+                </td>
+                <td>
+                  {{item.endDate}}
+                </td>
+                <td>
+                  {{item.planTime}}
+                </td>
+                <td>
+                  {{item.executor}}
+                </td>
+                <td>
+                  {{item.realTime}}
+                </td>
+              </tr>
+            </ng-container>
+          </ng-container>
+        </tbody>
+      </nz-table>
+    </div>
+  </div>
+</nz-card>

+ 24 - 0
src/app/routes/project-manage-archives/view/development/development.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { ProjectManageArchivesViewDevelopmentComponent } from './development.component';
+
+describe('ProjectManageArchivesViewDevelopmentComponent', () => {
+  let component: ProjectManageArchivesViewDevelopmentComponent;
+  let fixture: ComponentFixture<ProjectManageArchivesViewDevelopmentComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ProjectManageArchivesViewDevelopmentComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ProjectManageArchivesViewDevelopmentComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 77 - 0
src/app/routes/project-manage-archives/view/development/development.component.ts

@@ -0,0 +1,77 @@
+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-view-development',
+  templateUrl: './development.component.html',
+})
+export class ProjectManageArchivesViewDevelopmentComponent implements OnInit {
+ 
+
+  constructor(
+   
+  ) { }
+
+  ngOnInit(): void {
+    
+  }
+
+  projectManageArchives: ProjectManageArchives = {}; //项目档案主表实体
+  listOfMapData: any = []; //树形集合
+  remittanceInformation: any = {}; //回款信息实体
+
+  /**
+   * 初始化树形
+   */
+  getLoding() {
+    this.listOfMapData.forEach(item => {
+      this.mapOfExpandedData[item.key] = this.convertTreeToList(item);
+    });
+  }
+
+  ///////////////////////////树形配置
+  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);
+    }
+  }
+}

+ 135 - 0
src/app/routes/project-manage-archives/view/essential-information/essential-information.component.html

@@ -0,0 +1,135 @@
+<!-- 基本信息 -->
+<form nz-form>
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="'vertical' ? 24 : null" >项目编码</nz-form-label>
+        <nz-form-control [nzSm]="24" [nzXs]="24">
+          <!-- <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> -->
+          {{projectManageArchivesa.proCode}}
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24">项目名称</nz-form-label>
+        <nz-form-control [nzSm]="24" [nzXs]="24">
+          {{projectManageArchivesa.proName}}
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24">客户编码</nz-form-label>
+        <nz-form-control [nzSm]="24" [nzXs]="24">
+          {{projectManageArchivesa.cusCode}}
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24">客户名称</nz-form-label>
+        <nz-form-control [nzSm]="24" [nzXs]="24">
+          {{projectManageArchivesa.cusName}}
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+  </div>
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24" >项目总金额</nz-form-label>
+        <nz-form-control [nzSm]="24" [nzXs]="24">
+          {{projectManageArchivesa.totalPrice}}
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24" >里程碑类型</nz-form-label>
+        <nz-form-control [nzSm]="24" [nzXs]="24">
+          {{projectManageArchivesa.milestoneType}}
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+  </div>
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24">销售经理</nz-form-label>
+        <nz-form-control [nzSm]="24" [nzXs]="24">
+          {{projectManageArchivesa.saleManager}}
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="18">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24">业务员</nz-form-label>
+        <nz-form-control [nzSm]="24" [nzXs]="24">
+          <!-- <nz-select [nzMaxTagCount]="3" nzMode="multiple" nzPlaceHolder="请选择" formControlName="saleManIds"
+            id="saleManIds" [(ngModel)]="saleManIds">
+            <nz-option *ngFor="let item of personnelList" [nzLabel]="item.id" [nzValue]="item.name"></nz-option>
+          </nz-select> -->
+          {{projectManageArchivesa.saleMan}}
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+  </div>
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24">实施项目经理</nz-form-label>
+        <nz-form-control [nzSm]="24" [nzXs]="24">
+          {{projectManageArchivesa.impManager}}
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="18">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24">实施顾问</nz-form-label>
+        <nz-form-control [nzSm]="24" [nzXs]="24">
+          {{projectManageArchivesa.impConsultant}}
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+  </div>
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24">开发项目经理</nz-form-label>
+        <nz-form-control [nzSm]="24" [nzXs]="24">
+          {{projectManageArchivesa.deManager}}
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="18">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24">开发工程师</nz-form-label>
+        <nz-form-control [nzSm]="24" [nzXs]="24">
+          {{projectManageArchivesa.deEngineer}}
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+  </div>
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24">服务经理</nz-form-label>
+        <nz-form-control [nzSm]="24" [nzXs]="24">
+          {{projectManageArchivesa.seManager}}
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="18">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24">服务工程师</nz-form-label>
+        <nz-form-control [nzSm]="24" [nzXs]="24">
+          {{projectManageArchivesa.seEngineer}}
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+  </div>
+</form>

+ 24 - 0
src/app/routes/project-manage-archives/view/essential-information/essential-information.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { ProjectManageArchivesViewEssentialInformationComponent } from './essential-information.component';
+
+describe('ProjectManageArchivesViewEssentialInformationComponent', () => {
+  let component: ProjectManageArchivesViewEssentialInformationComponent;
+  let fixture: ComponentFixture<ProjectManageArchivesViewEssentialInformationComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ProjectManageArchivesViewEssentialInformationComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ProjectManageArchivesViewEssentialInformationComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 20 - 0
src/app/routes/project-manage-archives/view/essential-information/essential-information.component.ts

@@ -0,0 +1,20 @@
+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';
+
+@Component({
+  selector: 'app-project-manage-archives-view-essential-information',
+  templateUrl: './essential-information.component.html',
+})
+export class ProjectManageArchivesViewEssentialInformationComponent implements OnInit {
+
+
+  constructor(
+  ) { }
+
+  ngOnInit(): void {
+  }
+
+  projectManageArchivesa: ProjectManageArchives = {};
+}

+ 116 - 0
src/app/routes/project-manage-archives/view/implementation/implementation.component.html

@@ -0,0 +1,116 @@
+<!-- 商务 -->
+<form nz-form>
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">客户编码</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.cusCode}}</nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">客户名称</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.cusName}}</nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">实施项目经理</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.impManager}}</nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">实施顾问</nz-form-label>
+        <nz-form-control [nzSm]="16" [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">
+      <nz-table style="padding-top: 5px;" nzSize="small" #expandTable [nzData]="listOfMapData"
+        nzTableLayout="fixed" [nzShowPagination]="false" [nzFrontPagination]="false">
+        <thead>
+          <tr>
+            <th style="width: 8%;" ></th>
+            <th style="width: 5%;">编码</th>
+            <th style="width: 12%;">里程碑</th>
+            <th style="width: 10%;">开始时间</th>
+            <th style="width: 10%;">结束时间</th>
+            <th style="width: 10%;">计划人天</th>
+            <th style="width: 20%;">执行人</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)">*
+                </td>
+                <td>{{item.muilesCode}}</td>
+                <td>
+                  {{item.muilesName}}
+                </td>
+                <td>
+                  {{item.startDate}}
+                </td>
+                <td>
+                  {{item.endDate}}
+                </td>
+                <td>
+                  {{item.planTime}}
+                </td>
+                <td>
+                  {{item.executor}}
+                </td>
+                <td>
+                  {{item.realTime}}
+                </td>
+              </tr>
+            </ng-container>
+          </ng-container>
+        </tbody>
+      </nz-table>
+    </div>
+  </div>
+</nz-card>

+ 24 - 0
src/app/routes/project-manage-archives/view/implementation/implementation.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { ProjectManageArchivesViewImplementationComponent } from './implementation.component';
+
+describe('ProjectManageArchivesViewImplementationComponent', () => {
+  let component: ProjectManageArchivesViewImplementationComponent;
+  let fixture: ComponentFixture<ProjectManageArchivesViewImplementationComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ProjectManageArchivesViewImplementationComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ProjectManageArchivesViewImplementationComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 75 - 0
src/app/routes/project-manage-archives/view/implementation/implementation.component.ts

@@ -0,0 +1,75 @@
+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-view-implementation',
+  templateUrl: './implementation.component.html',
+})
+export class ProjectManageArchivesViewImplementationComponent implements OnInit {
+  
+
+  constructor(
+  ) { }
+
+  ngOnInit(): void {
+  }
+
+  projectManageArchives: ProjectManageArchives = {}; //项目档案主表实体
+  listOfMapData: any = []; //树形集合
+  remittanceInformation: any = {}; //回款信息实体
+
+  /**
+   * 初始化树形
+   */
+  getLoding() {
+    this.listOfMapData.forEach(item => {
+      this.mapOfExpandedData[item.key] = this.convertTreeToList(item);
+    });
+  }
+
+  ///////////////////////////树形配置
+  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);
+    }
+  }
+}

+ 117 - 0
src/app/routes/project-manage-archives/view/serviceta/serviceta.component.html

@@ -0,0 +1,117 @@
+<!-- 服务 -->
+<form nz-form>
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">客户编码</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.cusCode}}</nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">客户名称</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.cusName}}</nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">服务项目经理</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.seManager}}</nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="6">
+      <nz-form-item>
+        <nz-form-label [nzSpan]="8">服务工程师</nz-form-label>
+        <nz-form-control [nzSm]="16" [nzXs]="24">{{projectManageArchives.seEngineer}}</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">
+      <nz-table style="padding-top: 5px;" nzSize="small" #expandTable [nzData]="listOfMapData"
+        nzTableLayout="fixed" [nzShowPagination]="false" [nzFrontPagination]="false">
+        <thead>
+          <tr>
+            <th style="width: 8%;" ></th>
+            <th style="width: 5%;">编码</th>
+            <th style="width: 12%;">里程碑</th>
+            <th style="width: 10%;">开始时间</th>
+            <th style="width: 10%;">结束时间</th>
+            <th style="width: 10%;">计划人天</th>
+            <th style="width: 20%;">执行人</th>
+            <th style="width: 10%;">实际人天</th>
+        </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)">*
+                </td>
+                <td>{{item.muilesCode}}</td>
+                <td>
+                  {{item.muilesName}}
+                </td>
+                <td>
+                  {{item.startDate}}
+                </td>
+                <td>
+                  {{item.endDate}}
+                </td>
+                <td>
+                  {{item.planTime}}
+                </td>
+                <td>
+                  {{item.executor}}
+                </td>
+                <td>
+                  {{item.realTime}}
+                </td>
+              </tr>
+            </ng-container>
+          </ng-container>
+        </tbody>
+      </nz-table>
+    </div>
+  </div>
+</nz-card>

+ 24 - 0
src/app/routes/project-manage-archives/view/serviceta/serviceta.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { ProjectManageArchivesViewServicetaComponent } from './serviceta.component';
+
+describe('ProjectManageArchivesViewServicetaComponent', () => {
+  let component: ProjectManageArchivesViewServicetaComponent;
+  let fixture: ComponentFixture<ProjectManageArchivesViewServicetaComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ProjectManageArchivesViewServicetaComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ProjectManageArchivesViewServicetaComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 77 - 0
src/app/routes/project-manage-archives/view/serviceta/serviceta.component.ts

@@ -0,0 +1,77 @@
+import { Component, OnInit } from '@angular/core';
+import { NzModalRef, NzMessageService } from 'ng-zorro-antd';
+import { _HttpClient } from '@delon/theme';
+import { ProjectNodeTree } from '../../project-node-tree';
+import { ProjectManageArchives } from 'app/entity/project-manage-archives/project-manage-archives';
+
+@Component({
+  selector: 'app-project-manage-archives-view-serviceta',
+  templateUrl: './serviceta.component.html',
+})
+export class ProjectManageArchivesViewServicetaComponent implements OnInit {
+  
+
+  constructor(
+    
+  ) { }
+
+  ngOnInit(): void {
+    
+  }
+
+  projectManageArchives: ProjectManageArchives = {}; //项目档案主表实体
+  listOfMapData: any = []; //树形集合
+  remittanceInformation: any = {}; //回款信息实体
+
+  /**
+   * 初始化树形
+   */
+  getLoding() {
+    this.listOfMapData.forEach(item => {
+      this.mapOfExpandedData[item.key] = this.convertTreeToList(item);
+    });
+  }
+
+  ///////////////////////////树形配置
+  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);
+    }
+  }
+}

+ 40 - 0
src/app/routes/project-manage-archives/view/view.component.html

@@ -0,0 +1,40 @@
+<nz-spin [nzSpinning]="isLoadingSave">
+  <nz-tabset nzTabPosition="left">
+    <!-- 基本信息 -->
+    <nz-tab nzTitle="{{'essential.information'|translate}}">
+      <app-project-manage-archives-view-essential-information #essentialInformation >
+
+      </app-project-manage-archives-view-essential-information>
+    </nz-tab>
+    <!-- 商务 -->
+    <nz-tab nzTitle="{{'business.affairs'|translate}}">
+      <app-project-manage-archives-view-business-affairs #businessAffairs >
+
+      </app-project-manage-archives-view-business-affairs>
+    </nz-tab>
+    <!-- 实施 -->
+    <nz-tab nzTitle="{{'implementation'|translate}}">
+      <app-project-manage-archives-view-implementation #implementation>
+
+      </app-project-manage-archives-view-implementation>
+    </nz-tab>
+    <!-- 开发 -->
+    <nz-tab nzTitle="{{'development'|translate}}">
+      <app-project-manage-archives-view-development #development>
+
+      </app-project-manage-archives-view-development>
+    </nz-tab>
+    <!-- 服务 -->
+    <nz-tab nzTitle="{{'service'|translate}}">
+      <app-project-manage-archives-view-serviceta #serviceta>
+
+      </app-project-manage-archives-view-serviceta>
+    </nz-tab>
+  </nz-tabset>
+</nz-spin>
+<!-- 按钮 -->
+<div class="base">
+  <!-- 关闭按钮 -->
+  <button nz-button (click)="close()"
+    ><span>{{'pm.quotation.cancel'|translate}}</span></button>
+</div>

+ 24 - 0
src/app/routes/project-manage-archives/view/view.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { ProjectManageArchivesViewComponent } from './view.component';
+
+describe('ProjectManageArchivesViewComponent', () => {
+  let component: ProjectManageArchivesViewComponent;
+  let fixture: ComponentFixture<ProjectManageArchivesViewComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ProjectManageArchivesViewComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ProjectManageArchivesViewComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 131 - 0
src/app/routes/project-manage-archives/view/view.component.ts

@@ -0,0 +1,131 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { NzModalRef, NzMessageService, NzDrawerRef } from 'ng-zorro-antd';
+import { _HttpClient } from '@delon/theme';
+import { ProjectManageArchivesService } from 'app/services/project-manage-archives/project-manage-archives.service';
+import { ProjectManageArchivesViewEssentialInformationComponent } from './essential-information/essential-information.component';
+import { ProjectManageArchivesViewBusinessAffairsComponent } from './business-affairs/business-affairs.component';
+import { ProjectManageArchivesViewImplementationComponent } from './implementation/implementation.component';
+import { ProjectManageArchivesViewDevelopmentComponent } from './development/development.component';
+import { ProjectManageArchivesViewServicetaComponent } from './serviceta/serviceta.component';
+
+@Component({
+  selector: 'app-project-manage-archives-view',
+  templateUrl: './view.component.html',
+  styles: [
+    `
+      .base {
+        position: absolute;
+        bottom: 0px;
+        width: 100%;
+        border-top: 1px solid rgb(232, 232, 232);
+        padding: 6px 16px;
+        text-align: right;
+        left: 0px;
+        background: #fff;
+        z-index: 99;
+      }
+    `,
+  ],
+})
+export class ProjectManageArchivesViewComponent implements OnInit {
+
+  constructor(
+    private projectManageArchivesService:ProjectManageArchivesService,
+    private drawerRef:NzDrawerRef
+  ) { }
+  isLoadingSave=false;
+  //基本信息
+  @ViewChild('essentialInformation') essentialInformation: ProjectManageArchivesViewEssentialInformationComponent;
+  //商务
+  @ViewChild('businessAffairs') businessAffairs: ProjectManageArchivesViewBusinessAffairsComponent;
+  //实施
+  @ViewChild('implementation') implementation: ProjectManageArchivesViewImplementationComponent;
+  //开发
+  @ViewChild('development') development: ProjectManageArchivesViewDevelopmentComponent;
+  //服务
+  @ViewChild('serviceta') serviceta: ProjectManageArchivesViewServicetaComponent;
+
+  ngOnInit(): void {
+    this.isLoadingSave=true;
+    this.getById().then(()=>{
+      this.isLoadingSave=false;
+    });
+  }
+
+  close() {
+    this.drawerRef.close(true);
+  }
+
+  /**
+   * 根据类型id回写数据到实施、开发、服务页签的汇款信息
+   * @param data 计划对象
+   */
+  remittanceInformationChange(data) {
+    //实施页签
+    if (data.planName.indexOf("实施")!==-1) {
+      this.implementation.remittanceInformation = data;
+    } else if (data.planName.indexOf("开发")!==-1) {
+      //开发
+      this.development.remittanceInformation = data;
+    } else if (data.planName.indexOf("服务")!==-1) {
+      //服务
+      this.serviceta.remittanceInformation = data;
+    }
+  }
+
+  /**
+   * 修改根据id获取所有数据
+   */
+  id = '';
+  getById() {
+    return new Promise(resolve => {
+      this.projectManageArchivesService.getListById(this.id).then(response => {
+        if (response.result) {
+          let projectManageArchives = JSON.parse(JSON.stringify(response.result));
+          // //基本信息
+          // this.projectManageArchivesaEntiy(projectManageArchives);
+          // ///////////////基本信息页签
+          this.essentialInformation.projectManageArchivesa = projectManageArchives;
+          ///////////////商务页签
+          //主表数据
+          this.businessAffairs.projectManageArchives = projectManageArchives;
+          //收款计划
+          if (projectManageArchives.bsInfo.coPlanList) {
+            this.businessAffairs.collectionPlanList = projectManageArchives.bsInfo.coPlanList;
+          }
+          //回款情况
+          if (projectManageArchives.bsInfo.coSituationList) {
+            this.businessAffairs.paymentCollectionList = projectManageArchives.bsInfo.coSituationList;
+          }
+          //付款计划
+          if (projectManageArchives.bsInfo.payPlanList) {
+            this.businessAffairs.paymentPlanList = projectManageArchives.bsInfo.payPlanList;
+          }
+          //付款情况
+          if (projectManageArchives.bsInfo.paySituationList) {
+            this.businessAffairs.paymentStatusList = projectManageArchives.bsInfo.paySituationList;
+          }
+          //对应的收款情况
+          this.businessAffairs.paymentCollectionList.forEach(element => {
+            this.remittanceInformationChange(element);
+          });
+          /////////////////实施
+          //主表基本数据
+          this.implementation.projectManageArchives=projectManageArchives
+          //里程碑明细
+          this.implementation.listOfMapData = projectManageArchives.ipInfo.planList;
+          this.implementation.getLoding();
+          ////////////////开发
+          this.development.projectManageArchives=projectManageArchives
+          this.development.listOfMapData = projectManageArchives.deInfo.planList;
+          this.development.getLoding();
+          // ////////////////服务
+          this.serviceta.projectManageArchives=projectManageArchives
+          this.serviceta.listOfMapData = projectManageArchives.seInfo.planList;
+          this.serviceta.getLoding();
+          resolve();
+        }
+      });
+    });
+  }
+}

+ 86 - 8
src/app/routes/report-form/project-statistics/project-statistics.component.html

@@ -1,9 +1,87 @@
-<page-header [action]="phActionTpl">
-  <ng-template #phActionTpl>
-    <button (click)="add()" nz-button nzType="primary">新建</button>
-  </ng-template>
-</page-header>
+<!-- 项目情况统计表 -->
 <nz-card>
-  <sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf>
-  <st #st [data]="url" [columns]="columns"></st>
-</nz-card>
+  <form nz-form>
+    <div nz-row [nzGutter]="{ xs: 8, sm: 16, md: 24, lg: 32 }">
+      <div nz-col [nzSpan]="8">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24">项目编码</nz-form-label>
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            <input nz-input name="code" [(ngModel)]="projectStatisticsWhere.proCode" />
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <div nz-col [nzSpan]="8">
+        <nz-form-item>
+          <nz-form-label [nzSm]="2" [nzXs]="24" [nzNoColon]=true></nz-form-label>
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            <button nzType="primary" (click)="query()" nz-button><span>查询</span></button>
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+  </form>
+  <!-- 表格 -->
+  <div nz-row [nzGutter]="{ xs: 8, sm: 16, md: 24, lg: 32 }">
+    <div nz-col [nzSpan]="24">
+      <nz-table nzSize="small" class="tableTdPadding" [nzData]="listOfData" #basicTable nzBordered [nzFrontPagination]="false"
+        [nzLoading]="isSpinning">
+        <thead>
+          <tr>
+            <th rowSpan="2">项目编码</th>
+            <th rowSpan="2">项目名称</th>
+            <th colSpan="5">收入</th>
+            <th colSpan="5">付款</th>
+            <th rowSpan="2">应税合计</th>
+            <th rowSpan="2">税后合计</th>
+            <th colSpan="6">内部成本</th>
+            <th rowSpan="2">毛利</th>
+          </tr>
+          <tr>
+            <th>产品</th>
+            <th>实施</th>
+            <th>开发</th>
+            <th>服务</th>
+            <th>其他</th>
+            <th>产品</th>
+            <th>实施</th>
+            <th>开发</th>
+            <th>服务</th>
+            <th>其他</th>
+            <th>预留</th>
+            <th>工资</th>
+            <th>奖金</th>
+            <th>费用</th>
+            <th>销售提成</th>
+            <th>公摊费用</th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr *ngFor="let data of basicTable.data">
+            <td>{{ data.proCode }}</td>
+            <td>{{ data.proName }}</td>
+            <!-- <td>{{ data.cusName }}</td> -->
+            <td>{{ data.proIncome }}</td>
+            <td>{{ data.imIncome }}</td>
+            <td>{{ data.deIncome }}</td>
+            <td>{{ data.seIncome }}</td>
+            <td>{{ data.otherIncome }}</td>
+            <td>{{ data.proPayment }}</td>
+            <td>{{ data.imPayment }}</td>
+            <td>{{ data.dePayment }}</td>
+            <td>{{ data.sePayment }}</td>
+            <td>{{ data.otherPayment }}</td>
+            <td>{{ data.totalTax }}</td>
+            <td>{{ data.totalAfterTax }}</td>
+            <td>{{ data.reserve }}</td>
+            <td>{{ data.salary }}</td>
+            <td>{{ data.award }}</td>
+            <td>{{ data.cost }}</td>
+            <td>{{ data.comSales }}</td>
+            <td>{{ data.exShared }}</td>
+            <td>{{ data.groProfit }}</td>
+          </tr>
+        </tbody>
+      </nz-table>
+    </div>
+  </div>
+</nz-card>

+ 26 - 24
src/app/routes/report-form/project-statistics/project-statistics.component.ts

@@ -2,39 +2,41 @@ import { Component, OnInit, ViewChild } from '@angular/core';
 import { _HttpClient, ModalHelper } from '@delon/theme';
 import { STColumn, STComponent } from '@delon/abc';
 import { SFSchema } from '@delon/form';
+import { ProjectStatisticsService } from 'app/services/report-form/project-statistics.service';
 
 @Component({
   selector: 'app-report-form-project-statistics',
   templateUrl: './project-statistics.component.html',
 })
 export class ReportFormProjectStatisticsComponent implements OnInit {
-  url = `/user`;
-  searchSchema: SFSchema = {
-    properties: {
-      no: {
-        type: 'string',
-        title: '编号'
-      }
-    }
-  };
-  @ViewChild('st') st: STComponent;
-  columns: STColumn[] = [
-    { title: '编号', index: 'no' },
-    { title: '调用次数', type: 'number', index: 'callNo' },
-    { title: '头像', type: 'img', width: '50px', index: 'avatar' },
-    { title: '时间', type: 'date', index: 'updatedAt' },
-    {
-      title: '',
-      buttons: [
-        // { text: '查看', click: (item: any) => `/form/${item.id}` },
-        // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' },
-      ]
-    }
-  ];
+  
 
-  constructor(private http: _HttpClient, private modal: ModalHelper) { }
+  constructor(
+    private projectStatisticsService:ProjectStatisticsService
+  ) { }
 
   ngOnInit() { }
+  isSpinning=false;
+  listOfData=[];
+  projectStatisticsWhere:any={}//查询条件参数
+
+  /**
+   * 查询
+   */
+  getCostAccountingData(){
+     return new Promise((resolve)=>{
+      this.projectStatisticsService.getCostAccountingData(null).then((response)=>{
+        this.listOfData=response.result;
+      })
+     })
+  }
+
+  /**
+   * 查询按钮
+   */
+  query(){
+    this.getCostAccountingData();
+  }
 
   add() {
     // this.modal

+ 2 - 0
src/app/routes/routes-routing.module.ts

@@ -64,6 +64,8 @@ const routes: Routes = [
       ,{ path: 'down-payment-management', loadChildren: './down-payment-management/down-payment-management.module#DownPaymentManagementModule' }
       //费用报销
       ,{ path: 'expense-reimbursement', loadChildren: './expense-reimbursement/expense-reimbursement.module#ExpenseReimbursementModule' }
+      //报表
+      ,{ path: 'report-form', loadChildren: './report-form/report-form.module#ReportFormModule' }
   ],
   },
   // 全屏布局

+ 19 - 0
src/app/services/report-form/project-statistics.service.ts

@@ -0,0 +1,19 @@
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { BaseResponse } from 'app/entity/baseResponse';
+
+@Injectable({
+  providedIn: 'root'
+})
+/**
+ * 报表
+ */
+export class ProjectStatisticsService {
+
+  constructor(private http:HttpClient) { }
+
+  //获取成本核算数据
+  async getCostAccountingData(body: any): Promise<BaseResponse<any>> {
+    return await this.http.get<BaseResponse<any>>("report/getCostAccountingData", { params: body }).toPromise();
+  }
+}