chenc vor 3 Jahren
Ursprung
Commit
3702895c04
47 geänderte Dateien mit 1227 neuen und 242 gelöschten Zeilen
  1. 14 0
      src/app/entity/basedata/base-customer-industry.ts
  2. 28 9
      src/app/routes/basedata/basedata-routing.module.ts
  3. 46 27
      src/app/routes/basedata/basedata.module.ts
  4. 1 0
      src/app/routes/basedata/business-relations/business-relations.component.html
  5. 24 0
      src/app/routes/basedata/business-relations/business-relations.component.spec.ts
  6. 17 0
      src/app/routes/basedata/business-relations/business-relations.component.ts
  7. 1 0
      src/app/routes/basedata/customer-classification/customer-classification.component.html
  8. 24 0
      src/app/routes/basedata/customer-classification/customer-classification.component.spec.ts
  9. 30 0
      src/app/routes/basedata/customer-classification/customer-classification.component.ts
  10. 1 0
      src/app/routes/basedata/customer-grouping/customer-grouping.component.html
  11. 24 0
      src/app/routes/basedata/customer-grouping/customer-grouping.component.spec.ts
  12. 17 0
      src/app/routes/basedata/customer-grouping/customer-grouping.component.ts
  13. 1 0
      src/app/routes/basedata/customer-relationship/customer-relationship.component.html
  14. 24 0
      src/app/routes/basedata/customer-relationship/customer-relationship.component.spec.ts
  15. 17 0
      src/app/routes/basedata/customer-relationship/customer-relationship.component.ts
  16. 1 0
      src/app/routes/basedata/information-sources/information-sources.component.html
  17. 24 0
      src/app/routes/basedata/information-sources/information-sources.component.spec.ts
  18. 17 0
      src/app/routes/basedata/information-sources/information-sources.component.ts
  19. 79 35
      src/app/routes/basedata/milestone-category/milestone-category.component.ts
  20. 1 0
      src/app/routes/basedata/sleep-type/sleep-type.component.html
  21. 24 0
      src/app/routes/basedata/sleep-type/sleep-type.component.spec.ts
  22. 16 0
      src/app/routes/basedata/sleep-type/sleep-type.component.ts
  23. 11 0
      src/app/routes/basedata/test/add/add-routing.module.ts
  24. 1 0
      src/app/routes/basedata/test/add/add.component.html
  25. 24 0
      src/app/routes/basedata/test/add/add.component.spec.ts
  26. 21 0
      src/app/routes/basedata/test/add/add.component.ts
  27. 19 0
      src/app/routes/basedata/test/add/add.module.ts
  28. 13 0
      src/app/routes/basedata/test/test-routing.module.ts
  29. 9 0
      src/app/routes/basedata/test/test.component.html
  30. 24 0
      src/app/routes/basedata/test/test.component.spec.ts
  31. 48 0
      src/app/routes/basedata/test/test.component.ts
  32. 21 0
      src/app/routes/basedata/test/test.module.ts
  33. 1 0
      src/app/routes/basedata/unit-size/unit-size.component.html
  34. 24 0
      src/app/routes/basedata/unit-size/unit-size.component.spec.ts
  35. 17 0
      src/app/routes/basedata/unit-size/unit-size.component.ts
  36. 1 0
      src/app/routes/basedata/value-level/value-level.component.html
  37. 24 0
      src/app/routes/basedata/value-level/value-level.component.spec.ts
  38. 18 0
      src/app/routes/basedata/value-level/value-level.component.ts
  39. 1 1
      src/app/routes/down-payment-management/payment-slip/add/add.component.html
  40. 1 1
      src/app/routes/down-payment-management/payment-slip/update/update.component.html
  41. 1 1
      src/app/routes/down-payment-management/receipt/add/add.component.html
  42. 1 1
      src/app/routes/down-payment-management/receipt/update/update.component.html
  43. 66 66
      src/app/routes/project-manage-archives/add/business-affairs/business-affairs.component.html
  44. 179 23
      src/app/routes/project-manage-archives/add/business-affairs/business-affairs.component.ts
  45. 66 66
      src/app/routes/project-manage-archives/update/business-affairs/business-affairs.component.html
  46. 163 12
      src/app/routes/project-manage-archives/update/business-affairs/business-affairs.component.ts
  47. 42 0
      src/app/services/basedata/base-customer-industry.service.ts

+ 14 - 0
src/app/entity/basedata/base-customer-industry.ts

@@ -0,0 +1,14 @@
+import { Page } from '../page';
+
+/**
+ * 客商行业
+ */
+export class BaseCustomerIndustry extends Page{
+    key?:string;
+    id?:string;// 客商行业行业主键
+    code?:string;//客商行业编码
+    name?:string;//客商行业名称
+    parentId?:string;//父级id
+    status?:string;//是否启用
+    pkOrg?:string;//组织id
+}

+ 28 - 9
src/app/routes/basedata/basedata-routing.module.ts

@@ -6,11 +6,21 @@ import { BasedataCustomerCustomerAddComponent } from './customer/customer-add/cu
 import { BasedataCustomerEditComponent } from './customer/edit/edit.component';
 import { BasedataCustomerDetailsComponent } from './customer/details/details.component';
 import { BasedataPostComponent } from './post/post.component';
-import { BasedataProjectApprovalComponent } from './project-approval/project-approval.component';
-import { BasedataBaseArchivesMilestoneComponent } from './base-archives-milestone/base-archives-milestone.component';
-import { BasedataBaseArchivesCollectionLineComponent } from './base-archives-collection-line/base-archives-collection-line.component';
-import { BasedataBaseArchivesCostComponent } from './base-archives-cost/base-archives-cost.component';
+import { BasedataProjectApprovalComponent } from './project-approval/project-approval.component';
+import { BasedataBaseArchivesMilestoneComponent } from './base-archives-milestone/base-archives-milestone.component';
+import { BasedataBaseArchivesCollectionLineComponent } from './base-archives-collection-line/base-archives-collection-line.component';
+import { BasedataBaseArchivesCostComponent } from './base-archives-cost/base-archives-cost.component';
 import { BasedataMilestoneCategoryComponent } from './milestone-category/milestone-category.component';
