chenc 3 éve
szülő
commit
77502bc108
23 módosított fájl, 1398 hozzáadás és 9 törlés
  1. 13 0
      src/app/routes/automatic-logon/automatic-logon-routing.module.ts
  2. 21 0
      src/app/routes/automatic-logon/automatic-logon.module.ts
  3. 9 0
      src/app/routes/automatic-logon/list/list.component.html
  4. 24 0
      src/app/routes/automatic-logon/list/list.component.spec.ts
  5. 86 0
      src/app/routes/automatic-logon/list/list.component.ts
  6. 2 2
      src/app/routes/contract-management/contract-file/contract-file.component.ts
  7. 2 1
      src/app/routes/contract-management/contract-management-routing.module.ts
  8. 13 0
      src/app/routes/contract-management/contract-process-view/contract-process-view-routing.module.ts
  9. 27 0
      src/app/routes/contract-management/contract-process-view/contract-process-view.module.ts
  10. 0 0
      src/app/routes/contract-management/contract-process-view/process-view/collection-plan/collection-plan.component.html
  11. 24 0
      src/app/routes/contract-management/contract-process-view/process-view/collection-plan/collection-plan.component.spec.ts
  12. 19 0
      src/app/routes/contract-management/contract-process-view/process-view/collection-plan/collection-plan.component.ts
  13. 292 0
      src/app/routes/contract-management/contract-process-view/process-view/essential-information/essential-information.component.html
  14. 24 0
      src/app/routes/contract-management/contract-process-view/process-view/essential-information/essential-information.component.spec.ts
  15. 235 0
      src/app/routes/contract-management/contract-process-view/process-view/essential-information/essential-information.component.ts
  16. 28 0
      src/app/routes/contract-management/contract-process-view/process-view/process-view.component.html
  17. 24 0
      src/app/routes/contract-management/contract-process-view/process-view/process-view.component.spec.ts
  18. 118 0
      src/app/routes/contract-management/contract-process-view/process-view/process-view.component.ts
  19. 134 0
      src/app/routes/contract-management/contract-process-view/process-view/product-module/product-module.component.html
  20. 24 0
      src/app/routes/contract-management/contract-process-view/process-view/product-module/product-module.component.spec.ts
  21. 253 0
      src/app/routes/contract-management/contract-process-view/process-view/product-module/product-module.component.ts
  22. 7 0
      src/app/routes/routes-routing.module.ts
  23. 19 6
      src/app/routes/routes.module.ts

+ 13 - 0
src/app/routes/automatic-logon/automatic-logon-routing.module.ts

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

+ 21 - 0
src/app/routes/automatic-logon/automatic-logon.module.ts

@@ -0,0 +1,21 @@
+import { NgModule } from '@angular/core';
+import { SharedModule } from '@shared';
+import { AutomaticLogonRoutingModule } from './automatic-logon-routing.module';
+import { AutomaticLogonListComponent } from './list/list.component';
+
+const COMPONENTS = [
+  AutomaticLogonListComponent];
+const COMPONENTS_NOROUNT = [];
+
+@NgModule({
+  imports: [
+    SharedModule,
+    AutomaticLogonRoutingModule
+  ],
+  declarations: [
+    ...COMPONENTS,
+    ...COMPONENTS_NOROUNT
+  ],
+  entryComponents: COMPONENTS_NOROUNT
+})
+export class AutomaticLogonModule { }

+ 9 - 0
src/app/routes/automatic-logon/list/list.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/automatic-logon/list/list.component.spec.ts

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

+ 86 - 0
src/app/routes/automatic-logon/list/list.component.ts

@@ -0,0 +1,86 @@
+import { Component, OnInit, ViewChild, Inject } from '@angular/core';
+import { _HttpClient, ModalHelper } from '@delon/theme';
+import { STColumn, STComponent, ReuseTabService } from '@delon/abc';
+import { SFSchema } from '@delon/form';
+import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth';
+import { StartupService } from '@core';
+import { Router, ActivatedRoute } from '@angular/router';
+
+@Component({
+  selector: 'app-automatic-logon-list',
+  templateUrl: './list.component.html',
+})
+export class AutomaticLogonListComponent 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,
+    @Inject(ReuseTabService)
+    private reuseTabService: ReuseTabService,
+    @Inject(DA_SERVICE_TOKEN) private tokenService: ITokenService,
+    private startupSrv: StartupService,
+    private router: Router,
+    private activateInfo: ActivatedRoute,) { }
+
+    md5 = require('js-md5');
+  error = '';
+  username = '';
+  id = '';
+  ngOnInit() {
+    //获取OA流跳转地址获取参数
+    this.activateInfo.queryParams.subscribe(queryParams => {
+      this.username = queryParams.username;
+      let url = 'sys/loginByUserName'; //'/login/account?_allow_anonymous=true'
+      this.http
+        .post(url, {
+          type: 0,
+          username: this.username,
+        })
+        .subscribe((res: any) => {
+          //if (res.msg !== 'ok') {
+          if (res.code !== 200) {
+            this.error = res.message;
+            return;
+          }
+          // 清空路由复用信息
+          this.reuseTabService.clear();
+          // 设置用户Token信息
+          //this.tokenService.set(res.user);
+          this.tokenService.set(res.result);
+          sessionStorage.setItem('pkOrg', '');
+          //console.log(res);
+          // 重新获取 StartupService 内容,我们始终认为应用信息一般都会受当前用户授权范围而影响
+          this.startupSrv.load().then(() => {
+          });
+        });
+    });
+   }
+
+  add() {
+    // this.modal
+    //   .createStatic(FormEditComponent, { i: { id: 0 } })
+    //   .subscribe(() => this.st.reload());
+  }
+
+}