+import { BasedataTestComponent } from './test/test.component';
+import { TestAddComponent } from './test/add/add.component';
+import { BasedataCustomerClassificationComponent } from './customer-classification/customer-classification.component';
+import { BasedataInformationSourcesComponent } from './information-sources/information-sources.component';
+import { BasedataBusinessRelationsComponent } from './business-relations/business-relations.component';
+import { BasedataCustomerGroupingComponent } from './customer-grouping/customer-grouping.component';
+import { BasedataSleepTypeComponent } from './sleep-type/sleep-type.component';
+import { BasedataUnitSizeComponent } from './unit-size/unit-size.component';
+import { BasedataCustomerRelationshipComponent } from './customer-relationship/customer-relationship.component';
+import { BasedataValueLevelComponent } from './value-level/value-level.component';
 
 const routes: Routes = [
   { path: 'customer', component: BasedataCustomerComponent },
@@ -18,11 +28,20 @@ const routes: Routes = [
   { path: "material", component: BasedataMaterialComponent },
   { path: 'details', component: BasedataCustomerDetailsComponent },
   { path: 'post', component: BasedataPostComponent },
-  { path: 'project-approval', component: BasedataProjectApprovalComponent },
-  { path: 'base-archives-milestone', component: BasedataBaseArchivesMilestoneComponent },
-  { path: 'base-archives-collection-line', component: BasedataBaseArchivesCollectionLineComponent },
-  { path: 'base-archives-cost', component: BasedataBaseArchivesCostComponent },
-  { path: 'milestone-category', component: BasedataMilestoneCategoryComponent }];
+  { path: 'project-approval', component: BasedataProjectApprovalComponent },
+  { path: 'base-archives-milestone', component: BasedataBaseArchivesMilestoneComponent },
+  { path: 'base-archives-collection-line', component: BasedataBaseArchivesCollectionLineComponent },
+  { path: 'base-archives-cost', component: BasedataBaseArchivesCostComponent },
+  { path: 'milestone-category', component: BasedataMilestoneCategoryComponent },
+  { path: 'test', component: BasedataTestComponent },{path:'test/add',component:TestAddComponent},
+  { path: 'customer-classification', component: BasedataCustomerClassificationComponent },
+  { path: 'information-sources', component: BasedataInformationSourcesComponent },
+  { path: 'business-relations', component: BasedataBusinessRelationsComponent },
+  { path: 'customer-grouping', component: BasedataCustomerGroupingComponent },
+  { path: 'sleep-type', component: BasedataSleepTypeComponent },
+  { path: 'unit-size', component: BasedataUnitSizeComponent },
+  { path: 'customer-relationship', component: BasedataCustomerRelationshipComponent },
+  { path: 'value-level', component: BasedataValueLevelComponent }];
 @NgModule({
   imports: [RouterModule.forChild(routes)],
   exports: [RouterModule]

+ 46 - 27
src/app/routes/basedata/basedata.module.ts

@@ -9,20 +9,30 @@ import { BasedataCustomerCustomerAddComponent } from './customer/customer-add/cu
 import { BasedataCustomerEditComponent } from './customer/edit/edit.component';
 import { BasedataCustomerDetailsComponent } from './customer/details/details.component';
 import { BasedataCustomerIsAbbreviationComponent } from './customer/is-abbreviation/is-abbreviation.component';
-import { BasedataPostComponent } from './post/post.component';
-import { BasedataPostAddComponent } from './post/add/add.component';
-import { BasedataProjectApprovalComponent } from './project-approval/project-approval.component';
-import { BasedataProjectApprovalAddComponent } from './project-approval/add/add.component';
-import { BasedataBaseArchivesMilestoneComponent } from './base-archives-milestone/base-archives-milestone.component';
-import { BasedataBaseArchivesMilestoneAddComponent } from './base-archives-milestone/add/add.component';
-import { BasedataBaseArchivesCollectionLineComponent } from './base-archives-collection-line/base-archives-collection-line.component';
-import { BasedataBaseArchivesCollectionLineAddComponent } from './base-archives-collection-line/add/add.component';
-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 { BasedataBaseArchivesCollectionLineViewComponent } from './base-archives-collection-line/view/view.component';
+import { BasedataPostComponent } from './post/post.component';
+import { BasedataPostAddComponent } from './post/add/add.component';
+import { BasedataProjectApprovalComponent } from './project-approval/project-approval.component';
+import { BasedataProjectApprovalAddComponent } from './project-approval/add/add.component';
+import { BasedataBaseArchivesMilestoneComponent } from './base-archives-milestone/base-archives-milestone.component';
+import { BasedataBaseArchivesMilestoneAddComponent } from './base-archives-milestone/add/add.component';
+import { BasedataBaseArchivesCollectionLineComponent } from './base-archives-collection-line/base-archives-collection-line.component';
+import { BasedataBaseArchivesCollectionLineAddComponent } from './base-archives-collection-line/add/add.component';
+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 { BasedataBaseArchivesCollectionLineViewComponent } from './base-archives-collection-line/view/view.component';
 import { BasedataBaseArchivesCostViewComponent } from './base-archives-cost/view/view.component';
+import { BasedataTestComponent } from './test/test.component';
+import { TestAddComponent } from './test/add/add.component';
+import { BasedataCustomerClassificationComponent } from './customer-classification/customer-classification.component';
+import { BasedataInformationSourcesComponent } from './information-sources/information-sources.component';
+import { BasedataBusinessRelationsComponent } from './business-relations/business-relations.component';
+import { BasedataCustomerGroupingComponent } from './customer-grouping/customer-grouping.component';
+import { BasedataSleepTypeComponent } from './sleep-type/sleep-type.component';
+import { BasedataUnitSizeComponent } from './unit-size/unit-size.component';
+import { BasedataCustomerRelationshipComponent } from './customer-relationship/customer-relationship.component';
+import { BasedataValueLevelComponent } from './value-level/value-level.component';
 
 const COMPONENTS = [
   BasedataCustomerComponent,
@@ -30,21 +40,30 @@ const COMPONENTS = [
   BasedataMaterialComponent,
   BasedataCustomerDetailsComponent,
   BasedataPostComponent
-  ,
-  BasedataProjectApprovalComponent,
-  BasedataBaseArchivesMilestoneComponent,
-  BasedataBaseArchivesCollectionLineComponent,
-  BasedataBaseArchivesCostComponent,
-  BasedataMilestoneCategoryComponent];
+  ,
+  BasedataProjectApprovalComponent,
+  BasedataBaseArchivesMilestoneComponent,
+  BasedataBaseArchivesCollectionLineComponent,
+  BasedataBaseArchivesCostComponent,
+  BasedataMilestoneCategoryComponent,
+  BasedataTestComponent,TestAddComponent,
+  BasedataCustomerClassificationComponent,
+  BasedataInformationSourcesComponent,
+  BasedataBusinessRelationsComponent,
+  BasedataCustomerGroupingComponent,
+  BasedataSleepTypeComponent,
+  BasedataUnitSizeComponent,
+  BasedataCustomerRelationshipComponent,
+  BasedataValueLevelComponent];
 const COMPONENTS_NOROUNT = [BasedataCustomerEditComponent,
-  BasedataCustomerIsAbbreviationComponent,
-  BasedataPostAddComponent,
-  BasedataProjectApprovalAddComponent,
-  BasedataBaseArchivesMilestoneAddComponent,
-  BasedataBaseArchivesCollectionLineAddComponent,
-  BasedataBaseArchivesCostAddComponent,
-  BasedataMilestoneCategoryEditComponent,
-  BasedataBaseArchivesCollectionLineViewComponent,
+  BasedataCustomerIsAbbreviationComponent,
+  BasedataPostAddComponent,
+  BasedataProjectApprovalAddComponent,
+  BasedataBaseArchivesMilestoneAddComponent,
+  BasedataBaseArchivesCollectionLineAddComponent,
+  BasedataBaseArchivesCostAddComponent,
+  BasedataMilestoneCategoryEditComponent,
+  BasedataBaseArchivesCollectionLineViewComponent,
   BasedataBaseArchivesCostViewComponent];
 
 @NgModule({

+ 1 - 0
src/app/routes/basedata/business-relations/business-relations.component.html

@@ -0,0 +1 @@
+<app-basedata-milestone-category></app-basedata-milestone-category>

+ 24 - 0
src/app/routes/basedata/business-relations/business-relations.component.spec.ts

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

+ 17 - 0
src/app/routes/basedata/business-relations/business-relations.component.ts

@@ -0,0 +1,17 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { _HttpClient, ModalHelper } from '@delon/theme';
+import { STColumn, STComponent } from '@delon/abc';
+import { SFSchema } from '@delon/form';
+
+@Component({
+  selector: 'app-basedata-business-relations',
+  templateUrl: './business-relations.component.html',
+})
+export class BasedataBusinessRelationsComponent implements OnInit {
+  
+
+  constructor() { }
+
+  ngOnInit() { }
+
+}

+ 1 - 0
src/app/routes/basedata/customer-classification/customer-classification.component.html

@@ -0,0 +1 @@
+<app-basedata-milestone-category></app-basedata-milestone-category>

+ 24 - 0
src/app/routes/basedata/customer-classification/customer-classification.component.spec.ts

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

+ 30 - 0
src/app/routes/basedata/customer-classification/customer-classification.component.ts

@@ -0,0 +1,30 @@
+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 { NzNotificationService } from 'ng-zorro-antd';
+import { DictService } from 'app/services/dict.service';
+import { I18NService } from '@core';
+
+@Component({
+  selector: 'app-basedata-customer-classification',
+  templateUrl: './customer-classification.component.html',
+})
+export class BasedataCustomerClassificationComponent implements OnInit {
+  
+
+  constructor(
+    private notification: NzNotificationService,
+    private dictService: DictService,
+    private i18NService: I18NService,
+  ) { }
+
+  ngOnInit() { }
+
+  add() {
+    // this.modal
+    //   .createStatic(FormEditComponent, { i: { id: 0 } })
+    //   .subscribe(() => this.st.reload());
+  }
+
+}

+ 1 - 0
src/app/routes/basedata/customer-grouping/customer-grouping.component.html

@@ -0,0 +1 @@
+<app-basedata-milestone-category></app-basedata-milestone-category>

+ 24 - 0
src/app/routes/basedata/customer-grouping/customer-grouping.component.spec.ts

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

+ 17 - 0
src/app/routes/basedata/customer-grouping/customer-grouping.component.ts

@@ -0,0 +1,17 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { _HttpClient, ModalHelper } from '@delon/theme';
+import { STColumn, STComponent } from '@delon/abc';
+import { SFSchema } from '@delon/form';
+
+@Component({
+  selector: 'app-basedata-customer-grouping',
+  templateUrl: './customer-grouping.component.html',
+})
+export class BasedataCustomerGroupingComponent implements OnInit {
+  
+  constructor() { }
+
+  ngOnInit() { }
+
+
+}

+ 1 - 0
src/app/routes/basedata/customer-relationship/customer-relationship.component.html

@@ -0,0 +1 @@
+<app-basedata-milestone-category></app-basedata-milestone-category>

+ 24 - 0
src/app/routes/basedata/customer-relationship/customer-relationship.component.spec.ts

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

+ 17 - 0
src/app/routes/basedata/customer-relationship/customer-relationship.component.ts

@@ -0,0 +1,17 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { _HttpClient, ModalHelper } from '@delon/theme';
+import { STColumn, STComponent } from '@delon/abc';
+import { SFSchema } from '@delon/form';
+
+@Component({
+  selector: 'app-basedata-customer-relationship',
+  templateUrl: './customer-relationship.component.html',
+})
+export class BasedataCustomerRelationshipComponent implements OnInit {
+  
+  constructor(private http: _HttpClient, private modal: ModalHelper) { }
+
+  ngOnInit() { }
+
+
+}

+ 1 - 0
src/app/routes/basedata/information-sources/information-sources.component.html

@@ -0,0 +1 @@
+<app-basedata-milestone-category></app-basedata-milestone-category>

+ 24 - 0
src/app/routes/basedata/information-sources/information-sources.component.spec.ts

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

+ 17 - 0
src/app/routes/basedata/information-sources/information-sources.component.ts

@@ -0,0 +1,17 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { _HttpClient, ModalHelper } from '@delon/theme';
+import { STColumn, STComponent } from '@delon/abc';
+import { SFSchema } from '@delon/form';
+
+@Component({
+  selector: 'app-basedata-information-sources',
+  templateUrl: './information-sources.component.html',
+})
+export class BasedataInformationSourcesComponent implements OnInit {
+  
+  constructor() { }
+
+  ngOnInit() { }
+
+
+}

+ 79 - 35
src/app/routes/basedata/milestone-category/milestone-category.component.ts

@@ -8,6 +8,7 @@ import { I18NService } from '@core';
 import { DictItem } from 'app/entity/dict-item';
 import { messageShared } from '@shared/utils/message';
 import { BasedataMilestoneCategoryEditComponent } from './edit/edit.component';
+import { PlatformLocation } from '@angular/common';
 
 @Component({
   selector: 'app-basedata-milestone-category',
@@ -18,48 +19,90 @@ export class BasedataMilestoneCategoryComponent implements OnInit {
     private notification: NzNotificationService,
     private dictService: DictService,
     private i18NService: I18NService,
-    ) { }
+    private location: PlatformLocation,
+  ) {}
 
-  ngOnInit() { 
+  ngOnInit() {
+    for (const i in this.location) {
+      if (i === 'location') {
+        this.locationUrl = this.location[i].href;
+        break;
+      }
+    }
     this.getDictItems();
   }
-
+  locationUrl = ''; //页面地址
   visible = false;
   drawerWidth = 900;
-  title="";
-  listOfData=[];
-  isSpinning=false;
-  item={
-    id:"",
-    itemText:"",
-    itemValue:"",
-    dictName:"",
-    dictCode:""
+  title = '';
+  listOfData = [];
+  isSpinning = false;
+  item = {
+    id: '',
+    itemText: '',
+    itemValue: '',
+    dictName: '',
+    dictCode: '',
   };
 
-  @ViewChild("categoryEdit") categoryEdit:BasedataMilestoneCategoryEditComponent;
+  @ViewChild('categoryEdit') categoryEdit: BasedataMilestoneCategoryEditComponent;
   @HostListener('window:resize', ['$event'])
   onResize(event) {
     const width = event.target.innerWidth;
-    if(width>900){
+    if (width > 900) {
       this.drawerWidth = 900;
-    }else{
+    } else {
       this.drawerWidth = width;
     }
   }
 
-  dictItem:DictItem={}//处理查询条件
-  page:any={};//分页参数对象
+  dictItem: DictItem = {}; //处理查询条件
+  page: any = {}; //分页参数对象
 
-  getDictItems(){
+  getDictItems() {
+    //根据不同菜单查询对应数据字典数据
+    let dictId="";
+    if (this.locationUrl.indexOf('milestone-category')!=-1) {
+      //里程碑类型档案
+      dictId = '0cbf1113fd44010fb464aa4d2daacf6a';
+    }else if(this.locationUrl.indexOf('customer-classification')!=-1){
+      //客商分类
+      dictId='fb796929d89383ed42d22af60ff9a186'
+    }else if(this.locationUrl.indexOf('information-sources')!=-1){
+      //信息来源
+      dictId='457c4161e45bb4b9243d2de77ce65543'
+    }else if(this.locationUrl.indexOf('business-relations')!=-1){
+      //商务关系
+      dictId='a9fe3a6c0a685e2462094d88f98cda89'
+    }else if(this.locationUrl.indexOf('customer-grouping')!=-1){
+      //客商分组
+      dictId='fb95c1dcba1cfb9f268abc8bff2612ba'
+    }else if(this.locationUrl.indexOf('sleep-type')!=-1){
+      //休眠类型
+      dictId='15668e04b9b2c4e1d5f45df0e72ad3db'
+    }else if(this.locationUrl.indexOf('unit-size')!=-1){
+      //单位规模
+      dictId='e1becd87bc51a88e2578ea8121d901fe'
+    }else if(this.locationUrl.indexOf('customer-relationship')!=-1){
+      //客户关系
+      dictId='c0d7392b35800c89b340a74e1538e9e2'
+    }else if(this.locationUrl.indexOf('value-level')!=-1){
+      //价值级别
+      dictId='2b6a80bf2f4d77c686fdd2d5d5fcef59'
+    }
+    if(dictId==''){
+      this.notification.warning("未找到档案","");
+      return;
+    }
     // this.dictItem.dictId=this.item.id;
-    this.dictItem.dictId="0cbf1113fd44010fb464aa4d2daacf6a";
+    this.item.id=dictId
+    this.dictItem.dictId=dictId;
     this.isSpinning = true;
-    this.dictService.getDictItems(this.dictItem).then((response)=>{
+    this.dictService.getDictItems(this.dictItem).then(response => {
       this.listOfData = response.result.records;
-      this.page=response.result
+      this.page = response.result;
       this.isSpinning = false;
-    })
+    });
   }
 
   //页码点击事件
@@ -70,33 +113,34 @@ export class BasedataMilestoneCategoryComponent implements OnInit {
 
   config(item) {
     this.visible = true;
-    this.title = this.i18NService.fanyi("configuration.dictionary")
+    this.title = this.i18NService.fanyi('configuration.dictionary');
     this.item = item;
     this.getDictItems();
   }
 
-  close(){
+  close() {
     this.visible = false;
   }
 
-  add(){
+  add() {
     this.categoryEdit.add(this.item.id);
   }
 
-  edit(item){
+  edit(item) {
     this.categoryEdit.edit(item);
   }
 
-  delete(id:string){
-    this.dictService.deleteDictItem(id).then((response) => {
-      if(response.success){
-        this.notification.success(this.i18NService.fanyi("successful.deletion"),"");
+  delete(id: string) {
+    this.dictService.deleteDictItem(id).then(response => {
+      if (response.success) {
+        this.notification.success(this.i18NService.fanyi('successful.deletion'), '');
         this.getDictItems();
-      }else{
-        this.notification.error(this.i18NService.fanyi("delete.failed"),messageShared(this.i18NService,response.message));
+      } else {
+        this.notification.error(
+          this.i18NService.fanyi('delete.failed'),
+          messageShared(this.i18NService, response.message),
+        );
       }
-    })
+    });
   }
-
-
 }

+ 1 - 0
src/app/routes/basedata/sleep-type/sleep-type.component.html

@@ -0,0 +1 @@
+<app-basedata-milestone-category></app-basedata-milestone-category>

+ 24 - 0
src/app/routes/basedata/sleep-type/sleep-type.component.spec.ts

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

+ 16 - 0
src/app/routes/basedata/sleep-type/sleep-type.component.ts

@@ -0,0 +1,16 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { _HttpClient, ModalHelper } from '@delon/theme';
+import { STColumn, STComponent } from '@delon/abc';
+import { SFSchema } from '@delon/form';
+
+@Component({
+  selector: 'app-basedata-sleep-type',
+  templateUrl: './sleep-type.component.html',
+})
+export class BasedataSleepTypeComponent implements OnInit {
+  
+  constructor(private http: _HttpClient, private modal: ModalHelper) { }
+
+  ngOnInit() { }
+
+}

+ 11 - 0
src/app/routes/basedata/test/add/add-routing.module.ts

@@ -0,0 +1,11 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+
+const routes: Routes = [
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class AddRoutingModule { }

+ 1 - 0
src/app/routes/basedata/test/add/add.component.html

@@ -0,0 +1 @@
+a

+ 24 - 0
src/app/routes/basedata/test/add/add.component.spec.ts

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

+ 21 - 0
src/app/routes/basedata/test/add/add.component.ts

@@ -0,0 +1,21 @@
+import { Component, OnInit } from '@angular/core';
+import { NzModalRef, NzMessageService } from 'ng-zorro-antd';
+import { _HttpClient } from '@delon/theme';
+
+@Component({
+  selector: 'app-test-add',
+  templateUrl: './add.component.html',
+})
+export class TestAddComponent implements OnInit {
+
+
+  constructor(
+  ) { }
+
+  ngOnInit(): void {
+    
+  }
+
+  close() {
+  }
+}

+ 19 - 0
src/app/routes/basedata/test/add/add.module.ts

@@ -0,0 +1,19 @@
+import { NgModule } from '@angular/core';
+import { SharedModule } from '@shared';
+import { AddRoutingModule } from './add-routing.module';
+
+const COMPONENTS = [];
+const COMPONENTS_NOROUNT = [];
+
+@NgModule({
+  imports: [
+    SharedModule,
+    AddRoutingModule
+  ],
+  declarations: [
+    ...COMPONENTS,
+    ...COMPONENTS_NOROUNT
+  ],
+  entryComponents: COMPONENTS_NOROUNT
+})
+export class AddModule { }

+ 13 - 0
src/app/routes/basedata/test/test-routing.module.ts

@@ -0,0 +1,13 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { TestAddComponent } from './add/add.component';
+
+const routes: Routes = [{
+  path:'add',component:TestAddComponent
+}];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class TestRoutingModule { }

+ 9 - 0
src/app/routes/basedata/test/test.component.html

@@ -0,0 +1,9 @@
+<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>

+ 24 - 0
src/app/routes/basedata/test/test.component.spec.ts

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

+ 48 - 0
src/app/routes/basedata/test/test.component.ts

@@ -0,0 +1,48 @@
+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 { Router } from '@angular/router';
+
+@Component({
+  selector: 'app-basedata-test',
+  templateUrl: './test.component.html',
+})
+export class BasedataTestComponent 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,private router: Router) { }
+
+  ngOnInit() { }
+
+  add() {
+    // this.modal
+    //   .createStatic(FormEditComponent, { i: { id: 0 } })
+    //   .subscribe(() => this.st.reload());
+    console.log(this.router)
+    this.router.navigateByUrl("/basedata/test/add") 
+  }
+
+}

+ 21 - 0
src/app/routes/basedata/test/test.module.ts

@@ -0,0 +1,21 @@
+import { NgModule } from '@angular/core';
+import { SharedModule } from '@shared';
+import { TestRoutingModule } from './test-routing.module';
+import { TestAddComponent } from './add/add.component';
+
+const COMPONENTS = [TestAddComponent];
+const COMPONENTS_NOROUNT = [
+  ];
+
+@NgModule({
+  imports: [
+    SharedModule,
+    TestRoutingModule
+  ],
+  declarations: [
+    ...COMPONENTS,
+    ...COMPONENTS_NOROUNT
+  ],
+  entryComponents: COMPONENTS_NOROUNT
+})
+export class TestModule { }

+ 1 - 0
src/app/routes/basedata/unit-size/unit-size.component.html

@@ -0,0 +1 @@
+<app-basedata-milestone-category></app-basedata-milestone-category>

+ 24 - 0
src/app/routes/basedata/unit-size/unit-size.component.spec.ts

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

+ 17 - 0
src/app/routes/basedata/unit-size/unit-size.component.ts

@@ -0,0 +1,17 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { _HttpClient, ModalHelper } from '@delon/theme';
+import { STColumn, STComponent } from '@delon/abc';
+import { SFSchema } from '@delon/form';
+
+@Component({
+  selector: 'app-basedata-unit-size',
+  templateUrl: './unit-size.component.html',
+})
+export class BasedataUnitSizeComponent implements OnInit {
+  
+  constructor(private http: _HttpClient, private modal: ModalHelper) { }
+
+  ngOnInit() { }
+
+
+}

+ 1 - 0
src/app/routes/basedata/value-level/value-level.component.html

@@ -0,0 +1 @@
+<app-basedata-milestone-category></app-basedata-milestone-category>

+ 24 - 0
src/app/routes/basedata/value-level/value-level.component.spec.ts

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

+ 18 - 0
src/app/routes/basedata/value-level/value-level.component.ts

@@ -0,0 +1,18 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { _HttpClient, ModalHelper } from '@delon/theme';
+import { STColumn, STComponent } from '@delon/abc';
+import { SFSchema } from '@delon/form';
+
+@Component({
+  selector: 'app-basedata-value-level',
+  templateUrl: './value-level.component.html',
+})
+export class BasedataValueLevelComponent implements OnInit {
+  
+
+  constructor(private http: _HttpClient, private modal: ModalHelper) { }
+
+  ngOnInit() { }
+
+
+}

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

@@ -97,7 +97,7 @@
                 <textarea rows="1" nz-input [(ngModel)]="data.explain"></textarea>
               </td>
               <td style="width: 20%;">
-                <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.invoiceId" nzPlaceHolder="请选择"
+                <nz-select style="width: 100%;" nzAllowClear nzShowSearch [(ngModel)]="data.invoiceId" nzPlaceHolder="请选择"
                 >
                 <nz-option *ngFor="let i of invoiceIdList" [nzValue]="i.id" [nzLabel]="i.billcode"></nz-option>
               </nz-select>

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

@@ -97,7 +97,7 @@
                 <textarea rows="1" nz-input [(ngModel)]="data.explain"></textarea>
               </td>
               <td style="width: 20%;">
-                <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.invoiceId" nzPlaceHolder="请选择"
+                <nz-select style="width: 100%;" nzAllowClear nzShowSearch [(ngModel)]="data.invoiceId" nzPlaceHolder="请选择"
                 >
                 <nz-option *ngFor="let i of invoiceIdList" [nzValue]="i.id" [nzLabel]="i.billcode"></nz-option>
               </nz-select>

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

@@ -97,7 +97,7 @@
                 <textarea rows="1" nz-input [(ngModel)]="data.explain"></textarea>
               </td>
               <td style="width: 20%;">
-                <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.invoiceId" nzPlaceHolder="请选择"
+                <nz-select style="width: 100%;" nzAllowClear nzShowSearch [(ngModel)]="data.invoiceId" nzPlaceHolder="请选择"
                 >
                 <nz-option *ngFor="let i of invoiceIdList" [nzValue]="i.id" [nzLabel]="i.billcode"></nz-option>
               </nz-select>

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

@@ -97,7 +97,7 @@
                 <textarea rows="1" nz-input [(ngModel)]="data.explain"></textarea>
               </td>
               <td style="width: 20%;">
-                <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.invoiceId" nzPlaceHolder="请选择"
+                <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.invoiceId" nzPlaceHolder="请选择"
                 >
                 <nz-option *ngFor="let i of invoiceIdList" [nzValue]="i.id" [nzLabel]="i.billcode"></nz-option>
               </nz-select>

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

@@ -74,72 +74,72 @@
             <td style="width: 4%;">第一笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price1" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 (nzBlur)="priceBlur()"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId1" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileIdChange(data)">
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc1" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc1" nz-input maxlength=140 (blur)="descChange()"/>
             </td>
             <td style="width: 4%;">第二笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price2" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 (nzBlur)="priceBlur()"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId2" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileIdChange(data)">
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc2" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc2" nz-input maxlength=140 (blur)="descChange()"/>
             </td>
             <td style="width: 4%;">第三笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price3" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 (nzBlur)="priceBlur()"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId3" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileIdChange(data)">
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc3" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc3" nz-input maxlength=140 (blur)="descChange()"/>
             </td>
             <td style="width: 4%;">第四笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price4" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 (nzBlur)="priceBlur()"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId4" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileIdChange(data)">
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc4" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc4" nz-input maxlength=140 (blur)="descChange()"/>
             </td>
             <td style="width: 4%;">第五笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price5" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 (nzBlur)="priceBlur()"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId5" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileIdChange(data)">
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc5" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc5" nz-input maxlength=140 (blur)="descChange()"/>
             </td>
             <td nzRight="0"><a nz-popconfirm nzTitle="是否删除?"
                 (nzOnConfirm)="collectionPlanDelete(data.sort)">{{'table.delete'|translate}}</a></td>
@@ -156,7 +156,7 @@
   <div nz-row [nzGutter]="24">
     <div nz-col [nzSpan]="24">
       <!-- 新增按钮 -->
-      <button (click)="paymentCollectionAdd()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
+      <!-- <button (click)="paymentCollectionAdd()" nz-button nzType="primary">{{ 'button.add' | translate }}</button> -->
     </div>
   </div>
   <div nz-row [nzGutter]="24">
@@ -178,79 +178,79 @@
           <tr *ngFor="let data of basicTable2.data">
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'2')">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'2')" nzDisabled>
                 <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price1" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar"  [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar"  [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId1" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc1" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc1" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第二笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price2" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId2" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc2" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc2" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第三笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price3" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId3" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc3" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc3" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第四笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price4" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId4" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc4" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc4" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第五笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price5" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId5" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc5" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc5" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td nzRight="0"><a nz-popconfirm nzTitle="是否删除?"
               (nzOnConfirm)="paymentCollectionDelete(data.sort)">{{'table.delete'|translate}}</a></td>
@@ -267,7 +267,7 @@
   <div nz-row [nzGutter]="24">
     <div nz-col [nzSpan]="24">
       <!-- 新增按钮 -->
-      <button (click)="paymentPlanAdd()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
+      <!-- <button (click)="paymentPlanAdd()" nz-button nzType="primary">{{ 'button.add' | translate }}</button> -->
     </div>
   </div>
   <div nz-row [nzGutter]="24">
@@ -289,79 +289,79 @@
           <tr *ngFor="let data of basicTable3.data">
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'3')">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'3')" nzDisabled>
                 <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price1" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId1" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc1" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc1" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第二笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price2" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId2" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc2" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc2" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第三笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price3" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId3" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc3" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc3" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第四笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price4" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId4" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc4" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc4" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第五笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price5" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId5" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc5" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc5" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td nzRight="0"><a nz-popconfirm nzTitle="是否删除?"
               (nzOnConfirm)="paymentPlanDelete(data.sort)">{{'table.delete'|translate}}</a></td>
@@ -378,7 +378,7 @@
   <div nz-row [nzGutter]="24">
     <div nz-col [nzSpan]="24">
       <!-- 新增按钮 -->
-      <button (click)="paymentStatusAdd()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
+      <!-- <button (click)="paymentStatusAdd()" nz-button nzType="primary">{{ 'button.add' | translate }}</button> -->
     </div>
   </div>
   <div nz-row [nzGutter]="24">
@@ -400,79 +400,79 @@
           <tr *ngFor="let data of basicTable4.data">
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'4')">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'4')" nzDisabled>
                 <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price1" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId1" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc1" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc1" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第二笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price2" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId2" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc2" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc2" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第三笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price3" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId3" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc3" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc3" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第四笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price4" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId4" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc4" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc4" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第五笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price5" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=1000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId5" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc5" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc5" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td nzRight="0"><a nz-popconfirm nzTitle="是否删除?"
               (nzOnConfirm)="paymentStatusDelete(data.sort)">{{'table.delete'|translate}}</a></td>

+ 179 - 23
src/app/routes/project-manage-archives/add/business-affairs/business-affairs.component.ts

@@ -10,28 +10,25 @@ import { BaseArchivesMilestone } from 'app/entity/basedata/base-archives-milesto
   templateUrl: './business-affairs.component.html',
 })
 export class ProjectManageArchivesAddBusinessAffairsComponent implements OnInit {
-  constructor(
-    private baseArchivesMilestoneService:BaseArchivesMilestoneService
-  ) {}
+  constructor(private baseArchivesMilestoneService: BaseArchivesMilestoneService) {}
 
-  ngOnInit(): void {
-  }
+  ngOnInit(): void {}
 
   projectManageArchives: ProjectManageArchives = {}; //项目档案实体对象
   collectionPlanList = []; //收款计划数据
   paymentCollectionList = []; //回款情况数据
   paymentPlanList = []; //付款计划
   paymentStatusList = []; //付款情况
-  planList :any= []; //计划下来集合数据
+  planList: any = []; //计划下来集合数据
   formatterDollar = (value: number) => {
-    if(value){
-      return  `$ ${value}`;
-    }else{
-      return  `$ `;
+    if (value) {
+      return `$ ${value}`;
+    } else {
+      return `$ `;
     }
   };
   parserDollar = (value: string) => value.replace('$ ', '');
-  milestoneList :any= []; //里程碑集合数据
+  milestoneList: any = []; //里程碑集合数据
 
   /**
    * 
@@ -52,6 +49,12 @@ export class ProjectManageArchivesAddBusinessAffairsComponent implements OnInit
       },
     ];
     this.collectionPlanSort++;
+    //回款计划新增
+    this.paymentCollectionAdd();
+    //付款计划新增
+    this.paymentPlanAdd();
+    //付款计划新增
+    this.paymentStatusAdd();
   }
 
   /**
@@ -148,18 +151,20 @@ export class ProjectManageArchivesAddBusinessAffairsComponent implements OnInit
   planIdChange(data, type) {
     //获取类型名称
     this.getPlanName(data);
+    //同步其他三个表格数据
+    this.getData();
     //如果是回款情况表格中下拉触发
-    if (type === '2') {
-      //获取收款计划的金额
-      this.getCollectionPlanPrice(this.collectionPlanList,data);
-      //回写数据到实施、开发、服务页签的回款信息
-      this.getRemittanceInformationChange(data);
-    }
-    //如果是付款情况表格中下来触发
-    if (type === '4') {
-      //获取付款计划中的金额
-      this.getCollectionPlanPrice(this.paymentPlanList,data);
-    }
+    // if (type === '2') {
+    //   //获取收款计划的金额
+    //   this.getCollectionPlanPrice(this.collectionPlanList, data);
+    //   //回写数据到实施、开发、服务页签的回款信息
+    //   this.getRemittanceInformationChange(data);
+    // }
+    // //如果是付款情况表格中下来触发
+    // if (type === '4') {
+    //   //获取付款计划中的金额
+    //   this.getCollectionPlanPrice(this.paymentPlanList, data);
+    // }
   }
 
   /**
@@ -179,7 +184,7 @@ export class ProjectManageArchivesAddBusinessAffairsComponent implements OnInit
    * @param list 表格数据
    * @param data 表格中的对象
    */
-  getCollectionPlanPrice(list,data) {
+  getCollectionPlanPrice(list, data) {
     list.forEach(element => {
       if (data.planId === element.planId) {
         data.price1 = element.price1;
@@ -191,6 +196,8 @@ export class ProjectManageArchivesAddBusinessAffairsComponent implements OnInit
     });
   }
 
+  
+
   /**
    * 里程碑选择事件
    * @param data
@@ -227,6 +234,155 @@ export class ProjectManageArchivesAddBusinessAffairsComponent implements OnInit
     this.projectManageArchives.received = received;
   }
 
+  /**
+   * 里程碑选择事件
+   */
+  mileIdChange(data){
+    //获取里程碑名称
+    this.getMileName(data)
+    //同步其他表格数据
+    this.getData();
+  }
+
+  /**
+   * 获取里程碑名称
+   */
+  getMileName(element){
+    //判断是否选择里程碑
+    if(element.mileId1){
+      //循环商务页签中计划表中里程碑下拉数据获取名称
+      this.milestoneList.forEach(mile => {
+        if(mile.id===element.mileId1){
+          element.milestone1=mile.name;
+        }
+      });
+    }else{
+      element.milestone1="";
+    }
+    //判断是否选择里程碑
+    if(element.mileId2){
+      //循环商务页签中计划表中里程碑下拉数据获取名称
+      this.milestoneList.forEach(mile => {
+        if(mile.id===element.mileId2){
+          element.milestone2=mile.name;
+        }
+      });
+    }else{
+      element.milestone2="";
+    }
+    //判断是否选择里程碑
+    if(element.mileId3){
+      //循环商务页签中计划表中里程碑下拉数据获取名称
+      this.milestoneList.forEach(mile => {
+        if(mile.id===element.mileId3){
+          element.milestone3=mile.name;
+        }
+      });
+    }else{
+      element.milestone3="";
+    }
+    //判断是否选择里程碑
+    if(element.mileId4){
+      //循环商务页签中计划表中里程碑下拉数据获取名称
+      this.milestoneList.forEach(mile => {
+        if(mile.id===element.mileId4){
+          element.milestone4=mile.name;
+        }
+      });
+    }else{
+      element.milestone4="";
+    }
+    //判断是否选择里程碑
+    if(element.mileId5){
+      //循环商务页签中计划表中里程碑下拉数据获取名称
+      this.milestoneList.forEach(mile => {
+        if(mile.id===element.mileId5){
+          element.milestone5=mile.name;
+        }
+      });
+    }else{
+      element.milestone5="";
+    }
+  }
+
+  /**
+   * 金额鼠标离开事件
+   */
+  priceBlur(){
+    this.getData();
+  }
+
+  /**
+   * 描述输入改变事件
+   */
+  descChange(){
+    this.getData();
+  }
+
+  //根据计划收款信息表格数据复制到其他三个表格数据
+  getData() {
+    if (this.collectionPlanList) {
+      this.getAddData(this.collectionPlanList);
+    }
+  }
+
+  /**
+   * 根据计划收款信息表格数据复制到其他三个表格数据
+   * 
+   */
+  getAddData(dataList) {
+    this.paymentCollectionList = [];
+    this.paymentCollectionList=[];
+    this.paymentPlanList=[];
+    this.paymentStatusList=[];
+    //循环收款情况
+    dataList.forEach(element => {
+      //回款表格数据
+      let data = 
+        {
+          planId: element.planId, //计划条线id
+          planName: element.planName, //计划条线名称
+          price1: element.price1, //金额
+          mileId1: element.mileId1, //里程碑id
+          milestone1: element.milestone1, //里程碑名称
+          price2: element.price2, //金额
+          mileId2: element.mileId2, //里程碑id
+          milestone2: element.milestone2, //里程碑名称
+          price3: element.price3, //金额
+          mileId3: element.mileId3, //里程碑id
+          milestone3: element.milestone3, //里程碑名称
+          price4: element.price4, //金额
+          mileId4: element.mileId4, //里程碑id
+          milestone4: element.milestone4, //里程碑名称
+          price5: element.price5, //金额
+          mileId5: element.mileId5, //里程碑id
+          milestone5: element.milestone5, //里程碑名称
+          sort: element.sort,
+          planType: '2',
+        }
+        //回款情况
+        let data2=JSON.parse(JSON.stringify(data));
+        data2.planType='2';
+        //回写数据到实施、开发、服务页签的回款信息
+        this.getRemittanceInformationChange(data2);
+        this.paymentCollectionList.push(data2);
+        //付款计划
+        let data3=JSON.parse(JSON.stringify(data))
+        data3.planType='3'
+        data3.desc1=element.desc1;
+        data3.desc2=element.desc2;
+        data3.desc3=element.desc3;
+        data3.desc4=element.desc4;
+        data3.desc5=element.desc5;
+        this.paymentPlanList.push(data3);
+        //付款情况
+        let data4=JSON.parse(JSON.stringify(data))
+        data4.planType='4'
+        this.paymentStatusList.push(data4);
+    });
+    console.log(this.paymentCollectionList)
+  }
+
   /**
    * 回写数据到实施、开发、服务页签的回款信息
    * @param 对象

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

@@ -74,72 +74,72 @@
             <td style="width: 4%;">第一笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price1" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 (nzBlur)="priceBlur()"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId1" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileIdChange(data)">
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc1" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc1" nz-input maxlength=140 (blur)="descChange()"/>
             </td>
             <td style="width: 4%;">第二笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price2" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 (nzBlur)="priceBlur()"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId2" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileIdChange(data)">
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc2" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc2" nz-input maxlength=140 (blur)="descChange()"/>
             </td>
             <td style="width: 4%;">第三笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price3" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 (nzBlur)="priceBlur()"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId3" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileIdChange(data)">
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc3" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc3" nz-input maxlength=140 (blur)="descChange()"/>
             </td>
             <td style="width: 4%;">第四笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price4" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 (nzBlur)="priceBlur()"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId4" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileIdChange(data)">
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc4" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc4" nz-input maxlength=140 (blur)="descChange()"/>
             </td>
             <td style="width: 4%;">第五笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price5" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 (nzBlur)="priceBlur()"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId5" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileIdChange(data)">
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc5" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc5" nz-input maxlength=140 (blur)="descChange()"/>
             </td>
             <td nzRight="0"><a nz-popconfirm nzTitle="是否删除?"
                 (nzOnConfirm)="collectionPlanDelete(data.sort)">{{'table.delete'|translate}}</a></td>
@@ -156,7 +156,7 @@
   <div nz-row [nzGutter]="24">
     <div nz-col [nzSpan]="24">
       <!-- 新增按钮 -->
-      <button (click)="paymentCollectionAdd()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
+      <!-- <button (click)="paymentCollectionAdd()" nz-button nzType="primary">{{ 'button.add' | translate }}</button> -->
     </div>
   </div>
   <div nz-row [nzGutter]="24">
@@ -178,79 +178,79 @@
           <tr *ngFor="let data of basicTable2.data">
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'2')">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'2')" nzDisabled>
                 <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price1" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000 ></nz-input-number>
+                [nzParser]="parserDollar"  [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId1" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc1" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc1" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第二笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price2" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId2" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc2" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc2" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第三笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price3" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId3" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc3" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc3" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第四笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price4" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId4" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc4" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc4" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第五笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price5" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId5" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="mileChange(data)" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc5" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc5" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td nzRight="0"><a nz-popconfirm nzTitle="是否删除?"
               (nzOnConfirm)="paymentCollectionDelete(data.sort)">{{'table.delete'|translate}}</a></td>
@@ -267,7 +267,7 @@
   <div nz-row [nzGutter]="24">
     <div nz-col [nzSpan]="24">
       <!-- 新增按钮 -->
-      <button (click)="paymentPlanAdd()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
+      <!-- <button (click)="paymentPlanAdd()" nz-button nzType="primary">{{ 'button.add' | translate }}</button> -->
     </div>
   </div>
   <div nz-row [nzGutter]="24">
@@ -289,79 +289,79 @@
           <tr *ngFor="let data of basicTable3.data">
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'3')">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'3')" nzDisabled>
                 <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price1" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId1" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc1" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc1" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第二笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price2" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId2" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc2" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc2" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第三笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price3" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId3" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc3" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc3" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第四笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price4" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId4" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc4" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc4" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第五笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price5" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId5" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc5" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc5" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td nzRight="0"><a nz-popconfirm nzTitle="是否删除?"
               (nzOnConfirm)="paymentPlanDelete(data.sort)">{{'table.delete'|translate}}</a></td>
@@ -378,7 +378,7 @@
   <div nz-row [nzGutter]="24">
     <div nz-col [nzSpan]="24">
       <!-- 新增按钮 -->
-      <button (click)="paymentStatusAdd()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
+      <!-- <button (click)="paymentStatusAdd()" nz-button nzType="primary">{{ 'button.add' | translate }}</button> -->
     </div>
   </div>
   <div nz-row [nzGutter]="24">
@@ -400,79 +400,79 @@
           <tr *ngFor="let data of basicTable4.data">
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'4')">
+                [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'4')" nzDisabled>
                 <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price1" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId1" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc1" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc1" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第二笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price2" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId2" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc2" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc2" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第三笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price3" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId3" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc3" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc3" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第四笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price4" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId4" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc4" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc4" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td style="width: 4%;">第五笔</td>
             <td style="width: 4%;">
               <nz-input-number [(ngModel)]="data.price5" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar"
-                [nzParser]="parserDollar" [nzMax]=10000000000></nz-input-number>
+                [nzParser]="parserDollar" [nzMax]=1000000000 [disabled]="true"></nz-input-number>
             </td>
             <td style="width: 5%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.mileId5" nzPlaceHolder="请选择"
-                [nzDropdownMatchSelectWidth]="false">
+                [nzDropdownMatchSelectWidth]="false" nzDisabled>
                 <nz-option *ngFor="let i of milestoneList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 5%;">
-              <input [(ngModel)]="data.desc5" nz-input maxlength=140/>
+              <input [(ngModel)]="data.desc5" nz-input maxlength=140 [disabled]="true"/>
             </td>
             <td nzRight="0"><a nz-popconfirm nzTitle="是否删除?"
               (nzOnConfirm)="paymentStatusDelete(data.sort)">{{'table.delete'|translate}}</a></td>

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

@@ -147,18 +147,20 @@ export class ProjectManageArchivesUpdateBusinessAffairsComponent implements OnIn
   planIdChange(data, type) {
     //获取类型名称
     this.getPlanName(data);
-    //如果是回款情况表格中下拉触发
-    if (type === '2') {
-      //获取收款计划的金额
-      this.getCollectionPlanPrice(this.collectionPlanList,data);
-      //回写数据到实施、开发、服务页签的回款信息
-      this.getRemittanceInformationChange(data);
-    }
-    //如果是付款情况表格中下来触发
-    if (type === '4') {
-      //获取付款计划中的金额
-      this.getCollectionPlanPrice(this.paymentPlanList,data);
-    }
+    //同步其他三个表格数据
+    this.getData();
+    // //如果是回款情况表格中下拉触发
+    // if (type === '2') {
+    //   //获取收款计划的金额
+    //   this.getCollectionPlanPrice(this.collectionPlanList,data);
+    //   //回写数据到实施、开发、服务页签的回款信息
+    //   this.getRemittanceInformationChange(data);
+    // }
+    // //如果是付款情况表格中下来触发
+    // if (type === '4') {
+    //   //获取付款计划中的金额
+    //   this.getCollectionPlanPrice(this.paymentPlanList,data);
+    // }
     
   }
 
@@ -227,6 +229,155 @@ export class ProjectManageArchivesUpdateBusinessAffairsComponent implements OnIn
     this.projectManageArchives.received = received;
   }
 
+  /**
+   * 里程碑选择事件
+   */
+  mileIdChange(data){
+    //获取里程碑名称
+    this.getMileName(data)
+    //同步其他表格数据
+    this.getData();
+  }
+
+  /**
+   * 获取里程碑名称
+   */
+  getMileName(element){
+    //判断是否选择里程碑
+    if(element.mileId1){
+      //循环商务页签中计划表中里程碑下拉数据获取名称
+      this.milestoneList.forEach(mile => {
+        if(mile.id===element.mileId1){
+          element.milestone1=mile.name;
+        }
+      });
+    }else{
+      element.milestone1="";
+    }
+    //判断是否选择里程碑
+    if(element.mileId2){
+      //循环商务页签中计划表中里程碑下拉数据获取名称
+      this.milestoneList.forEach(mile => {
+        if(mile.id===element.mileId2){
+          element.milestone2=mile.name;
+        }
+      });
+    }else{
+      element.milestone2="";
+    }
+    //判断是否选择里程碑
+    if(element.mileId3){
+      //循环商务页签中计划表中里程碑下拉数据获取名称
+      this.milestoneList.forEach(mile => {
+        if(mile.id===element.mileId3){
+          element.milestone3=mile.name;
+        }
+      });
+    }else{
+      element.milestone3="";
+    }
+    //判断是否选择里程碑
+    if(element.mileId4){
+      //循环商务页签中计划表中里程碑下拉数据获取名称
+      this.milestoneList.forEach(mile => {
+        if(mile.id===element.mileId4){
+          element.milestone4=mile.name;
+        }
+      });
+    }else{
+      element.milestone4="";
+    }
+    //判断是否选择里程碑
+    if(element.mileId5){
+      //循环商务页签中计划表中里程碑下拉数据获取名称
+      this.milestoneList.forEach(mile => {
+        if(mile.id===element.mileId5){
+          element.milestone5=mile.name;
+        }
+      });
+    }else{
+      element.milestone5="";
+    }
+  }
+
+  /**
+   * 金额鼠标离开事件
+   */
+  priceBlur(){
+    this.getData();
+  }
+
+  /**
+   * 描述输入改变事件
+   */
+  descChange(){
+    this.getData();
+  }
+
+  //根据计划收款信息表格数据复制到其他三个表格数据
+  getData() {
+    if (this.collectionPlanList) {
+      this.getAddData(this.collectionPlanList);
+    }
+  }
+
+  /**
+   * 根据计划收款信息表格数据复制到其他三个表格数据
+   * 
+   */
+  getAddData(dataList) {
+    this.paymentCollectionList = [];
+    this.paymentCollectionList=[];
+    this.paymentPlanList=[];
+    this.paymentStatusList=[];
+    //循环收款情况
+    dataList.forEach(element => {
+      //回款表格数据
+      let data = 
+        {
+          planId: element.planId, //计划条线id
+          planName: element.planName, //计划条线名称
+          price1: element.price1, //金额
+          mileId1: element.mileId1, //里程碑id
+          milestone1: element.milestone1, //里程碑名称
+          price2: element.price2, //金额
+          mileId2: element.mileId2, //里程碑id
+          milestone2: element.milestone2, //里程碑名称
+          price3: element.price3, //金额
+          mileId3: element.mileId3, //里程碑id
+          milestone3: element.milestone3, //里程碑名称
+          price4: element.price4, //金额
+          mileId4: element.mileId4, //里程碑id
+          milestone4: element.milestone4, //里程碑名称
+          price5: element.price5, //金额
+          mileId5: element.mileId5, //里程碑id
+          milestone5: element.milestone5, //里程碑名称
+          sort: element.sort,
+          planType: '2',
+        }
+        //回款情况
+        let data2=JSON.parse(JSON.stringify(data));
+        data2.planType='2';
+        //回写数据到实施、开发、服务页签的回款信息
+        this.getRemittanceInformationChange(data2);
+        this.paymentCollectionList.push(data2);
+        //付款计划
+        let data3=JSON.parse(JSON.stringify(data))
+        data3.planType='3'
+        data3.desc1=element.desc1;
+        data3.desc2=element.desc2;
+        data3.desc3=element.desc3;
+        data3.desc4=element.desc4;
+        data3.desc5=element.desc5;
+        this.paymentPlanList.push(data3);
+        //付款情况
+        let data4=JSON.parse(JSON.stringify(data))
+        data4.planType='4'
+        this.paymentStatusList.push(data4);
+    });
+    console.log(this.paymentCollectionList)
+  }
+
   /**
    * 回写数据到实施、开发、服务页签的回款信息
    * @param 对象

+ 42 - 0
src/app/services/basedata/base-customer-industry.service.ts

@@ -0,0 +1,42 @@
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { BaseResponse } from 'app/entity/baseResponse';
+import { Result } from 'app/entity/Result';
+import { BaseCustomerIndustry } from 'app/entity/basedata/base-customer-industry';
+
+@Injectable({
+  providedIn: 'root'
+})
+/**
+ * 客商行业
+ */
+export class BaseCustomerIndustryService {
+
+  constructor(private http:HttpClient) { }
+
+  //查詢Tree
+  async getTreeList(body: any): Promise<BaseResponse<Result<any>>> {
+    return await this.http.get<BaseResponse<Result<any>>>('/basedata/baseCustomerIndustry/getTreeList', { params: body }).toPromise();
+  }
+
+   //新增
+   async add(body: BaseCustomerIndustry): Promise<BaseResponse<any>> {
+    return await this.http.post<BaseResponse<any>>('basedata/baseCustomerIndustry/add', body).toPromise();
+  }
+
+  //修改
+  async update(body: BaseCustomerIndustry): Promise<BaseResponse<any>> {
+    return await this.http.post<BaseResponse<any>>('basedata/baseCustomerIndustry/edit', body).toPromise();
+  }
+
+  //根据id查询
+  async getById(id: string): Promise<BaseResponse<BaseCustomerIndustry>> {
+    return await this.http.get<BaseResponse<BaseCustomerIndustry>>("basedata/baseCustomerIndustry/queryById", { params: { id: id } }).toPromise();
+  }
+
+  //删除
+  async delete(body:any):Promise<BaseResponse<any>>{
+    return await this.http.post<BaseResponse<any>>('basedata/baseCustomerIndustry/delete',body).toPromise();
+  }
+
+}