+ 2 - 2
src/app/routes/contract-management/contract-file/contract-file.component.ts

@@ -159,8 +159,8 @@ export class ContractManagementContractFileComponent implements OnInit {
 
   add2(){
     // this.router.navigateByUrl("/contract-management/contract-process-view")
-    // this.router.navigateByUrl("/passport/register")
-    window.open("/contract-management/contract-process-view")
+    this.router.navigateByUrl("/contract-process-view")
+    // window.open("http://localhost:4200/#/contract-management/contract-file")
 
   }
 }

+ 2 - 1
src/app/routes/contract-management/contract-management-routing.module.ts

@@ -4,7 +4,8 @@ import { ContractManagementContractFileComponent } from './contract-file/contrac
 
 const routes: Routes = [
 
-  { path: 'contract-file', component: ContractManagementContractFileComponent }];
+  { path: 'contract-file', component: ContractManagementContractFileComponent },
+  { path: 'contract-process-view', loadChildren: './contract-process-view/contract-process-view.module#ContractProcessViewModule' }];
 
 @NgModule({
   imports: [RouterModule.forChild(routes)],

+ 13 - 0
src/app/routes/contract-management/contract-process-view/contract-process-view-routing.module.ts

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

+ 27 - 0
src/app/routes/contract-management/contract-process-view/contract-process-view.module.ts

@@ -0,0 +1,27 @@
+import { NgModule } from '@angular/core';
+import { SharedModule } from '@shared';
+import { ContractProcessViewRoutingModule } from './contract-process-view-routing.module';
+import { ContractProcessViewProcessViewComponent } from './process-view/process-view.component';
+import { ContractProcessViewProcessViewCollectionPlanComponent } from './process-view/collection-plan/collection-plan.component';
+import { ContractProcessViewProcessViewEssentialInformationComponent } from './process-view/essential-information/essential-information.component';
+import { ContractProcessViewProcessViewProductModuleComponent } from './process-view/product-module/product-module.component';
+
+const COMPONENTS = [
+  ContractProcessViewProcessViewComponent];
+const COMPONENTS_NOROUNT = [
+  ContractProcessViewProcessViewCollectionPlanComponent,
+  ContractProcessViewProcessViewEssentialInformationComponent,
+  ContractProcessViewProcessViewProductModuleComponent];
+
+@NgModule({
+  imports: [
+    SharedModule,
+    ContractProcessViewRoutingModule
+  ],
+  declarations: [
+    ...COMPONENTS,
+    ...COMPONENTS_NOROUNT
+  ],
+  entryComponents: COMPONENTS_NOROUNT
+})
+export class ContractProcessViewModule { }

+ 0 - 0
src/app/routes/contract-management/contract-process-view/process-view/collection-plan/collection-plan.component.html


+ 24 - 0
src/app/routes/contract-management/contract-process-view/process-view/collection-plan/collection-plan.component.spec.ts

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

+ 19 - 0
src/app/routes/contract-management/contract-process-view/process-view/collection-plan/collection-plan.component.ts

@@ -0,0 +1,19 @@
+import { Component, OnInit } from '@angular/core';
+import { NzModalRef, NzMessageService } from 'ng-zorro-antd';
+import { _HttpClient } from '@delon/theme';
+
+@Component({
+  selector: 'app-contract-process-view-process-view-collection-plan',
+  templateUrl: './collection-plan.component.html',
+})
+export class ContractProcessViewProcessViewCollectionPlanComponent implements OnInit {
+
+  constructor(
+  ) { }
+
+  ngOnInit(): void {
+  }
+
+  close() {
+  }
+}

+ 292 - 0
src/app/routes/contract-management/contract-process-view/process-view/essential-information/essential-information.component.html

@@ -0,0 +1,292 @@
+<!-- 基本信息 -->
+<form nz-form style="margin-top: 5px;margin-right: 5px;">
+  <nz-card >
+    <div nz-row [nzGutter]="24">
+      <!-- 合同编码 -->
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null" >
+            {{ 'project.file.upload.contract' | translate }}{{ 'contract.code' | translate }}</nz-form-label
+          >
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.code}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 项目名称 -->
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null" >{{ 'cost.item.name' | translate }}</nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.proId}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 合同日期 -->
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null" >
+            {{ 'project.file.upload.contract' | translate }}{{ 'Date' | translate }}
+          </nz-form-label>
+          <nz-form-control>
+            {{contractFile.contractDate}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 里程碑类型 -->
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null" [nzXs]="24" >
+            {{ 'financial.management.milestoneName' | translate }}
+          </nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.milestoneId}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+    <div nz-row [nzGutter]="24">
+      <!-- 免费售后起始 -->
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null" >
+            {{ 'free.sale.start' | translate }}
+          </nz-form-label>
+          <nz-form-control>
+            {{contractFile.freeAfterSalesStart}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 免费售后截至 -->
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null" >
+            {{ 'free.sale.until' | translate }}
+          </nz-form-label>
+          <nz-form-control>
+            {{contractFile.freeAfterSalesEnd}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+
+      <!-- 合同概述 -->
+      <div nz-col [nzSpan]="12">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">
+            {{ 'project.file.upload.contract' | translate }}{{ 'summarize' | translate }}
+          </nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.overview}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+    <div nz-row [nzGutter]="24">
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <!-- 客户 -->
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null" >{{ 'customer' | translate }}</nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.fdCustomerName}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <div nz-col [nzSpan]="18">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">
+            {{ 'customer' | translate }}{{ 'address' | translate }}
+          </nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.fdCustomeraddress}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+    <div nz-row [nzGutter]="24">
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <!-- 客户人员 -->
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null" 
+            >{{ 'customer' | translate }}{{ 'personnel' | translate }}</nz-form-label
+          >
+          <nz-form-control>
+            {{contractFile.fdCustomerPersonnelId}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 手机 -->
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">{{ 'phone' | translate }}</nz-form-label>
+          <nz-form-control>
+            {{contractFile.fdCustomerPersonnelTel}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 销售人员 -->
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null" >{{ 'sales.staff' | translate }}</nz-form-label>
+          <nz-form-control>
+            {{contractFile.salesmanId}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 业务类型 -->
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">{{ 'business.types' | translate }}</nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.businessTypeDictId}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+  </nz-card>
+  <nz-card>
+    <div nz-row [nzGutter]="24">
+      <!-- 标准报价 -->
+      <div nz-col [nzSpan]="4">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">{{ 'standard.quotation' | translate }}</nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.standardQuotation}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 成交金额 -->
+      <div nz-col [nzSpan]="4">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">{{ 'deal.price' | translate }}</nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.transactionAmount}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 折扣率 -->
+      <div nz-col [nzSpan]="4">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">{{ 'The discount' | translate }}</nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.discountRate}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 赠品金额 -->
+      <div nz-col [nzSpan]="4">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">{{ 'gift.amount' | translate }}</nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.giftAmount}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 成本 -->
+      <div nz-col [nzSpan]="4">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">{{ 'cost' | translate }}</nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.cost}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 合同费用 -->
+      <div nz-col [nzSpan]="4">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">
+            {{ 'project.file.upload.contract' | translate }}{{ 'pm.quotation.fee' | translate }}
+          </nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.contractCost}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+    <div nz-row [nzGutter]="24">
+      <!-- 合同利润 -->
+      <div nz-col [nzSpan]="4">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">{{ 'contract.profits' | translate }}</nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.contractProfit}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 回款金额 -->
+      <div nz-col [nzSpan]="4">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">{{ 'receivable.amount' | translate }}</nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.received}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 应收款账 -->
+      <div nz-col [nzSpan]="4">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">
+            {{ 'accounts.receivable.account' | translate }}
+          </nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.accountsReceivable}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 业绩计算率 -->
+      <div nz-col [nzSpan]="4">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">
+            {{ 'performance.calculation.rate' | translate }}
+          </nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.performanceCalculationRate}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+  </nz-card>
+  <nz-card>
+    <div nz-row [nzGutter]="24">
+      <!-- 制单人 -->
+      <div nz-col [nzSpan]="12">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">{{
+            'pm.quotation.Single.person' | translate
+          }}</nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.createBy}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 制单时间 -->
+      <div nz-col [nzSpan]="12">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">{{ 'make.time' | translate }}</nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.createTime}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+    <div nz-row [nzGutter]="24">
+      <!-- 修改人 -->
+      <div nz-col [nzSpan]="12">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">{{ 'update.by' | translate }}</nz-form-label>
+          <nz-form-control [nzSm]="24" [nzXs]="24">
+            {{contractFile.updateBy}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 修改时间 -->
+      <div nz-col [nzSpan]="12">
+        <nz-form-item>
+          <nz-form-label [nzSpan]="'vertical' ? 24 : null">{{ 'update.time' | translate }}</nz-form-label>
+          <nz-form-control>
+            {{ contractFile.updateTime }}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+  </nz-card>
+</form>

+ 24 - 0
src/app/routes/contract-management/contract-process-view/process-view/essential-information/essential-information.component.spec.ts

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

+ 235 - 0
src/app/routes/contract-management/contract-process-view/process-view/essential-information/essential-information.component.ts

@@ -0,0 +1,235 @@
+import { Component, OnInit } from '@angular/core';
+import { NzModalRef, NzMessageService } from 'ng-zorro-antd';
+import { _HttpClient, SettingsService } from '@delon/theme';
+import { CustomerService } from 'app/services/basedata/customer.service';
+import { DatePipe } from '@angular/common';
+import { ContractFile } from 'app/entity/contract-management/contract-file';
+
+@Component({
+  selector: 'app-contract-process-view-process-view-essential-information',
+  templateUrl: './essential-information.component.html',
+})
+export class ContractProcessViewProcessViewEssentialInformationComponent implements OnInit {
+  constructor(
+    private customerService: CustomerService,
+    private settingsService: SettingsService,
+    private datePipe:DatePipe
+  ) {}
+
+  ngOnInit(): void {
+    
+  }
+  user=this.settingsService.user//当前登录用户信息
+  contractFile: ContractFile = {
+    standardQuotation: 0,
+    transactionAmount: 0,
+    discountRate: 0,
+    giftAmount: 0,
+    cost: 0,
+    contractCost: 0,
+    contractProfit: 0,
+    accountsReceivable: 0,
+    performanceCalculationRate: 0,
+    received: 0,
+    createBy:this.user.realname,
+    createTime:this.datePipe.transform(new Date(), 'yyyy-MM-dd HH:mm:ss')
+  }; //合同对象
+  proList: any = []; //项目下拉集合
+  businessTypeDictList: any = []; //业务类型集合
+  salesStaffList: any = []; //销售人员tree下拉数据
+  formatterDollar = (value: number): string => `¥ ${value}`;
+  parserDollar = (value: string): string => value.replace('¥ ', '');
+  milestoneList: any = []; //里程碑类型
+  formatterDollar2 = (value: number): string => `${value}%`;
+  parserDollar2 = (value: string): string => value.replace('%', '');
+
+  /**
+   * 项目名称下拉款触发事件
+   */
+  proChange(event) {
+    if (!event) {
+      this.contractFile.proId = '';
+    }
+  }
+
+  /**
+   * 根据客户获取客户人员数据
+   */
+  fdCustomerPersonnelList: any = [];
+  getLdCustomerPersonnelList() {
+    return new Promise(resolve => {
+      this.customerService.getContactsByMainId(this.contractFile.fdCustomerId).then(response => {
+        this.fdCustomerPersonnelList = response.result;
+        resolve();
+      });
+    });
+  }
+
+  /**
+   * 客户人员选择事件
+   */
+  fdCustomerPersonnelChange(event) {
+    if (event) {
+      this.fdCustomerPersonnelList.forEach(element => {
+        if (element.id == event) {
+          this.contractFile.fdCustomerPersonnelTel = element.contectTel;
+        }
+      });
+    } else {
+      this.contractFile.fdCustomerPersonnelId = '';
+      this.contractFile.fdCustomerPersonnelTel = '';
+    }
+  }
+
+  /**
+   * 业务类型选择事件
+   */
+  businessTypeDictIdChange(event) {
+    if (!event) {
+      this.contractFile.businessTypeDictId = '';
+    }
+  }
+
+  /**
+   * 销售人员选择时间
+   * @param event
+   */
+  onChangeSalesmanId(event) {
+    if (event) {
+      //获取人员名称
+      this.salesStaffList.forEach(pkOrg => {
+        pkOrg.children.forEach(depart => {
+          depart.children.forEach(personnel => {
+            if (personnel.key === event) {
+              this.contractFile.salesmanName = personnel.name;
+            }
+          });
+        });
+      });
+    } else {
+      this.contractFile.salesmanName = '';
+    }
+  }
+
+  /**
+   * 免费售后起始
+   */
+  disabledDate = (current: Date): boolean => {
+    // Can not select days before today and today
+    if (this.contractFile.freeAfterSalesEnd) {
+      let end = new Date(this.contractFile.freeAfterSalesEnd); //结束时间
+      //开始时间大于结束时间的禁用
+      return current.getTime() > end.getTime();
+    } else {
+      return false;
+    }
+  };
+
+  /**
+   * 免费售后截至
+   */
+  disabledDate2 = (current: Date): boolean => {
+    // Can not select days before today and today
+    if (this.contractFile.freeAfterSalesStart) {
+      let start = new Date(this.contractFile.freeAfterSalesStart); //开始时间
+      //结束时间小于开始时间禁用
+      return current.getTime() < start.getTime();
+    } else {
+      return false;
+    }
+  };
+
+  
+
+  /**
+   * 成交金额改变事件
+   */
+  transactionAmountBlur() {
+    //计算折扣率
+    this.calculation();
+    //计算应收金额
+    this.calculationAccountsReceivable();
+  }
+
+  /**
+   * 计算折扣率
+   */
+  calculation() {
+    /**计算折扣率*/
+    //标准报价
+    let standardQuotation = this.getIsNaN('standardQuotation');
+    //成交金额
+    let transactionAmount = this.getIsNaN('transactionAmount');
+    //折扣率
+    if (transactionAmount > 0.0 && standardQuotation > 0.0) {
+      //(成交金额/标准报价)100
+      let discountRate = Number(((transactionAmount / standardQuotation) * 100).toFixed(2));
+      this.contractFile.discountRate = discountRate;
+    }
+    //计算合同利润
+    this.calculationContractProfit();
+  }
+
+  /**
+   * 成本改变事件
+   */
+  costBlur() {
+    //计算合同利润
+    this.calculationContractProfit();
+  }
+
+  /**
+   * 合同费用改变事件
+   */
+  contractCostBlur() {
+    //计算合同利润
+    this.calculationContractProfit();
+  }
+
+  /**
+   * 计算合同利润
+   */
+  calculationContractProfit() {
+    //成交金额
+    let transactionAmount = this.getIsNaN('transactionAmount');
+    //成本
+    let cost = this.getIsNaN('cost');
+    //合同费用
+    let contractCost = this.getIsNaN('contractCost');
+    //合同利润
+    if (transactionAmount > 0.0) {
+      //成交金额-成本-合同费用
+      let contractProfit = transactionAmount - cost - contractCost;
+      this.contractFile.contractProfit = contractProfit;
+    }
+  }
+
+  /**
+   * 计算应收款账
+   */
+  calculationAccountsReceivable(){
+    //成交金额
+    let transactionAmount = this.getIsNaN('transactionAmount');
+    //回款金额
+    let received=this.getIsNaN("received");
+    //计算应收金额
+    if(transactionAmount>0.0){
+      //成交金额-回款金额
+      this.contractFile.accountsReceivable=transactionAmount-received;
+    }
+  }
+
+
+  /**
+   * 验证是否数字
+   */
+  getIsNaN(name) {
+    if (!isNaN(Number(this.contractFile[name]))) {
+      return Number(this.contractFile[name]);
+    } else {
+      return 0.0;
+    }
+  }
+
+  close() {}
+}

+ 28 - 0
src/app/routes/contract-management/contract-process-view/process-view/process-view.component.html

@@ -0,0 +1,28 @@
+<nz-spin [nzSpinning]="isLoadingSave">
+  <nz-tabset nzTabPosition="left">
+    <nz-tab nzTitle="合同基本信息">
+      <app-contract-process-view-process-view-essential-information #essentialInformation
+        ></app-contract-process-view-process-view-essential-information>
+    </nz-tab>
+    <nz-tab nzTitle="产品与模块">
+      <app-contract-process-view-process-view-product-module #productModule
+        ></app-contract-process-view-process-view-product-module>
+    </nz-tab>
+    <nz-tab nzTitle="收款计划">
+      <app-contract-process-view-process-view-collection-plan #collectionPlan>
+
+      </app-contract-process-view-process-view-collection-plan>
+    </nz-tab>
+  </nz-tabset>
+</nz-spin>
+<!-- 按钮 -->
+<div class="base">
+  <!-- 关闭按钮 -->
+  <a nz-popconfirm nzTitle="{{'pm.contract.contract.add.button.cancel'|translate}}" (nzOnConfirm)="close()"
+    style="padding-right: 8px">
+    <button nz-button>{{'pm.quotation.cancel'|translate}}</button>
+  </a>
+  <!-- 保存按钮 -->
+  <button nz-button nzType="primary" class="ant-btn ant-btn-primary" (click)="save()"
+    [nzLoading]="isLoadingSave"><span>{{'pm.finish' | translate}}</span></button>
+</div>

+ 24 - 0
src/app/routes/contract-management/contract-process-view/process-view/process-view.component.spec.ts

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

+ 118 - 0
src/app/routes/contract-management/contract-process-view/process-view/process-view.component.ts

@@ -0,0 +1,118 @@
+import { Component, OnInit, ViewChild, Inject } from '@angular/core';
+import { _HttpClient, ModalHelper } from '@delon/theme';
+import { STColumn, STComponent, ReuseTabService } from '@delon/abc';
+import { SFSchema } from '@delon/form';
+import { ITokenService, DA_SERVICE_TOKEN } from '@delon/auth';
+import { StartupService } from '@core';
+import { Router, ActivatedRoute } from '@angular/router';
+import { UserService } from 'app/services/user.service';
+import { ContractFileService } from 'app/services/contract-management/contract-file.service';
+
+@Component({
+  selector: 'app-contract-process-view-process-view',
+  templateUrl: './process-view.component.html',
+  styles: [
+    `
+      .base {
+        position: absolute;
+        bottom: 0px;
+        width: 100%;
+        border-top: 1px solid rgb(232, 232, 232);
+        padding: 6px 16px;
+        text-align: right;
+        left: 0px;
+        background: #fff;
+        z-index: 99;
+      }
+    `,
+  ],
+})
+export class ContractProcessViewProcessViewComponent implements OnInit {
+
+
+  constructor(
+    private http: _HttpClient,
+    private modal: ModalHelper,
+    @Inject(ReuseTabService)
+    private reuseTabService: ReuseTabService,
+    @Inject(DA_SERVICE_TOKEN) private tokenService: ITokenService,
+    private startupSrv: StartupService,
+    private router: Router,
+    private activateInfo: ActivatedRoute,
+  ) {}
+
+  // md5 = require('js-md5');
+  // error = '';
+  // username = '';
+  id = '';
+  isLoadingSave=false;
+  ngOnInit() {
+    //获取OA流跳转地址获取参数
+    // this.activateInfo.queryParams.subscribe(queryParams => {
+    //   this.username = queryParams.username;
+    //   this.id = queryParams.id;
+    //   let url = 'sys/loginByUserName'; //'/login/account?_allow_anonymous=true'
+    //   this.http
+    //     .post(url, {
+    //       type: 0,
+    //       username: this.username,
+    //     })
+    //     .subscribe((res: any) => {
+    //       //if (res.msg !== 'ok') {
+    //       if (res.code !== 200) {
+    //         this.error = res.message;
+    //         return;
+    //       }
+    //       // 清空路由复用信息
+    //       this.reuseTabService.clear();
+    //       // 设置用户Token信息
+    //       //this.tokenService.set(res.user);
+    //       this.tokenService.set(res.result);
+    //       sessionStorage.setItem('pkOrg', '');
+    //       //console.log(res);
+    //       // 重新获取 StartupService 内容,我们始终认为应用信息一般都会受当前用户授权范围而影响
+    //       this.startupSrv.load().then(() => {
+    //       });
+    //     });
+    // });
+  }
+
+  /**
+   * 自动登录
+   */
+  automaticLogon() {
+    // return new Promise(resolve => {
+    //   let url = 'sys/loginByUserName'; //'/login/account?_allow_anonymous=true'
+    //   this.http
+    //     .post(url, {
+    //       type: 0,
+    //       username: this.username,
+    //     })
+    //     .subscribe((res: any) => {
+    //       //if (res.msg !== 'ok') {
+    //       if (res.code !== 200) {
+    //         this.error = res.message;
+    //         return;
+    //       }
+    //       // 清空路由复用信息
+    //       this.reuseTabService.clear();
+    //       // 设置用户Token信息
+    //       //this.tokenService.set(res.user);
+    //       this.tokenService.set(res.result);
+    //       sessionStorage.setItem('pkOrg', '');
+    //       //console.log(res);
+    //       // 重新获取 StartupService 内容,我们始终认为应用信息一般都会受当前用户授权范围而影响
+    //       this.startupSrv.load().then(() => {
+    //         this.router.navigateByUrl('/dashboard/analysis');
+    //         resolve();
+    //       });
+    //     });
+    // });
+  }
+
+  add() {
+    // this.modal
+    //   .createStatic(FormEditComponent, { i: { id: 0 } })
+    //   .subscribe(() => this.st.reload());
+  }
+}

+ 134 - 0
src/app/routes/contract-management/contract-process-view/process-view/product-module/product-module.component.html

@@ -0,0 +1,134 @@
+<!-- 产品 -->
+<nz-card nzTitle="产品">
+  <!-- 表格 -->
+  <div nz-row [nzGutter]="24">
+    <div nz-col [nzSpan]="24">
+      <nz-table #productRowTable nzSize="small" class="tableTdPadding" nzBordered [nzData]="productList">
+        <thead>
+          <tr>
+            <!-- 产品编码 -->
+            <th nzWidth="10%">{{ 'product' | translate }}{{ 'table.thead.code' | translate }}</th>
+            <!-- 产品名称 -->
+            <th nzWidth="17%">{{ 'product' | translate }}{{ 'contract.name' | translate }}</th>
+
+            <!-- 折扣率 -->
+            <th nzWidth="9%">{{ 'The discount' | translate }}</th>
+            <!-- 标准报价 -->
+            <th nzWidth="9%">{{ 'standard.quotation' | translate }}</th>
+
+            <!-- 折扣后单价 -->
+            <th nzWidth="9%">
+              {{ 'pm.quotation.Discount' | translate }}
+              {{ 'after' | translate }}
+              {{ 'price' | translate }}
+            </th>
+
+            <!-- 标准金额 -->
+            <th nzWidth="9%">{{ 'standard.amount' | translate }}</th>
+
+            <!-- 折扣后金额 -->
+            <th nzWidth="9%">
+              {{ 'pm.quotation.Discount' | translate }}
+              {{ 'after' | translate }}
+              {{ 'their.fees.money' | translate }}
+            </th>
+
+            <!-- 成本单价 -->
+            <th nzWidth="9%">
+              {{ 'cost' | translate }}
+              {{ 'price' | translate }}
+            </th>
+
+            <!--成本金额  -->
+            <th nzWidth="9%">
+              {{ 'cost' | translate }}
+              {{ 'their.fees.money' | translate }}
+            </th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr *ngFor="let data of productRowTable.data" class="editable-row">
+            <td>{{data.code}}</td>
+            <td>
+              {{data.name}}
+            </td>
+            <td>
+              {{data.discountRate}}
+            </td>
+            <td>
+              {{data.standardQuotation}}
+            </td>
+            <td>
+              {{data.unitPriceAfterDiscount}}
+            </td>
+            <td>
+              {{data.standardAmount}}
+            </td>
+            <td>
+             {{data.amountAfterDiscount}}
+            </td>
+            <td>
+              {{data.costUnitPrice}}
+            </td>
+            <td>
+              {{data.costAmount}}
+            </td>
+          </tr>
+        </tbody>
+      </nz-table>
+    </div>
+  </div>
+</nz-card>
+
+<!-- 模块 -->
+<nz-card nzTitle="{{ 'module' | translate }}">
+  <nz-tabset>
+    <nz-tab *ngFor="let product of productList" [nzTitle]="product.name">
+      <!-- 表格 -->
+      <div nz-row [nzGutter]="24">
+        <div nz-col [nzSpan]="24">
+          <nz-table
+            #moduleRowTable
+            nzSize="small"
+            class="tableTdPadding"
+            nzBordered
+            [nzData]="product.contractFileModularList"
+          >
+            <thead>
+              <tr>
+                <!-- 产品模块编码 -->
+                <th nzWidth="30%">{{ 'product' | translate }}{{ 'module.code' | translate }}</th>
+
+                <!-- 产品模块名称 -->
+                <th nzWidth="30%">{{ 'product' | translate }}{{ 'module.name' | translate }}</th>
+
+                <!-- 标准报价 -->
+                <th nzWidth="10%">{{ 'standard.quotation' | translate }}</th>
+
+                <!-- 采购价格 -->
+                <th nzWidth="10%">
+                  {{ 'procurement' | translate }}
+                  {{ 'the.price' | translate }}
+                </th>
+              </tr>
+            </thead>
+            <tbody>
+              <tr *ngFor="let data of moduleRowTable.data" class="editable-row">
+                <td>{{data.code}}</td>
+                <td>
+                  {{data.baseMaterialFileModularId}}
+                </td>
+                <td>
+                  {{data.standardQuotation}}
+                </td>
+                <td>
+                 {{data.purchasePrice}}
+                </td>
+              </tr>
+            </tbody>
+          </nz-table>
+        </div>
+      </div>
+    </nz-tab>
+  </nz-tabset>
+</nz-card>

+ 24 - 0
src/app/routes/contract-management/contract-process-view/process-view/product-module/product-module.component.spec.ts

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

+ 253 - 0
src/app/routes/contract-management/contract-process-view/process-view/product-module/product-module.component.ts

@@ -0,0 +1,253 @@
+import { Component, OnInit } from '@angular/core';
+import { NzModalRef, NzMessageService, NzModalService } from 'ng-zorro-antd';
+import { _HttpClient } from '@delon/theme';
+import { BaseMaterialFileModularService } from 'app/services/basedata/base-material-file-modular.service';
+import { ContractFileProduct } from 'app/entity/contract-management/contract-file-product';
+import { ContractFile } from 'app/entity/contract-management/contract-file';
+import { BaseMaterialFileModular } from 'app/entity/basedata/base-material-file-modular';
+
+@Component({
+  selector: 'app-contract-process-view-process-view-product-module',
+  templateUrl: './product-module.component.html',
+})
+export class ContractProcessViewProcessViewProductModuleComponent implements OnInit {
+  constructor(
+    private modalService:NzModalService,
+    private baseMaterialFileModularService:BaseMaterialFileModularService
+  ) {}
+  ngOnInit(): void {}
+
+  productList: ContractFileProduct[] = []; //产品数据
+  // moduleList:ContractFileModular[]=[];//模块数据
+  formatterDollar = (value: number): string => `¥ ${value}`;
+  parserDollar = (value: string): string => value.replace('¥ ', '');
+  formatterDollar2 = (value: number): string => `${value}%`;
+  parserDollar2 = (value: string): string => value.replace('%', '');
+
+  /**
+   * 产品新增行
+   */
+  prouctI = 0;
+  productAddRow() {
+    this.productList = [
+      ...this.productList,
+      {
+        id: `${this.prouctI}`,
+        code: '',
+        name: '',
+        discountRate: 0,
+        standardQuotation: 0,
+        unitPriceAfterDiscount: 0,
+        standardAmount: 0,
+        amountAfterDiscount: 0,
+        costUnitPrice: 0,
+        costAmount: 0,
+        contractFileModularList: [],
+      },
+    ];
+    this.prouctI++;
+  }
+
+  /**
+   * 产品删除行
+   */
+  productDeleteRow(data) {
+    this.productList = this.productList.filter(d => d.id !== data.id);
+    //计算折扣单价总和
+    this.getUnitPriceAfterDiscountTotal();
+    //计算标准报价
+    this.standardQuotationModuleKeyUp(data)
+  }
+
+  /**
+   * 模块新增行
+   */
+  moduleI = 0;
+  moduleAddRow(product) {
+    product.contractFileModularList = [
+      ...product.contractFileModularList,
+      {
+        id: `${this.moduleI}`,
+        code: '',
+        name: '',
+        standardQuotation: 0,
+        purchasePrice: 0,
+      },
+    ];
+    this.moduleI++;
+  }
+
+  /**
+   * 模块删除行
+   */
+  moduleDeleteRow(product, id) {
+    product.contractFileModularList = product.contractFileModularList.filter(d => d.id !== id);
+    //计算标准报价
+    this.standardQuotationModuleKeyUp(product)
+  }
+
+  /**
+   * 模块标准报价键盘弹起事件
+   * @param product 产品对象
+   */
+  standardQuotationModuleKeyUp(product) {
+    //判断当前产品下是否存在模块
+    if (product && product.contractFileModularList) {
+      let standardQuotationTotal = 0.0; //定义模块中标准报价总计
+      //循环模块
+      product.contractFileModularList.forEach(element => {
+        //判断标准报价是否为数字
+        if (!isNaN(Number(element.standardQuotation))) {
+          //累加
+          standardQuotationTotal = standardQuotationTotal + Number(element.standardQuotation);
+        }
+      });
+      //把模块标准报价总和赋值给产品的标准报价
+      product.standardQuotation = standardQuotationTotal;
+      //获取品总标准报价并传入基本信息
+      this.getContractFileStandardQuotationTotal();
+    }
+  }
+
+  /**
+   * 获取合同总共的标准报价
+   */
+
+  getContractFileStandardQuotationTotal() {
+    if (this.productList) {
+      let standardQuotationProductTotal = 0.0; //定义产品中标准报价总计
+      this.productList.forEach(element => {
+        //判断标准报价是否为数字
+        if (!isNaN(Number(element.standardQuotation))) {
+          //累加
+          standardQuotationProductTotal = standardQuotationProductTotal + Number(element.standardQuotation);
+        }
+      });
+      //把产品的总标准报价给合同标准报价
+      this.contractFile.standardQuotation = standardQuotationProductTotal;
+      //传给基本信息
+      // this.outContractFileObject();
+    }
+  }
+
+  contractFile: ContractFile = {}; //合同的对象
+
+
+  // /**
+  //  * 选择产品事件
+  //  */
+  // selectProdutModal(product) {
+  //   const modalRef = this.modalService.create({
+  //     nzTitle: '选择产品',
+  //     nzContent: RoutesSharedModalProdutSelectComponent,
+  //     nzWidth: 1400,
+  //     nzFooter: [
+  //       {
+  //         label: '关闭',
+  //         type: 'default',
+  //         onClick: addModel => {
+  //           addModel.close();
+  //         },
+  //       },
+  //       {
+  //         label: '确定',
+  //         type: 'primary',
+  //         onClick: addModel => {
+  //           addModel.save().then(()=>{
+  //             product.code=addModel.selectObj[0].code
+  //             product.name=addModel.selectObj[0].name
+  //             product.baseMaterialFileProductId=addModel.selectObj[0].id
+  //             //获取产品下的模块数据下拉供模块表格选择
+  //             this.getModuleListByPid(product);
+  //           });
+  //         },
+  //       },
+  //     ],
+  //   });
+  // }
+
+  /**
+   * 根据产品id查询所属模块集合(供模块表格下拉选择)
+   */
+  getModuleListByPid(product){
+      return new Promise((resolve)=>{
+        let baseMaterialFileModular=new BaseMaterialFileModular();
+        baseMaterialFileModular.baseMaterialFileProductId=product.baseMaterialFileProductId;
+        //查询当前选择产品的模块
+        this.baseMaterialFileModularService.list(baseMaterialFileModular).then((response)=>{
+          //放入产品对象中
+          if(response.success){
+            product.modularListSelect=JSON.parse(JSON.stringify(response.result.records))
+          }
+          resolve();
+        })
+      })
+  }
+
+  /**
+   * 模块选择触发事件
+   * 获取编码和名称
+   */
+  baseMaterialFileModularIdChange(product,data,event){
+    if(event){
+      product.modularListSelect.forEach(element => {
+        if(event==element.id){
+          data.code=element.code;
+          data.name=element.name;
+          data.standardQuotation=element.standardQuotation;
+        }
+      });
+    }else{
+      data.code="";
+      data.name="";
+    }
+    //计算标准报价
+    this.standardQuotationModuleKeyUp(product)
+  }
+
+  /**
+   * 折扣后单价改变事件
+   */
+  unitPriceAfterDiscountBlur(data){
+    //标准报价
+    let standardQuotation=this.getIsNaN("standardQuotation",data);
+    //折扣后单价
+    let unitPriceAfterDiscount=this.getIsNaN("unitPriceAfterDiscount",data);
+    //折扣率
+    if (unitPriceAfterDiscount > 0.0 && standardQuotation > 0.0) {
+      //(成交金额/标准报价)100
+      let discountRate = Number(((unitPriceAfterDiscount / standardQuotation) * 100).toFixed(2));
+      data.discountRate = discountRate;
+    }
+    //计算折扣单价总和
+    this.getUnitPriceAfterDiscountTotal();
+  }
+
+/**
+ * 计算折扣单价总和
+ */
+  getUnitPriceAfterDiscountTotal(){
+    //折扣后单价总和
+    let unitPriceAfterDiscountTotal=0.0;
+    if(this.productList){
+      this.productList.forEach(element => {
+        unitPriceAfterDiscountTotal=unitPriceAfterDiscountTotal+Number(element.unitPriceAfterDiscount);
+      });
+      //放到主对象中
+      this.contractFile.transactionAmount=unitPriceAfterDiscountTotal;
+      //传给父级页面
+    }
+  }
+
+  /**
+   * 验证是否数字
+   */
+  getIsNaN(name,data) {
+    if (!isNaN(Number(data[name]))) {
+      return Number(data[name]);
+    } else {
+      return 0.0;
+    }
+  }
+  close() {}
+}

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

@@ -18,6 +18,8 @@ import { UserRegisterResultComponent } from './passport/register-result/register
 // single pages
 import { CallbackComponent } from './callback/callback.component';
 import { UserLockComponent } from './passport/lock/lock.component';
+import { ContractProcessViewProcessViewComponent } from './contract-management/contract-process-view/process-view/process-view.component';
+import { AutomaticLogonListComponent } from './automatic-logon/list/list.component';
 
 const routes: Routes = [
   {
@@ -68,6 +70,8 @@ const routes: Routes = [
       ,{ path: 'report-form', loadChildren: './report-form/report-form.module#ReportFormModule' }
       //合同管理
       ,{path:'contract-management',loadChildren:'./contract-management/contract-management.module#ContractManagementModule'}
+      //自动登录
+      ,{path:'automatic-logon',loadChildren:'./automatic-logon/automatic-logon.module#AutomaticLogonModule'}
   ],
   },
   // 全屏布局
@@ -105,6 +109,9 @@ const routes: Routes = [
   },
   // 单页不包裹Layout
   { path: 'callback/:type', component: CallbackComponent },
+  //外部项目跳转
+  {path:'automatic-logon-list',component:AutomaticLogonListComponent},
+  { path:'contract-process-view',component:ContractProcessViewProcessViewComponent},
   { path: '**', redirectTo: 'exception/404' },
 ]
 

+ 19 - 6
src/app/routes/routes.module.ts

@@ -15,9 +15,14 @@ import { UserRegisterResultComponent } from './passport/register-result/register
 import { UserLockComponent } from './passport/lock/lock.component';
 import { CallbackComponent } from './callback/callback.component';
 import { BasedataModule } from './basedata/basedata.module';
-import { RoutesUploadDownloadComponent } from './upload-download/upload-download.component';
-import { RoutesSharedModalCustomerSelectComponent } from './shared/modal/customer-select/customer-select.component';
+import { RoutesUploadDownloadComponent } from './upload-download/upload-download.component';
+import { RoutesSharedModalCustomerSelectComponent } from './shared/modal/customer-select/customer-select.component';
 import { RoutesSharedModalProdutSelectComponent } from './shared/modal/produt-select/produt-select.component';
+import { ContractProcessViewProcessViewComponent } from './contract-management/contract-process-view/process-view/process-view.component';
+import { AutomaticLogonListComponent } from './automatic-logon/list/list.component';
+import { ContractProcessViewProcessViewCollectionPlanComponent } from './contract-management/contract-process-view/process-view/collection-plan/collection-plan.component';
+import { ContractProcessViewProcessViewEssentialInformationComponent } from './contract-management/contract-process-view/process-view/essential-information/essential-information.component';
+import { ContractProcessViewProcessViewProductModuleComponent } from './contract-management/contract-process-view/process-view/product-module/product-module.component';
 // import { PmModule } from './pm/pm.module';
 // import { RoutesCommonUploadUrlAddComponent } from './common/upload-url-add/upload-url-add.component';
 // import { RoutesMessageNotificationComponent } from './message-notification/message-notification.component';
@@ -37,7 +42,9 @@ const COMPONENTS = [
   UserRegisterResultComponent,
   // single pages
   UserLockComponent,
-  CallbackComponent
+  CallbackComponent,
+  ContractProcessViewProcessViewComponent,
+  AutomaticLogonListComponent
 ];
 const COMPONENTS_NOROUNT = [
   // RoutesCommonUploadUrlAddComponent,
@@ -45,13 +52,19 @@ const COMPONENTS_NOROUNT = [
   // RoutesCommonSelectContractCodeComponent
 
   RoutesUploadDownloadComponent
-  ,
-  RoutesSharedModalCustomerSelectComponent,
+  ,
+  RoutesSharedModalCustomerSelectComponent,
   RoutesSharedModalProdutSelectComponent];
 
+const external_page=[
+  ContractProcessViewProcessViewCollectionPlanComponent,
+  ContractProcessViewProcessViewEssentialInformationComponent,
+  ContractProcessViewProcessViewProductModuleComponent
+]
+
 @NgModule({
   imports: [SharedModule, RouteRoutingModule],
-  declarations: [...COMPONENTS, ...COMPONENTS_NOROUNT,],
+  declarations: [...external_page,...COMPONENTS, ...COMPONENTS_NOROUNT,],
   entryComponents: COMPONENTS_NOROUNT,
 })
 export class RoutesModule { }