chenc 4 years ago
parent
commit
3d79bde94b
87 changed files with 52 additions and 6367 deletions
  1. 22 0
      src/app/layout/default/header/header.component.html
  2. 25 2
      src/app/layout/default/header/header.component.ts
  3. 1 1
      src/app/layout/passport/passport.component.html
  4. 1 40
      src/app/routes/basedata/basedata-routing.module.ts
  5. 2 55
      src/app/routes/basedata/basedata.module.ts
  6. 0 73
      src/app/routes/basedata/cost/cost-add/cost-add.component.html
  7. 0 24
      src/app/routes/basedata/cost/cost-add/cost-add.component.spec.ts
  8. 0 185
      src/app/routes/basedata/cost/cost-add/cost-add.component.ts
  9. 0 45
      src/app/routes/basedata/cost/cost-class/cost-class.component.html
  10. 0 24
      src/app/routes/basedata/cost/cost-class/cost-class.component.spec.ts
  11. 0 121
      src/app/routes/basedata/cost/cost-class/cost-class.component.ts
  12. 0 52
      src/app/routes/basedata/cost/cost-doc/cost-doc.component.html
  13. 0 24
      src/app/routes/basedata/cost/cost-doc/cost-doc.component.spec.ts
  14. 0 110
      src/app/routes/basedata/cost/cost-doc/cost-doc.component.ts
  15. 0 70
      src/app/routes/basedata/cost/cost-record/cost-record.component.html
  16. 0 24
      src/app/routes/basedata/cost/cost-record/cost-record.component.spec.ts
  17. 0 176
      src/app/routes/basedata/cost/cost-record/cost-record.component.ts
  18. 0 17
      src/app/routes/basedata/cost/cost.component.html
  19. 0 24
      src/app/routes/basedata/cost/cost.component.spec.ts
  20. 0 34
      src/app/routes/basedata/cost/cost.component.ts
  21. 0 35
      src/app/routes/basedata/cost/details/details.component.html
  22. 0 24
      src/app/routes/basedata/cost/details/details.component.spec.ts
  23. 0 47
      src/app/routes/basedata/cost/details/details.component.ts
  24. 0 99
      src/app/routes/basedata/hospital/hospital-add/hospital-add.component.html
  25. 0 24
      src/app/routes/basedata/hospital/hospital-add/hospital-add.component.spec.ts
  26. 0 198
      src/app/routes/basedata/hospital/hospital-add/hospital-add.component.ts
  27. 0 47
      src/app/routes/basedata/hospital/hospital-doc/edit/contacts-add-row/contacts-add-row.component.html
  28. 0 24
      src/app/routes/basedata/hospital/hospital-doc/edit/contacts-add-row/contacts-add-row.component.spec.ts
  29. 0 123
      src/app/routes/basedata/hospital/hospital-doc/edit/contacts-add-row/contacts-add-row.component.ts
  30. 0 159
      src/app/routes/basedata/hospital/hospital-doc/edit/edit.component.html
  31. 0 24
      src/app/routes/basedata/hospital/hospital-doc/edit/edit.component.spec.ts
  32. 0 282
      src/app/routes/basedata/hospital/hospital-doc/edit/edit.component.ts
  33. 0 76
      src/app/routes/basedata/hospital/hospital-doc/hospital-doc.component.html
  34. 0 24
      src/app/routes/basedata/hospital/hospital-doc/hospital-doc.component.spec.ts
  35. 0 101
      src/app/routes/basedata/hospital/hospital-doc/hospital-doc.component.ts
  36. 0 96
      src/app/routes/basedata/hospital/hospital-doc/view/view.component.html
  37. 0 24
      src/app/routes/basedata/hospital/hospital-doc/view/view.component.spec.ts
  38. 0 163
      src/app/routes/basedata/hospital/hospital-doc/view/view.component.ts
  39. 0 48
      src/app/routes/basedata/hospital/hospital-new/hospital-new.component.html
  40. 0 24
      src/app/routes/basedata/hospital/hospital-new/hospital-new.component.spec.ts
  41. 0 141
      src/app/routes/basedata/hospital/hospital-new/hospital-new.component.ts
  42. 0 8
      src/app/routes/basedata/hospital/hospital.component.html
  43. 0 24
      src/app/routes/basedata/hospital/hospital.component.spec.ts
  44. 0 26
      src/app/routes/basedata/hospital/hospital.component.ts
  45. 0 60
      src/app/routes/basedata/matrix-type/matrix-add/matrix-add.component.html
  46. 0 24
      src/app/routes/basedata/matrix-type/matrix-add/matrix-add.component.spec.ts
  47. 0 167
      src/app/routes/basedata/matrix-type/matrix-add/matrix-add.component.ts
  48. 0 63
      src/app/routes/basedata/matrix-type/matrix-type.component.html
  49. 0 24
      src/app/routes/basedata/matrix-type/matrix-type.component.spec.ts
  50. 0 91
      src/app/routes/basedata/matrix-type/matrix-type.component.ts
  51. 0 71
      src/app/routes/basedata/milestone/milestone-add/milestone-add.component.html
  52. 0 24
      src/app/routes/basedata/milestone/milestone-add/milestone-add.component.spec.ts
  53. 0 192
      src/app/routes/basedata/milestone/milestone-add/milestone-add.component.ts
  54. 0 48
      src/app/routes/basedata/milestone/milestone-new/edit/edit.component.html
  55. 0 24
      src/app/routes/basedata/milestone/milestone-new/edit/edit.component.spec.ts
  56. 0 137
      src/app/routes/basedata/milestone/milestone-new/edit/edit.component.ts
  57. 0 62
      src/app/routes/basedata/milestone/milestone-new/milestone-new.component.html
  58. 0 24
      src/app/routes/basedata/milestone/milestone-new/milestone-new.component.spec.ts
  59. 0 148
      src/app/routes/basedata/milestone/milestone-new/milestone-new.component.ts
  60. 0 98
      src/app/routes/basedata/milestone/milestone.component.html
  61. 0 24
      src/app/routes/basedata/milestone/milestone.component.spec.ts
  62. 0 112
      src/app/routes/basedata/milestone/milestone.component.ts
  63. 0 101
      src/app/routes/basedata/quotation/quotation-add/quotation-add.component.html
  64. 0 24
      src/app/routes/basedata/quotation/quotation-add/quotation-add.component.spec.ts
  65. 0 211
      src/app/routes/basedata/quotation/quotation-add/quotation-add.component.ts
  66. 0 97
      src/app/routes/basedata/quotation/quotation-description/edit/edit.component.html
  67. 0 24
      src/app/routes/basedata/quotation/quotation-description/edit/edit.component.spec.ts
  68. 0 153
      src/app/routes/basedata/quotation/quotation-description/edit/edit.component.ts
  69. 0 67
      src/app/routes/basedata/quotation/quotation-description/quotation-description.component.html
  70. 0 24
      src/app/routes/basedata/quotation/quotation-description/quotation-description.component.spec.ts
  71. 0 117
      src/app/routes/basedata/quotation/quotation-description/quotation-description.component.ts
  72. 0 90
      src/app/routes/basedata/quotation/quotation.component.html
  73. 0 24
      src/app/routes/basedata/quotation/quotation.component.spec.ts
  74. 0 106
      src/app/routes/basedata/quotation/quotation.component.ts
  75. 0 91
      src/app/routes/basedata/store/store-add/store-add.component.html
  76. 0 24
      src/app/routes/basedata/store/store-add/store-add.component.spec.ts
  77. 0 181
      src/app/routes/basedata/store/store-add/store-add.component.ts
  78. 0 72
      src/app/routes/basedata/store/store.component.html
  79. 0 24
      src/app/routes/basedata/store/store.component.spec.ts
  80. 0 116
      src/app/routes/basedata/store/store.component.ts
  81. 0 41
      src/app/routes/basedata/work-tasks/add/add.component.html
  82. 0 24
      src/app/routes/basedata/work-tasks/add/add.component.spec.ts
  83. 0 105
      src/app/routes/basedata/work-tasks/add/add.component.ts
  84. 0 100
      src/app/routes/basedata/work-tasks/work-tasks.component.html
  85. 0 24
      src/app/routes/basedata/work-tasks/work-tasks.component.spec.ts
  86. 0 192
      src/app/routes/basedata/work-tasks/work-tasks.component.ts
  87. 1 0
      src/app/routes/dashboard/analysis/analysis.component.ts

+ 22 - 0
src/app/layout/default/header/header.component.html

@@ -66,6 +66,28 @@
         </div>
       </nz-dropdown>
     </li>
+    <li class="hidden-mobile">
+      <nz-dropdown nzTrigger="click" nzPlacement="bottomRight">
+        <div class="alain-default__nav-item" nz-dropdown>
+          <i class="anticon anticon-appstore"></i>
+        </div>
+        <div nz-menu style="width: 100%;">
+          <ng-container *ngFor="let org of orgList">
+            <div nz-menu-item>
+              <!-- <header-fullscreen></header-fullscreen> -->
+              <a (click)="aa()">{{org.departName}}</a>
+            </div>
+          </ng-container>
+          
+          <!-- <div nz-menu-item>
+            <header-storage></header-storage>
+          </div>
+          <div nz-menu-item>
+            <header-i18n></header-i18n>
+          </div> -->
+        </div>
+      </nz-dropdown>
+    </li>
     <li class="hidden-mobile">
       <header-user></header-user>
     </li>

+ 25 - 2
src/app/layout/default/header/header.component.ts

@@ -1,5 +1,6 @@
 import { Component, ChangeDetectionStrategy } from '@angular/core';
 import { SettingsService } from '@delon/theme';
+import { DepartService } from 'app/services/depart.service';
 
 @Component({
   selector: 'layout-header',
@@ -9,13 +10,35 @@ import { SettingsService } from '@delon/theme';
 export class HeaderComponent {
   searchToggleStatus: boolean;
 
-  constructor(public settings: SettingsService) {}
-
+  constructor(public settings: SettingsService,public departService:DepartService) {}
+  ngOnInit(): void {
+    this.getOrgList();
+  }
   toggleCollapsedSidebar() {
+    
     this.settings.setLayout('collapsed', !this.settings.layout.collapsed);
+    
+    
   }
 
   searchToggleChange() {
+    
     this.searchToggleStatus = !this.searchToggleStatus;
   }
+
+  /**
+   * 查询全部公司
+   */
+  orgList=[];
+  getOrgList(){
+    this.departService.getByType("1").then((response)=>{
+      if(response.success){
+        this.orgList=response.result;
+      }
+    })
+  }
+
+  aa(){
+    // alert(1);
+  }
 }

+ 1 - 1
src/app/layout/passport/passport.component.html

@@ -4,7 +4,7 @@
     <div class="top">
       <div class="head">
         <img class="logo" src="./assets/fangda_logo_b.png">
-        <span class="title">{{'app.login.title' | translate}}</span><span
+        <span class="title">项目管理系统</span><span
           style="margin-left: 10px;"><strong>(v20.1130)</strong></span>
         <!-- 测试包才有 -->
         <!-- <span class="title" >(<span style="color: red;">测试</span>)</span> -->

+ 1 - 40
src/app/routes/basedata/basedata-routing.module.ts

@@ -5,54 +5,15 @@ import { BasedataCustomerComponent } from './customer/customer.component';
 import { BasedataCustomerCustomerAddComponent } from './customer/customer-add/customer-add.component';
 import { BasedataCustomerEditComponent } from './customer/edit/edit.component';
 import { BasedataContractClassComponent } from './contract-class/contract-class.component';
-import { BasedataHospitalComponent } from './hospital/hospital.component';
-import { BasedataHospitalHospitalDocComponent } from './hospital/hospital-doc/hospital-doc.component';
-import { BasedataHospitalHospitalAddComponent } from './hospital/hospital-add/hospital-add.component';
-import { BasedataCostComponent } from './cost/cost.component';
-import { BasedataCostCostClassComponent } from './cost/cost-class/cost-class.component';
-import { BasedataCostCostDocComponent } from './cost/cost-doc/cost-doc.component';
-import { BasedataCostCostAddComponent } from './cost/cost-add/cost-add.component';
-import { BasedataCostCostRecordComponent } from './cost/cost-record/cost-record.component';
-import { BasedataMatrixTypeComponent } from './matrix-type/matrix-type.component';
-import { BasedataMatrixTypeMatrixAddComponent } from './matrix-type/matrix-add/matrix-add.component';
-import { BasedataStoreComponent } from './store/store.component';
-import { BasedataStoreStoreAddComponent } from './store/store-add/store-add.component';
-import { BasedataMilestoneComponent } from './milestone/milestone.component';
-import { BasedataMilestoneMilestoneAddComponent } from './milestone/milestone-add/milestone-add.component';
-import { BasedataQuotationComponent } from './quotation/quotation.component';
-import { BasedataQuotationQuotationAddComponent } from './quotation/quotation-add/quotation-add.component';
-import { BasedataHospitalHospitalNewComponent } from './hospital/hospital-new/hospital-new.component';
-import { BasedataMilestoneMilestoneNewComponent } from './milestone/milestone-new/milestone-new.component';
 import { BasedataCustomerDetailsComponent } from './customer/details/details.component';
-import { BaseDataCostDetailsComponent } from './cost/details/details.component';
-import { BasedataWorkTasksComponent } from './work-tasks/work-tasks.component';
 
 const routes: Routes = [
   { path: 'customer', component: BasedataCustomerComponent },
   { path: 'customerAdd', component: BasedataCustomerCustomerAddComponent },
   { path: "material", component: BasedataMaterialComponent },
   { path: 'contract-class', component: BasedataContractClassComponent },
-  { path: 'hospital', component: BasedataHospitalComponent },
-  { path: 'hospitalDoc', component: BasedataHospitalHospitalDocComponent },
-  { path: 'hospitalAdd', component: BasedataHospitalHospitalAddComponent },
-  { path: 'cost', component: BasedataCostComponent },
-  { path: 'costClass', component: BasedataCostCostClassComponent },
-  { path: 'costDoc', component: BasedataCostCostDocComponent },
-  { path: 'costAdd', component: BasedataCostCostAddComponent },
-  { path: 'costRecord', component: BasedataCostCostRecordComponent },
-  { path: 'matrix-type', component: BasedataMatrixTypeComponent },
-  { path: 'matrix-add', component: BasedataMatrixTypeMatrixAddComponent },
-  { path: 'store', component: BasedataStoreComponent },
-  { path: 'storeAdd', component: BasedataStoreStoreAddComponent },
-  { path: 'milestone', component: BasedataMilestoneComponent },
-  { path: 'milestoneAdd', component: BasedataMilestoneMilestoneAddComponent },
-  { path: 'quotation', component: BasedataQuotationComponent },
-  { path: 'quotationAdd', component: BasedataQuotationQuotationAddComponent },
-  { path: 'hospital-new', component: BasedataHospitalHospitalNewComponent },
-  { path: 'milestone-new', component: BasedataMilestoneMilestoneNewComponent },
   { path: 'details', component: BasedataCustomerDetailsComponent },
-  { path: 'details', component: BaseDataCostDetailsComponent },
-  { path: 'work-tasks', component: BasedataWorkTasksComponent }];
+  ];
 @NgModule({
   imports: [RouterModule.forChild(routes)],
   exports: [RouterModule]

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

@@ -9,34 +9,7 @@ import { BasedataCustomerCustomerAddComponent } from './customer/customer-add/cu
 import { BasedataCustomerEditComponent } from './customer/edit/edit.component';
 import { BasedataContractClassComponent } from './contract-class/contract-class.component';
 import { BasedataContractClassEditComponent } from './contract-class/edit/edit.component';
-import { BasedataHospitalComponent } from './hospital/hospital.component';
-import { BasedataHospitalHospitalDocComponent } from './hospital/hospital-doc/hospital-doc.component';
-import { BasedataHospitalHospitalAddComponent } from './hospital/hospital-add/hospital-add.component';
-import { BasedataCostComponent } from './cost/cost.component';
-import { BasedataCostCostClassComponent } from './cost/cost-class/cost-class.component';
-import { BasedataCostCostDocComponent } from './cost/cost-doc/cost-doc.component';
-import { BasedataCostCostAddComponent } from './cost/cost-add/cost-add.component';
-import { BasedataCostCostRecordComponent } from './cost/cost-record/cost-record.component';
-import { BasedataMatrixTypeComponent } from './matrix-type/matrix-type.component';
-import { BasedataMatrixTypeMatrixAddComponent } from './matrix-type/matrix-add/matrix-add.component';
-import { BasedataStoreComponent } from './store/store.component';
-import { BasedataStoreStoreAddComponent } from './store/store-add/store-add.component';
-import { BasedataMilestoneComponent } from './milestone/milestone.component';
-import { BasedataMilestoneMilestoneAddComponent } from './milestone/milestone-add/milestone-add.component';
-import { BasedataQuotationComponent } from './quotation/quotation.component';
-import { BasedataQuotationQuotationAddComponent } from './quotation/quotation-add/quotation-add.component';
-import { BasedataHospitalHospitalNewComponent } from './hospital/hospital-new/hospital-new.component';
-import { BasedataMilestoneMilestoneNewComponent } from './milestone/milestone-new/milestone-new.component';
-import { BasedataMilestoneMilestoneNewEditComponent } from './milestone/milestone-new/edit/edit.component';
-import { BasedataHospitalHospitalDocEditComponent } from './hospital/hospital-doc/edit/edit.component';
-import { BasedataHospitalHospitalDocViewComponent } from './hospital/hospital-doc/view/view.component';
-import { BasedataQuotationQuotationDescriptionComponent } from './quotation/quotation-description/quotation-description.component';
-import { BasedataQuotationQuotationDescriptionEditComponent } from './quotation/quotation-description/edit/edit.component';
-import { BasedataHospitalHospitalDocEditContactsAddRowComponent } from './hospital/hospital-doc/edit/contacts-add-row/contacts-add-row.component';
 import { BasedataCustomerDetailsComponent } from './customer/details/details.component';
-import { BaseDataCostDetailsComponent } from './cost/details/details.component';
-import { BasedataWorkTasksComponent } from './work-tasks/work-tasks.component';
-import { BasedataWorkTasksAddComponent } from './work-tasks/add/add.component';
 import { BasedataCustomerIsAbbreviationComponent } from './customer/is-abbreviation/is-abbreviation.component';
 
 const COMPONENTS = [
@@ -44,36 +17,10 @@ const COMPONENTS = [
   BasedataCustomerCustomerAddComponent,
   BasedataMaterialComponent,
   BasedataContractClassComponent,
-  BasedataHospitalComponent,
-  BasedataHospitalHospitalDocComponent,
-  BasedataHospitalHospitalAddComponent,
-  BasedataCostComponent,
-  BasedataCostCostClassComponent,
-  BasedataCostCostDocComponent,
-  BasedataCostCostAddComponent,
-  BasedataCostCostRecordComponent,
-  BasedataMatrixTypeComponent,
-  BasedataMatrixTypeMatrixAddComponent,
-  BasedataStoreComponent,
-  BasedataStoreStoreAddComponent,
-  BasedataMilestoneComponent,
-  BasedataMilestoneMilestoneAddComponent,
-  BasedataQuotationComponent,
-  BasedataQuotationQuotationAddComponent,
-  BasedataHospitalHospitalNewComponent,
-  BasedataMilestoneMilestoneNewComponent,
-  BasedataCustomerDetailsComponent,
-  BaseDataCostDetailsComponent,
-  BasedataWorkTasksComponent];
+  BasedataCustomerDetailsComponent
+  ];
 const COMPONENTS_NOROUNT = [BasedataCustomerEditComponent,
   BasedataContractClassEditComponent,
-  BasedataMilestoneMilestoneNewEditComponent,
-  BasedataHospitalHospitalDocEditComponent,
-  BasedataHospitalHospitalDocViewComponent,
-  BasedataQuotationQuotationDescriptionComponent,
-  BasedataQuotationQuotationDescriptionEditComponent,
-  BasedataHospitalHospitalDocEditContactsAddRowComponent,
-  BasedataWorkTasksAddComponent,
   BasedataCustomerIsAbbreviationComponent];
 
 @NgModule({

+ 0 - 73
src/app/routes/basedata/cost/cost-add/cost-add.component.html

@@ -1,73 +0,0 @@
-  <!-- 新增客户分类drawer -->
-
-  <nz-drawer [nzMaskClosable]="true" [nzWidth]="drawerWidth" [nzVisible]="visible" nzTitle="{{'cost.class'|translate}}" [nzClosable]="true"
-    (nzOnClose)="close()">
-    <nz-spin [nzSpinning]="isLoadingSave">
-    <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
-      <nz-form-item>
-        <nz-form-label [nzSm]="6" [nzXs]="14">{{'cost.sorting.code.number' | translate}}</nz-form-label>
-        <nz-form-control [nzSm]="14" [nzXs]="14">
-          <input nz-input formControlName="code" placeholder="{{'cost.please.input.code' | translate}}" />
-          <nz-form-explain *ngIf="validateForm.get('coding')?.dirty && validateForm.get('coding')?.errors">
-            {{'cost.please.input.code' | translate}}
-          </nz-form-explain>
-        </nz-form-control>
-      </nz-form-item>
-      <nz-form-item>
-        <nz-form-label [nzSm]="6" [nzXs]="14">{{'cost.classification.of.pass-through' | translate}}</nz-form-label>
-        <nz-form-control [nzSm]="14" [nzXs]="14">
-          <input nz-input formControlName="name" placeholder="{{'cost.please.input.code' | translate}}" />
-          <nz-form-explain *ngIf="validateForm.get('coding')?.dirty && validateForm.get('coding')?.errors">
-            {{'cost.please.input.code' | translate}}
-          </nz-form-explain>
-        </nz-form-control>
-      </nz-form-item>
-      <nz-form-item *ngIf="parent=='修改'">
-        <nz-form-label [nzSm]="6" [nzXs]="14">{{'parent' | translate}}</nz-form-label>
-        <nz-form-control [nzSm]="14" [nzXs]="14">
-            <nz-select nzShowSearch nzAllowClear
-            nzPlaceHolder=" {{'cost.choose' | translate}}" formControlName="parentId" [nzDisabled]="false"
-                >
-                <ng-container *ngFor="let con of listClass">
-                    <nz-option nzLabel="{{con.name}}" nzValue="{{con.id}}"></nz-option>
-                </ng-container>
-            </nz-select>
-          <!-- <nz-select nzAllowClear nzPlaceHolder=" {{'cost.choose' | translate}}" formControlName="parentId">
-            <nz-option nzLabel="{{'cost.yes' | translate}}" nzValue="{{'cost.yes' | translate}}"></nz-option>
-            <nz-option nzLabel="{{'cost.no' | translate}}" nzValue="{{'cost.no' | translate}}"></nz-option>
-          </nz-select> -->
-        </nz-form-control>
-      </nz-form-item>
-      <nz-form-item>
-        <nz-form-label [nzSm]="6" [nzXs]="14">{{'memo' | translate}}</nz-form-label>
-        <nz-form-control [nzSm]="14" [nzXs]="14">
-          <input nz-input formControlName="memo" placeholder="{{'cost.please.input.type.declaration' | translate}}" />
-          <nz-form-explain *ngIf="validateForm.get('cName')?.dirty && validateForm.get('cName')?.errors">
-            {{'cost.please.input.type.declaration' | translate}}
-          </nz-form-explain>
-        </nz-form-control>
-      </nz-form-item>
-      <nz-form-item>
-        <nz-form-label [nzSm]="6" [nzXs]="14">{{'whether.using.or.not' | translate}}</nz-form-label>
-        <nz-form-control [nzSm]="14" [nzXs]="14">
-          <nz-switch [ngModelOptions]="{standalone: true}" [(ngModel)]="enable" name="enable" nzCheckedChildren="{{'yes' | translate}}" nzUnCheckedChildren="{{'no' | translate}}"></nz-switch>
-          <nz-form-explain *ngIf="validateForm.get('remark')?.dirty && validateForm.get('remark')?.errors">
-            {{'cost.choose' | translate}}
-          </nz-form-explain>
-        </nz-form-control>
-      </nz-form-item>
-      <!-- <nz-form-item>
-      <nz-form-control class="footer" [nzSm]="10" [nzXs]="24">
-        <nz-divider></nz-divider>
-        <button nz-button nzType="primary">完成</button>
-        <button nz-button nzType="default" (click)="close()">取消</button>
-      </nz-form-control>
-    </nz-form-item> -->
-      <nz-form-item class="base">
-        <button type="button" (click)="close()" class="ant-btn"
-          style="margin-right: 8px;">{{'cost.cancel' | translate}}</button>
-        <button nzbutton nzType="primary" class="ant-btn ant-btn-primary">{{'cost.finish' | translate}}</button>
-      </nz-form-item>
-    </form>
-  </nz-spin>
-  </nz-drawer>

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

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

+ 0 - 185
src/app/routes/basedata/cost/cost-add/cost-add.component.ts

@@ -1,185 +0,0 @@
-import { I18NService } from './../../../../core/i18n/i18n.service';
-import { Component, OnInit, HostListener, Output, EventEmitter } from '@angular/core';
-import { _HttpClient, ModalHelper } from '@delon/theme';
-import { Validators, FormBuilder, FormGroup } from '@angular/forms';
-import { PassFeeClassService } from 'app/services/basedata/pass-fee-class.service';
-import { Page } from 'app/entity/page';
-import { PassFeeClass } from 'app/entity/basedata/pass-fee-class';
-import { NzNotificationService } from 'ng-zorro-antd';
-
-@Component({
-  selector: 'app-basedata-cost-cost-add',
-  templateUrl: './cost-add.component.html',
-  styles: [
-    `
-    .base{
-      position: absolute;
-      bottom: -25px;
-      width: 100%;
-      border-top: 1px solid rgb(232, 232, 232);
-      padding: 10px 16px;
-      text-align: right;
-      left: 0px;
-      background: #fff;
-      z-index:99;
-    }
-
-    `
-  ]
-})
-export class BasedataCostCostAddComponent implements OnInit {
-  //元数据
-  ngOnInit(): void {
-    this.getForm();
-    this.getPassFeeClassList();
-  }
-  constructor(private http: _HttpClient, private modal: ModalHelper, private fb: FormBuilder,
-    private passFeeClassService: PassFeeClassService,
-    private notification: NzNotificationService,
-    private i18NService:I18NService
-  ) { }
-
-
-  drawerWidth = 600;
-  visible = false;
-  validateForm: FormGroup;
-  @HostListener('window:resize', ['$event'])
-  onResize(event) {
-    const width = event.target.innerWidth;
-    if (width > 600) {
-      this.drawerWidth = 600;
-    } else {
-      this.drawerWidth = width;
-    }
-  }
-
-
-  listClass = [];//分类集合
-  parent = "";//判断父机,子集新增与修改
-  passFeeClass: PassFeeClass;
-  id = "";//分类id
-  @Output() afterSave = new EventEmitter<{}>();
-  enable=false;
-
-  //对<nz-form-control>标签逐一校验
-  isLoadingSave=false;
-  submitForm(): void {
-
-    //分类对象
-    this.passFeeClass = {
-      id: this.id,
-      code: this.validateForm.get('code').value,
-      name: this.validateForm.get('name').value,
-      parentId: this.validateForm.get('parentId').value,
-      memo: this.validateForm.get('memo').value,
-      // enable: this.validateForm.get('enable').value
-    }
-    if(this.enable){
-      this.passFeeClass.enable="1"
-    }else{
-      this.passFeeClass.enable="0"
-    }
-    if (this.parent == this.i18NService.fanyi("table.update")) {//修改
-      this.isLoadingSave=true;
-      this.passFeeClassService.updatePassFeeClass(this.passFeeClass).then((response) => {
-        if (response.success) {
-          this.isLoadingSave=false;
-          this.notification.success(this.i18NService.fanyi("successful.revision"), "")
-          this.afterSave.emit();
-          this.getForm();
-          this.close();
-        } else {
-          this.isLoadingSave=false;
-          this.notification.success(this.i18NService.fanyi("modification.failed"), "")
-        }
-      })
-    } else {//新增
-      this.isLoadingSave=true;
-      this.passFeeClassService.addPassFeeClass(this.passFeeClass).then((response) => {
-        if (response.success) {
-          this.isLoadingSave=false;
-          this.notification.success(this.i18NService.fanyi("insert.success"), "")
-          this.afterSave.emit();
-          this.getForm();
-          this.close();
-        } else {
-          this.isLoadingSave=false;
-          this.notification.success(this.i18NService.fanyi("insert.defeated"), "")
-        }
-      })
-    }
-
-  }
-
-  //初始化form
-  getForm() {
-    this.validateForm = this.fb.group({
-      code: [null, [Validators.required]],
-      name: [null, [Validators.required]],
-      parentId: [null],
-      memo: [null, [Validators.required]],
-      // enable: [null, [Validators.required]],
-    });
-  }
-
-  //新增打开抽屉
-  open(node: any, parent): void {
-    if (node != null) {
-      this.parent = parent;
-      this.validateForm.get('parentId').setValue(node.id);
-    }
-    this.visible = true;//打开drawer并清除校验提示信息
-    // for (const i in this.validateForm.controls) {
-    //   this.validateForm.controls[i].reset();
-    // }
-
-  }
-
-  //修改打开抽屉
-  updateOpen(node: any, parent) {
-    this.visible = true;
-    if(node.enable=="0"){
-      this.enable=false;
-    }else{
-      this.enable=true;
-    }
-    if (node != null) {
-      this.parent = parent;
-      this.id = node.id;
-      this.validateForm.get('code').setValue(node.code);
-      this.validateForm.get('name').setValue(node.name);
-      this.validateForm.get('parentId').setValue(node.parentId);
-      this.validateForm.get('memo').setValue(node.memo);
-      // this.validateForm.get('enable').setValue(node.enable);
-    }
-    this.getPassFeeClassList();//父级下拉框
-  }
-
-
-  close(): boolean {
-    this.id = "";
-    this.passFeeClass = {}
-    this.parent = "";
-    this.getForm();
-    this.enable=false;
-    this.visible = false;//关闭drawer
-    return false;
-  }
-
-
-  //查询全部分类
-  getPassFeeClassList() {
-    var passFeeClass=new PassFeeClass();
-    passFeeClass.id=this.id;
-    this.passFeeClassService.queryByNotParentId(passFeeClass).then((response) => {
-      console.log("11")
-      console.log(response)
-      this.listClass = response.result
-    });
-  }
-
-
-
-
-
-}

+ 0 - 45
src/app/routes/basedata/cost/cost-class/cost-class.component.html

@@ -1,45 +0,0 @@
-<!-- 左边卡片 -->
-<!-- 头部按钮 -->
-<nz-row class="head-button">
-  <nz-col>
-    <button nz-button nzType="primary" acl [acl-ability]="'cost-class-parent:add'" (click)="basedataCostCostAdd.open(null,null)">{{'cost.add' | translate}}</button>
-  </nz-col>
-</nz-row>
-<!--搜索框-->
-<nz-row>
-  <nz-col>
-    <nz-input-group class="search" [nzSuffix]="suffixIconSearch">
-      <input type="text" [(ngModel)]="searchValue" nz-input placeholder="{{'cost.please.search' | translate}}" />
-    </nz-input-group>
-    <ng-template #suffixIconSearch>
-      <i nz-icon type="search"></i>
-    </ng-template>
-  </nz-col>
-</nz-row>
-<!--树形体-->
-<nz-tree [nzSearchValue]="searchValue" nzCheckable nzMultiple [nzData]="nodes" (nzClick)="treeClick($event)" (nzDblClick)="openFolder($event)">
-  <ng-template #contextTemplate>
-    <ul nz-menu nzInDropDown>
-      <li nz-menu-item (click)="addClass()" acl [acl-ability]="'cost-class:add'">{{'button.add' | translate}}</li>
-      <li nz-menu-item (click)="updateClass()" acl [acl-ability]="'cost-class:update'">{{'table.update' | translate}}</li>
-      <li nz-menu-item nz-popconfirm nzTitle="{{'isdelete'|translate}}" nzPlacement="right"
-        nzOkText="{{ 'yes' | translate }}" nzCancelText="{{ 'no' | translate }}" (nzOnConfirm)="delete()"
-        (nzOnCancel)="cancelDel()">{{'table.delete' | translate}}</li>
-      <li nz-menu-item (click)="cancel()">{{'cost.cancel' | translate}}</li>
-    </ul>
-  </ng-template>
-  <!-- 鼠标右键 -->
-  <ng-template #nzTreeTemplate let-node>
-    <span class="custom-node" [class.active]="activedNode?.key === node.key">
-      <span *ngIf="!node.isLeaf" (contextmenu)="contextMenu(node,$event, contextTemplate)">
-        <span class="folder-name">{{ node.title }}</span>
-        <span class="folder-desc">{{ node?.origin?.author | lowercase }}</span>
-      </span>
-      <span *ngIf="node.isLeaf" (contextmenu)="contextMenu(node,$event, contextTemplate)">
-        <span class="file-name">{{ node.title }}</span>
-        <span class="file-desc">{{ node?.origin?.author | lowercase }}</span>
-      </span>
-    </span>
-  </ng-template>
-</nz-tree>
-<app-basedata-cost-cost-add #basedataCostCostAdd (afterSave)="getPassFeeClassTree()"></app-basedata-cost-cost-add>

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

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

+ 0 - 121
src/app/routes/basedata/cost/cost-class/cost-class.component.ts

@@ -1,121 +0,0 @@
-import { DepartService } from 'app/services/depart.service';
-import { PassFeeClassService } from './../../../../services/basedata/pass-fee-class.service';
-import { Component, OnInit, TemplateRef, ViewChild, Output, EventEmitter } from '@angular/core';
-import { _HttpClient } from '@delon/theme';
-import { NzDropdownService, NzDrawerService, NzDropdownContextComponent, NzTreeNode, NzNotificationService, NzFormatEmitEvent } from 'ng-zorro-antd';
-import { BasedataCostCostAddComponent } from '../cost-add/cost-add.component';
-import { PassFeeClassProjectService } from 'app/services/basedata/pass-fee-class-project.service';
-import { PassFeeClass } from 'app/entity/basedata/pass-fee-class';
-import { PassFeeClassProject } from 'app/entity/basedata/pass-fee-class-project';
-import { BasedataCostCostDocComponent } from '../cost-doc/cost-doc.component';
-import { I18NService } from '@core';
-
-@Component({
-  selector: 'app-basedata-cost-cost-class',
-  templateUrl: './cost-class.component.html',
-  styles: [
-    `
-    .head-button{
-      margin-bottom: 10px;
-    }
-    .search{
-      width:100%;
-    }
-    .custom-node {
-      cursor: pointer;
-      line-height: 24px;
-      margin-left: 4px;
-      display: inline-block;
-      margin: 0 -1000px;
-      padding: 0 1000px;
-    }
-    `
-  ]
-})
-export class BasedataCostCostClassComponent implements OnInit {
-  constructor(
-    private notification: NzNotificationService,
-    private departService: DepartService,
-    private passFeeClassProjectService:PassFeeClassProjectService,
-    private nzDropdownService: NzDropdownService,
-    private drawerService: NzDrawerService,
-    private passFeeClassService: PassFeeClassService,
-    private i18Nservice:I18NService
-  ) { }
-  ngOnInit(): void {
-    this.getPassFeeClassTree();
-  }
-  @ViewChild("basedataCostCostAdd") basedataCostCostAdd:BasedataCostCostAddComponent
-  @Output() afterSave = new EventEmitter<{}>();
-  //初始化数据
-  defaultCheckedKeys = [''];
-  defaultSelectedKeys = [''];
-  dropdown: NzDropdownContextComponent;
-  activedNode: NzTreeNode;
-
-  searchValue="";//搜索框于tree对应搜索功能
-
-  //元数据
-  nodes: any;
-  clickNode:any;
-
-  //查询树形节点
-  getPassFeeClassTree() {
-    this.passFeeClassService.getPassFeeClassTree().then((response) => {
-      this.nodes = response.result
-    })
-  }
-
-  //单机
-  treeClick(event) {
-    var feeClass = event.node.origin;//过收费分类对象
-    this.afterSave.emit(feeClass);
-  }
-
-   //双击节点自动打开树分支
-   openFolder(data: NzTreeNode | Required<NzFormatEmitEvent>): void {
-    if (data instanceof NzTreeNode) {
-      data.isExpanded = !data.isExpanded;
-    } else {
-      const node = data.node;
-      if (node) {
-        node.isExpanded = !node.isExpanded;
-      }
-    }
-  }
-
-  //鼠标右键
-  contextMenu(node,$event: MouseEvent, template: TemplateRef<void>): void {
-    this.clickNode=node;
-    this.dropdown = this.nzDropdownService.create($event, template);
-  }
-
-  //右键新增子集过手费分类
-  addClass(){
-    this.dropdown.close()
-    this.basedataCostCostAdd.open(this.clickNode.origin,this.i18Nservice.fanyi("add.child"));
-  }
-  //右键修改
-  updateClass(){
-    this.dropdown.close()
-    this.basedataCostCostAdd.updateOpen(this.clickNode.origin,this.i18Nservice.fanyi("table.update"));
-  }
-
-  //右键删除
-  delete(){
-    this.passFeeClassService.deletePassFeeClass(this.clickNode.origin.id).then((response)=>{
-      if(response.success){
-        this.notification.success(this.i18Nservice.fanyi("successful.deletion"),"");
-        this.dropdown.close()
-        this.getPassFeeClassTree();
-      }else{
-        this.notification.success(this.i18Nservice.fanyi("delete.failed"),"");
-      }
-    })
-  }
-
-  //右键取消
-  cancel() {
-    this.dropdown.close()
-  }
-}

+ 0 - 52
src/app/routes/basedata/cost/cost-doc/cost-doc.component.html

@@ -1,52 +0,0 @@
-  <!-- 右边卡片 -->
-  <nz-table nzSize="small" [nzData]="dataSet" #borderedTable 
-  [nzFrontPagination]="false"
-  [nzTotal]="page.total"
-  [nzPageIndex]="page.current"
-  (nzPageIndexChange)="pageIndexChange($event)"
-  nz-row [nzLoading]="isSpinning">
-    <thead>
-      <tr>
-        <!-- title -->
-        <th nzAlign="center"><span>{{'cost.item.coding' | translate}}</span></th>
-        <th nzAlign="center"><span>{{'cost.item.name' | translate}}</span></th>
-        <th nzAlign="center"><span>{{'cost.item.category' | translate}}</span></th>
-        <th nzAlign="center"><span>{{'cost.whether.discontinuation' | translate}}</span></th>
-        <th nzAlign="center"><span>{{'cost.operation' | translate}}</span></th>
-      </tr>
-    </thead>
-    <!-- 绑定数据 -->
-    <tbody>
-      <tr *ngFor="let item of  borderedTable.data">
-        <td nzAlign="center">{{ item.code }}</td>
-        <td nzAlign="center">{{ item.name}}</td>
-        <td nzAlign="center">{{ item.className}}</td>
-        <td nzAlign="center">
-          <!-- 否 -->
-          <nz-tag *ngIf="item.enable==0" [nzColor]="'green'">{{'no'|translate}}</nz-tag>
-          <!-- 是 -->
-          <nz-tag *ngIf="item.enable==1" [nzColor]="'red'">{{'yes'|translate}}</nz-tag>
-        </td>
-        <td nzAlign="center">
-          <!-- <a (click)="openDetails(item)">{{'hospital.operation.details' | translate}}</a>
-          <span [acl]="{ ability: [10, 'cost-item:update','cost-item:delete'], mode: 'oneOf' }">&nbsp;|</span> -->
-          <nz-dropdown [acl]="{ ability: [10, 'cost-item:update','cost-item:delete'], mode: 'oneOf' }">
-            <a nz-dropdown>&nbsp;{{'hospital.operation.more' | translate}}<i nz-icon type="down"></i> </a>
-            <ul nz-menu nzSelectable>
-              <li nz-menu-item acl [acl-ability]="'cost-item:update'">
-                <a href="javascript:void(0);"  (click)="basedataCostCostRecordComponent.edit(item)">{{'table.update' | translate}}</a>
-              </li>
-              <li nz-menu-item acl [acl-ability]="'cost-item:delete'">
-                <a nz-popconfirm nzTitle="{{'hospital.menu.item.title' | translate}}"
-                  nzOkText="{{'hospital.menu.yes' | translate}}"
-                  nzCancelText="{{'hospital.menu.no' | translate}}"
-                  (nzOnConfirm)="confirmDel(item.id)"
-                  >{{'hospital.operation.delete' | translate}}</a>
-              </li>
-            </ul>
-          </nz-dropdown>
-        </td>
-      </tr>
-    </tbody>
-  </nz-table>
-  <app-basedata-cost-cost-record #basedataCostCostRecordComponent (afterSave)="getPassFeeClassProjectList()"></app-basedata-cost-cost-record>

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

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

+ 0 - 110
src/app/routes/basedata/cost/cost-doc/cost-doc.component.ts

@@ -1,110 +0,0 @@
-import { I18NService } from './../../../../core/i18n/i18n.service';
-import { Component, OnInit, ViewChild } from '@angular/core';
-import { _HttpClient } from '@delon/theme';
-import { DictService } from 'app/services/dict.service';
-import { PassFeeClassProjectService } from 'app/services/basedata/pass-fee-class-project.service';
-import { PassFeeClassProject } from 'app/entity/basedata/pass-fee-class-project';
-import { BasedataCostCostRecordComponent } from '../cost-record/cost-record.component';
-import { NzNotificationService, NzDrawerService } from 'ng-zorro-antd';
-import { BaseDataCostDetailsComponent } from '../details/details.component';
-import { EventManager } from '@angular/platform-browser';
-import { messageShared } from '@shared/utils/message';
-
-@Component({
-  selector: 'app-basedata-cost-cost-doc',
-  templateUrl: './cost-doc.component.html',
-  styles: [
-    `
-    @media (max-width: 800px) {
-
-
-    }
-
-    `
-  ]
-
-})
-export class BasedataCostCostDocComponent implements OnInit {
-  constructor(private http: _HttpClient, private dictService: DictService,
-    private passFeeClassProjectService: PassFeeClassProjectService,
-    private notification: NzNotificationService,
-    private i18Nservice : I18NService,
-    private drawerService:NzDrawerService,
-    private eventManager: EventManager
-  ) { }
-  ngOnInit() {
-    this.passFeeClassProject = {
-
-    }
-    this.getPassFeeClassProjectList();
-  }
-
-  @ViewChild("basedataCostCostRecordComponent") basedataCostCostRecordComponent:BasedataCostCostRecordComponent
-  passFeeClassProject: PassFeeClassProject
-  dataSet: any;
-  page = {
-    total:0,
-    current:0
-  };//total总页数 current当前页
-
-  isSpinning=false;
-  getPassFeeClassProjectList() {
-    this.isSpinning=true;
-    this.passFeeClassProjectService.getPassFeeClassProjectList1(this.passFeeClassProject).then((response) => {
-      this.dataSet = response.result.records
-      this.passFeeClassProject.pageNo=1;
-      this.page = response.result
-      this.isSpinning=false;
-    })
-  }
-
-  //接受条件参数查询
-  getPassFeeClassProjectListParams(object) {
-    this.passFeeClassProjectService.getPassFeeClassProjectList(object).then((response) => {
-      this.dataSet = response.result.records
-      this.page = response.result
-    })
-  }
-
-  //按页码显示数据
-  pageIndexChange(event) {
-    this.passFeeClassProject.pageNo = event;
-    this.getPassFeeClassProjectList();
-  }
-
-
-  //打开项目新增抽屉
-  add(){
-    this.basedataCostCostRecordComponent.open();
-  }
-
-  /**
-   * @description: 详情
-   * @param {type}
-   * @author: 段亚鑫
-   */
-  openDetails(item){
-    this.drawerService.create(({
-      nzTitle:this.i18Nservice.fanyi("check.overhead.items"),
-      nzContent:BaseDataCostDetailsComponent,
-      nzBodyStyle:{ height: 'calc(100% - 55px)', overflow: 'auto', 'padding-bottom': '53px'},
-      nzWidth:600,
-      nzContentParams:{
-        item:item
-      }
-    }))
-  }
-
-  //删除
-  confirmDel(id){
-    this.passFeeClassProjectService.deletePassFeeClassProject(id).then((response)=>{
-      if(response.success){
-        this.notification.success(this.i18Nservice.fanyi("successful.deletion"),"")
-        this.getPassFeeClassProjectList();
-      }else{
-        this.notification.error(this.i18Nservice.fanyi("delete.failed"),messageShared(this.i18Nservice,response.message))
-      }
-    })
-  }
-
-}

+ 0 - 70
src/app/routes/basedata/cost/cost-record/cost-record.component.html

@@ -1,70 +0,0 @@
-<nz-drawer [nzMaskClosable]="true" [nzWidth]="drawerWidth" [nzVisible]="visible" nzTitle="{{'cost.project'|translate}}" [nzClosable]="true"
-  (nzOnClose)="close()">
-  <nz-spin [nzSpinning]="isLoadingSave">
-  <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="24">{{'cost.project.code.of.pass-through.cost' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="24">
-        <input nz-input formControlName="code" placeholder="{{'cost.please.item.coding' | translate}}" />
-        <nz-form-explain *ngIf="validateForm.get('itemCoding')?.dirty && validateForm.get('itemCoding')?.errors">
-          {{'cost.please.item.coding' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="24">{{'cost.project.name.of.pass-through.cost' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="24">
-        <input nz-input formControlName="name"
-          placeholder="{{'cost.please.project.name.of.pass-through' | translate}}" />
-        <nz-form-explain *ngIf="validateForm.get('projectName')?.dirty && validateForm.get('projectName')?.errors">
-          {{'cost.please.project.name.of.pass-through.cost' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <!-- 过手费分类下拉框 -->
-      <nz-form-label [nzSm]="6" [nzXs]="24">{{'cost.classification.of.pass-through' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="24">
-        <!-- <nz-select nzShowSearch nzAllowClear
-          nzPlaceHolder="{{'cost.please.classification.of.pass-through' | translate}}" formControlName="pkPassFeeClass"
-          [nzDisabled]="false">
-          <ng-container *ngFor="let con of listClass">
-            <nz-option nzLabel="{{con.name}}" nzValue="{{con.id}}"></nz-option>
-          </ng-container>
-        </nz-select> -->
-        <nz-tree-select
-      [nzNodes]="nodes"
-      nzShowSearch
-      nzPlaceHolder="{{'cost.please.classification.of.pass-through' | translate}}"
-      formControlName="pkPassFeeClass"
-    >
-    </nz-tree-select>
-        <nz-form-explain *ngIf="validateForm.get('classify')?.dirty && validateForm.get('classify')?.errors">
-          {{'cost.please.classification.of.pass-through' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="24">{{'cost.whether.discontinuation' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="24">
-        <nz-switch [ngModelOptions]="{standalone: true}" [(ngModel)]="enable" name="enable" nzCheckedChildren="{{'yes' | translate}}" nzUnCheckedChildren="{{'no' | translate}}"></nz-switch>
-        <nz-form-explain *ngIf="validateForm.get('whether')?.dirty && validateForm.get('whether')?.errors">
-          {{'cost.choose' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <!-- <nz-form-item>
-      <nz-form-control class="footer" [nzSm]="10" [nzXs]="24">
-        <nz-divider></nz-divider>
-        <button nz-button nzType="primary">完成</button>
-        <button nz-button nzType="default" (click)="close()">取消</button>
-      </nz-form-control>
-    </nz-form-item> -->
-    <nz-form-item class="base">
-      <button type="button" (click)="close()" class="ant-btn"
-        style="margin-right: 8px;">{{'cost.cancel' | translate}}</button>
-      <button nzbutton nzType="primary" class="ant-btn ant-btn-primary">{{'cost.finish' | translate}}</button>
-    </nz-form-item>
-  </form>
-  </nz-spin>
-</nz-drawer>

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

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

+ 0 - 176
src/app/routes/basedata/cost/cost-record/cost-record.component.ts

@@ -1,176 +0,0 @@
-import { I18NService } from './../../../../core/i18n/i18n.service';
-import { Customer } from 'app/entity/basedata/customer';
-import { Component, OnInit, HostListener, EventEmitter, Output, ViewChild } from '@angular/core';
-import { _HttpClient } from '@delon/theme';
-import { Validators, FormBuilder, FormGroup, FormControl } from '@angular/forms';
-import { PassFeeClassProjectService } from 'app/services/basedata/pass-fee-class-project.service';
-import { PassFeeClassProject } from 'app/entity/basedata/pass-fee-class-project';
-import { Page } from 'app/entity/page';
-import { PassFeeClassService } from 'app/services/basedata/pass-fee-class.service';
-import { NzNotificationService } from 'ng-zorro-antd';
-
-@Component({
-  selector: 'app-basedata-cost-cost-record',
-  templateUrl: './cost-record.component.html',
-  styles: [
-    `
-    .base{
-      position: absolute;
-      bottom: -25px;
-      width: 100%;
-      border-top: 1px solid rgb(232, 232, 232);
-      padding: 10px 16px;
-      text-align: right;
-      left: 0px;
-      background: #fff;
-      z-index:99;
-    }
-
-    `
-  ]
-})
-export class BasedataCostCostRecordComponent implements OnInit {
-  [x: string]: any;
-  constructor(private fb: FormBuilder,
-    private passFeeClassProjectService: PassFeeClassProjectService,
-    private passFeeClassService: PassFeeClassService,
-    private notification: NzNotificationService,
-    private i18NService : I18NService
-  ) {
-    //元数据
-  }
-  ngOnInit(): void {
-    this.getFrom();
-    this.getPassFeeClassProjectList();
-  }
-  drawerWidth = 600;
-  visible = false;
-  validateForm: FormGroup;
-  passFeeClassProject: PassFeeClassProject
-  @HostListener('window:resize', ['$event'])
-  onResize(event) {
-    const width = event.target.innerWidth;
-    if (width > 600) {
-      this.drawerWidth = 600;
-    } else {
-      this.drawerWidth = width;
-    }
-  }
-
-
-  listClass = [];//全部过手费分类
-  id = "";//过手费项目id
-  @Output() afterSave = new EventEmitter<{}>();
-  enable=false;
-
-  //对<nz-form-control>标签逐一校验
-  isLoadingSave=false;
-  submitForm(): void {
-
-    this.passFeeClassProject = {
-      id: this.id,
-      code: this.validateForm.get('code').value,
-      name: this.validateForm.get('name').value,
-      pkPassFeeClass: this.validateForm.get('pkPassFeeClass').value,
-      // enable: this.validateForm.get('enable').value
-    }
-    if(this.enable){
-      this.passFeeClassProject.enable="1";
-    }else{
-      this.passFeeClassProject.enable="0";
-    }
-
-    if (this.id == "") {//添加
-      this.isLoadingSave=true;
-      this.passFeeClassProjectService.addPassFeeClassProject(this.passFeeClassProject).then((response) => {
-        if (response.success) {
-          this.isLoadingSave=false;
-          this.notification.success(this.i18NService.fanyi("insert.success"), "")
-          this.afterSave.emit();//调用list的查询(刷新)
-          this.close();
-        } else {
-          this.isLoadingSave=false;
-          this.notification.success(this.i18NService.fanyi("insert.defeated"), "")
-        }
-      })
-    } else {//修改
-      this.isLoadingSave=true;
-      this.passFeeClassProjectService.updatePassFeeClassProject(this.passFeeClassProject).then((response) => {
-        if (response.success) {
-          this.isLoadingSave=false;
-          this.notification.success(this.i18NService.fanyi("successful.revision"), "")
-          this.afterSave.emit();//调用list的查询(刷新)
-          this.close();
-        } else {
-          this.isLoadingSave=false;
-          this.notification.success(this.i18NService.fanyi("modification.failed"), "")
-        }
-      })
-    }
-
-
-    // for (const i in this.validateForm.controls) {
-    //   this.validateForm.controls[i].markAsDirty();
-    //   this.validateForm.controls[i].updateValueAndValidity();
-    // }
-  }
-
-  //初始化表单
-  getFrom() {
-    this.validateForm = this.fb.group({
-      code: [null, [Validators.required]],
-      name: [null, [Validators.required]],
-      pkPassFeeClass: [null, [Validators.required]],
-      // enable: [null, [Validators.required]],
-    });
-  }
-
-  //新增打开抽屉
-  open(): void {
-    this.visible = true;//打开drawer并清除校验提示信息
-    this.getPassFeeClassProjectList()
-    // for (const i in this.validateForm.controls) {
-    //   this.validateForm.controls[i].reset();
-    // }
-
-  }
-  //修改打开抽屉
-  edit(item): void {
-    if(item.enable=="0"){
-      this.enable=false;
-    }else{
-      this.enable=true;
-    }
-    this.visible = true;
-    this.getPassFeeClassProjectList()
-    this.id = item.id
-    this.validateForm.get('code').setValue(item.code)
-    this.validateForm.get('name').setValue(item.name)
-    this.validateForm.get('pkPassFeeClass').setValue(item.pkPassFeeClass)
-    // this.validateForm.get('enable').setValue(item.enable)
-  }
-
-  //关闭
-  close(): boolean {
-    this.id="";
-    this.passFeeClassProject = {};
-    this.listClass = [];
-    this.getFrom();
-    this.visible = false;//关闭drawer
-    return false;
-  }
-
-  //查询全部分类(分类下拉款)
-  nodes:any;
-  getPassFeeClassProjectList() {
-    // var page = new Page();
-    // page.pageSize = 500;
-    // this.passFeeClassService.getPassFeeClassList(page).then((response) => {
-    //   this.listClass = response.result.records
-    // })
-    this.passFeeClassService.getPassFeeClassTree().then((response)=>{
-      this.nodes=response.result;
-    })
-  }
-
-}

+ 0 - 17
src/app/routes/basedata/cost/cost.component.html

@@ -1,17 +0,0 @@
-<page-header [action]="phActionTpl">
-  <ng-template #phActionTpl>
-    <button nz-button nzType="primary" (click)="add()" acl [acl-ability]="'cost-item:add'"  > {{'cost.new' | translate}}{{'cost.project'|translate}}</button>
-  </ng-template>
-</page-header>
-<div nz-row nzGutter="24">
-  <div nz-col nzLg="7">
-    <nz-card>
-      <app-basedata-cost-cost-class #basedataCostCostClassComponent (afterSave)="selectProject($event)"></app-basedata-cost-cost-class>
-    </nz-card>
-  </div>
-  <div nz-col nzLg="17">
-    <nz-card>
-      <app-basedata-cost-cost-doc #basedataCostCostDocComponent></app-basedata-cost-cost-doc>
-    </nz-card>
-  </div>
-</div>

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

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

+ 0 - 34
src/app/routes/basedata/cost/cost.component.ts

@@ -1,34 +0,0 @@
-import { Component, OnInit, ViewChild } from '@angular/core';
-import { _HttpClient, ModalHelper } from '@delon/theme';
-import { BasedataCostCostDocComponent } from './cost-doc/cost-doc.component';
-import { PassFeeClassProject } from 'app/entity/basedata/pass-fee-class-project';
-import { EventManager } from '@angular/platform-browser';
-
-@Component({
-  selector: 'app-basedata-cost',
-  templateUrl: './cost.component.html',
-})
-export class BasedataCostComponent implements OnInit {
-
-  constructor(private http: _HttpClient, private modal: ModalHelper,private eventManager: EventManager) { }
-
-  ngOnInit() {
-
-  }
-
-  @ViewChild("basedataCostCostDocComponent") basedataCostCostDocComponent:BasedataCostCostDocComponent
-  add(){
-    this.basedataCostCostDocComponent.add();
-  }
-  selectProject(feeClass){
-    var feeProject=new PassFeeClassProject();
-    console.log(feeClass)
-    if(feeClass.parentId!=""&&feeClass.parentId!=null){
-      feeProject.pkPassFeeClass=feeClass.id;
-    }else{
-      feeProject=null;
-    }
-    this.basedataCostCostDocComponent.getPassFeeClassProjectListParams(feeProject);
-  }
-
-}

+ 0 - 35
src/app/routes/basedata/cost/details/details.component.html

@@ -1,35 +0,0 @@
-<form nz-form>
-  <nz-form-item>
-    <nz-form-label [nzSm]="6" [nzXs]="24">{{'cost.project.code.of.pass-through.cost' | translate}}</nz-form-label>
-    <nz-form-control [nzSm]="14" [nzXs]="24">
-      {{dataList.code}}
-    </nz-form-control>
-  </nz-form-item>
-  <nz-form-item>
-    <nz-form-label [nzSm]="6" [nzXs]="24">{{'cost.project.name.of.pass-through.cost' | translate}}</nz-form-label>
-    <nz-form-control [nzSm]="14" [nzXs]="24">
-      {{dataList.name}}
-    </nz-form-control>
-  </nz-form-item>
-  <nz-form-item>
-    <!-- 过手费分类下拉框 -->
-    <nz-form-label [nzSm]="6" [nzXs]="24">{{'cost.classification.of.pass-through' | translate}}</nz-form-label>
-    <nz-form-control [nzSm]="14" [nzXs]="24">
-      {{dataList.className}}
-    </nz-form-control>
-  </nz-form-item>
-  <nz-form-item>
-    <nz-form-label [nzSm]="6" [nzXs]="24">{{'cost.whether.discontinuation' | translate}}</nz-form-label>
-    <nz-form-control [nzSm]="14" [nzXs]="24">
-      <ng-container *ngIf="dataList.enable==='0'">
-        否
-      </ng-container>
-      <ng-container *ngIf="dataList.enable==='1'">
-        是
-      </ng-container>
-    </nz-form-control>
-  </nz-form-item>
-  <nz-form-item class="base">
-    <button nz-button (click)="close()">{{'cost.cancel'|translate}}</button>
-  </nz-form-item>
-</form>

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

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

+ 0 - 47
src/app/routes/basedata/cost/details/details.component.ts

@@ -1,47 +0,0 @@
-import { Component, OnInit, Input } from '@angular/core';
-import { _HttpClient } from '@delon/theme';
-import { PassFeeClassService } from 'app/services/basedata/pass-fee-class.service';
-import { NzDrawerRef } from 'ng-zorro-antd';
-
-@Component({
-  selector: 'app-baseData-cost-details',
-  templateUrl: './details.component.html',
-  styles: [
-    `
-    .base{
-      position: absolute;
-      bottom: -25px;
-      width: 100%;
-      border-top: 1px solid rgb(232, 232, 232);
-      padding: 10px 16px;
-      text-align: right;
-      left: 0px;
-      background: #fff;
-      z-index:99;
-    }
-    `
-  ]
-})
-export class BaseDataCostDetailsComponent implements OnInit {
-
-  constructor(private http: _HttpClient, private passFeeClassService: PassFeeClassService,
-    private drawerRef: NzDrawerRef) { }
-
-  ngOnInit() {
-    this.dataList=this.item;
-   }
-
-  @Input() item;// id
-
-  dataList = null;
-
-  /**
-   * @description: 关闭
-   * @param {type} 
-   * @author: 段亚鑫
-   */
-  close() {
-    this.drawerRef.close();
-  }
-
-}

+ 0 - 99
src/app/routes/basedata/hospital/hospital-add/hospital-add.component.html

@@ -1,99 +0,0 @@
-
- <nz-drawer [nzMaskClosable]="true" [nzWidth]="drawerWidth" [nzVisible]="visible" nzTitle="{{'add.hospital.file'|translate}}" [nzClosable]="true"
-   (nzOnClose)="close()">
-   <nz-spin [nzSpinning]="isLoadingSave">
-   <form [formGroup]="validateForm">
-     <div nz-row [nzGutter]="24">
-       <div nz-col nzMd="24" nzLg="12">
-         <nz-form-item>
-           <nz-form-label [nzSm]="9" [nzXs]="24" nzFor="code" nzRequired>{{'hospital.code'|translate}}</nz-form-label>
-           <nz-form-control [nzSm]="15" [nzXs]="24">
-             <input nz-input formControlName="code" [(ngModel)]="hospital.code" id="code" name="code" />
-             <nz-form-explain *ngIf="validateForm.get('code')?.dirty && validateForm.get('code')?.errors">
-              {{'hospital.please.input.code'|translate}}
-             </nz-form-explain>
-           </nz-form-control>
-         </nz-form-item>
-       </div>
-       <div nz-col nzMd="24" nzLg="12">
-         <nz-form-item>
-           <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="name" nzRequired>{{'hospital.name'|translate}}</nz-form-label>
-           <nz-form-control [nzSm]="18" [nzXs]="24">
-             <input nz-input formControlName="name" [(ngModel)]="hospital.name" id="name" name="name" />
-             <nz-form-explain *ngIf="validateForm.get('name')?.dirty && validateForm.get('name')?.errors">
-              {{'hospital.please.input.name'|translate}}
-             </nz-form-explain>
-           </nz-form-control>
-         </nz-form-item>
-       </div>
-     </div>
-     <div nz-row [nzGutter]="24">
-       <div nz-col nzMd="24" nzLg="12">
-         <nz-form-item>
-           <nz-form-label [nzSm]="9" [nzXs]="24" nzFor="enable">{{'hospital.whether.discontinuation'|translate}}</nz-form-label>
-           <nz-form-control [nzSm]="15" [nzXs]="24">
-             <nz-switch [ngModelOptions]="{standalone: true}" [(ngModel)]="enable" name="enable"
-               nzCheckedChildren="{{'yes' | translate}}" nzUnCheckedChildren="{{'no' | translate}}"></nz-switch>
-           </nz-form-control>
-         </nz-form-item>
-       </div>
-       <div nz-col nzMd="24" nzLg="12">
-         <nz-form-item>
-           <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="memo">{{'hospital.remark'|translate}}</nz-form-label>
-           <nz-form-control [nzSm]="18" [nzXs]="24">
-             <input nz-input [ngModelOptions]="{standalone: true}" [(ngModel)]="hospital.memo" id="memo" name="memo" />
-             <!-- <nz-form-explain *ngIf="validateForm.get('email')?.dirty && validateForm.get('email')?.errors">
-                The input is not valid E-mail!
-              </nz-form-explain> -->
-           </nz-form-control>
-         </nz-form-item>
-       </div>
-     </div>
-     <!-- 数据表 -->
-     <div nz-row nzGutter="24">
-       <div nz-col nzMd="24" nzLg="24">
-         <button (click)="basedataHospitalHospitalNew.showModal()" nz-button
-           nzType="primary">{{ 'button.add' | translate }}</button>
-         <app-basedata-hospital-hospital-new #basedataHospitalHospitalNew (afterSave)="pushHospitalContacts($event)">
-         </app-basedata-hospital-hospital-new>
-       </div>
-     </div>
-     <nz-form-item>
-       <div nz-row nzGutter="24">
-         <div nz-col nzMd="24" nzLg="24">
-           <nz-table nzSize="small" [nzLoading]="isLoading" #basicTable [nzData]="hospitalContacts" [nzFrontPagination]="false">
-             <thead>
-               <tr>
-                 <th>{{'hospital.contacts'|translate}}</th>
-                 <th>{{'contact.number'|translate}}</th>
-                 <th>{{'contact.e-mail'|translate}}</th>
-                 <th>{{'hospital.contact.address'|translate}}</th>
-                 <th>{{'is.it.default'|translate}}</th>
-                 <th>{{'hospital.operation'|translate}}</th>
-               </tr>
-             </thead>
-             <tbody>
-               <tr *ngFor="let item of basicTable.data">
-                 <td>{{item.contactPsn}}</td>
-                 <td>{{item.contactTel}}</td>
-                 <td>{{item.email}}</td>
-                 <td>{{item.address}}</td>
-                 <td>{{item.isDefault==0?'否':'是'}}</td>
-                 <td>
-                   <a nz-popconfirm nzTitle="{{'hospital.menu.item.title'|translate}}?" nzOkText="{{'yes'|translate}}" nzCancelText="{{'no'|translate}}"
-                     (nzOnConfirm)="confirmDel(item.contactPsn)" (nzOnCancel)="cancelDel()">{{'hospital.operation.delete'|translate}}</a>
-                 </td>
-               </tr>
-             </tbody>
-           </nz-table>
-         </div>
-       </div>
-     </nz-form-item>
-     <div class="base">
-       <button type="button" (click)="close()" class="ant-btn"
-         style="margin-right: 8px;">{{ 'button.close' | translate }}</button>
-       <button nzbutton nzType="primary" (click)="save()"
-         class="ant-btn ant-btn-primary">{{ 'button.save' | translate }}</button>
-     </div>
-   </form>
-  </nz-spin>

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

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

+ 0 - 198
src/app/routes/basedata/hospital/hospital-add/hospital-add.component.ts

@@ -1,198 +0,0 @@
-import { I18NService } from './../../../../core/i18n/i18n.service';
-import { BasedataHospitalHospitalNewComponent } from './../hospital-new/hospital-new.component';
-import { HospitalContacts } from 'app/entity/basedata/hospital-contacts';
-import { Hospital } from './../../../../entity/basedata/hospital';
-import { Component, OnInit, ViewChild, HostListener, Output, EventEmitter } from '@angular/core';
-import { FormGroup, Validators, FormBuilder } from '@angular/forms';
-import { NzNotificationService } from 'ng-zorro-antd';
-import { HospitalService } from 'app/services/basedata/hospital.service';
-import { messageShared } from '@shared/utils/message';
-
-@Component({
-  selector: 'app-basedata-hospital-hospital-add',
-  templateUrl: './hospital-add.component.html',
-  styles: [
-    `
-    .base{
-      position: absolute;
-      bottom: 0px;
-      width: 100%;
-      border-top: 1px solid rgb(232, 232, 232);
-      padding: 10px 16px;
-      text-align: right;
-      left: 0px;
-      background: #fff;
-      z-index:99;
-    }
-    .buttonDistance{
-      margin-right:2%;
-    }
-
-    `
-  ]
-})
-export class BasedataHospitalHospitalAddComponent implements OnInit {
-  //元数据
-  ngOnInit(): void {
-    this.validateForm = this.fb.group({
-      code: [null, [Validators.required]],
-      name: [null, [Validators.required]],
-    });
-    // this.initHospital();
-    this.hospitalContacts = [];
-  }
-  constructor(
-    private nzNotificationService: NzNotificationService,
-    private hospitalService: HospitalService,
-    private fb: FormBuilder,
-    private i18NService:I18NService
-  ) { }
-  // 表格加载状态
-  isLoading = false
-  drawerWidth = 1000;
-  visible = false;
-  validateForm: FormGroup;
-  hospital: Hospital = {
-    id: "",
-    code: "",// 医院编码 (非空)
-    name: "",// 医院名称 (非空)
-    enable: "",// 是否停用
-    delFlag: "",// 是否删除
-    createBy: "",// 创建人
-    createTime: null,// 创建时间
-    updateBy: "",// 修改人
-    updateTime: null,// 修改时间
-    memo: "",// 备注
-    HospitalContact: null,
-    hospitalContacts: []// 医院联系人
-  };
-  enable = false;
-  hospitalContacts: HospitalContacts[];
-
-  @ViewChild("basedataHospitalHospitalNew") basedataHospitalHospitalNew: BasedataHospitalHospitalNewComponent
-  @Output() afterSave = new EventEmitter();
-  @HostListener('window:resize', ['$event'])
-  onResize(event) {
-    const width = event.target.innerWidth;
-    if (width > 900) {
-      this.drawerWidth = 900;
-    } else {
-      this.drawerWidth = width;
-    }
-  }
-  //对<nz-form-control>标签逐一校验
-  isLoadingSave=false;
-  save(): void {
-    this.isLoading = true
-    this.hospital.hospitalContacts = this.hospitalContacts;
-    if (this.enable) {
-      this.hospital.enable = "1";
-    } else {
-      this.hospital.enable = "0";
-    }
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].markAsDirty();
-      this.validateForm.controls[i].updateValueAndValidity();
-    }
-    //alert(JSON.""ify(this.hospital));
-    //return;
-    let valid = this.validateForm.valid;
-    // 验证通过保存
-    if (valid) {
-      if (this.hospital.id == null || this.hospital.id == "") {
-        this.isLoadingSave=true;
-        this.hospitalService.addHospital(this.hospital).then((response) => {
-          console.log(this.i18NService.fanyi("hospital.data.is"))
-          console.log(response)
-          if (response.success) {
-            this.nzNotificationService.success(this.i18NService.fanyi("newsuccess"), "");
-            this.afterSave.emit();
-            // this.initHospital();
-            this.isLoading = false
-            this.isLoadingSave=false;
-            this.close();
-          } else {
-            this.isLoading = false
-            this.isLoadingSave=false;
-            this.nzNotificationService.error(this.i18NService.fanyi("newfailure"), messageShared(this.i18NService,response.message));
-          }
-        })
-      } else {
-        this.isLoadingSave=true;
-        this.hospitalService.editHospital(this.hospital).then((response) => {
-          if (response.success) {
-            this.isLoading = false;
-            this.isLoadingSave=false;
-            this.nzNotificationService.success(this.i18NService.fanyi("successful.revision"), "");
-            this.afterSave.emit();
-            // this.initHospital();
-            this.close();
-          } else {
-            this.isLoading = false;
-            this.isLoadingSave=false;
-            this.nzNotificationService.error(this.i18NService.fanyi("modification.failed"),messageShared(this.i18NService,response.message));
-          }
-        })
-      }
-    }
-  }
-  open(): void {
-    this.visible = true;//打开drawer并清除校验提示信息
-    this.enable = false;
-    this.hospitalContacts = [];
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].reset();
-    }
-  }
-
-  close(): void {
-    this.visible = false;//关闭drawer
-  }
-
-  pushHospitalContacts(hospitalContact: HospitalContacts) {
-    console.log("5555")
-    var i = 0;
-    this.hospitalContacts.forEach((obj) => {
-      if (hospitalContact.contactPsn == obj.contactPsn) {
-        i++;
-      }
-    })
-    console.log("1")
-    if (i > 0) {
-      this.nzNotificationService.error(this.i18NService.fanyi("add.contact.failed"), this.i18NService.fanyi("hospital.contacts ") + hospitalContact.contactPsn + this.i18NService.fanyi("hospital.contarts.isdefault"));
-      return;
-    }
-    console.log("2")
-    this.hospitalContacts.push(hospitalContact);
-    this.hospitalContacts = [...this.hospitalContacts];
-    console.log("3")
-    this.basedataHospitalHospitalNew.handleCancel();
-    console.log("4")
-  }
-
-  confirmDel(contactPsn: string) {
-    for (var i = 0; i < this.hospitalContacts.length; i++) {
-      if (this.hospitalContacts[i].contactPsn == contactPsn) {
-        this.hospitalContacts.splice(i, 1);
-        this.hospitalContacts = [...this.hospitalContacts];
-        break;
-      }
-    }
-  }
-
-  cancelDel() {
-
-  }
-
-
-  // hospital:Hospital = {
-  //   id: "",
-  //   code: "",// 医院编码
-  //   name: "",// 医院名称
-  //   enable: "",// 是否停用
-  //   memo: "",// 备注
-  //   hospitalContacts: []
-  // }
-
-
-}

+ 0 - 47
src/app/routes/basedata/hospital/hospital-doc/edit/contacts-add-row/contacts-add-row.component.html

@@ -1,47 +0,0 @@
-
-  <form nz-form [formGroup]="validateForm">
-    <nz-form-item>
-      <nz-form-label nzRequired [nzSm]="4" [nzXs]="24">{{ 'customer.contacts.name' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="7" [nzXs]="24">
-        <input name="contactPsn" formControlName="contactPsn" nz-input [(ngModel)]="hospitalContacts.contactPsn"
-          placeholder="{{ 'placeholder' | translate }}{{ 'customer.contacts.name' | translate }}" />
-        <nz-form-explain *ngIf="validateForm.get('contactPsn')?.dirty && validateForm.get('contactPsn')?.errors">
-          {{'please.input.contacts' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-      <nz-form-label [nzSm]="4" [nzXs]="24">{{ 'customer.contacts.telephone' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="7" [nzXs]="24">
-        <input name="contactTel" formControlName="contactTel" nz-input [(ngModel)]="hospitalContacts.contactTel"
-          placeholder="{{ 'placeholder' | translate }}{{ 'customer.contacts.telephone' | translate }}" />
-        <nz-form-explain *ngIf="validateForm.get('contactTel')?.dirty && validateForm.get('contactTel')?.errors">
-          {{'store.please.coding' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="4" [nzXs]="24">{{ 'customer.contacts.mail' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="7" [nzXs]="24">
-        <input name="email" nz-input formControlName="email" [(ngModel)]="hospitalContacts.email"
-          placeholder="{{ 'placeholder' | translate }}{{ 'customer.contacts.mail' | translate }}" />
-        <nz-form-explain *ngIf="validateForm.get('email')?.dirty && validateForm.get('email')?.errors">
-          {{'store.please.coding' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-      <nz-form-label [nzSm]="4" [nzXs]="24">{{ 'customer.contacts.address' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="7" [nzXs]="24">
-        <input name="address" nz-input [ngModelOptions]="{standalone: true}" [(ngModel)]="hospitalContacts.address" />
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <!-- 是否默认 -->
-      <nz-form-label [nzSm]="4" [nzXs]="24">{{ 'customer.is.it.default' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="7" [nzXs]="24">
-        <nz-switch [(ngModel)]="isDefault" name="isDefault" [ngModelOptions]="{standalone: true}"
-          nzCheckedChildren="{{'yes' | translate}}" nzUnCheckedChildren="{{'no' | translate}}"></nz-switch>
-      </nz-form-control>
-      <nz-form-label [nzSm]="4" [nzXs]="24">{{ 'hospital.remark' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="7" [nzXs]="24">
-        <input name="memo" nz-input [(ngModel)]="hospitalContacts.memo" [ngModelOptions]="{standalone: true}" />
-      </nz-form-control>
-    </nz-form-item>
-  </form>

+ 0 - 24
src/app/routes/basedata/hospital/hospital-doc/edit/contacts-add-row/contacts-add-row.component.spec.ts

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

+ 0 - 123
src/app/routes/basedata/hospital/hospital-doc/edit/contacts-add-row/contacts-add-row.component.ts

@@ -1,123 +0,0 @@
-import { Component, OnInit, Input } from '@angular/core';
-import { NzModalRef, NzMessageService, NzNotificationService } from 'ng-zorro-antd';
-import { _HttpClient } from '@delon/theme';
-import { FormGroup, FormBuilder, Validators } from '@angular/forms';
-import { HospitalContacts } from 'app/entity/basedata/hospital-contacts';
-import { HospitalContactsService } from 'app/services/basedata/hospital-contacts.service';
-import { I18NService } from '@core';
-
-@Component({
-  selector: 'app-basedata-hospital-hospital-doc-edit-contacts-add-row',
-  templateUrl: './contacts-add-row.component.html',
-})
-export class BasedataHospitalHospitalDocEditContactsAddRowComponent implements OnInit {
-
-  constructor(
-    private fb: FormBuilder,
-    private modal: NzModalRef,
-    private hospitalContactsService: HospitalContactsService,
-    private nzNotificationService: NzNotificationService,
-    private i18NService: I18NService
-  ) { }
-
-  ngOnInit(): void {
-    this.validateForm = this.fb.group({
-      contactPsn: [null, [Validators.required]],
-      contactTel: [null],
-      email: [null],
-    });
-
-    //修改执行
-    if (this.contratsId != "") {
-      this.getContactsById();
-    }
-  }
-  validateForm: FormGroup;
-
-  hospitalContacts: HospitalContacts = {};//医院联系人对象
-
-  /**
-   * 保存按钮
-   */
-  isDefault = false;//是否默认switch
-  save(hospitalId, hospitalContacts) {
-    return new Promise((resolve, reject) => {
-      for (const i in this.validateForm.controls) {
-        this.validateForm.controls[i].markAsDirty();
-        this.validateForm.controls[i].updateValueAndValidity();
-      }
-      // if (this.isDefault) {
-      //   //是否存在默认联系人
-      //   var isdefa = false;
-      //   hospitalContacts.forEach(element => {
-      //     if (element.isDefault == "1") {
-      //       isdefa = true;
-      //     }
-      //   });
-      //   if (isdefa) {
-      //     //已存在默认联系人
-      //     this.nzNotificationService.success(this.i18NService.fanyi("hospital.contarts.isdefault"), "");
-      //     return;
-      //   }
-      // }
-      //验证通过则
-      if (this.validateForm.valid) {
-        //转换是否默认字段
-        if (this.isDefault) {
-          this.hospitalContacts.isDefault = "1"
-        } else {
-          this.hospitalContacts.isDefault = "0";
-        }
-        //医院id
-        this.hospitalContacts.pkHospitalId = hospitalId;
-        if (this.contratsId == "") {
-          //新增
-          this.hospitalContactsService.addHospitalContacts(this.hospitalContacts).then((response) => {
-            if (response.success) {
-              //新增成功
-              this.nzNotificationService.success(this.i18NService.fanyi("newsuccess"), "")
-              this.modal.close();
-              resolve();
-            } else {
-              //新增失败
-              this.nzNotificationService.success(this.i18NService.fanyi("newfailure"), "")
-            }
-          })
-        } else {
-          //修改
-          this.hospitalContactsService.editHospitalContacts(this.hospitalContacts).then((response) => {
-            if (response.success) {
-              //修改成功
-              this.nzNotificationService.success(this.i18NService.fanyi("successful.revision"), "")
-              this.modal.close();
-              resolve();
-            } else {
-              //修改失败
-              this.nzNotificationService.success(this.i18NService.fanyi("modification.failed"), "")
-            }
-          })
-        }
-      }
-    })
-  }
-
-  close() {
-    this.modal.destroy();
-  }
-
-  /**
-   * 修改执行
-   */
-  @Input() contratsId = "";//联系人id
-  getContactsById() {
-    this.hospitalContactsService.getById(this.contratsId).then((response) => {
-      this.hospitalContacts = response.result
-      //转换是否默认
-      if (this.hospitalContacts.isDefault == "1") {
-        this.isDefault = true;
-      } else {
-        this.isDefault = false;
-      }
-    });
-  }
-}

+ 0 - 159
src/app/routes/basedata/hospital/hospital-doc/edit/edit.component.html

@@ -1,159 +0,0 @@
-<nz-drawer [nzMaskClosable]="true" [nzWidth]="drawerWidth" [nzVisible]="visible" nzTitle="修改医院档案" [nzClosable]="true"
-  (nzOnClose)="close()">
-  <form [formGroup]="validateForm">
-    <div nz-row [nzGutter]="24">
-      <div nz-col nzMd="24" nzLg="12">
-        <nz-form-item>
-          <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="code" nzRequired>{{'hospital.code'|translate}}</nz-form-label>
-          <nz-form-control [nzSm]="18" [nzXs]="24">
-            <input nz-input formControlName="code" disabled [(ngModel)]="hospital.code" id="code" name="code" />
-            <nz-form-explain *ngIf="validateForm.get('code')?.dirty && validateForm.get('code')?.errors">
-              {{'hospital.please.input.code'|translate}}
-            </nz-form-explain>
-          </nz-form-control>
-        </nz-form-item>
-      </div>
-      <div nz-col nzMd="24" nzLg="12">
-        <nz-form-item>
-          <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="name" nzRequired>{{'hospital.name'|translate}}</nz-form-label>
-          <nz-form-control [nzSm]="18" [nzXs]="24">
-            <input nz-input formControlName="name" [(ngModel)]="hospital.name" id="name" name="name" />
-            <nz-form-explain *ngIf="validateForm.get('name')?.dirty && validateForm.get('name')?.errors">
-               {{'hospital.please.input.name'|translate}}
-            </nz-form-explain>
-          </nz-form-control>
-        </nz-form-item>
-      </div>
-    </div>
-    <div nz-row [nzGutter]="24">
-      <div nz-col nzMd="24" nzLg="12">
-        <nz-form-item>
-          <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="enable">{{'hospital.whether.discontinuation'|translate}}
-          </nz-form-label>
-          <nz-form-control [nzSm]="18" [nzXs]="24">
-            <nz-switch [ngModelOptions]="{standalone: true}" [(ngModel)]="enable" name="enable"
-              nzCheckedChildren="{{'yes' | translate}}" nzUnCheckedChildren="{{'no' | translate}}"></nz-switch>
-          </nz-form-control>
-        </nz-form-item>
-      </div>
-      <div nz-col nzMd="24" nzLg="12">
-        <nz-form-item>
-          <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="memo">{{'hospital.remark'|translate}}</nz-form-label>
-          <nz-form-control [nzSm]="18" [nzXs]="24">
-            <input nz-input [ngModelOptions]="{standalone: true}" [(ngModel)]="hospital.memo" id="memo" name="memo" />
-            <!-- <nz-form-explain *ngIf="validateForm.get('email')?.dirty && validateForm.get('email')?.errors">
-             The input is not valid E-mail!
-           </nz-form-explain> -->
-          </nz-form-control>
-        </nz-form-item>
-      </div>
-    </div>
-    <!-- 数据表 -->
-    <!-- <div nz-row nzGutter="24">
-      <div nz-col nzMd="24" nzLg="24">
-        <button (click)="editNewContact()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
-        <app-basedata-hospital-hospital-new #basedataHospitalHospitalNew (afterEditNewSave)="getContacts($event)">
-        </app-basedata-hospital-hospital-new>
-      </div>
-    </div> -->
-    <!-- <nz-form-item>
-    <div nz-row nzGutter="24">
-      <div nz-col nzMd="24" nzLg="24">
-        <nz-table #basicTable [nzData]="hospitalContacts" [nzFrontPagination]="false" [nzShowPagination]="false">
-          <thead>
-            <tr>
-              <th>联系人</th>
-              <th>联系人电话</th>
-              <th>联系人邮箱</th>
-              <th>联系地址</th>
-              <th>是否默认</th>
-              <th>操作</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr *ngFor="let item of basicTable.data">
-              <td>{{item.contactPsn}}</td>
-              <td>{{item.contactTel}}</td>
-              <td>{{item.email}}</td>
-              <td>{{item.address}}</td>
-              <td>{{item.isDefault==0?'否':'是'}}</td>
-              <td>
-                <a href="javascript:;" (click)="edit(item.id)">{{'hospital.operation.edit' | translate}}</a>
-                <span class="ant-divider ant-divider-vertical"></span>
-                <a nz-popconfirm
-                nzTitle="确定删除吗?"
-                nzOkText="是"
-                nzCancelText="否"
-                (nzOnConfirm)="confirmDel(item.id)"
-                (nzOnCancel)="cancelDel()"
-                >删除</a>
-              </td>
-            </tr>
-          </tbody>
-        </nz-table>
-      </div>
-    </div>
-  </nz-form-item> -->
-    <div class="base">
-      <button type="button" (click)="close()" class="ant-btn"
-        style="margin-right: 8px;">{{ 'button.close' | translate }}</button>
-      <button nzbutton nzType="primary" (click)="save()"
-        class="ant-btn ant-btn-primary">{{ 'button.save' | translate }}</button>
-    </div>
-  </form>
-  <!-- 数据表 -->
-  <div>
-    <div style="margin-bottom: 2%;">
-      <div style="margin-left:94.1%">
-        <button (click)="addRow()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
-      </div>
-    </div>
-    <nz-table nzSize="small" style="margin-bottom: 2.5%" [nzLoading]="isLoading" #editRowTable nzBordered [nzData]="hospitalContacts"
-      [nzShowPagination]="false" [nzFrontPagination]="false">
-      <thead>
-        <tr>
-          <!-- 联系人 -->
-          <th nzAlign="center">{{'customer.contacts.name' | translate}}
-          </th>
-          <!-- 联系人电话 -->
-          <th nzAlign="center">{{ 'customer.contacts.telephone' | translate }}
-            <!-- 联系人邮箱 -->
-          <th nzAlign="center">{{ 'customer.contacts.mail' | translate }}
-            <!-- 联系地址 -->
-          <th nzAlign="center">{{ 'hospital.contact.address' | translate }}
-            <!-- 是否默认 -->
-          <th nzAlign="center">{{ 'customer.is.it.default' | translate }}
-          </th>
-          <!-- 操作 -->
-          <th nzAlign="center">{{ 'table.operation' | translate }}</th>
-        </tr>
-      </thead>
-      <tbody>
-        <tr *ngFor="let data of hospitalContacts">
-          <td nzAlign="center">
-            {{data.contactPsn}}
-          </td>
-          <td nzAlign="center">
-            {{data.contactTel}}
-          </td>
-          <td nzAlign="center">
-            {{data.email}}
-          </td>
-          <td nzAlign="center">
-            {{data.address}}
-          </td>
-          <td nzAlign="center">
-            <nz-switch [nzDisabled]="true" [(ngModel)]="data.isDefault"></nz-switch>
-          </td>
-          <td nzAlign="center">
-            <a (click)="updateRow(data.id)">{{ 'milestone.update' | translate }}</a>
-            <nz-divider nzType="vertical"></nz-divider>
-            <a nz-popconfirm nzTitle="{{ 'pm.contract.contract.payment.delete' | translate }}"
-              (nzOnConfirm)="confirmDel(data.id)">
-              <!-- 删除 -->
-              {{ 'pm.contract.delete' | translate }}</a>
-          </td>
-        </tr>
-      </tbody>
-    </nz-table>
-  </div>

+ 0 - 24
src/app/routes/basedata/hospital/hospital-doc/edit/edit.component.spec.ts

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

+ 0 - 282
src/app/routes/basedata/hospital/hospital-doc/edit/edit.component.ts

@@ -1,282 +0,0 @@
-import { HospitalService } from 'app/services/basedata/hospital.service';
-import { Component, OnInit, ViewChild, Output, EventEmitter, HostListener } from '@angular/core';
-import { NzNotificationService, NzModalService } from 'ng-zorro-antd';
-import { _HttpClient } from '@delon/theme';
-import { HospitalContacts } from 'app/entity/basedata/hospital-contacts';
-import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { Hospital } from 'app/entity/basedata/hospital';
-import { BasedataHospitalHospitalNewComponent } from '../../hospital-new/hospital-new.component';
-import { HospitalContactsService } from 'app/services/basedata/hospital-contacts.service';
-import { I18NService } from '@core';
-import { BasedataHospitalHospitalDocEditContactsAddRowComponent } from './contacts-add-row/contacts-add-row.component';
-import { messageShared } from '@shared/utils/message';
-
-@Component({
-  selector: 'app-basedata-hospital-hospital-doc-edit',
-  templateUrl: './edit.component.html',
-  styles: [
-    `
-    .base{
-      position: absolute;
-      bottom: 0px;
-      width: 100%;
-      border-top: 1px solid rgb(232, 232, 232);
-      padding: 10px 16px;
-      text-align: right;
-      left: 0px;
-      background: #fff;
-      z-index:99;
-    }
-    .buttonDistance{
-      margin-right:2%;
-    }
-    .textCenter{
-      text-align:center
-    }
-
-    `
-  ]
-})
-export class BasedataHospitalHospitalDocEditComponent implements OnInit {
-
-  //元数据
-  ngOnInit(): void {
-    this.validateForm = this.fb.group({
-      code: [null, [Validators.required]],
-      name: [null, [Validators.required]],
-      pig: [null]
-    });
-    this.initHospital();
-    this.hospitalContacts = [];
-  }
-  constructor(
-    private nzNotificationService: NzNotificationService,
-    private hospitalService: HospitalService,
-    private hospitalContactsService: HospitalContactsService,
-    private fb: FormBuilder,
-    private nzModalService:NzModalService,
-    private i18NService:I18NService
-  ) { }
-  isLoading = false;
-  drawerWidth = 1100;
-  visible = false;
-  validateForm: FormGroup;
-  hospital: Hospital;
-  enable = false;
-  hospitalContact: HospitalContacts;
-
-  @ViewChild("basedataHospitalHospitalNew") basedataHospitalHospitalNew: BasedataHospitalHospitalNewComponent
-  @Output() afterSave = new EventEmitter();
-  @HostListener('window:resize', ['$event'])
-  onResize(event) {
-    const width = event.target.innerWidth;
-    if (width > 900) {
-      this.drawerWidth = 900;
-    } else {
-      this.drawerWidth = width;
-    }
-  }
-  //对<nz-form-control>标签逐一校验
-  a = 0;
-
-  save(): void {
-
-    // this.hospitalContacts.forEach(element => {
-    //   console.log(this.hospitalContacts)
-    //   if (element.isDefault == true) {
-    //     element.isDefault="1";
-    //     this.a++
-    //     console.log("默认联系人有" + this.a)
-    //   }else{
-    //     element.isDefault="0";
-    //   }
-    // });
-    // this.hospital.hospitalContacts = this.hospitalContacts;
-    if (this.enable) {
-      this.hospital.enable = "1";
-    } else {
-      this.hospital.enable = "0";
-    }
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].markAsDirty();
-      this.validateForm.controls[i].updateValueAndValidity();
-    }
-    //alert(JSON.stringify(this.hospital));
-    //return;
-    let valid = this.validateForm.valid;
-    //验证通过保存
-    if (valid) {
-      this.hospitalService.editHospital(this.hospital).then((response) => {
-        if (response.success) {
-          this.nzNotificationService.success(this.i18NService.fanyi("successful.revision"), "");
-          this.afterSave.emit();
-          this.initHospital();
-          this.close();
-        } else {
-          this.nzNotificationService.error(this.i18NService.fanyi("modification.failed"), messageShared(this.i18NService,response.message));
-        }
-      })
-    }
-  }
-  openEdit(id: string): void {
-    this.visible = true;//打开drawer并清除校验提示信息
-    this.hospital.id = id;
-    // this.enable = true;
-    // this.hospitalContacts = [];
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].reset();
-    }
-    this.hospitalService.queryById(id).then((response) => {
-      this.hospital = response.result;
-      //装换是否停用
-      if(this.hospital.enable=="0"){
-        this.enable=false;
-      }else{
-        this.enable=true;
-      }
-    })
-    this.getContacts(id);
-
-  }
-
-  getContacts(id) {
-    this.isLoading = true
-    this.hospitalContact = {
-      pkHospitalId: id
-    }
-    this.hospitalContactsService.getHospitalContacts(this.hospitalContact).then((response) => {
-      console.log(this.i18NService.fanyi("the.data.queried.is"))
-      console.log(response.result.records)
-      this.hospitalContacts = response.result.records;
-      this.hospitalContacts.forEach(element => {
-        //转换是否默认
-        if(element.isDefault=="1"){
-          element.isDefault=true;
-        }else{
-          element.isDefault=false;
-        }
-      });
-      this.isLoading = false
-    })
-  }
-
-  editNewContact() {
-    this.basedataHospitalHospitalNew.editNewContact(this.hospital.id);
-  }
-
-  edit(id: string) {
-    this.basedataHospitalHospitalNew.editContact(id);
-  }
-
-  close(): void {
-    this.visible = false;//关闭drawer
-    this.enable=false;
-    this.hospital={}
-  }
-
-  /**
-   * 删除
-   * @param id 联系人id
-   */
-  confirmDel(id: string) {
-    this.isLoading = true
-    this.hospitalContactsService.deleteHospitalContacts(id).then((response) => {
-      if (response.success) {
-        //删除成功
-        this.nzNotificationService.success(this.i18NService.fanyi("successful.deletion"), "")
-        this.getContacts(this.hospital.id)
-        this.isLoading = false
-      } else {
-        //删除失败
-        this.nzNotificationService.error(this.i18NService.fanyi("delete.failed"), response.message);
-        this.getContacts(this.hospital.id)
-        this.isLoading = false
-      }
-    })
-  }
-
-  cancelDel() {
-
-  }
-
-  initHospital() {
-    this.hospital = {
-      id: "",
-      code: "",// 医院编码
-      name: "",// 医院名称
-      enable: "",// 是否停用
-      memo: "",// 备注
-      hospitalContacts: []
-    }
-  }
-
-
-
-  index = 1;
-  hospitalContacts: any[] = [];
-  // 生物分析方法号增行
-  addRow(): void {
-    this.nzModalService.create({
-      nzTitle:this.i18NService.fanyi("hospital.contarts.add"),
-      nzWidth:900,
-      nzContent:BasedataHospitalHospitalDocEditContactsAddRowComponent,
-      nzFooter:[
-        {
-          label: this.i18NService.fanyi("button.cancel"),
-          type:"default",
-          onClick: BasedataHospitalHospitalDocEditContactsAddRowComponent => {
-            BasedataHospitalHospitalDocEditContactsAddRowComponent.close();
-          }
-        },
-        {
-          label: this.i18NService.fanyi("button.save"),
-          type:"primary",
-          onClick: BasedataHospitalHospitalDocEditContactsAddRowComponent => {
-            BasedataHospitalHospitalDocEditContactsAddRowComponent.save(this.hospital.id,this.hospitalContacts).then(()=>{
-              this.getContacts(this.hospital.id);
-            });
-          }
-        }
-      ]
-    })
-  }
-
-  /**
-   * 修改
-   * @param contratsId 联系人id
-   */
-  updateRow(contratsId){
-    this.nzModalService.create({
-      nzTitle:this.i18NService.fanyi("hospital.contarts.add"),
-      nzWidth:900,
-      nzContent:BasedataHospitalHospitalDocEditContactsAddRowComponent,
-      nzComponentParams:{
-        contratsId:contratsId
-      },
-      nzFooter:[
-        {
-          label: this.i18NService.fanyi("button.cancel"),
-          type:"default",
-          onClick: BasedataHospitalHospitalDocEditContactsAddRowComponent => {
-            BasedataHospitalHospitalDocEditContactsAddRowComponent.close();
-          }
-        },
-        {
-          label: this.i18NService.fanyi("button.save"),
-          type:"primary",
-          onClick: BasedataHospitalHospitalDocEditContactsAddRowComponent => {
-            BasedataHospitalHospitalDocEditContactsAddRowComponent.save(this.hospital.id,this.hospitalContacts).then(()=>{
-              this.getContacts(this.hospital.id);
-            });
-          }
-        }
-      ]
-    })
-  }
-
-  // 生物分析方法号删行
-  deleteRow(index: number): void {
-    this.hospitalContacts = this.hospitalContacts.filter(d => d.index !== index);
-  }
-
-}

+ 0 - 76
src/app/routes/basedata/hospital/hospital-doc/hospital-doc.component.html

@@ -1,76 +0,0 @@
-<nz-card>
-  <form nz-form>
-  <!-- 查询条件 -->
-  <div nz-row [nzGutter]="{xs:10,sm:25,md:39,lg: 36, xl: 40}">
-    <div class="backGauge" nz-col nzXs="24" nzSm="4" nzLg="3">
-      <nz-form-label>{{'hospital.code' | translate}}</nz-form-label>
-    </div>
-    <div nz-col nzXs="24" nzSm="5" nzLg="6">
-      <input nz-input [(ngModel)]="hospital.code" name="code"/>
-    </div>
-    <div class="backGauge" nz-col nzXs="24" nzSm="4" nzLg="3">
-      <nz-form-label>{{'hospital.name' | translate}}</nz-form-label>
-    </div>
-    <div nz-col nzXs="24" nzSm="5" nzLg="6">
-      <input nz-input [(ngModel)]="hospital.name" name="name">
-    </div>
-    <div class="diss" nz-col nzXs="24" nzSm="3" nzLg="6">
-      <button nz-button nzType="primary" (click)="query()">{{'hospital.search' | translate}}</button>
-    </div>
-  </div>
-</form>
-  <!-- 列表详细信息 -->
-  <nz-table nzSize="small" [nzData]="data" #borderedTable [nzFrontPagination]="false" [nzTotal]="page.total" [nzPageIndex]="page.current"
-    (nzPageIndexChange)="pageIndexChange($event)" [nzLoading]="isSpining">
-    <thead>
-      <tr>
-        <!-- <th nzShowCheckbox nzAlign="left"></th> -->
-        <th nzAlign="left">{{'hospital.code' | translate}}</th>
-        <th nzAlign="left">{{'hospital.name' | translate}}</th>
-        <th nzAlign="left">{{'hospital.contacts' | translate}}</th>
-        <th nzAlign="left">{{'contact.number' | translate}}</th>
-        <th nzAlign="left">{{'hospital.whether.discontinuation' | translate}}</th>
-        <th nzAlign="left">{{'hospital.operation' | translate}}</th>
-      </tr>
-    </thead>
-    <!-- 绑定数据 -->
-    <tbody>
-      <tr *ngFor="let item of  borderedTable.data">
-        <!-- <td nzShowCheckbox></td> -->
-        <td nzAlign="left">{{ item.code }}</td>
-        <td nzAlign="left">{{ item.name}}</td>
-        <td nzAlign="left">{{ item.defaultContactPsn}}</td>
-        <td nzAlign="left">{{ item.defaultContactTel}}</td>
-        <td nzAlign="left">
-          <!-- 否 -->
-          <nz-tag *ngIf="item.enable==0" [nzColor]="'green'">{{'store.no'|translate}}</nz-tag>
-          <!-- 是 -->
-          <nz-tag *ngIf="item.enable==1" [nzColor]="'red'">{{'store.yes'|translate}}</nz-tag>
-        </td>
-        <td nzAlign="left">
-          <a href="javascript:;" (click)="view(item.id)">{{'hospital.operation.details' | translate}}</a>
-          <span class="ant-divider ant-divider-vertical"
-            [acl]="{ ability: [10, 'hospital:update','hospital:delete'], mode: 'oneOf' }"></span>
-          <nz-dropdown [acl]="{ ability: [10, 'hospital:update','hospital:delete'], mode: 'oneOf' }">
-            <a nz-dropdown>{{'hospital.operation.more' | translate}}<i nz-icon type="down"></i> </a>
-            <ul nz-menu nzSelectable>
-              <li nz-menu-item acl [acl-ability]="'hospital:update'">
-                <a href="javascript:;" (click)="edit(item.id)">{{'hospital.operation.edit' | translate}}</a>
-              </li>
-              <li nz-menu-item acl [acl-ability]="'hospital:delete'">
-                <a nz-popconfirm nzTitle="{{'hospital.menu.item.title' | translate}}"
-                  nzOkText="{{'hospital.menu.yes' | translate}}" nzCancelText="{{'hospital.menu.no' | translate}}"
-                  (nzOnConfirm)="confirmDel(item.id)"
-                  (nzOnCancel)="cancelDel()">{{'hospital.operation.delete' | translate}}</a>
-              </li>
-            </ul>
-          </nz-dropdown>
-        </td>
-      </tr>
-    </tbody>
-  </nz-table>
-</nz-card>
-<app-basedata-hospital-hospital-doc-edit #basedataHospitalHospitalDocEditComponent (afterSave)="getHospitals()">
-</app-basedata-hospital-hospital-doc-edit>
-<app-basedata-hospital-hospital-doc-view #basedataHospitalHospitalDocViewComponent>
-</app-basedata-hospital-hospital-doc-view>

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

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

+ 0 - 101
src/app/routes/basedata/hospital/hospital-doc/hospital-doc.component.ts

@@ -1,101 +0,0 @@
-import { I18NService } from '@core';
-import { BasedataHospitalHospitalDocViewComponent } from './view/view.component';
-import { BasedataHospitalHospitalDocEditComponent } from './edit/edit.component';
-import { NzNotificationService } from 'ng-zorro-antd';
-import { Hospital } from 'app/entity/basedata/hospital';
-import { HospitalService } from './../../../../services/basedata/hospital.service';
-import { Component, OnInit, ViewChild } from '@angular/core';
-
-@Component({
-  selector: 'app-basedata-hospital-hospital-doc',
-  templateUrl: './hospital-doc.component.html',
-  styles: [
-    `
-    .distance{
-      margin-top:14px;
-    }
-    @media screen and (max-width: 572px) {
-      .diss{
-         margin-top:2%;
-      }
-  }
-  @media screen and (max-width: 726px) and (min-width:574px) {
-    .backGauge{
-      margin-right:28px
-    }
-  }
-  @media screen and (max-width: 794px) and (min-width:748px) {
-    .backGauge{
-      margin-right:14px
-    }
-  }
-
-    `
-  ]
-})
-export class BasedataHospitalHospitalDocComponent implements OnInit {
-  constructor(
-    private hospitalService: HospitalService,
-    private nzNotificationService:NzNotificationService,
-    private i18Nservice:I18NService
-  ) { }
-
-  ngOnInit(): void {
-    this.getHospitals();
-    this.hospital={};
-  }
-  //元数据
-  data = [];
-  hospital:Hospital;
-  isSpining = false;
-  page={
-    total:0,
-    current:0};
-  @ViewChild("basedataHospitalHospitalDocEditComponent") basedataHospitalHospitalDocEditComponent:BasedataHospitalHospitalDocEditComponent;
-  @ViewChild("basedataHospitalHospitalDocViewComponent") basedataHospitalHospitalDocViewComponent:BasedataHospitalHospitalDocViewComponent;
-  getHospitals(){
-    this.isSpining = true;
-    this.hospitalService.getHospitals1(this.hospital).then((response)=>{
-      this.data = response.result.records;
-      this.page = response.result;
-      this.isSpining = false;
-    })
-  }
-
-  /**
-   * 查询按钮
-   */
-  query(){
-    this.hospital.pageNo=1;
-    this.getHospitals();
-  }
-
-  edit(id:string){
-    this.basedataHospitalHospitalDocEditComponent.openEdit(id);
-  }
-
-  view(id:string){
-    this.basedataHospitalHospitalDocViewComponent.openView(id);
-  }
-
-  confirmDel(id:string){
-    this.hospitalService.deleteHospital(id).then((response)=>{
-      if(response.success){
-        this.nzNotificationService.success(this.i18Nservice.fanyi("successful.deletion"),"");
-        this.getHospitals();
-      }else{
-        this.nzNotificationService.success(this.i18Nservice.fanyi("delete.failed"),response.message);
-      }
-    })
-  }
-  //按页码显示数据
-  pageIndexChange(event) {
-    this.hospital.pageNo=event;//当前页码
-    this.getHospitals();
-  }
-
-  cancelDel(){
-
-  }
-
-}

+ 0 - 96
src/app/routes/basedata/hospital/hospital-doc/view/view.component.html

@@ -1,96 +0,0 @@
-<nz-drawer [nzMaskClosable]="true" [nzWidth]="drawerWidth" [nzVisible]="visible" nzTitle="{{'view.hospital.files'|translate}}" [nzClosable]="true"
-(nzOnClose)="close()">
-<form [formGroup]="validateForm">
- <div nz-row [nzGutter]="24">
-   <div nz-col nzMd="24" nzLg="12">
-       <nz-form-item>
-         <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="code" nzRequired>{{'hospital.code'|translate}}</nz-form-label>
-         <nz-form-control [nzSm]="18" [nzXs]="24">
-           {{hospital.code}}
-           <!-- <input nz-input formControlName="code" [(ngModel)]="hospital.code" id="code" name="code"/> -->
-           <nz-form-explain *ngIf="validateForm.get('code')?.dirty && validateForm.get('code')?.errors">
-              {{'hospital.please.input.code'|translate}}
-           </nz-form-explain>
-         </nz-form-control>
-       </nz-form-item>
-   </div>
-   <div nz-col nzMd="24" nzLg="12">
-       <nz-form-item>
-         <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="name" nzRequired>{{'hospital.name'|translate}}</nz-form-label>
-         <nz-form-control [nzSm]="18" [nzXs]="24">
-           {{hospital.name}}
-           <!-- <input nz-input formControlName="name" [(ngModel)]="hospital.name" id="name" name="name"/> -->
-           <nz-form-explain *ngIf="validateForm.get('name')?.dirty && validateForm.get('name')?.errors">
-              {{'hospital.please.input.name'|translate}}
-           </nz-form-explain>
-         </nz-form-control>
-       </nz-form-item>
-   </div>
- </div>
- <div nz-row [nzGutter]="24">
-   <div nz-col nzMd="24" nzLg="12">
-       <nz-form-item>
-         <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="enable">{{'hospital.whether.discontinuation'|translate}}</nz-form-label>
-         <nz-form-control [nzSm]="18" [nzXs]="24">
-           <ng-container *ngIf="hospital.enable==='0'">
-            否
-           </ng-container>
-           <ng-container *ngIf="hospital.enable==='1'">
-            是
-            </ng-container>
-           <!-- <nz-switch [ngModelOptions]="{standalone: true}" [(ngModel)]="hospital.enable" name="enable" nzCheckedChildren="{{'yes' | translate}}" nzUnCheckedChildren="{{'no' | translate}}"></nz-switch> -->
-         </nz-form-control>
-       </nz-form-item>
-   </div>
-   <div nz-col nzMd="24" nzLg="12">
-       <nz-form-item>
-         <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="memo">{{'hospital.remark'|translate}}</nz-form-label>
-         <nz-form-control [nzSm]="18" [nzXs]="24">
-           {{hospital.memo}}
-           <!-- <input nz-input [ngModelOptions]="{standalone: true}" [(ngModel)]="hospital.memo" id="memo" name="memo"/> -->
-           <!-- <nz-form-explain *ngIf="validateForm.get('email')?.dirty && validateForm.get('email')?.errors">
-             The input is not valid E-mail!
-           </nz-form-explain> -->
-         </nz-form-control>
-       </nz-form-item>
-   </div>
- </div>
-  <!-- 数据表 -->
-  <!-- <div nz-row nzGutter="24">
-    <div nz-col nzMd="24" nzLg="24">
-      <button (click)="editNewContact()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
-      <app-basedata-hospital-hospital-new #basedataHospitalHospitalNew (afterEditNewSave)="getContacts($event)"></app-basedata-hospital-hospital-new>
-    </div>
-  </div> -->
-  <nz-form-item>
-    <div nz-row nzGutter="24">
-      <div nz-col nzMd="24" nzLg="24">
-        <nz-table nzSize="small" #basicTable [nzData]="hospitalContacts" [nzFrontPagination]="false" [nzShowPagination]="false">
-          <thead>
-            <tr>
-              <!-- <th style="width:150px;">{{ 'customer.code' | translate }}</th> -->
-              <th>{{'hospital.contacts'|translate}}</th>
-              <th>{{'contact.number'|translate}}</th>
-              <th>{{'contact.e-mail'|translate}}</th>
-              <th>{{'hospital.contact.address'|translate}}</th>
-              <th>{{'is.it.default'|translate}}</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr *ngFor="let item of basicTable.data">
-              <td>{{item.contactPsn}}</td>
-              <td>{{item.contactTel}}</td>
-              <td>{{item.email}}</td>
-              <td>{{item.address}}</td>
-              <td>{{item.isDefault==0?'否':'是'}}</td>
-            </tr>
-          </tbody>
-        </nz-table>
-      </div>
-    </div>
-  </nz-form-item>
-  <div class="base">
-     <button type="button" (click)="close()" class="ant-btn"style="margin-right: 8px;">{{ 'button.close' | translate }}</button>
-     <!-- <button nzbutton nzType="primary" (click)="save()" class="ant-btn ant-btn-primary">{{ 'button.save' | translate }}</button> -->
-  </div>
-</form>

+ 0 - 24
src/app/routes/basedata/hospital/hospital-doc/view/view.component.spec.ts

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

+ 0 - 163
src/app/routes/basedata/hospital/hospital-doc/view/view.component.ts

@@ -1,163 +0,0 @@
-import { I18NService } from './../../../../../core/i18n/i18n.service';
-import { Component, OnInit, ViewChild, Output, EventEmitter, HostListener } from '@angular/core';
-import { NzModalRef, NzMessageService, NzNotificationService } from 'ng-zorro-antd';
-import { _HttpClient } from '@delon/theme';
-import { HospitalService } from 'app/services/basedata/hospital.service';
-import { HospitalContactsService } from 'app/services/basedata/hospital-contacts.service';
-import { FormBuilder, Validators, FormGroup } from '@angular/forms';
-import { Hospital } from 'app/entity/basedata/hospital';
-import { HospitalContacts } from 'app/entity/basedata/hospital-contacts';
-import { BasedataHospitalHospitalNewComponent } from '../../hospital-new/hospital-new.component';
-import { messageShared } from '@shared/utils/message';
-
-@Component({
-  selector: 'app-basedata-hospital-hospital-doc-view',
-  templateUrl: './view.component.html',
-  styles: [
-    `
-    .base{
-      position: absolute;
-      bottom: 0px;
-      width: 100%;
-      border-top: 1px solid rgb(232, 232, 232);
-      padding: 10px 16px;
-      text-align: right;
-      left: 0px;
-      background: #fff;
-      z-index:99;
-    }
-    .buttonDistance{
-      margin-right:2%;
-    }
-
-    `
-  ]
-})
-export class BasedataHospitalHospitalDocViewComponent implements OnInit {
-  //元数据
-  ngOnInit(): void {
-    this.validateForm = this.fb.group({
-      code: [null, [Validators.required]],
-      name: [null, [Validators.required]],
-    });
-    this.initHospital();
-    this.hospitalContacts = [];
-  }
-  constructor(
-    private nzNotificationService:NzNotificationService,
-    private hospitalService:HospitalService,
-    private hospitalContactsService:HospitalContactsService,
-    private fb: FormBuilder,
-    private i18Nservice:I18NService
-  ) { }
-
-  drawerWidth = 900;
-  visible = false;
-  validateForm: FormGroup;
-  hospital:Hospital;
-  enable = false;
-  hospitalContact:HospitalContacts;
-  hospitalContacts:HospitalContacts[];
-
-  @ViewChild("basedataHospitalHospitalNew") basedataHospitalHospitalNew:BasedataHospitalHospitalNewComponent
-  @Output() afterSave = new EventEmitter();
-  @HostListener('window:resize', ['$event'])
-  onResize(event) {
-    const width = event.target.innerWidth;
-    if (width > 900) {
-      this.drawerWidth = 900;
-    } else {
-      this.drawerWidth = width;
-    }
-  }
-  //对<nz-form-control>标签逐一校验
-  save(): void {
-    //this.hospital.hospitalContacts = this.hospitalContacts;
-    if(this.enable){
-      this.hospital.enable = "1";
-    }else{
-      this.hospital.enable = "0";
-    }
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].markAsDirty();
-      this.validateForm.controls[i].updateValueAndValidity();
-    }
-    //alert(JSON.stringify(this.hospital));
-    //return;
-    let valid = this.validateForm.valid;
-    //验证通过保存
-    if(valid){
-      this.hospitalService.editHospital(this.hospital).then((response) => {
-        if(response.success){
-          this.nzNotificationService.success(this.i18Nservice.fanyi("successful.revision"),"");
-          this.afterSave.emit();
-          this.initHospital();
-          this.close();
-        }else{
-          this.nzNotificationService.error(this.i18Nservice.fanyi("modification.failed"),messageShared(this.i18Nservice,response.message));
-        }
-      })
-    }
-  }
-  openView(id:string): void {
-    this.visible = true;//打开drawer并清除校验提示信息
-    this.hospital.id = id;
-    // this.enable = true;
-    // this.hospitalContacts = [];
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].reset();
-    }
-    this.hospitalService.queryById(id).then((response)=>{
-      this.hospital = response.result;
-    })
-    this.getContacts(id);
-
-  }
-
-  getContacts(id){
-    this.hospitalContact = {
-      pkHospitalId:id
-    }
-    this.hospitalContactsService.getHospitalContacts(this.hospitalContact).then((response)=>{
-      this.hospitalContacts = response.result.records;
-      console.error(response);
-    })
-  }
-
-  editNewContact(){
-    this.basedataHospitalHospitalNew.editNewContact(this.hospital.id);
-  }
-
-  edit(id:string){
-    this.basedataHospitalHospitalNew.editContact(id);
-  }
-
-  close(): void {
-    this.visible = false;//关闭drawer
-  }
-
-  confirmDel(id:string){
-    this.hospitalContactsService.deleteHospitalContacts(id).then((response)=>{
-      if(response.success){
-        this.nzNotificationService.success(this.i18Nservice.fanyi("successful.deletion"),"")
-      }else{
-        this.nzNotificationService.error(this.i18Nservice.fanyi("delete.failed"),messageShared(this.i18Nservice,response.message));
-      }
-    })
-  }
-
-  cancelDel(){
-
-  }
-
-  initHospital(){
-    this.hospital = {
-      id:"",
-      code:"",// 医院编码
-      name:"",// 医院名称
-      enable:"",// 是否停用
-      memo:"",// 备注
-      hospitalContacts:[]
-    }
-  }
-}

+ 0 - 48
src/app/routes/basedata/hospital/hospital-new/hospital-new.component.html

@@ -1,48 +0,0 @@
-<nz-modal [(nzVisible)]="isVisible" nzTitle="{{'add.hospital.contact'|translate}}" (nzOnOk)="handleOk()" [nzOkLoading]="isLoading"
-  (nzOnCancel)="handleCancel()" [nzWidth]="900">
-  <form nz-form [formGroup]="validateForm">
-    <nz-form-item>
-      <nz-form-label nzRequired [nzSm]="4" [nzXs]="24">{{ 'customer.contacts.name' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="7" [nzXs]="24">
-        <input name="contactPsn" formControlName="contactPsn" nz-input [(ngModel)]="hospitalContacts.contactPsn"
-          placeholder="{{ 'placeholder' | translate }}{{ 'customer.contacts.name' | translate }}" />
-        <nz-form-explain *ngIf="validateForm.get('contactPsn')?.dirty && validateForm.get('contactPsn')?.errors">
-          {{'please.input.contacts' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-      <nz-form-label [nzSm]="4" [nzXs]="24">{{ 'customer.contacts.telephone' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="7" [nzXs]="24">
-        <input name="contactTel" formControlName="contactTel" nz-input [(ngModel)]="hospitalContacts.contactTel"
-          placeholder="{{ 'placeholder' | translate }}{{ 'customer.contacts.telephone' | translate }}" />
-        <nz-form-explain *ngIf="validateForm.get('contactTel')?.dirty && validateForm.get('contactTel')?.errors">
-          {{'store.please.coding' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="4" [nzXs]="24">{{ 'customer.contacts.mail' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="7" [nzXs]="24">
-        <input name="email" nz-input formControlName="email" [(ngModel)]="hospitalContacts.email"
-          placeholder="{{ 'placeholder' | translate }}{{ 'customer.contacts.mail' | translate }}" />
-        <nz-form-explain *ngIf="validateForm.get('email')?.dirty && validateForm.get('email')?.errors">
-          {{'store.please.coding' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-      <nz-form-label [nzSm]="4" [nzXs]="24">{{ 'customer.contacts.address' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="7" [nzXs]="24">
-        <input name="address" nz-input [ngModelOptions]="{standalone: true}" [(ngModel)]="hospitalContacts.address" />
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="4" [nzXs]="24">{{ 'customer.is.it.default' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="7" [nzXs]="24">
-        <nz-switch [(ngModel)]="isDefault" name="isDefault" [ngModelOptions]="{standalone: true}"
-          nzCheckedChildren="{{'yes' | translate}}" nzUnCheckedChildren="{{'no' | translate}}"></nz-switch>
-      </nz-form-control>
-      <nz-form-label [nzSm]="4" [nzXs]="24">{{ 'hospital.remark' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="7" [nzXs]="24">
-        <input name="memo" nz-input [(ngModel)]="hospitalContacts.memo" [ngModelOptions]="{standalone: true}" />
-      </nz-form-control>
-    </nz-form-item>
-  </form>
-</nz-modal>

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

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

+ 0 - 141
src/app/routes/basedata/hospital/hospital-new/hospital-new.component.ts

@@ -1,141 +0,0 @@
-import { I18NService } from '@core';
-import { NzNotificationService } from 'ng-zorro-antd';
-import { HospitalContactsService } from 'app/services/basedata/hospital-contacts.service';
-import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
-import { _HttpClient, ModalHelper } from '@delon/theme';
-import { HospitalContacts } from 'app/entity/basedata/hospital-contacts';
-import { Validators, FormBuilder, FormGroup } from '@angular/forms';
-import { messageShared } from '@shared/utils/message';
-
-@Component({
-  selector: 'app-basedata-hospital-hospital-new',
-  templateUrl: './hospital-new.component.html',
-})
-export class BasedataHospitalHospitalNewComponent implements OnInit {
-  constructor(
-    private fb: FormBuilder,
-    private hospitalContactsService: HospitalContactsService,
-    private nzNotificationService: NzNotificationService,
-    private i18Nservice:I18NService
-  ) { }
-  ngOnInit() {
-    this.validateForm = this.fb.group({
-      contactPsn: [null, [Validators.required]],
-      contactTel: [null],
-      email: [null],
-    });
-    this.initHospitalContacts();
-  }
-  // 按钮loading状态
-  isLoading = false
-  validateForm: FormGroup;
-  isVisible = false;
-  hospitalContacts: HospitalContacts;
-  isDefault = false;
-  id: string = null;
-  @Output() afterSave = new EventEmitter<HospitalContacts>();
-  @Output() afterEditNewSave = new EventEmitter<string>();
-
-  showModal(): void {
-    this.isVisible = true;
-    this.isDefault = false;
-  }
-
-  editNewContact(id: string) {
-    this.isVisible = true;
-    this.isDefault = false;
-    this.id = id;
-  }
-
-  editContact(id: string) {
-    this.isVisible = true;
-    this.hospitalContactsService.getById(id).then((response) => {
-      this.hospitalContacts = response.result;
-      if (this.hospitalContacts.isDefault == "0") {
-        this.isDefault = false;
-      } else {
-        this.isDefault = true;
-      }
-    })
-  }
-
-  handleCancel(): void {
-    this.isVisible = false;
-    this.initHospitalContacts();
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].reset();
-    }
-  }
-
-  handleOk() {
-    this.isLoading = true
-    if (this.isDefault) {
-      this.hospitalContacts.isDefault = "1";
-    } else {
-      this.hospitalContacts.isDefault = "0";
-    }
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].markAsDirty();
-      this.validateForm.controls[i].updateValueAndValidity();
-    }
-    let valid = this.validateForm.valid;
-    this.isLoading = false
-    // 验证通过保存
-    if (valid) {
-      this.isLoading = false
-      // 如果医院id存在,即新增医院时新增联系人,否则即修改时修改联系人
-      if (this.id != null && this.id != "") {
-        this.isLoading = true
-        this.hospitalContacts.pkHospitalId = this.id;
-        // 如果医院联系人id不存在,即新增,存在,即修改
-        if (this.hospitalContacts.id == null || this.hospitalContacts.id == "") {
-          this.hospitalContactsService.addHospitalContacts(this.hospitalContacts).then((response) => {
-            if (response) {
-              this.isLoading = false
-              this.nzNotificationService.success(this.i18Nservice.fanyi("new.contact.success"), "");
-              this.afterEditNewSave.emit(this.id);
-              this.initHospitalContacts();
-              this.handleCancel();
-            } else {
-              this.isLoading = false
-              this.nzNotificationService.error(this.i18Nservice.fanyi("new.contact.failed"), messageShared(this.i18Nservice,response.message));
-            }
-          })
-        } else {
-          this.hospitalContactsService.editHospitalContacts(this.hospitalContacts).then((response) => {
-            if (response) {
-              this.isLoading = false
-              this.nzNotificationService.success(this.i18Nservice.fanyi("modify.contact.success"), "");
-              this.afterEditNewSave.emit(this.id);
-              this.initHospitalContacts();
-              this.handleCancel();
-            } else {
-              this.isLoading = false
-              this.nzNotificationService.error(this.i18Nservice.fanyi("edit.contact.failed"), response.message);
-            }
-          })
-        }
-      } else {
-        // var b =
-        this.afterSave.emit(this.hospitalContacts);
-        console.log("222")
-      }
-    }
-  }
-
-  initHospitalContacts() {
-    this.hospitalContacts = {
-      id: "",// 联系人主键
-      pkHospitalId: "",// 联系人所在医院id
-      contactPsn: "",// 联系人
-      contactTel: "",// 联系人电话
-      email: "",// 邮件
-      address: "",// 公司地址
-      delFlag: "",// 是否删除
-      isDefault: "",// 是否默认
-      memo: "",// 备注
-    }
-  }
-
-
-}

+ 0 - 8
src/app/routes/basedata/hospital/hospital.component.html

@@ -1,8 +0,0 @@
-<page-header [action]="phActionTpl">
-  <ng-template #phActionTpl>
-    <button nz-button nzType="primary" acl [acl-ability]="'hospital:add'" (click)="basedataHospitalHospitalAdd.open()">
-      {{ 'hospital.new' | translate }} </button>
-  </ng-template>
-  <app-basedata-hospital-hospital-add #basedataHospitalHospitalAdd (afterSave)="getHospitals()"></app-basedata-hospital-hospital-add>
-</page-header>
-<app-basedata-hospital-hospital-doc #basedataHospitalHospitalDocComponent></app-basedata-hospital-hospital-doc>

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

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

+ 0 - 26
src/app/routes/basedata/hospital/hospital.component.ts

@@ -1,26 +0,0 @@
-import { BasedataHospitalHospitalDocComponent } from './hospital-doc/hospital-doc.component';
-import { Component, OnInit, ViewChild } from '@angular/core';
-import { _HttpClient, ModalHelper } from '@delon/theme';
-import { EventManager } from '@angular/platform-browser';
-
-@Component({
-  selector: 'app-basedata-hospital',
-  templateUrl: './hospital.component.html',
-})
-export class BasedataHospitalComponent implements OnInit {
-  constructor(
-    private http: _HttpClient,
-    private modal: ModalHelper,
-    private eventManager: EventManager) { }
-
-  ngOnInit() {
-
-   }
-
-  @ViewChild("basedataHospitalHospitalDocComponent") basedataHospitalHospitalDocComponent: BasedataHospitalHospitalDocComponent;
-
-  getHospitals() {
-    this.basedataHospitalHospitalDocComponent.getHospitals();
-  }
-
-}

+ 0 - 60
src/app/routes/basedata/matrix-type/matrix-add/matrix-add.component.html

@@ -1,60 +0,0 @@
-<!-- 新增基质drawer -->
-<nz-drawer [nzMaskClosable]="true" [nzWidth]="drawerWidth" [nzVisible]="visible" nzTitle="{{'matrix.type'|translate}}"
-  [nzClosable]="true" (nzOnClose)="close()">
-  <nz-spin [nzSpinning]="isLoadingSave">
-  <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14">{{'matrix.matrix.coding' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <!-- 修改时 -->
-        <ng-container *ngIf="isDisabled">
-            <input nz-input formControlName="code" [(ngModel)]="matrixType.code" disabled name="code"
-            placeholder="{{'matrix.please.input.matrix.coding' | translate}}" />
-        </ng-container>
-        <!-- 新增时 -->
-        <ng-container *ngIf="!isDisabled">
-          <input nz-input formControlName="code" [(ngModel)]="matrixType.code" name="code"
-            placeholder="{{'matrix.please.input.matrix.coding' | translate}}" />
-        </ng-container>
-        <nz-form-explain *ngIf="validateForm.get('coding')?.dirty && validateForm.get('coding')?.errors">
-          {{'matrix.please.input.matrix.coding' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <!-- <nz-form-item>
-        <nz-form-label [nzSm]="6" [nzXs]="14">{{'matrix.name' | translate}}</nz-form-label>
-        <nz-form-control [nzSm]="14" [nzXs]="14">
-          <input nz-input formControlName="name" [(ngModel)]="matrixType.name" name="name" placeholder="{{'cost.please.input.type.declaration' | translate}}" />
-          <nz-form-explain *ngIf="validateForm.get('cName')?.dirty && validateForm.get('cName')?.errors">
-            {{'placeholder' | translate}}{{'matrix.name' | translate}}
-          </nz-form-explain>
-        </nz-form-control>
-      </nz-form-item> -->
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14">{{'matrix.name' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <input nz-input formControlName="name" [(ngModel)]="matrixType.name" name="name"
-          placeholder="{{'matrix.please.input.matrix.description' | translate}}" />
-        <nz-form-explain *ngIf="validateForm.get('state')?.dirty && validateForm.get('state')?.errors">
-          {{'matrix.please.input.matrix.description' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14">{{'matrix.whether.using.or.not' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <nz-switch [ngModelOptions]="{standalone: true}" [(ngModel)]="enable" name="enable"
-          nzCheckedChildren="{{'yes' | translate}}" nzUnCheckedChildren="{{'no' | translate}}"></nz-switch>
-        <nz-form-explain *ngIf="validateForm.get('blockUp')?.dirty && validateForm.get('blockUp')?.errors">
-          {{'matrix.choose' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item class="base">
-      <button type="button" (click)="close()" class="ant-btn"
-        style="margin-right: 8px;">{{'matrix.cancel' | translate}}</button>
-      <button nzbutton nzType="primary" class="ant-btn ant-btn-primary">{{'matrix.finish' | translate}}</button>
-    </nz-form-item>
-  </form>
-  </nz-spin>
-</nz-drawer>

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

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

+ 0 - 167
src/app/routes/basedata/matrix-type/matrix-add/matrix-add.component.ts

@@ -1,167 +0,0 @@
-import { I18NService } from './../../../../core/i18n/i18n.service';
-import { Component, OnInit, ViewChild, HostListener, Output, EventEmitter } from '@angular/core';
-import { _HttpClient, ModalHelper } from '@delon/theme';
-import { STColumn, STComponent } from '@delon/abc';
-import { SFSchema } from '@delon/form';
-import { FormGroup, Validators, FormBuilder } from '@angular/forms';
-import { MatrixTypeService } from 'app/services/basedata/matrix-type.service';
-import { NzNotificationService } from 'ng-zorro-antd';
-
-@Component({
-  selector: 'app-basedata-matrix-type-matrix-add',
-  templateUrl: './matrix-add.component.html',
-  styles: [
-    `
-    .base{
-      position: absolute;
-      bottom: -25px;
-      width: 100%;
-      border-top: 1px solid rgb(232, 232, 232);
-      padding: 10px 16px;
-      text-align: right;
-      left: 0px;
-      background: #fff;
-      z-index:99;
-    }
-
-    `
-  ]
-})
-export class BasedataMatrixTypeMatrixAddComponent implements OnInit {
-  constructor(private fb: FormBuilder,
-    private matrixTypeService: MatrixTypeService,
-    private notification: NzNotificationService,
-    private i18NService: I18NService
-  ) {
-    //元数据
-
-  }
-  ngOnInit(): void {
-    this.validateForm = this.fb.group({
-      code: [null, [Validators.required]],
-      name: [null, [Validators.required]],
-      // enable: [null, [Validators.required]],
-    });
-  }
-  drawerWidth = 600;
-  visible = false;
-  validateForm: FormGroup;
-  @HostListener('window:resize', ['$event'])
-  onResize(event) {
-    const width = event.target.innerWidth;
-    if (width > 600) {
-      this.drawerWidth = 600;
-    } else {
-      this.drawerWidth = width;
-    }
-  }
-
-
-  isAdd = true;//决定新增/修改保存
-  matrixType = {
-    id: "",
-    code: "",
-    name: "",
-    memo: "",
-    enable: ""
-  }
-  @Output() afterSave = new EventEmitter<{}>();
-  enable = false;
-
-  //对<nz-form-control>标签逐一校验
-  isLoadingSave=false;
-  submitForm(): void {
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].markAsDirty();
-      this.validateForm.controls[i].updateValueAndValidity();
-    }
-    let valid = this.validateForm.valid;
-    console.log(valid)
-    if (valid) {//验证是否通过
-      if (this.enable) {
-        this.matrixType.enable = "1";
-      } else {
-        this.matrixType.enable = "0";
-      }
-      if (this.isAdd) {
-        //新增
-        this.isLoadingSave=true;
-        this.matrixTypeService.addMatrixType(this.matrixType).then((response) => {
-          if (response.success) {
-            this.isLoadingSave=false;
-            this.notification.success(this.i18NService.fanyi("insert.success"), "")
-            this.afterSave.emit();
-            this.close();
-            // this.getResetFrom();//关闭验证
-          } else {
-            this.isLoadingSave=false;
-            this.notification.success(this.i18NService.fanyi("insert.defeated"), "")
-          }
-        })
-      } else {
-        //修改
-        this.isLoadingSave=true;
-        this.matrixTypeService.updateMatrixType(this.matrixType).then((response) => {
-          if (response.success) {
-            this.isLoadingSave=false;
-            this.notification.success(this.i18NService.fanyi("successful.revision"), "")
-            this.afterSave.emit();
-            this.close();
-            // this.getResetFrom();//关闭验证
-          } else {
-            this.isLoadingSave=false;
-            this.notification.success(this.i18NService.fanyi("modification.failed"), "")
-          }
-        })
-      }
-
-    }
-  }
-
-  //新增打开抽屉
-  open(): void {
-    this.visible = true;//打开drawer并清除校验提示信息
-    // this.getResetFrom()
-  }
-  isDisabled = false;
-  //修改打开抽屉
-  update(data): void {
-    this.visible = true;//打开drawer并清除校验提示信息
-    this.isDisabled = true;
-    // this.getResetFrom()
-
-    this.isAdd = false;//修改
-    this.matrixTypeService.getById(data.id).then((response) => {
-      this.matrixType = response.result
-      if (response.result.enable == "0") {//是否停用
-        this.enable = false;
-      } else {
-        this.enable = true;
-      }
-    })
-
-  }
-
-  //关闭验证
-  getResetFrom() {
-    // for (const i in this.validateForm.controls) {
-      this.validateForm.reset();
-    // }
-  }
-
-  close(): boolean {
-    this.isDisabled = false;
-    this.visible = false;//关闭drawer
-    this.matrixType = {
-      id: "",
-      code: "",
-      name: "",
-      memo: "",
-      enable: ""
-    }
-    this.isAdd=true;
-    this.getResetFrom();
-    return false;
-  }
-
-}

+ 0 - 63
src/app/routes/basedata/matrix-type/matrix-type.component.html

@@ -1,63 +0,0 @@
-<page-header [action]="phActionTpl">
-  <ng-template #phActionTpl>
-    <button nz-button nzType="primary" acl [acl-ability]="'matrix-type:add'" (click)="basedataMatrixMatrixAdd.open()">{{'matrix.new' | translate}}</button>
-
-  </ng-template>
-
-</page-header>
-<nz-card>
-  <form nz-form>
-  <!-- 查询条件 -->
-  <div nz-row [nzGutter]="{xs:12,sm:15,md:29,lg: 36, xl: 40}">
-    <div class="backGauge" nz-col nzXs="24" nzSm="5" nzLg="3">
-      <nz-form-label>{{'matrix.matrix.coding' | translate}}</nz-form-label>
-    </div>
-    <div nz-col nzXs="24" nzSm="5" nzLg="6">
-      <input nz-input [(ngModel)]="matrixType.code" name="code"/>
-    </div>
-    <div class="backGauge" nz-col nzXs="24" nzSm="5" nzLg="3">
-      <nz-form-label>{{'matrix.name' | translate}}</nz-form-label>
-    </div>
-    <div nz-col nzXs="24" nzSm="5" nzLg="6">
-      <input nz-input [(ngModel)]="matrixType.name" name="name"/>
-    </div>
-    <div class="diss" nz-col nzXs="24" nzSm="3" nzLg="6">
-      <button nz-button nzType="primary" (click)="search()">{{'matrix.search' | translate}}</button>
-    </div>
-  </div>
-</form>
-  <!-- 列表详细信息 -->
-  <nz-table nzSize="small" class="distance" [nzData]="dataSet" #borderedTable [nzFrontPagination]="false" [nzTotal]="page.total"
-    [nzPageIndex]="page.current" (nzPageIndexChange)="pageIndexChange($event)" [nzLoading]="isSpinning">
-    <thead>
-      <tr>
-        <th nzAlign="center">{{'matrix.matrix.coding' | translate}}</th>
-        <th nzAlign="center">{{'matrix.name' | translate}}</th>
-        <th nzAlign="center">{{'matrix.whether.using.or.not' | translate}}</th>
-        <th>{{ 'table.operation' | translate }}</th>
-      </tr>
-    </thead>
-    <!-- 绑定数据 -->
-    <tbody>
-      <tr *ngFor="let item of  borderedTable.data">
-        <td nzAlign="center">{{ item.code }}</td>
-        <td nzAlign="center">{{ item.name}}</td>
-        <td nzAlign="center">
-         <!-- 否 -->
-         <nz-tag *ngIf="item.enable==0" [nzColor]="'green'">{{'store.no'|translate}}</nz-tag>
-         <!-- 是 -->
-         <nz-tag *ngIf="item.enable==1" [nzColor]="'red'">{{'store.yes'|translate}}</nz-tag>
-        </td>
-        <td>
-          <a href="javascript:void(0);"
-            (click)="basedataMatrixMatrixAdd.update(item)" acl [acl-ability]="'matrix-type:update'">{{ 'table.update' | translate }}</a>
-          <nz-divider acl [acl-ability]="'matrix-type:update'" nzType="vertical"></nz-divider>
-          <a nz-popconfirm acl [acl-ability]="'matrix-type:delete'" nzTitle="{{'isdelete'|translate}}" nzOkText="{{ 'yes' | translate }}" nzCancelText="{{ 'no' | translate }}"
-            (nzOnConfirm)="delete(item.id)">{{ 'table.delete' | translate }}</a>
-        </td>
-      </tr>
-    </tbody>
-  </nz-table>
-</nz-card>
-<app-basedata-matrix-type-matrix-add #basedataMatrixMatrixAdd (afterSave)="getMatrixTypeList()">
-</app-basedata-matrix-type-matrix-add>

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

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

+ 0 - 91
src/app/routes/basedata/matrix-type/matrix-type.component.ts

@@ -1,91 +0,0 @@
-import { I18NService } from '@core';
-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 { MatrixTypeService } from 'app/services/basedata/matrix-type.service';
-import { MatrixType } from 'app/entity/basedata/matrix-type';
-import { NzNotificationService } from 'ng-zorro-antd';
-import { EventManager } from '@angular/platform-browser';
-
-@Component({
-  selector: 'app-basedata-matrix-type',
-  templateUrl: './matrix-type.component.html',
-  styles: [
-    `
-    .borderDistance{
-      margin-bottom:3%
-    }
-    .distance{
-      margin-top:14px;
-    }
-    @media screen and (max-width: 572px) {
-      .diss{
-         margin-top:2%;
-      }
-  }
-
-
-  `
-  ]
-})
-export class BasedataMatrixTypeComponent implements OnInit {
-  constructor(private http: _HttpClient, private modal: ModalHelper,
-    private matrixTypeService: MatrixTypeService,
-    private notification: NzNotificationService,
-    private i18NService:I18NService,
-    private eventManager: EventManager
-  ) { }
-
-
-  matrixType: MatrixType;
-  dataSet = [];
-  page = {
-    total:0,
-    current:0
-  }
-  isSpinning=false;
-
-  ngOnInit() {
-    this.matrixType = {
-      code: "",
-      name: ""
-    }
-    this.getMatrixTypeList();
-  }
-
-  //分页查询全部
-  getMatrixTypeList() {
-    this.isSpinning=true;
-    this.matrixTypeService.getMatrixTypeList1(this.matrixType).then((response) => {
-      this.dataSet = response.result.records;
-      this.page = response.result;
-      this.isSpinning=false;
-    })
-  }
-
-  //按页码显示数据
-  pageIndexChange(event) {
-    this.matrixType.pageNo = event;//当前页码
-    this.getMatrixTypeList();
-  }
-
-  //查询按钮
-  search() {
-    this.matrixType.pageNo=1;
-    this.getMatrixTypeList()
-  }
-
-  //删除
-  delete(id) {
-    this.matrixTypeService.deleteMatrixType(id).then((response)=>{
-      if(response.success){
-        this.notification.success(this.i18NService.fanyi("successful.deletion"),"");
-        this.getMatrixTypeList();
-      }else{
-        this.notification.success(this.i18NService.fanyi("delete.failed"),"");
-      }
-    })
-  }
-
-}

+ 0 - 71
src/app/routes/basedata/milestone/milestone-add/milestone-add.component.html

@@ -1,71 +0,0 @@
-<nz-drawer [nzMaskClosable]="true" [nzWidth]="drawerWidth" [nzVisible]="visible" nzTitle="{{'menu.Milestone.Template'|translate}}" [nzClosable]="true"
-  (nzOnClose)="close()">
-  <nz-spin [nzSpinning]="isLoadingSave">
-  <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()" nz-col>
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14" nzRequired>{{ 'milestone.template.name' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <input nz-input formControlName="name" [(ngModel)]="milestoneTemplate.name" name="name" placeholder="{{ 'milestone.please.input' | translate }}" />
-        <nz-form-explain *ngIf="validateForm.get('name')?.dirty && validateForm.get('name')?.errors">
-          {{ 'milestone.please.input' | translate }}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14" nzRequired>{{ 'milestone.milestone.type' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <nz-select style="width: 100%;" nzShowSearch nzAllowClear nzPlaceHolder="{{'select.please.choose'|translate}}"
-        formControlName="type"
-          [(ngModel)]="milestoneTemplate.type" name="type" (ngModelChange)="typeChange(milestoneTemplate)">
-          <nz-option *ngFor="let ty of typeList" [nzLabel]="ty.text" [nzValue]="ty.value"></nz-option>
-        </nz-select>
-        <nz-form-explain *ngIf="validateForm.get('type')?.dirty && validateForm.get('type')?.errors">
-          {{ 'milestone.please.input' | translate }}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14" >{{ 'milestone.template.description' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <input nz-input formControlName="description" [(ngModel)]="milestoneTemplate.description" name="description" placeholder="{{ 'milestone.please.input' | translate }}" />
-        <nz-form-explain *ngIf="validateForm.get('description')?.dirty && validateForm.get('description')?.errors">
-          {{ 'milestone.please.input' | translate }}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14" >{{'store.whether.not' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <nz-switch  [(ngModel)]="enable" name="enable" [ngModelOptions]="{standalone: true}" nzCheckedChildren="{{'store.yes' | translate}}" nzUnCheckedChildren="{{'store.no' | translate}}"></nz-switch>
-      </nz-form-control>
-    </nz-form-item>
-    <!-- <nz-form-item>
-        <nz-card>
-          <nz-table [nzData]="listOfData" #borderedTable>
-            <thead>
-              <tr>
-                <th nzAlign="center">{{ 'milestone.serial.number' | translate }}</th>
-                <th nzAlign="center">{{ 'milestone.milestone.description' | translate }}</th>
-                <th nzAlign="center">{{ 'milestone.schedule' | translate }}</th>
-                <th nzAlign="center">{{ 'milestone.key.point.or.not' | translate }}</th>
-              </tr>
-            </thead>
-            <tbody>
-              <tr *ngFor="let item of  borderedTable.data">
-                <td nzAlign="center">{{ item.key }}</td>
-                <td nzAlign="center" contenteditable="true"></td>
-                <td nzAlign="center" contenteditable="true"></td>
-                <td nzAlign="center">{{ item.whether }}</td>
-              </tr>
-            </tbody>
-          </nz-table>
-        </nz-card>
-      </nz-form-item>-->
-      <nz-form-item class="base">
-        <button class="ant-btn" type="button" (click)="close()"
-          style="margin-right: 8px;">{{ 'button.cancel' | translate }}</button>
-        <button class="ant-btn ant-btn-primary" nzbutton nzType="primary">{{ 'milestone.save' | translate }}</button>
-      </nz-form-item>
-  </form>
-</nz-spin>
-</nz-drawer>

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

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

+ 0 - 192
src/app/routes/basedata/milestone/milestone-add/milestone-add.component.ts

@@ -1,192 +0,0 @@
-import { Component, OnInit, HostListener, EventEmitter, Output } from '@angular/core';
-import { _HttpClient } from '@delon/theme';
-import { FormGroup, Validators, FormBuilder } from '@angular/forms';
-import { MilestoneTemplateService } from 'app/services/basedata/milestone-template.service';
-import { NzNotificationService } from 'ng-zorro-antd';
-import { MilestoneTemplate } from 'app/entity/basedata/milestone-template';
-import { I18NService } from '@core';
-import { DictService } from 'app/services/dict.service';
-
-@Component({
-  selector: 'app-basedata-milestone-milestone-add',
-  templateUrl: './milestone-add.component.html',
-  styles: [
-    `
-    .base{
-      position: absolute;
-      bottom: -25px;
-      width: 100%;
-      border-top: 1px solid rgb(232, 232, 232);
-      padding: 10px 16px;
-      text-align: right;
-      left: 0px;
-      background: #fff;
-      z-index:99;
-    }
-
-    `
-  ]
-})
-export class BasedataMilestoneMilestoneAddComponent implements OnInit {
-  constructor(private fb: FormBuilder,
-    private milestoneTemplateService: MilestoneTemplateService,
-    private notification: NzNotificationService,
-    private i18NService: I18NService,
-    private dictService: DictService
-  ) {
-
-  }
-  ngOnInit(): void {
-    this.validateForm = this.fb.group({
-      name: [null, [Validators.required]],
-      description: [],
-      type: [null, [Validators.required]]
-    });
-    this.getTypeList();
-  }
-
-  visible = false;
-  validateForm: FormGroup;
-  drawerWidth = 600;
-  @HostListener('window:resize', ['$event'])
-  onResize(event) {
-    const width = event.target.innerWidth;
-    if (width > 600) {
-      this.drawerWidth = 630;
-    } else {
-      this.drawerWidth = width;
-    }
-  }
-
-  /**
-   * @name: 查询模板类型
-   * @test: test font
-   * @param {type} 
-   * @return: 
-   * @Author: chengchuang
-   * @Date: 2019-09-02 10:38:19
-   */
-  typeList: any = [];//模板类型集合
-  getTypeList() {
-    return new Promise((resolve) => {
-      this.dictService.getByDictCode("milestone_template_type").then((response) => {
-        this.typeList = response.result;
-        resolve()
-      })
-    })
-  }
-
-  /**
-   * @name: 类型选择事件
-   * @test: test font
-   * @param {type} 
-   * @return: 
-   * @Author: chengchuang
-   * @Date: 2019-09-02 10:43:44
-   */
-  typeChange(milestoneTemplate) {
-    if (milestoneTemplate.type != undefined && milestoneTemplate.type != null && milestoneTemplate.type != "") {
-      this.typeList.forEach(ty => {
-        if (milestoneTemplate.type == ty.value) {
-          milestoneTemplate.typeName = ty.text;
-        }
-      });
-    }
-  }
-
-  //里程碑模板对象
-  milestoneTemplate: MilestoneTemplate = {
-    id: "",
-    name: "",
-    description: "",
-    enable: ""
-  }
-  @Output() afterSave = new EventEmitter<{}>();
-  enable = false;//是否停用
-
-  //对<nz-form-control>标签逐一校验
-  isLoadingSave=false;
-  submitForm(): void {
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].markAsDirty();
-      this.validateForm.controls[i].updateValueAndValidity();
-    }
-    let valid = this.validateForm.valid;
-    if (valid) {//是否验证成功
-      if (this.enable) {//是否停用
-        this.milestoneTemplate.enable = "1";
-      } else {
-        this.milestoneTemplate.enable = "0"
-      }
-
-      if (this.milestoneTemplate.id == "") {
-        this.isLoadingSave=true;
-        this.milestoneTemplateService.addMilestoneTemplate(this.milestoneTemplate).then((response) => {
-          if (response.success) {
-            this.isLoadingSave=false;
-            this.notification.success(this.i18NService.fanyi("insert.success"), "")
-            this.afterSave.emit();
-            this.close();
-          } else {
-            this.isLoadingSave=false;
-            this.notification.success("insert.defeated", "")
-          }
-        })
-      } else {
-        this.isLoadingSave=true;
-        this.milestoneTemplateService.updateMilestoneTemplate(this.milestoneTemplate).then((response) => {
-          if (response.success) {
-            this.isLoadingSave=false;
-            this.notification.success(this.i18NService.fanyi("successful.revision"), "")
-            this.afterSave.emit();
-            this.close();
-          } else {
-            this.isLoadingSave=false;
-            this.notification.success(this.i18NService.fanyi("modification.failed"), "")
-          }
-        })
-      }
-    }
-  }
-
-  //新增打开抽屉
-  open(): void {
-    this.milestoneTemplate.id = "";
-    this.visible = true;//打开drawer并清除校验提示信息
-    this.getRestForm()
-  }
-
-  //修改打开抽屉
-  updateOpen(id) {
-    this.visible = true;//打开drawer并清除校验提示信息
-    this.getRestForm()
-
-    this.milestoneTemplate.id = id;//模板id
-    this.milestoneTemplateService.getById(id).then((response) => {
-      this.milestoneTemplate = response.result
-      if (response.result.enable == "0") {
-        this.enable = false;
-      } else {
-        this.enable = true;
-      }
-    })
-
-  }
-
-  getRestForm() {
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].reset();
-    }
-  }
-
-
-  close(): boolean {
-    this.getRestForm();
-    this.milestoneTemplate = {}
-    this.visible = false;//关闭drawer
-    return false;
-  }
-
-
-
-}

+ 0 - 48
src/app/routes/basedata/milestone/milestone-new/edit/edit.component.html

@@ -1,48 +0,0 @@
-<nz-modal [(nzVisible)]="isVisible" nzTitle="{{'milestone.milestone.description' | translate}}" (nzOnCancel)="close()"
-  (nzOnOk)="save()">
-  <nz-spin [nzSpinning]="isLoadingSave">
-  <form nz-form>
-    <nz-form-item>
-      <nz-form-label [nzSm]="8" [nzXs]="24">{{ 'milestone.serial.number' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="24">
-        <input [(ngModel)]="milestoneTemplateItem.code" name="code" nz-input
-          placeholder="{{ 'placeholder' | translate }}{{ 'milestone.serial.number' | translate }}" />
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="8" [nzXs]="24">{{ 'milestone.milestone.description' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="24">
-        <input [(ngModel)]="milestoneTemplateItem.description" name="description" nz-input
-          placeholder="{{ 'placeholder' | translate }}{{ 'milestone.milestone.description' | translate }}" />
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="8" [nzXs]="24">{{ 'milestone.schedule' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="24">
-        <nz-input-number [(ngModel)]="milestoneTemplateItem.weight" name="weight" [nzMin]="1" [nzMax]="100" [nzStep]="1"
-          [nzFormatter]="formatterPercent" [nzParser]="parserPercent"></nz-input-number>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="8" [nzXs]="24">{{ 'milestone.key.point.or.not' | translate }}
-      </nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="24">
-        <nz-switch [(ngModel)]="switch" name="switch" [ngModelOptions]="{standalone: true}"
-          nzCheckedChildren="{{'store.yes' | translate}}" nzUnCheckedChildren="{{'store.no' | translate}}"></nz-switch>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item *ngIf="isModel=='修改'">
-      <nz-form-label [nzSm]="8" [nzXs]="24">{{ 'parent' | translate }}
-      </nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="24">
-        <nz-select nzShowSearch nzAllowClear nzPlaceHolder="{{ 'select.please.choose' | translate }}"
-          [(ngModel)]="milestoneTemplateItem.parentId" name="parentId">
-          <ng-container *ngFor="let item of listItem">
-            <nz-option nzLabel="{{item.description}}" nzValue="{{item.id}}"></nz-option>
-          </ng-container>
-        </nz-select>
-      </nz-form-control>
-    </nz-form-item>
-  </form>
-</nz-spin>
-</nz-modal>

+ 0 - 24
src/app/routes/basedata/milestone/milestone-new/edit/edit.component.spec.ts

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

+ 0 - 137
src/app/routes/basedata/milestone/milestone-new/edit/edit.component.ts

@@ -1,137 +0,0 @@
-import { I18NService } from './../../../../../core/i18n/i18n.service';
-import { Component, OnInit, ViewChild, Output, EventEmitter } from '@angular/core';
-import { NzModalRef, NzMessageService, NzNotificationService } from 'ng-zorro-antd';
-import { _HttpClient } from '@delon/theme';
-import { SFSchema, SFUISchema } from '@delon/form';
-import { MilestoneTemplateItem } from 'app/entity/basedata/milestone-template-item';
-import { MilestoneTemplateItemService } from 'app/services/basedata/milestone-template-item.service';
-import { messageShared } from '@shared/utils/message';
-
-@Component({
-  selector: 'app-basedata-milestone-milestone-new-edit',
-  templateUrl: './edit.component.html',
-})
-export class BasedataMilestoneMilestoneNewEditComponent implements OnInit {
-
-  constructor(
-    private milestoneTemplateItemService: MilestoneTemplateItemService,
-    private notification: NzNotificationService,
-    private i18NService: I18NService
-  ) { }
-
-  ngOnInit(): void {
-  }
-
-  milestoneTemplateItem: MilestoneTemplateItem = {
-    id: "",
-    code: "",
-    description: "",
-    weight: "",
-    isKeypoint: "",
-    parentId: ""
-  }
-  isVisible = false;
-  isModel = "";//作用于一级新增/子集新增/修改
-  switch = false;//是否关键点
-  listItem = [];//里程碑项目集合
-  @Output() afterSave = new EventEmitter<{}>();
-
-
-  //添加一级打开抽屉
-  addOneOpen(pkMilestoneTemplate) {
-    this.isVisible = true;
-    this.milestoneTemplateItem.pkMilestoneTemplate = pkMilestoneTemplate//里程碑模板主键
-  }
-
-  //添加子集打开抽屉
-  addOpen(pkMilestoneTemplate, item) {
-    this.isVisible = true;
-    this.isModel = this.i18NService.fanyi("collection.of.children");
-    this.milestoneTemplateItem.pkMilestoneTemplate = pkMilestoneTemplate;//里程碑模板主键
-    this.milestoneTemplateItem.parentId = item.id;//父级id
-  }
-
-  //修改打开抽屉
-  updateOpen(pkMilestoneTemplate, item) {
-    this.isVisible = true;
-    this.isModel = this.i18NService.fanyi("table.update");
-
-    var items = new MilestoneTemplateItem();
-    items.pkMilestoneTemplate = pkMilestoneTemplate
-    items.id = item.id;
-    items.parentId = item.parentId;
-    //父级下拉款
-    this.milestoneTemplateItemService.queryByNotParentId(items).then((response) => {
-      this.listItem = response.result
-    })
-
-    //修改对象数据
-    this.milestoneTemplateItemService.getById(item.id).then((response) => {
-      this.milestoneTemplateItem = response.result
-      if (response.result.isKeypoint == "0") {//是否关键点
-        this.switch = false;
-      } else {
-        this.switch = true;
-      }
-    })
-  }
-
-  isLoadingSave=false;
-  save() {
-    if (this.switch) {
-      this.milestoneTemplateItem.isKeypoint = "1"
-    } else {
-      this.milestoneTemplateItem.isKeypoint = "0"
-    }
-    if (this.isModel == "" || this.isModel == this.i18NService.fanyi("collection.of.children")) {
-      //新增/子集新增
-      this.isLoadingSave=true;
-      this.milestoneTemplateItemService.addMilestoneTemplateItem(this.milestoneTemplateItem).then((response) => {
-        if (response.success) {
-          this.isLoadingSave=false;
-          this.notification.success(this.i18NService.fanyi("insert.success"), "")
-          this.afterSave.emit();
-          this.close();
-        } else {
-          this.isLoadingSave=false;
-          this.notification.error(this.i18NService.fanyi("insert.defeated"), messageShared(this.i18NService, response.message))
-        }
-      })
-    } else {
-      //修改
-      this.isLoadingSave=true;
-      this.milestoneTemplateItemService.updateMilestoneTemplateItem(this.milestoneTemplateItem).then((response) => {
-        if (response.success) {
-          this.isLoadingSave=false;
-          this.notification.success(this.i18NService.fanyi("successful.revision"), "")
-          this.afterSave.emit();
-          this.close();
-        } else {
-          this.isLoadingSave=false;
-          this.notification.error(this.i18NService.fanyi("modification.failed"), messageShared(this.i18NService, response.message))
-        }
-      })
-    }
-  }
-
-  /**
-   * 数字款的百分号
-   */
-  formatterPercent = (value: number) => `${value} %`;
-  parserPercent = (value: string) => value.replace(' %', '');
-
-
-  close() {
-    this.isVisible = false;
-    this.milestoneTemplateItem = {
-      id: "",
-      code: "",
-      description: "",
-      weight: "",
-      isKeypoint: "",
-      parentId: ""
-    };
-    this.isModel = "";
-    this.switch = false;
-  }
-}

+ 0 - 62
src/app/routes/basedata/milestone/milestone-new/milestone-new.component.html

@@ -1,62 +0,0 @@
-<nz-drawer [nzMaskClosable]="true" [nzWidth]="drawerWidth" [nzVisible]="visible"
-  nzTitle="{{'milestone.milestone.description'|translate}}" [nzClosable]="true" (nzOnClose)="close()">
-  <nz-page-header>
-    <nz-page-header-title>{{'milestone.template.name' | translate}}:</nz-page-header-title>
-    <nz-page-header-subtitle>{{milestoneTemplate.name}}</nz-page-header-subtitle>
-    <nz-page-header-extra>
-      <!-- 添加一级 -->
-      <button nz-button nzType="primary" acl [acl-ability]="'item-parent:add'"
-        (click)="basedataMilestoneMilestoneNewEditComponent.addOneOpen(milestoneTemplate.id)">{{'button.leve.one'|translate}}</button>
-    </nz-page-header-extra>
-  </nz-page-header>
-
-
-  <nz-table nzSize="small" #expandTable [nzData]="listOfMapData" [nzShowPagination]=false [nzLoading]="isSpinning">
-    <thead>
-      <tr>
-        <th>{{'milestone.serial.number'|translate}}</th>
-        <th>{{'milestone.milestone.description' | translate}}</th>
-        <th>{{'milestone.schedule' | translate}}</th>
-        <th>{{'milestone.key.point.or.not' | translate}}</th>
-        <th>{{ 'milestone.operation' | translate }}</th>
-      </tr>
-    </thead>
-    <tbody>
-      <ng-container *ngFor="let data of expandTable.data">
-        <ng-container *ngFor="let item of mapOfExpandedData[data.key]">
-          <tr *ngIf="(item.parent && item.parent.expand) || !item.parent">
-            <td [nzIndentSize]="item.level * 20" [nzShowExpand]="item.children" [(nzExpand)]="item.expand"
-              (nzExpandChange)="collapse(mapOfExpandedData[data.key], item, $event)">
-              {{ item.code }}
-            </td>
-            <td>{{ item.description }}</td>
-            <td>{{ item.weight }}</td>
-            <td>
-              <ng-container *ngIf="item.isKeypoint==0">
-                {{'no'| translate}}
-              </ng-container>
-              <ng-container *ngIf="item.isKeypoint==1">
-                {{'yes'| translate}}
-              </ng-container>
-            </td>
-            <td>
-              <a acl [acl-ability]="'item:add'"
-                (click)="basedataMilestoneMilestoneNewEditComponent.addOpen(milestoneTemplate.id,item)">{{ 'button.leve.lower' | translate }}</a>
-              <span acl [acl-ability]="'item:add'">&nbsp;|&nbsp;</span>
-              <a acl [acl-ability]="'item:update'"
-                (click)="basedataMilestoneMilestoneNewEditComponent.updateOpen(milestoneTemplate.id,item)">{{ 'milestone.update' | translate }}</a>
-              <span acl [acl-ability]="'item:update'">&nbsp;|&nbsp;</span>
-              <a acl [acl-ability]="'item:delete'" nz-popconfirm nzTitle="{{'isdelete'|translate}}" nzOkText="{{ 'yes' | translate }}"
-                nzCancelText="{{ 'no' | translate }}"
-                (nzOnConfirm)="delete(item.id)">{{ 'milestone.delete' | translate }}</a>
-            </td>
-          </tr>
-        </ng-container>
-      </ng-container>
-    </tbody>
-  </nz-table>
-
-
-</nz-drawer>
-<app-basedata-milestone-milestone-new-edit #basedataMilestoneMilestoneNewEditComponent
-  (afterSave)="getMilestoneTemplateItemTree()"></app-basedata-milestone-milestone-new-edit>

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

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

+ 0 - 148
src/app/routes/basedata/milestone/milestone-new/milestone-new.component.ts

@@ -1,148 +0,0 @@
-import { Component, OnInit, ViewChild, Input, HostListener } from '@angular/core';
-import { _HttpClient, ModalHelper } from '@delon/theme';
-import { MilestoneTemplate } from 'app/entity/basedata/milestone-template';
-import { MilestoneTemplateItemService } from 'app/services/basedata/milestone-template-item.service';
-import { NzNotificationService } from 'ng-zorro-antd';
-import { I18NService } from '@core';
-import { messageShared } from '@shared/utils/message';
-
-@Component({
-  selector: 'app-basedata-milestone-milestone-new',
-  templateUrl: './milestone-new.component.html',
-})
-export class BasedataMilestoneMilestoneNewComponent implements OnInit {
-  constructor(private http: _HttpClient, private modal: ModalHelper,
-    private milestoneTemplateItemService: MilestoneTemplateItemService,
-    private notification: NzNotificationService,
-    private i18NService:I18NService
-  ) { }
-  ngOnInit() {
-    this.getMilestoneTemplateItemTree();
-  }
-
-  drawerWidth = window.innerWidth;
-
-  @HostListener('window:resize', ['$event'])
-  onResize(event) {
-    const width = event.target.innerWidth;
-    if (width > 800) {
-      this.drawerWidth = 800;
-    } else {
-      this.drawerWidth = width;
-    }
-  }
-  // 表格loading状态
-  isSpinning = false;
-  visible = false;
-  milestoneTemplate: MilestoneTemplate = {//里程碑模板对象
-    id: "",
-    name: ""
-  };
-
-  listOfMapData = [];//里程碑描述数据
-
-  //新增打开抽屉
-  open(item): void {
-    // 表格loading状态
-    this.isSpinning = true
-    this.visible = true;//打开drawer
-    this.milestoneTemplate = item;//模板对象
-    this.getMilestoneTemplateItemTree();
-  }
-
-  close(): boolean {
-    this.visible = false;//关闭drawer
-    return false;
-  }
-
-  //树行查询数据表
-  getMilestoneTemplateItemTree() {
-    var parent = { parent: this.milestoneTemplate.id }
-    this.milestoneTemplateItemService.getMilestoneTemplateItemTree(parent).then((response) => {
-      this.listOfMapData = response.result
-      this.listOfMapData.forEach(item => {
-        this.mapOfExpandedData[item.key] = this.convertTreeToList(item);
-      });
-      this.isSpinning = false
-
-    })
-  }
-
-  delete(id) {
-    this.milestoneTemplateItemService.deleteMilestoneTemplateItem(id).then((response) => {
-      if (response.success) {
-        this.notification.success(this.i18NService.fanyi("successful.deletion"), "")
-        this.getMilestoneTemplateItemTree();
-      } else {
-        this.notification.error(this.i18NService.fanyi("delete.failed"), messageShared(this.i18NService,response.message))
-      }
-    })
-  }
-
-
-
-
-
-
-
-
-
-
-
-
-  //////////////////////////////////////////////////////
-  //树表格
-  mapOfExpandedData: { [key: string]: TreeNodeInterface[] } = {};
-
-  collapse(array: TreeNodeInterface[], data: TreeNodeInterface, $event: boolean): void {
-    if ($event === false) {
-      if (data.children) {
-        data.children.forEach(d => {
-          const target = array.find(a => a.key === d.key)!;
-          target.expand = false;
-          this.collapse(array, target, false);
-        });
-      } else {
-        return;
-      }
-    }
-  }
-
-  convertTreeToList(root: object): TreeNodeInterface[] {
-    const stack: any[] = [];
-    const array: any[] = [];
-    const hashMap = {};
-    stack.push({ ...root, level: 0, expand: true });
-
-    while (stack.length !== 0) {
-      const node = stack.pop();
-      this.visitNode(node, hashMap, array);
-      if (node.children) {
-        for (let i = node.children.length - 1; i >= 0; i--) {
-          stack.push({ ...node.children[i], level: node.level + 1, expand: true, parent: node });
-        }
-      }
-    }
-
-    return array;
-  }
-
-  visitNode(node: TreeNodeInterface, hashMap: { [key: string]: any }, array: TreeNodeInterface[]): void {
-    if (!hashMap[node.key]) {
-      hashMap[node.key] = true;
-      array.push(node);
-    }
-  }
-
-
-}
-export interface TreeNodeInterface {
-  key: string;
-  description: string;
-  code: string;
-  weight: string;
-  isKeypoint: string;
-  expand: boolean;
-  sortNo: number;
-  children?: TreeNodeInterface[];
-}

+ 0 - 98
src/app/routes/basedata/milestone/milestone.component.html

@@ -1,98 +0,0 @@
-<page-header [action]="phActionTpl">
-  <ng-template #phActionTpl>
-    <button nz-button nzType="primary" (click)="basedataMilestoneMilestoneAdd.open()" acl
-      [acl-ability]="'milestone:add'">{{ 'milestone.new' | translate }}</button>
-  </ng-template>
-
-</page-header>
-<nz-card>
-  <form nz-form>
-  <div nz-row [nzGutter]="{xs:12,sm:15,md:29,lg: 36, xl: 40}">
-    <!-- 里程碑类型 -->
-    <div nz-col nzXs="24" nzSm="5" nzLg="3">
-      <nz-form-label>{{ 'milestone.milestone.type' | translate }}</nz-form-label>
-    </div>
-    <div nz-col nzXs="24" nzSm="5" nzLg="6">
-      <!-- <input [(ngModel)]="milestoneTemplate.type" name="type" nz-input placeholder="{{ 'milestone.please.input' | translate }}" /> -->
-      <nz-select style="width: 100%;" nzShowSearch nzAllowClear nzPlaceHolder="{{'select.please.choose'|translate}}"
-          [(ngModel)]="milestoneTemplate.type" name="type">
-          <nz-option *ngFor="let ty of typeList" [nzLabel]="ty.text" [nzValue]="ty.value"></nz-option>
-        </nz-select>
-    </div>
-    <!-- 项目名称 -->
-    <div nz-col nzXs="24" nzSm="5" nzLg="3">
-      <nz-form-label>{{ 'milestone.template.name' | translate }}</nz-form-label>
-    </div>
-    <div nz-col nzXs="24" nzSm="5" nzLg="6">
-      <input [(ngModel)]="milestoneTemplate.name" name="name" nz-input placeholder="{{ 'milestone.please.input' | translate }}" />
-    </div>
-    <!-- <div nz-col nzXs="24" nzSm="5" nzLg="3">
-      <nz-form-label>{{ 'milestone.template.description' | translate }}</nz-form-label>
-    </div>
-    <div nz-col nzXs="24" nzSm="5" nzLg="6">
-      <input [(ngModel)]="milestoneTemplate.description" name="description" nz-input
-        placeholder="{{ 'milestone.please.input' | translate }}" />
-    </div> -->
-    <div nz-col nzXs="24" nzSm="3" nzLg="6">
-      <button nz-button nzType="primary"
-        (click)="query()">{{ 'milestone.search' | translate }}</button>
-    </div>
-  </div>
-</form>
-  <nz-table nzSize="small" [nzData]="dataSet" #borderedTable [nzFrontPagination]="false" [nzTotal]="page.total" [nzPageIndex]="page.current"
-    (nzPageIndexChange)="pageIndexChange($event)" [nzLoading]="isSpinning">
-    <thead>
-      <tr>
-        <th nzAlign="center">{{ 'milestone.milestone.type' | translate }}</th>
-        <th nzAlign="center">{{ 'milestone.template.name' | translate }}</th>
-        <th nzAlign="center">{{ 'milestone.template.description' | translate }}</th>
-        <th nzAlign="center">{{ 'milestone.Creatin.time' | translate }}</th>
-        <th nzAlign="center">{{'whether.using.or.not'|translate}}</th>
-        <th nzAlign="center" nzWidth="250px">{{ 'milestone.operation' | translate }}</th>
-      </tr>
-    </thead>
-    <tbody>
-      <tr *ngFor="let item of  borderedTable.data">
-        <td nzAlign="center">{{ item.typeName }}</td>
-        <td nzAlign="center">{{ item.name }}</td>
-        <td nzAlign="center">{{ item.description}}</td>
-        <td nzAlign="center">{{ item.createTime|date:'dd-MMM-y HH:mm:ss'}}</td>
-        <td nzAlign="center">
-          <!-- 否 -->
-          <nz-tag *ngIf="item.enable==0" [nzColor]="'green'">{{'store.no'|translate}}</nz-tag>
-          <!-- 是 -->
-          <nz-tag *ngIf="item.enable==1" [nzColor]="'red'">{{'store.yes'|translate}}</nz-tag>
-        </td>
-        <td nzAlign="center" style="width: 250px">
-          <!-- 修改 -->
-          <a acl [acl-ability]="'milestone:update'"
-            (click)="basedataMilestoneMilestoneAdd.updateOpen(item.id)">{{ 'milestone.update' | translate }}</a>
-          <!-- 查看明细 -->
-          <span acl [acl-ability]="'milestone:update'">&nbsp;|&nbsp;</span>
-          <a acl [acl-ability]="'milestone-item:view'"
-            (click)="basedataMilestoneMilestoneNewComponent.open(item)">{{ 'milestone.milestone.description' | translate }}</a>
-          <span [acl]="{ ability: [10, 'milestone:delete','milestone:copy'], mode: 'oneOf' }">&nbsp;|&nbsp;</span>
-          <!-- 更多 -->
-          <nz-dropdown [acl]="{ ability: [10, 'milestone:delete','milestone:copy'], mode: 'oneOf' }">
-            <a nz-dropdown>&nbsp;{{'pm.quotation.more' | translate}}<i nz-icon type="down"></i> </a>
-            <ul nz-menu nzSelectable>
-              <!-- 复制 -->
-              <li nz-menu-item acl [acl-ability]="'milestone:copy'">
-                <a acl href="javascript:void(0);" (click)="copy(item)">{{'pm.quotation.copy' | translate}}</a>
-              </li>
-              <!-- 删除 -->
-              <li nz-menu-item acl [acl-ability]="'milestone:delete'">
-                <a acl [acl-ability]="'milestone:delete'" nz-popconfirm nzTitle="{{'isdelete'|translate}}"
-                  nzOkText="{{ 'yes' | translate }}" nzCancelText="{{ 'no' | translate }}"
-                  (nzOnConfirm)="delete(item.id)" (nzOnCancel)="cancelDel()">{{ 'milestone.delete' | translate }}</a>
-              </li>
-            </ul>
-          </nz-dropdown>
-        </td>
-      </tr>
-    </tbody>
-  </nz-table>
-</nz-card>
-<app-basedata-milestone-milestone-add #basedataMilestoneMilestoneAdd (afterSave)="getMilestoneTemplateList()">
-</app-basedata-milestone-milestone-add>
-<app-basedata-milestone-milestone-new #basedataMilestoneMilestoneNewComponent></app-basedata-milestone-milestone-new>

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

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

+ 0 - 112
src/app/routes/basedata/milestone/milestone.component.ts

@@ -1,112 +0,0 @@
-import { I18NService } from '@core';
-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 { MilestoneTemplateService } from 'app/services/basedata/milestone-template.service';
-import { MilestoneTemplate } from 'app/entity/basedata/milestone-template';
-import { NzNotificationService } from 'ng-zorro-antd';
-import { EventManager } from '@angular/platform-browser';
-import { DictService } from 'app/services/dict.service';
-
-@Component({
-  selector: 'app-basedata-milestone',
-  templateUrl: './milestone.component.html',
-})
-export class BasedataMilestoneComponent implements OnInit {
-  constructor(private http: _HttpClient, private modal: ModalHelper,
-    private milestoneTemplateService:MilestoneTemplateService,
-    private notification: NzNotificationService,
-    private i18NService :I18NService,
-    private eventManager: EventManager,
-    private dictService:DictService
-    ) { }
-
-  ngOnInit() {
-    this.milestoneTemplate={
-      name:"",
-      description:"",
-      pageNo:1
-    }
-    this.getMilestoneTemplateList()
-    this.getTypeList();
-  }
-  dataSet=[];
-
-
-  milestoneTemplate:MilestoneTemplate;//
-  isSpinning=false;
-  page:any={}//total总数 current当前页码
-
-   /**
-   * @name: 查询模板类型
-   * @test: test font
-   * @param {type} 
-   * @return: 
-   * @Author: chengchuang
-   * @Date: 2019-09-02 10:38:19
-   */
-  typeList: any = [];//模板类型集合
-  getTypeList() {
-    return new Promise((resolve) => {
-      this.dictService.getByDictCode("milestone_template_type").then((response) => {
-        this.typeList = response.result;
-        resolve()
-      })
-    })
-  }
-
-  //查询里程碑模板数据集合
-  getMilestoneTemplateList(){
-    this.isSpinning=true;
-    this.milestoneTemplateService.getMilestoneTemplateList1(this.milestoneTemplate).then((response)=>{
-      this.dataSet=response.result.records
-      this.page=response.result;
-      this.isSpinning=false;
-    })
-  }
-
-  /**
-   * 查询按钮
-   */
-  query(){
-    this.milestoneTemplate.pageNo=1;
-    this.getMilestoneTemplateList();
-  }
-
-  //按页码显示数据
-  pageIndexChange(event) {
-    this.milestoneTemplate.pageNo = event;//当前页码
-    this.getMilestoneTemplateList();
-  }
-
-  /**
-   * 复制
-   * @param item 里程碑模板对象
-   */
-  copy(item){
-    this.milestoneTemplateService.copy(item.id).then((response)=>{
-      if(response.success){
-        //复制成功
-        this.notification.success(this.i18NService.fanyi("copy.Successful.replication"),"");
-        this.getMilestoneTemplateList();
-      }else{
-        //复制失败
-        this.notification.success(this.i18NService.fanyi("copy.failed"),"");
-      }
-    })
-  }
-
-  //删除
-  delete(id){
-    this.milestoneTemplateService.deleteMilestoneTemplate(id).then((response)=>{
-      if(response.success){
-        this.notification.success(this.i18NService.fanyi("successful.deletion"),"")
-        this.getMilestoneTemplateList();
-      }else{
-        this.notification.success(this.i18NService.fanyi("delete.failed"),"")
-      }
-    })
-  }
-
-}

+ 0 - 101
src/app/routes/basedata/quotation/quotation-add/quotation-add.component.html

@@ -1,101 +0,0 @@
-<nz-drawer [nzMaskClosable]="true" [nzWidth]="drawerWidth" [nzVisible]="visible"
-  nzTitle="{{'quotation.quotation.template'|translate}}" [nzClosable]="true" (nzOnClose)="close()">
-  <nz-spin [nzSpinning]="isLoadingSave">
-  <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()" nz-col>
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14">{{'quotation.template.type' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <nz-select nz-col nzShowSearch nzAllowClear nzPlaceHolder="{{'quotation.select' | translate}}"
-          [(ngModel)]="quotationTemplate.type" name="type" formControlName="type">
-          <nz-option nzLabel="{{'quotation.select' | translate}}" nzValue=""></nz-option>
-          <nz-option *ngFor="let item of selectTemplates" nzLabel="{{item.text}}" nzValue="{{item.value}}"></nz-option>
-        </nz-select>
-        <nz-form-explain *ngIf="validateForm.get('name')?.dirty && validateForm.get('name')?.errors">
-          {{'placeholder' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14">{{'quotation.template.name' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <input nz-input [(ngModel)]="quotationTemplate.name" name="name" formControlName="name"
-          placeholder="{{'placeholder' | translate}}" />
-        <nz-form-explain *ngIf="validateForm.get('description')?.dirty && validateForm.get('description')?.errors">
-          {{'placeholder' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14">{{'quotation.template.description' | translate}}
-      </nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <textarea rows="4" nz-input [(ngModel)]="quotationTemplate.description" name="description"
-          formControlName="description"></textarea>
-        <nz-form-explain *ngIf="validateForm.get('name')?.dirty && validateForm.get('name')?.errors">
-          {{'placeholder' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <!-- 语言类型 -->
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14">{{'quotation.language.type' | translate}}
-      </nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <nz-select nz-col nzShowSearch nzAllowClear nzPlaceHolder="{{'quotation.select' | translate}}"
-          [(ngModel)]="quotationTemplate.languageType" name="languageType" formControlName="languageType" (ngModelChange)="languageTypeChange($event)">
-          <nz-option *ngFor="let item of languageTypeList" nzLabel="{{item.text}}" nzValue="{{item.value}}"></nz-option>
-        </nz-select>
-        <nz-form-explain *ngIf="validateForm.get('name')?.dirty && validateForm.get('name')?.errors">
-          {{'placeholder' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <!-- <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14"> {{'quotation.fee.category1' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <input nz-input [(ngModel)]="quotationTemplate.feeCategory1" name="feeCategory1" formControlName="feeCategory1"
-          placeholder="{{'placeholder' | translate}}" />
-        <nz-form-explain *ngIf="validateForm.get('description')?.dirty && validateForm.get('description')?.errors">
-          {{'placeholder' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14">{{'quotation.fee.category2' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <input nz-input [(ngModel)]="quotationTemplate.feeCategory2" name="feeCategory2" formControlName="feeCategory2"
-          placeholder="{{'placeholder' | translate}}" />
-        <nz-form-explain *ngIf="validateForm.get('name')?.dirty && validateForm.get('name')?.errors">
-          {{'placeholder' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item> -->
-    <!--<nz-form-item>
-      <nz-card>
-        <nz-table [nzData]="listOfData" #borderedTable>
-          <thead nz-col>
-            <tr>
-              <th nzAlign="center"> {{'quotation.serial.number' | translate}}</th>
-              <th nzAlign="center"> {{'quotation.project.name' | translate}}</th>
-              <th nzAlign="center"> {{'quotation.project.details' | translate}}</th>
-            </tr>
-          </thead>
-          <tbody nz-col>
-            <tr *ngFor="let item of  borderedTable.data">
-              <td nzAlign="center">{{ item.key }}</td>
-              <td nzAlign="center">{{ item.name }}</td>
-              <td nzAlign="center">{{ item.description }}</td>
-            </tr>
-          </tbody>
-        </nz-table>
-      </nz-card>
-    </nz-form-item> -->
-    <nz-form-item class="base">
-      <button class="ant-btn" type="button" (click)="close()"
-        style="margin-right: 8px;">{{'quotation.cancel' | translate}}</button>
-      <button class="ant-btn ant-btn-primary" nzbutton nzType="primary">{{'quotation.finish' | translate}}</button>
-    </nz-form-item>
-  </form>
-  </nz-spin>
-</nz-drawer>

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

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

+ 0 - 211
src/app/routes/basedata/quotation/quotation-add/quotation-add.component.ts

@@ -1,211 +0,0 @@
-import { I18NService } from './../../../../core/i18n/i18n.service';
-import { Component, OnInit, HostListener, Output, EventEmitter } from '@angular/core';
-import { _HttpClient } from '@delon/theme';
-import { FormBuilder, Validators, FormGroup } from '@angular/forms';
-import { QuotationTemplate } from 'app/entity/basedata/quotation-template';
-import { QuotationTemplateService } from 'app/services/basedata/quotation-template.service';
-import { NzNotificationService } from 'ng-zorro-antd';
-import { DictService } from 'app/services/dict.service';
-import { messageShared } from '@shared/utils/message';
-
-@Component({
-  selector: 'app-basedata-quotation-quotation-add',
-  templateUrl: './quotation-add.component.html',
-  styles: [
-    `
-    .base{
-      position: absolute;
-      bottom: -25px;
-      width: 100%;
-      border-top: 1px solid rgb(232, 232, 232);
-      padding: 10px 16px;
-      text-align: right;
-      left: 0px;
-      background: #fff;
-      z-index:99;
-    }
-
-    `
-  ]
-})
-export class BasedataQuotationQuotationAddComponent implements OnInit {
-  constructor(private fb: FormBuilder,
-    private quotationTemplateService: QuotationTemplateService,
-    private dictService: DictService,
-    private notification: NzNotificationService,
-    private I18NService: I18NService
-  ) {
-  }
-  ngOnInit(): void {
-    this.validateForm = this.fb.group({
-      type: [null, [Validators.required]],
-      name: [null, [Validators.required]],
-      description: [null, [Validators.required]],
-      languageType: [null, [Validators.required]]
-      // ,
-      // feeCategory1: [null, [Validators.required]],
-      // feeCategory2: [null, [Validators.required]]
-    });
-    this.getSelect();
-    //语言类型
-    this.getLanguageType();
-  }
-  drawerWidth = 600;
-  visible = false;
-  validateForm: FormGroup;
-  @HostListener('window:resize', ['$event'])
-  onResize(event) {
-    const width = event.target.innerWidth;
-    if (width > 600) {
-      this.drawerWidth = 600;
-    } else {
-      this.drawerWidth = width;
-    }
-  }
-
-  quotationTemplate: QuotationTemplate = {//模板对象
-    id: "",
-    type: "",
-    name: "",
-    description: "",
-    feeCategory1: "",
-    feeCategory2: "",
-    languageType: "",//语言类型
-    languageTypeName: ""//语言类型名称
-  }
-  selectTemplates: QuotationTemplate;//类型模板下拉框
-  @Output() afterSave = new EventEmitter<{}>();
-
-  getSelect() {
-    this.dictService.getByDictCode("quotation_template_type").then((response) => {
-      this.selectTemplates = response.result;
-    })
-  }
-
-  //对<nz-form-control>标签逐一校验
-  isLoadingSave=false;
-  submitForm(): void {
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].markAsDirty();
-      this.validateForm.controls[i].updateValueAndValidity();
-    }
-
-    let valid = this.validateForm.valid
-    if (valid) {//表单验证是否通过
-      if (this.quotationTemplate.id == "" || this.quotationTemplate.id == null) {
-        this.isLoadingSave=true;
-        this.quotationTemplateService.addQuotationTemplate(this.quotationTemplate).then((response) => {
-          if (response.success) {
-            this.isLoadingSave=false;
-            this.notification.success(this.I18NService.fanyi("newsuccess"), "")
-            this.afterSave.emit();
-            this.close()
-          } else {
-            this.isLoadingSave=false;
-            this.notification.error(this.I18NService.fanyi("newfailure"), messageShared(this.I18NService, response.message))
-          }
-        })
-      } else {
-        this.isLoadingSave=true;
-        this.quotationTemplateService.updateQuotationTemplate(this.quotationTemplate).then((response) => {
-          if (response.success) {
-            this.isLoadingSave=false;
-            this.notification.success(this.I18NService.fanyi("successful.revision"), "")
-            this.afterSave.emit();
-            this.close()
-          } else {
-            this.isLoadingSave=false;
-            this.notification.success(this.I18NService.fanyi("modification.failed"), "")
-          }
-        })
-      }
-    }
-  }
-
-  //新增打开抽屉
-  open(): void {
-    this.visible = true;//打开drawer并清除校验提示信息
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].reset();
-    }
-  }
-  //修改打开抽屉
-  update(item) {
-    this.visible = true;//打开drawer并清除校验提示信息
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].reset();
-    }
-
-    this.quotationTemplateService.getById(item.id).then((response) => {
-      this.quotationTemplate = response.result
-    })
-  }
-
-  close(): boolean {
-    this.quotationTemplate = {
-      id: "",
-      type: "",
-      name: "",
-      description: "",
-      feeCategory1: "",
-      feeCategory2: "",
-      languageType: "",//语言类型
-      languageTypeName: ""//语言类型名称
-    }
-    this.visible = false;//关闭drawer
-    return false;
-  }
-  listOfData = [
-    {
-
-
-
-      key: '1',
-      name: this.I18NService.fanyi('menu.Project.Management'),
-      description: this.I18NService.fanyi("test.coordination.management")
-    },
-    {
-      key: '2',
-      name: this.I18NService.fanyi('test.design'),
-      description: this.I18NService.fanyi("Report.to.the.sponsor(conventional.weekly.report.estimated.six.months")
-    },
-    {
-      key: '1',
-      name: this.I18NService.fanyi('data.management.and.KPI.statistical.analysis'),
-      description: this.I18NService.fanyi("verification.report.submitted.to.customer.review.date")
-    }
-  ];
-
-  /**
-   * 语言类型
-   */
-  languageTypeList: any = [];
-  getLanguageType() {
-    return new Promise((resolve) => {
-      this.dictService.getByDictCode("language_type").then((response) => {
-        this.languageTypeList = response.result;
-        resolve();
-      })
-    })
-  }
-
-  /**
-   * 语言类型触发事件
-   * 获取名称
-   * @param event 
-   */
-  languageTypeChange(event) {
-    if (event) {
-      this.languageTypeList.forEach(element => {
-        //找到对应语言类型获取名称
-        if (event === element.value) {
-          this.quotationTemplate.languageTypeName = element.text;
-        }
-      });
-    } else {
-      this.quotationTemplate.languageType = "";
-      this.quotationTemplate.languageTypeName = "";
-    }
-  }
-
-}

+ 0 - 97
src/app/routes/basedata/quotation/quotation-description/edit/edit.component.html

@@ -1,97 +0,0 @@
-<nz-modal [(nzVisible)]="isVisible" nzWidth="700" nzTitle="{{'milestone.milestone.description' | translate}}"
-  (nzOnCancel)="close()" (nzOnOk)="save()">
-  <!-- <div #editor class="ant-input ng-untouched ng-pristine ng-valid"></div>
-
-  <button counting>Increment</button> -->
-  <nz-spin [nzSpinning]="isLoadingSave">
-  <form nz-form>
-    <!-- 序号 -->
-    <nz-form-item>
-      <nz-form-label [nzSm]="8" nzMd="5" [nzXs]="24">{{ 'quotation.serial.number' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="14" nzMd="19" [nzXs]="24">
-        <input [(ngModel)]="quotationTemplateItem.code" name="code" nz-input
-          placeholder="{{ 'placeholder' | translate }}{{ 'quotation.serial.number' | translate }}" />
-      </nz-form-control>
-    </nz-form-item>
-    <!-- 项目名称 -->
-    <nz-form-item>
-      <nz-form-label [nzSm]="8" nzMd="5" [nzXs]="24">{{ 'quotation.project.name' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="14" nzMd="19" [nzXs]="24">
-        <!-- <input [(ngModel)]="quotationTemplateItem.name" name="name" nz-input
-          placeholder="{{ 'placeholder' | translate }}{{ 'quotation.project.name' | translate }}" /> -->
-        <textarea nz-input nzAutosize [(ngModel)]="quotationTemplateItem.name" name="name" nz-input
-          placeholder="{{ 'placeholder' | translate }}{{ 'quotation.project.name' | translate }}"></textarea>
-      </nz-form-control>
-    </nz-form-item>
-    <!-- 可交付成果 -->
-    <nz-form-item *ngIf="templateType=='2'">
-      <nz-form-label [nzSm]="8" nzMd="5" [nzXs]="24">{{'deliverables'|translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" nzMd="19" [nzXs]="24">
-        <input [(ngModel)]="quotationTemplateItem.deliverables" name="deliverables" nz-input placeholder="" />
-      </nz-form-control>
-    </nz-form-item>
-    <!-- 完成时间 -->
-    <nz-form-item *ngIf="templateType=='2'||templateType=='6'">
-      <nz-form-label [nzSm]="8" nzMd="5" [nzXs]="24">{{'complete.time'|translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" nzMd="19" [nzXs]="24">
-        <!-- <input [(ngModel)]="quotationTemplateItem.timeline" name="timeline" nz-input placeholder="" /> -->
-        <textarea rows="4" nz-input [(ngModel)]="quotationTemplateItem.timeline" name="timeline"
-          ></textarea>
-      </nz-form-control>
-    </nz-form-item>
-    <!-- 空腹单价 -->
-    <nz-form-item>
-      <nz-form-label [nzSm]="8" nzMd="5" [nzXs]="24">{{'pm.macromplecule.pk.Fasting.unit.price'|translate}}
-      </nz-form-label>
-      <nz-form-control [nzSm]="14" nzMd="19" [nzXs]="24">
-        <input [(ngModel)]="quotationTemplateItem.unitPrice" name="unitPrice" nz-input placeholder="" />
-      </nz-form-control>
-    </nz-form-item>
-    <!-- 餐后单价 -->
-    <nz-form-item>
-      <nz-form-label [nzSm]="8" nzMd="5" [nzXs]="24">{{'pm.macromplecule.pk.After.meal.unit.price'|translate}}
-      </nz-form-label>
-      <nz-form-control [nzSm]="14" nzMd="19" [nzXs]="24">
-        <input [(ngModel)]="quotationTemplateItem.postprandialUnitPrice" name="postprandialUnitPrice" nz-input
-          placeholder="" />
-      </nz-form-control>
-    </nz-form-item>
-    <!-- 对照单明细字段来源 -->
-    <nz-form-item>
-      <nz-form-label [nzSm]="8" nzMd="5" [nzXs]="24">{{'control.single.detail.field.source'|translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" nzMd="19" [nzXs]="24">
-        <nz-select nzShowSearch nzAllowClear nzPlaceHolder="{{ 'select.please.choose' | translate }}"
-          [(ngModel)]="quotationTemplateItem.detailField" name="detailField">
-          <ng-container *ngFor="let item of delaitSelect">
-            <nz-option nzLabel="{{item.text}}" nzValue="{{item.value}}"></nz-option>
-          </ng-container>
-        </nz-select>
-      </nz-form-control>
-    </nz-form-item>
-    <!-- 项目详情 -->
-    <nz-form-item>
-      <nz-form-label [nzSm]="8" nzMd="5" [nzXs]="24">{{ 'quotation.project.details' | translate }}</nz-form-label>
-      <nz-form-control [nzSm]="14" nzMd="19" [nzXs]="24">
-        <textarea rows="4" nz-input [(ngModel)]="quotationTemplateItem.description" name="description"
-          ></textarea>
-          <!-- ts中没有以下方法,打包不成功 -->
-          <!-- (input)="testLog(quotationTemplateItem.description,'input')"
-          (ngModelChange)="testLog($event,'modelChange')" -->
-      </nz-form-control>
-    </nz-form-item>
-    <!-- 父级 -->
-    <nz-form-item *ngIf="isModel=='修改'">
-      <nz-form-label [nzSm]="8" nzMd="5" [nzXs]="24">{{ 'parent' | translate }}
-      </nz-form-label>
-      <nz-form-control [nzSm]="14" nzMd="19" [nzXs]="24">
-        <nz-select nzShowSearch nzAllowClear nzPlaceHolder="{{ 'select.please.choose' | translate }}"
-          [(ngModel)]="quotationTemplateItem.parentId" name="parentId">
-          <ng-container *ngFor="let item of listTemplateItem">
-            <nz-option nzLabel="{{item.code}}" nzValue="{{item.id}}"></nz-option>
-          </ng-container>
-        </nz-select>
-      </nz-form-control>
-    </nz-form-item>
-  </form>
-</nz-spin>
-</nz-modal>

+ 0 - 24
src/app/routes/basedata/quotation/quotation-description/edit/edit.component.spec.ts

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

+ 0 - 153
src/app/routes/basedata/quotation/quotation-description/edit/edit.component.ts

@@ -1,153 +0,0 @@
-import { I18NService } from '@core';
-import { Component, OnInit, ViewChild, Output, EventEmitter, ElementRef, AfterViewInit, Renderer2, HostListener, Directive } from '@angular/core';
-import { NzModalRef, NzMessageService, NzNotificationService } from 'ng-zorro-antd';
-import { _HttpClient } from '@delon/theme';
-import { SFSchema, SFUISchema } from '@delon/form';
-import { QuotationTemplateItem } from 'app/entity/basedata/quotation-template-item';
-import { QuotationTemplateService } from 'app/services/basedata/quotation-template.service';
-import { DictService } from 'app/services/dict.service';
-import { I18nContext } from '@angular/compiler/src/render3/view/i18n/context';
-import * as wangEditor from '../../../../../../../node_modules/wangeditor/release/wangEditor'
-import { messageShared } from '@shared/utils/message';
-
-@Component({
-  selector: 'app-basedata-quotation-quotation-description-edit',
-  templateUrl: './edit.component.html',
-})
-
-export class BasedataQuotationQuotationDescriptionEditComponent implements OnInit, AfterViewInit {
-  constructor(
-    private notification: NzNotificationService,
-    private quotationTemplateService: QuotationTemplateService,
-    private dictService: DictService,
-    private i18NService: I18NService,
-    public msg: NzMessageService,
-  ) { }
-
-  ngOnInit(): void {
-  }
-
-  @ViewChild("editor") editor: ElementRef;
-  ngAfterViewInit() {
-    // const editor = new wangEditor("", this.editor.nativeElement);
-    // editor.create()
-  }
-
-  isVisible = false;
-  isModel = "";//用于判断新增一级/子级/修改
-  quotationTemplateItem: QuotationTemplateItem = {}
-  @Output() afterSave = new EventEmitter<{}>();
-  listTemplateItem: QuotationTemplateItem[] = [];//项目集合
-
-  templateType = "";//模板类型
-  //添加一级时打开抽屉
-  addOneOpen(quotationTemplate) {
-    this.isVisible = true;
-    this.templateType = quotationTemplate.type;//模板类型
-    this.quotationTemplateItem.pkQuotationTemplate = quotationTemplate.id//模板id
-    this.getDelaitSelect();
-  }
-
-  //添加子级时打开抽屉
-  addOpen(quotationTemplate, quotationTemplateItem) {
-    this.isVisible = true;
-    this.templateType = quotationTemplate.type;//模板类型
-    this.quotationTemplateItem.pkQuotationTemplate = quotationTemplate.id;//模板id
-    this.quotationTemplateItem.parentId = quotationTemplateItem.id;//父级id
-    this.getDelaitSelect();
-  }
-
-  //修改时打开抽屉
-  updateOpen(quotationTemplate, quotationTemplateItems) {
-    this.isVisible = true;
-    this.templateType = quotationTemplate.type;//模板类型
-    this.isModel = this.i18NService.fanyi("table.update");
-    //父级下拉框
-    var itemParam = new QuotationTemplateItem();
-    itemParam.pkQuotationTemplate = quotationTemplate.id;//模板id
-    itemParam.id = quotationTemplateItems.value;//项目id
-    this.getDelaitSelect();
-    this.quotationTemplateService.queryByNotParentId(itemParam).then((response) => {
-      this.listTemplateItem = response.result
-      //去除本身对象
-      //修改数据
-      this.quotationTemplateService.getByIdQuotationTemplateItem(quotationTemplateItems.value).then((response) => {
-        this.quotationTemplateItem = response.result
-        if (this.quotationTemplateItem.detailField == "") {
-          this.quotationTemplateItem.detailField = null;
-        }
-      });
-    });
-
-
-  }
-
-  delaitSelect: any;
-  //对照明细数据来源下拉框
-  getDelaitSelect() {
-    if (this.templateType == "6") {
-      this.dictService.getByDictCode("macromolecule_detail_field").then((response) => {
-        this.delaitSelect = response.result;
-      })
-    } else {
-      this.dictService.getByDictCode("project_quotation_detail_field").then((response) => {
-        this.delaitSelect = response.result;
-      })
-    }
-  }
-
-  //保存
-  isLoadingSave=false;
-  save() {
-    if (this.quotationTemplateItem.detailField == null) {
-      this.quotationTemplateItem.detailField = "";
-    }
-    if (this.isModel == "") {//新增一级
-      this.isLoadingSave=true;
-      this.quotationTemplateService.addQuotationTemplateItem(this.quotationTemplateItem).then((response) => {
-        if (response.success) {
-          this.isLoadingSave=false;
-          this.notification.success(this.i18NService.fanyi("newsuccess"), "")
-          this.afterSave.emit();
-          this.close()
-        } else {
-          this.isLoadingSave=false;
-          this.notification.error(this.i18NService.fanyi("newfailure"), messageShared(this.i18NService,response.message))
-        }
-      })
-    } else {
-      this.isLoadingSave=true;
-      this.quotationTemplateService.updateQuotationTemplateItem(this.quotationTemplateItem).then((response) => {
-        if (response.success) {
-          this.isLoadingSave=false;
-          this.notification.success(this.i18NService.fanyi("successful.revision"), "")
-          this.afterSave.emit();
-          this.close()
-        } else {
-          this.isLoadingSave=false;
-          this.notification.error(this.i18NService.fanyi("modification.failed"), messageShared(this.i18NService,response.message))
-        }
-      })
-    }
-  }
-
-  close() {
-    this.isModel = "";
-    this.quotationTemplateItem = {};
-    this.templateType = "";
-    this.delaitSelect = [];
-    this.listTemplateItem = []
-    this.isVisible = false;
-  }
-}
-// tslint:disable-next-line: directive-selector
-@Directive({ selector: 'button[counting]' })
-// tslint:disable-next-line: directive-class-suffix
-class CountClicks {
-  numberOfClicks = 0;
-
-  @HostListener('click', ['$event.target'])
-  onClick(btn) {
-    console.log('button', btn, 'number of clicks:', this.numberOfClicks++);
-  }
-}

+ 0 - 67
src/app/routes/basedata/quotation/quotation-description/quotation-description.component.html

@@ -1,67 +0,0 @@
-<nz-drawer [nzMaskClosable]="true" [nzWidth]="drawerWidth" [nzVisible]="visible" nzTitle="新增报价单" [nzClosable]="true"
-  (nzOnClose)="close()">
-  <nz-page-header>
-    <nz-page-header-title>{{'milestone.template.name' | translate}}:</nz-page-header-title>
-    <nz-page-header-subtitle>{{quotationTemplate.name}}</nz-page-header-subtitle>
-    <nz-page-header-extra>
-      <button nz-button nzType="primary" acl [acl-ability]="'item-parent:add'"
-        (click)="basedataQuotationQuotationDescriptionEditComponent.addOneOpen(quotationTemplate)">{{'button.leve.one'|translate}}</button>
-    </nz-page-header-extra>
-  </nz-page-header>
-
-  <div nz-row [nzGutter]="24">
-    <div nz-col nzMd="24" nzLg="24">
-      <nz-table nzSize="small" #expandTable [nzData]="listOfMapData" style="table-layout: fixed;" [nzShowPagination]=false
-        [nzFrontPagination]="false">
-        <thead>
-          <tr>
-            <th>{{'quotation.serial.number'|translate}}</th>
-            <th style="width:20%">{{'quotation.project.name' | translate}}</th>
-            <th style="width:20%">{{'quotation.project.details' | translate}}</th>
-            <th style="width:20%">{{'pm.quotation.timeline' | translate}}</th>
-            <th nzWidth="250px">{{ 'milestone.operation' | translate }}</th>
-          </tr>
-        </thead>
-        <tbody>
-          <ng-container *ngFor="let data of expandTable.data">
-            <ng-container *ngFor="let item of mapOfExpandedData[data.key]">
-              <tr *ngIf="(item.parent && item.parent.expand) || !item.parent">
-                <td [nzIndentSize]="item.level * 20" [nzShowExpand]="item.children" [(nzExpand)]="item.expand"
-                  (nzExpandChange)="collapse(mapOfExpandedData[data.key], item, $event)">
-                  {{ item.code }}
-                </td>
-                <td>
-                  <!-- <pre> -->
-                    {{ item.name }}
-                  <!-- </pre> -->
-                </td>
-                <td>
-                  <!-- <pre> -->
-                    {{ item.description }}
-                  <!-- </pre> -->
-                </td>
-                <td>
-                  {{ item.timeline }}
-                </td>
-                <td>
-                  <a acl [acl-ability]="'item:add'"
-                    (click)="basedataQuotationQuotationDescriptionEditComponent.addOpen(quotationTemplate,item)">{{ 'button.leve.lower' | translate }}</a>
-                  <nz-divider acl [acl-ability]="'item:add'" nzType="vertical"></nz-divider>
-                  <a acl [acl-ability]="'item:update'"
-                    (click)="basedataQuotationQuotationDescriptionEditComponent.updateOpen(quotationTemplate,item)">{{ 'milestone.update' | translate }}</a>
-                  <nz-divider acl [acl-ability]="'item:update'" nzType="vertical"></nz-divider>
-                  <a acl [acl-ability]="'item:delete'" nz-popconfirm nzTitle="{{'isdelete'|translate}}"
-                    nzOkText="{{ 'yes' | translate }}" nzCancelText="{{ 'no' | translate }}"
-                    (nzOnConfirm)="delete(item.value)">{{ 'milestone.delete' | translate }}</a>
-                </td>
-              </tr>
-            </ng-container>
-          </ng-container>
-        </tbody>
-      </nz-table>
-    </div>
-  </div>
-
-</nz-drawer>
-<app-basedata-quotation-quotation-description-edit #basedataQuotationQuotationDescriptionEditComponent
-  (afterSave)="getQuotationTemplateItemTree()"></app-basedata-quotation-quotation-description-edit>

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

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

+ 0 - 117
src/app/routes/basedata/quotation/quotation-description/quotation-description.component.ts

@@ -1,117 +0,0 @@
-import { Component, OnInit, ViewChild, HostListener, ElementRef, ViewChildren } from '@angular/core';
-import { NzModalRef, NzMessageService, vi_VN, NzNotificationService } from 'ng-zorro-antd';
-import { _HttpClient } from '@delon/theme';
-import { SFSchema, SFUISchema } from '@delon/form';
-import { QuotationTemplate } from 'app/entity/basedata/quotation-template';
-import { TreeNodeInterface } from 'app/routes/system/menu/menu.component';
-import { QuotationTemplateService } from 'app/services/basedata/quotation-template.service';
-import { I18NService } from '@core';
-import { messageShared } from '@shared/utils/message';
-
-@Component({
-  selector: 'app-basedata-quotation-quotation-description',
-  templateUrl: './quotation-description.component.html',
-})
-export class BasedataQuotationQuotationDescriptionComponent implements OnInit {
-
-  constructor(
-    private quotationTemplateService:QuotationTemplateService,
-    private notification: NzNotificationService,
-    private i18NService:I18NService,
-  ) {}
-
-  ngOnInit(): void {
-   
-  }
-
-  drawerWidth = window.innerWidth;
-  visible = false;
-  @HostListener('window:resize', ['$event'])
-  onResize(event) {
-    const width = event.target.innerWidth;
-    if (width > 1480) {
-      this.drawerWidth = 1480;
-    } else {
-      this.drawerWidth = width;
-    }
-  }
-  quotationTemplate:QuotationTemplate={}//模板对象
-  listOfMapData=[];//数据表tree
-
-
-  open(item){
-    this.visible=true;
-    this.quotationTemplate=item
-    this.getQuotationTemplateItemTree()
-  }
-
-  delete(id){
-    this.quotationTemplateService.deleteQuotationTemplateItem(id).then((response)=>{
-      if (response.success) {
-        this.notification.success(this.i18NService.fanyi("successful.deletion"), "")
-        this.getQuotationTemplateItemTree();
-      } else {
-        this.notification.error(this.i18NService.fanyi("delete.failed"), messageShared(this.i18NService,response.message))
-      }
-    })
-  }
-
-  close() {
-    this.visible=false;
-  }
-
-  //tree数据表
-  getQuotationTemplateItemTree(){
-    var pkTemplateId={pkTemplateId:this.quotationTemplate.id}//模板id(描述外键)
-    //查询数据表
-    this.quotationTemplateService.getQuotationTemplateItemTree(pkTemplateId).then((response)=>{
-      this.listOfMapData=response.result
-      this.listOfMapData.forEach(item => {
-        this.mapOfExpandedData[item.key] = this.convertTreeToList(item);
-      });
-    })
-  }
-
-
-  //tree数据表////////////////
-  mapOfExpandedData: { [key: string]: TreeNodeInterface[] } = {};
-  collapse(array: TreeNodeInterface[], data: TreeNodeInterface, $event: boolean): void {
-    if ($event === false) {
-      if (data.children) {
-        data.children.forEach(d => {
-          const target = array.find(a => a.key === d.key)!;
-          target.expand = false;
-          this.collapse(array, target, false);
-        });
-      } else {
-        return;
-      }
-    }
-  }
-
-  convertTreeToList(root: object): TreeNodeInterface[] {
-    const stack: any[] = [];
-    const array: any[] = [];
-    const hashMap = {};
-    stack.push({ ...root, level: 0, expand: true });
-
-    while (stack.length !== 0) {
-      const node = stack.pop();
-      this.visitNode(node, hashMap, array);
-      if (node.children) {
-        for (let i = node.children.length - 1; i >= 0; i--) {
-          stack.push({ ...node.children[i], level: node.level + 1, expand: true, parent: node });
-        }
-      }
-    }
-
-    return array;
-  }
-
-  visitNode(node: TreeNodeInterface, hashMap: { [key: string]: any }, array: TreeNodeInterface[]): void {
-    if (!hashMap[node.key]) {
-      hashMap[node.key] = true;
-      array.push(node);
-    }
-  }
-}

+ 0 - 90
src/app/routes/basedata/quotation/quotation.component.html

@@ -1,90 +0,0 @@
-<page-header [action]="phActionTpl">
-  <ng-template #phActionTpl>
-    <!-- 新增 -->
-    <button nz-button nzType="primary" (click)=basedataQuotationQuotationAdd.open() acl
-      [acl-ability]="'quotation:add'">{{'quotation.new' | translate}}</button>
-  </ng-template>
-</page-header>
-
-<nz-card>
-  <form nz-form>
-  <div nz-row [nzGutter]="{xs:12,sm:15,md:29,lg: 36, xl: 40}">
-    <div nz-col nzXs="24" nzSm="3" nzLg="3">
-      <nz-form-label>{{'quotation.template.type' | translate}}</nz-form-label>
-    </div>
-    <div nz-col nzXs="24" nzSm="7" nzLg="6">
-      <nz-select style="width: 100%;" nzShowSearch nzAllowClear
-        nzPlaceHolder="{{'quotation.select' | translate}}" [(ngModel)]="quotationTemplate.type" name="type">
-        <nz-option nzLabel="{{'quotation.all' | translate}}" nzValue=""></nz-option>
-        <nz-option *ngFor="let item of selectTemplates" nzLabel="{{item.text}}" nzValue="{{item.value}}"></nz-option>
-      </nz-select>
-    </div>
-    <div nz-col nzXs="24" nzSm="3" nzLg="3">
-      <nz-form-label>{{'quotation.template.name' | translate}}</nz-form-label>
-    </div>
-    <div nz-col nzXs="24" nzSm="7" nzLg="6">
-      <input [(ngModel)]="quotationTemplate.name" name="name" nz-input placeholder="{{'placeholder' | translate}}" />
-    </div>
-    <div nz-col nzXs="24" nzSm="3" nzLg="6">
-      <button (click)="query()" nz-button nzType="primary">{{'quotation.search' | translate}}</button>
-    </div>
-  </div>
-</form>
-  <nz-table nzSize="small" [nzData]="dataSet" #borderedTable [nzFrontPagination]="false" [nzTotal]="page.total"
-    [nzPageIndex]="page.current" (nzPageIndexChange)="pageIndexChange($event)" [nzLoading]="isSpinning">
-    <thead>
-      <tr>
-        <th nzAlign="center">{{'quotation.template.type' | translate}}</th>
-        <th nzAlign="center">{{'quotation.template.name' | translate}}</th>
-        <th nzAlign="center">{{'quotation.template.description' | translate}}</th>
-        <th nzAlign="center">{{'quotation.creation.time' | translate}}</th>
-        <th nzAlign="center">{{ 'milestone.operation' | translate }}</th>
-      </tr>
-    </thead>
-    <tbody>
-      <tr *ngFor="let item of  borderedTable.data">
-        <td nzAlign="center">
-          <ng-container *ngFor="let type of selectTemplates">
-            <ng-container *ngIf="type.value==item.type">
-              {{type.text}}
-            </ng-container>
-          </ng-container>
-        </td>
-        <td nzAlign="center">{{ item.name}}</td>
-        <td nzAlign="center">{{ item.description}}</td>
-        <td nzAlign="center">{{ item.createTime|date:'dd-MMM-y HH:mm:ss'}}</td>
-        <td nzAlign="center">
-          <a href="javascript:void(0);" acl [acl-ability]="'quotation:update'"
-            (click)="basedataQuotationQuotationAdd.update(item)">{{ 'table.update' | translate }}</a>
-          <nz-divider acl [acl-ability]="'quotation:update'" nzType="vertical"></nz-divider>
-          <a acl [acl-ability]="'quotation-item:view'" href="javascript:void(0);"
-            (click)="basedataQuotationQuotationDescriptionComponent.open(item)">{{ 'quotation.description' | translate }}</a>
-          <nz-divider [acl]="{ ability: [10, 'quotation:delete','quotation:copy'], mode: 'oneOf' }" nzType="vertical"></nz-divider>
-          <!-- <a acl [acl-ability]="'quotation:delete'" nz-popconfirm nzTitle="{{'isdelete'|translate}}"
-            nzOkText="{{ 'yes' | translate }}" nzCancelText="{{ 'no' | translate }}" (nzOnConfirm)="delete(item.id)"
-            (nzOnCancel)="cancelDel()">{{ 'table.delete' | translate }}</a> -->
-            <!-- 更多 -->
-          <nz-dropdown [acl]="{ ability: [10, 'quotation:delete','quotation:copy'], mode: 'oneOf' }">
-            <a nz-dropdown>&nbsp;{{'pm.quotation.more' | translate}}<i nz-icon type="down"></i> </a>
-            <ul nz-menu nzSelectable>
-              <!-- 复制 -->
-              <li nz-menu-item acl [acl-ability]="'quotation:copy'">
-                  <a acl href="javascript:void(0);" (click)="copy(item)">{{'pm.quotation.copy' | translate}}</a>
-                </li>
-              <!-- 删除 -->
-              <li nz-menu-item acl [acl-ability]="'quotation:delete'">
-                <a acl nz-popconfirm nzTitle="{{'isdelete'|translate}}"
-                  nzOkText="{{ 'yes' | translate }}" nzCancelText="{{ 'no' | translate }}"
-                  (nzOnConfirm)="delete(item.id)" (nzOnCancel)="cancelDel()">{{ 'table.delete' | translate }}</a>
-              </li>
-            </ul>
-          </nz-dropdown>
-        </td>
-      </tr>
-    </tbody>
-  </nz-table>
-</nz-card>
-<app-basedata-quotation-quotation-add #basedataQuotationQuotationAdd (afterSave)="getQuotationTemplate()">
-</app-basedata-quotation-quotation-add>
-<app-basedata-quotation-quotation-description #basedataQuotationQuotationDescriptionComponent>
-</app-basedata-quotation-quotation-description>

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

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

+ 0 - 106
src/app/routes/basedata/quotation/quotation.component.ts

@@ -1,106 +0,0 @@
-import { Component, OnInit, ViewChild, ViewChildren, ElementRef } from '@angular/core';
-import { _HttpClient, ModalHelper } from '@delon/theme';
-import { STColumn, STComponent } from '@delon/abc';
-import { SFSchema } from '@delon/form';
-import { QuotationTemplateService } from 'app/services/basedata/quotation-template.service';
-import { QuotationTemplate } from 'app/entity/basedata/quotation-template';
-import { DictService } from 'app/services/dict.service';
-import { NzNotificationService } from 'ng-zorro-antd';
-import { I18NService } from '@core';
-import { EventManager } from '@angular/platform-browser';
-
-@Component({
-  selector: 'app-basedata-quotation',
-  templateUrl: './quotation.component.html',
-})
-export class BasedataQuotationComponent implements OnInit {
-  constructor(
-    private quotationTemplateService: QuotationTemplateService,
-    private dictService: DictService,
-    private notification: NzNotificationService,
-    private i18NService: I18NService,
-    private eventManager: EventManager
-  ) { }
-
-  ngOnInit() {
-    this.getQuotationTemplate()
-    this.getInitData()
-  }
-  quotationTemplate: QuotationTemplate = {
-    name: "",
-    type: "",
-    pageSize: 10
-  };
-  page = {//分页
-    total: 0,
-    current: 0
-  };
-  dataSet: QuotationTemplate;//模板数据表数据
-  selectTemplates: QuotationTemplate;//类型模板下拉框
-
-
-  isSpinning=false;
-  //查询全部模板
-  getQuotationTemplate() {
-    if (this.quotationTemplate.type === null) {
-      this.quotationTemplate.type = "";
-    }
-    this.isSpinning=true;
-    this.quotationTemplateService.getQuotationTemplate1(this.quotationTemplate).then((response) => {
-      this.dataSet = response.result.records
-      this.page = response.result
-      this.isSpinning=false;
-    })
-  }
-
-  /**
-   * 查询按钮
-   */
-  query(){
-    this.quotationTemplate.pageNo = 1;
-    this.getQuotationTemplate();
-  }
-
-  //下拉框数据
-  getInitData() {
-    this.dictService.getByDictCode("quotation_template_type").then((response) => {
-      this.selectTemplates = response.result;
-    })
-  }
-
-  //删除模板
-  delete(id) {
-    this.quotationTemplateService.deleteAll(id).then((response) => {
-      if (response.success) {
-        this.notification.success(this.i18NService.fanyi("successful.deletion"), "")
-        this.getQuotationTemplate();
-      } else {
-        this.notification.success(this.i18NService.fanyi("delete.failed"), "")
-      }
-    })
-  }
-
-  /**
-   * 复制
-   * @param item 报价模板对象
-   */
-  copy(item) {
-    this.quotationTemplateService.copy(item.id).then((response) => {
-      if (response.success) {
-        //复制成功
-        this.notification.success(this.i18NService.fanyi("copy.Successful.replication"), "");
-        this.getQuotationTemplate();
-      } else {
-        //复制失败
-        this.notification.success(this.i18NService.fanyi("copy.failed"), "");
-      }
-    })
-  }
-
-  //按页码显示数据
-  pageIndexChange(event) {
-    this.quotationTemplate.pageNo = event;
-    this.getQuotationTemplate();
-  }
-
-}

+ 0 - 91
src/app/routes/basedata/store/store-add/store-add.component.html

@@ -1,91 +0,0 @@
-<nz-drawer [nzMaskClosable]="true" [nzWidth]="drawerWidth" [nzVisible]="visible" nzTitle="基本信息" [nzClosable]="true"
-  (nzOnClose)="close()">
-  <nz-spin [nzSpinning]="isLoadingSave">
-  <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14" nzRequired>{{'store.type' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <nz-select nzShowSearch nzAllowClear nzPlaceHolder="{{'store.select' | translate}}"
-          [(ngModel)]="storagePlace.type" name="type" formControlName="type" [nzDisabled]="isDisabled">
-          <nz-option *ngFor="let item of storageTypes" nzLabel="{{item.text}}" nzValue="{{item.value}}"></nz-option>
-        </nz-select>
-        <nz-form-explain *ngIf="validateForm.get('type')?.dirty && validateForm.get('type')?.errors">
-          {{'store.select' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14" nzRequired>{{'store.coding' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <!-- 修改时 -->
-        <ng-container *ngIf="isDisabled">
-            <input nz-input [(ngModel)]="storagePlace.code" disabled name="code" placeholder="{{'store.input' | translate}}"
-            formControlName="code" />
-        </ng-container>
-        <!-- 新增时 -->
-        <ng-container *ngIf="!isDisabled">
-          <input nz-input [(ngModel)]="storagePlace.code" name="code" placeholder="{{'store.input' | translate}}"
-          formControlName="code" />
-        </ng-container>
-        <nz-form-explain *ngIf="validateForm.get('code')?.dirty && validateForm.get('code')?.errors">
-          {{'store.please.coding' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <!-- <nz-form-label [nzSm]="6" [nzXs]="14" nzRequired>{{'store.freezer.no' | translate}}</nz-form-label>
-        <nz-form-control [nzSm]="14" [nzXs]="14">
-          <input nz-input formControlName="iceBoxNumber" [(ngModel)]="storagePlace.iceBoxNumber" name="iceBoxNumber" placeholder="{{'store.input' | translate}}" />
-          <nz-form-explain *ngIf="validateForm.get('iceBoxNumber')?.dirty && validateForm.get('iceBoxNumber')?.errors">
-            {{'store.please.freezer.no' | translate}}
-          </nz-form-explain>
-        </nz-form-control> -->
-      <nz-form-label [nzSm]="6" [nzXs]="14" nzRequired>{{'store.freezer.no' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <nz-select nzShowSearch nzAllowClear formControlName="iceBoxNumber" nzPlaceHolder="{{'pm.choose'|translate}}"
-          [(ngModel)]="storagePlace.iceBoxNumber">
-          <ng-container *ngFor="let option of iceBoxNumber">
-            <nz-option [nzLabel]="option.text" [nzValue]="option.value"> </nz-option>
-          </ng-container>
-        </nz-select>
-        <nz-form-explain *ngIf="validateForm.get('iceBoxNumber')?.dirty && validateForm.get('iceBoxNumber')?.errors">
-          {{'store.please.freezer.no' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14">{{'store.freezer.level.o' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <input nz-input formControlName="layer" [(ngModel)]="storagePlace.layer" name="layer"
-          placeholder="{{'store.input' | translate}}" />
-        <nz-form-explain *ngIf="validateForm.get('layer')?.dirty && validateForm.get('layer')?.errors">
-          {{'store.please.level' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14">{{'store.lattice.number' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <input nz-input formControlName="grid" [(ngModel)]="storagePlace.grid" name="grid"
-          placeholder=" {{'store.input' | translate}}" />
-        <nz-form-explain *ngIf="validateForm.get('grid')?.dirty && validateForm.get('grid')?.errors">
-          {{'store.please.number' | translate}}
-        </nz-form-explain>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="14" nzRequired>{{'store.whether.not' | translate}}</nz-form-label>
-      <nz-form-control [nzSm]="14" [nzXs]="14">
-        <nz-switch [(ngModel)]="enable" name="enable" [ngModelOptions]="{standalone: true}"
-          nzCheckedChildren="{{'store.yes' | translate}}" nzUnCheckedChildren="{{'store.no' | translate}}">
-        </nz-switch>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item class="base">
-      <button type="button" (click)="close()" class="ant-btn"
-        style="margin-right: 8px;">{{'store.close' | translate}}</button>
-      <button nzbutton nzType="primary" class="ant-btn ant-btn-primary">{{'store.save' | translate}}</button>
-    </nz-form-item>
-  </form>
-</nz-spin>
-</nz-drawer>

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

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

+ 0 - 181
src/app/routes/basedata/store/store-add/store-add.component.ts

@@ -1,181 +0,0 @@
-import { I18NService } from '@core';
-import { StoragePlace } from 'app/entity/basedata/storage-place';
-import { NzNotificationService } from 'ng-zorro-antd';
-import { StoragePlaceService } from 'app/services/basedata/storage-place.service';
-import { Component, OnInit, ViewChild, HostListener, Output, EventEmitter, enableProdMode } from '@angular/core';
-import { Validators, FormBuilder, FormGroup } from '@angular/forms';
-import { DictService } from 'app/services/dict.service';
-import { messageShared } from '@shared/utils/message';
-
-@Component({
-  selector: 'app-basedata-store-store-add',
-  templateUrl: './store-add.component.html',
-  styles: [
-    `
-    .base{
-      position: absolute;
-      bottom: -25px;
-      width: 100%;
-      border-top: 1px solid rgb(232, 232, 232);
-      padding: 10px 16px;
-      text-align: right;
-      left: 0px;
-      background: #fff;
-      z-index:99;
-    }
-
-    `
-  ]
-})
-export class BasedataStoreStoreAddComponent implements OnInit {
-  constructor(private fb: FormBuilder,
-    private storagePlaceService: StoragePlaceService,
-    private nzNotificationService: NzNotificationService,
-    private dictService: DictService,
-    private i18NService: I18NService
-  ) {
-    //元数据
-
-  }
-  ngOnInit(): void {
-    this.validateForm = this.fb.group({
-      code: [null, [Validators.required]],
-      type: [null, [Validators.required]],
-      iceBoxNumber: [null, [Validators.required]],
-      layer: [null, []],
-      grid: [null, []],
-    });
-
-    this.storageTypes = [];
-    this.iceBoxNumber = []
-    this.initStoragePlace();
-
-  }
-  drawerWidth = 900;
-  visible = false;
-  validateForm: FormGroup;
-  storagePlace: StoragePlace;
-  storageTypes: any;
-  iceBoxNumber: any
-  enable = false;
-  // 冰箱编号元数据
-
-
-  @Output() afterSave = new EventEmitter();
-  @HostListener('window:resize', ['$event'])
-  onResize(event) {
-    const width = event.target.innerWidth;
-    if (width > 600) {
-      this.drawerWidth = 600;
-    } else {
-      this.drawerWidth = width;
-    }
-  }
-
-  //对<nz-form-control>标签逐一校验
-  isLoadingSave=false;
-  submitForm(): void {
-    if (this.enable) {
-      this.storagePlace.enable = "1";
-    } else {
-      this.storagePlace.enable = "0";
-    }
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].markAsDirty();
-      this.validateForm.controls[i].updateValueAndValidity();
-    }
-    let valid = this.validateForm.valid;
-    //验证通过保存
-    if (valid) {
-      if (this.storagePlace.id == null || this.storagePlace.id == "") {
-        this.isLoadingSave=true;
-        this.storagePlaceService.addStoragePlace(this.storagePlace).then((response) => {
-          if (response.success) {
-            this.isLoadingSave=false;
-            this.nzNotificationService.success(this.i18NService.fanyi("newsuccess"), "");
-            this.afterSave.emit();
-            this.initStoragePlace();
-            this.close();
-          } else {
-            this.isLoadingSave=false;
-            this.nzNotificationService.error(this.i18NService.fanyi("newfailure"), messageShared(this.i18NService,response.message));
-          }
-        })
-      } else {
-        this.isLoadingSave=true;
-        this.storagePlaceService.editStoragePlace(this.storagePlace).then((response) => {
-          if (response.success) {
-            this.isLoadingSave=false;
-            this.nzNotificationService.success(this.i18NService.fanyi("successful.revision"), "");
-            this.afterSave.emit();
-            this.initStoragePlace();
-            this.close();
-          } else {
-            this.isLoadingSave=false;
-            this.nzNotificationService.error(this.i18NService.fanyi("modification.failed"), messageShared(this.i18NService,response.message));
-          }
-        })
-      }
-    }
-  }
-  open(): void {
-    this.visible = true;//打开drawer并清除校验提示信息
-    this.enable = false;
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].reset();
-    }
-    this.getInitData();
-  }
-  isDisabled = false;
-  openEdit(item) {
-    console.error("111")
-    this.isDisabled = true;
-    // alert(JSON.stringify(item))
-    this.visible = true;//打开drawer并清除校验提示信息
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].reset();
-    }
-    this.getInitData();
-    this.storagePlaceService.getById(item.id).then((response) => {
-      if (response.result.enable == "0") {
-        this.enable = false;
-      } else {
-        this.enable = true;
-      }
-      this.storagePlace = response.result;
-    })
-  }
-  close(): void {
-    this.visible = false;//关闭drawer
-    this.isDisabled = false;
-    for (const i in this.validateForm.controls) {
-      this.validateForm.controls[i].reset();
-    }
-    this.initStoragePlace();
-  }
-
-  getInitData() {
-    this.dictService.getByDictCode("storage_type").then((response) => {
-      this.storageTypes = response.result;
-    })
-    // 获取冰箱编号元数据
-    this.dictService.getByDictCode("refrigerator_code").then((response) => {
-      this.iceBoxNumber = response.result;
-    })
-  }
-
-
-  initStoragePlace() {
-    this.storagePlace = {
-      id: "",
-      code: "",
-      name: "",
-      type: "",//存储类型
-      iceBoxNumber: null,//冰箱号
-      layer: "",// 层数
-      grid: "",// 格号
-      enable: "1"// 是否停用
-    }
-  }
-
-}

+ 0 - 72
src/app/routes/basedata/store/store.component.html

@@ -1,72 +0,0 @@
-<page-header [action]="phActionTpl">
-  <ng-template #phActionTpl>
-    <button nz-button nzType="primary" (click)="basedataStoreStoreAdd.open()" acl
-      [acl-ability]="'store:add'">{{'store.new' | translate}}</button>
-  </ng-template>
-  <app-basedata-store-store-add #basedataStoreStoreAdd (afterSave)="getStores()"></app-basedata-store-store-add>
-</page-header>
-<nz-card>
-  <form nz-form>
-  <div nz-row [nzGutter]="{xs:12,sm:15,md:29,lg: 36, xl: 40}">
-    <div class="backGauge" nz-col nzXs="24" nzSm="3" nzLg="3">
-      <nz-form-label>{{'store.coding' | translate}}</nz-form-label>
-    </div>
-    <div nz-col nzXs="24" nzSm="5" nzLg=5>
-      <input nz-input [(ngModel)]="storagePlace.code" name="code"/>
-    </div>
-    <div class="diss" nz-col nzXs="24" nzSm="5" nzLg="7">
-      <button nz-button nzType="primary" (click)="query()">{{'store.search' | translate}}</button>
-    </div>
-  </div>
-</form>
-  <nz-table nzSize="small" [nzData]="dataSet" #borderedTable [nzFrontPagination]="false" [nzTotal]="page.total"
-    [nzPageIndex]="page.current" (nzPageIndexChange)="pageIndexChange($event)" [nzLoading]="isSpining">
-    <thead>
-      <tr>
-        <!-- <th nzShowCheckbox nzAlign="center"></th> -->
-        <th nzAlign="center">{{'store.coding' | translate}}</th>
-        <th nzAlign="center">{{'store.type' | translate}}</th>
-        <th nzAlign="center">{{'store.freezer.no' | translate}}</th>
-        <th nzAlign="center">{{'store.freezer.level.o' | translate}}</th>
-        <th nzAlign="center">{{'store.lattice.number' | translate}}</th>
-        <th nzAlign="center">{{'store.whether.not' | translate}}</th>
-        <th nzAlign="center">{{'store.operation' | translate}}</th>
-      </tr>
-    </thead>
-    <!-- 绑定数据 -->
-    <tbody>
-      <tr *ngFor="let item of  borderedTable.data">
-        <!-- <td nzShowCheckbox></td> -->
-        <td nzAlign="center">{{ item.code }}</td>
-        <td nzAlign="center">
-          <span *ngFor="let st of storageTypes">
-            <span *ngIf="st.value == item.type">{{st.text}}</span>
-          </span>
-        </td>
-        <td nzAlign="center">
-          <ng-container *ngFor="let data of iceBoxNumber">
-            <ng-container *ngIf="data.value==item.iceBoxNumber">
-              {{data.text}}
-            </ng-container>
-          </ng-container>
-        </td>
-        <td nzAlign="center">{{ item.layer }}</td>
-        <td nzAlign="center">{{ item.grid}}</td>
-        <td nzAlign="center">
-          <!-- 否 -->
-          <nz-tag *ngIf="item.enable==0" [nzColor]="'green'">{{'store.no'|translate}}</nz-tag>
-          <!-- 是 -->
-          <nz-tag *ngIf="item.enable==1" [nzColor]="'red'">{{'store.yes'|translate}}</nz-tag>
-        </td>
-        <td nzAlign="center">
-          <a (click)="basedataStoreStoreAdd.openEdit(item)" acl
-            [acl-ability]="'store:update'">{{'store.update' | translate}}</a>
-          <span class="ant-divider ant-divider-vertical" acl [acl-ability]="'store:update'"></span>
-          <a acl [acl-ability]="'store:delete'" nz-popconfirm nzTitle="{{'isdelete'|translate}}" nzOkText="{{ 'yes' | translate }}"
-            nzCancelText="{{ 'no' | translate }}"  (nzOnConfirm)="confirmDel(item.id)"
-            (nzOnCancel)="cancelDel()">{{'table.delete'|translate}}</a>
-        </td>
-      </tr>
-    </tbody>
-  </nz-table>
-</nz-card>

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

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

+ 0 - 116
src/app/routes/basedata/store/store.component.ts

@@ -1,116 +0,0 @@
-import { I18NService } from '@core';
-import { BasedataStoreStoreAddComponent } from './store-add/store-add.component';
-import { NzNotificationService } from 'ng-zorro-antd';
-import { StoragePlace } from './../../../entity/basedata/storage-place';
-import { Component, OnInit, ViewChild } from '@angular/core';
-import { StoragePlaceService } from 'app/services/basedata/storage-place.service';
-import { DictService } from 'app/services/dict.service';
-import { EventManager } from '@angular/platform-browser';
-import { messageShared } from '@shared/utils/message';
-
-@Component({
-  selector: 'app-basedata-store',
-  templateUrl: './store.component.html',
-  styles: [
-    `
-    @media screen and (max-width: 1077px) and (min-width:997px) {
-      .backGauge{
-        margin-right:2%;
-      }
-    }
-    @media screen and (max-width: 877px) and (min-width:577px) {
-      .backGauge{
-        margin-right:10%;
-      }
-    }
-    @media screen and (max-width: 573px) and (min-width:320px) {
-      .diss{
-        margin-top:2%;
-      }
-    }
-
-
-    `
-  ]
-})
-export class BasedataStoreComponent implements OnInit {
-
-  constructor(
-    private StoragePlaceService: StoragePlaceService,
-    private nzNotificationService: NzNotificationService,
-    private dictService: DictService,
-    private i18NService: I18NService,
-    private eventManager: EventManager
-  ) { }
-
-  ngOnInit() {
-    this.getInitData();
-    this.getStores();
-    this.storagePlace = {
-      code: ""
-    }
-  }
-
-  dataSet: any;
-  isSpining = false;
-  storagePlace: StoragePlace;
-  storageTypes: any;
-  page = {
-    total:0,
-    current:0
-  };//页码
-  iceBoxNumber: any
-
-  getStores() {
-    this.isSpining = true;
-    this.StoragePlaceService.getStoragePlace1(this.storagePlace).then((response) => {
-      this.dataSet = response.result.records;
-      this.page = response.result;
-      this.isSpining = false;
-      this.basedataStoreStoreAdd.iceBoxNumber = response.result.records
-    })
-
-    this.dictService.getByDictCode("refrigerator_code").then((response) => {
-      this.iceBoxNumber = response.result;
-    })
-  }
-
-  /**
-   * 查询按钮
-   */
-  query(){
-    this.storagePlace.pageNo=1;
-    this.getStores();
-  }
-
-  //按页码显示数据
-  pageIndexChange(event) {
-    this.storagePlace.pageNo = event;//当前页码
-    this.getStores();
-  }
-
-  confirmDel(id) {
-    this.StoragePlaceService.deleteStoragePlace(id).then((response) => {
-      if (response.success) {
-        this.nzNotificationService.success(this.i18NService.fanyi("successful.deletion"), "");
-        this.getStores();
-      } else {
-        this.nzNotificationService.error(this.i18NService.fanyi("delete.failed"), messageShared(this.i18NService,response.message));
-      }
-    })
-  }
-
-  cancelDel() {
-
-  }
-
-  getInitData() {
-    this.dictService.getByDictCode("storage_type").then((response) => {
-      this.storageTypes = response.result;
-    })
-  }
-
-
-  @ViewChild("basedataStoreStoreAdd") basedataStoreStoreAdd: BasedataStoreStoreAddComponent
-
-}

+ 0 - 41
src/app/routes/basedata/work-tasks/add/add.component.html

@@ -1,41 +0,0 @@
-<form nz-form>
-  <!-- <table>
-      <th style="width: 500px;"></th>
-  </table> -->
-  <!-- 任务 -->
-  <nz-form-item>
-    <nz-form-label nzRequired [nzSm]="8" [nzXs]="24">{{ 'working.task' | translate }}</nz-form-label>
-    <nz-form-control [nzSm]="14" [nzXs]="24">
-      <input [(ngModel)]="fdWorkTasks.name" name="name" nz-input
-        placeholder="{{ 'placeholder' | translate }}{{ 'working.task' | translate }}" />
-    </nz-form-control>
-  </nz-form-item>
-  <!-- 类型 -->
-  <nz-form-item>
-    <nz-form-label nzRequired [nzSm]="8" [nzXs]="24">{{ 'financial.management.type' | translate }}</nz-form-label>
-    <nz-form-control [nzSm]="14" [nzXs]="24">
-      <!-- <input [(ngModel)]="fdWorkTasks.type" name="type" nz-input
-        placeholder="{{ 'placeholder' | translate }}{{ 'depart.sort' | translate }}" /> -->
-        <nz-select style="width: 100%;" [(ngModel)]="fdWorkTasks.type" nzShowSearch
-            nzPlaceHolder="{{'pm.choose'|translate}}" name="type" [nzDisabled]="isType">
-            <nz-option *ngFor="let type of tasksType" [nzLabel]="type.text"
-              [nzValue]="type.value">
-            </nz-option>
-          </nz-select>
-    </nz-form-control>
-  </nz-form-item>
-  <!-- 排序 -->
-  <nz-form-item>
-    <nz-form-label nzRequired [nzSm]="8" [nzXs]="24">{{ 'depart.sort' | translate }}</nz-form-label>
-    <nz-form-control [nzSm]="14" [nzXs]="24">
-      <input [(ngModel)]="fdWorkTasks.sort" name="sort" nz-input
-        placeholder="{{ 'placeholder' | translate }}{{ 'depart.sort' | translate }}" />
-    </nz-form-control>
-  </nz-form-item>
-  <div class="footer">
-    <button type="button" (click)="close()" class="ant-btn"
-      style="margin-right: 8px;"><span>{{ 'button.close' | translate }}</span></button>
-    <button nz-button [nzLoading]="isLoading" (click)="save()"
-      class="ant-btn ant-btn-primary"><span>{{ 'button.save' | translate }}</span></button>
-  </div>
-</form>

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

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

+ 0 - 105
src/app/routes/basedata/work-tasks/add/add.component.ts

@@ -1,105 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { NzModalRef, NzMessageService, NzDrawerRef, NzNotificationService } from 'ng-zorro-antd';
-import { _HttpClient } from '@delon/theme';
-import { FdWorkTasks } from 'app/entity/basedata/fd-work-tasks';
-import { DictService } from 'app/services/dict.service';
-import { FdWorkTasksService } from 'app/services/basedata/fd-work-tasks.service';
-import { I18NService } from '@core';
-import { messageShared } from '@shared/utils/message';
-
-@Component({
-  selector: 'app-basedata-work-tasks-add',
-  templateUrl: './add.component.html',
-  styles: [
-    `
-      .footer {
-        position: absolute;
-        bottom: 0px;
-        width: 100%;
-        border-top: 1px solid rgb(232, 232, 232);
-        padding: 10px 16px;
-        text-align: right;
-        left: 0px;
-        background: #fff;
-      }
-    `
-  ]
-})
-export class BasedataWorkTasksAddComponent implements OnInit {
-  
-
-  constructor(
-    private dictService:DictService,
-    private nzDrawerRef: NzDrawerRef,
-    private fdWorkTasksService:FdWorkTasksService,
-    private nzNotificationService:NzNotificationService,
-    private i18NService:I18NService
-  ) { }
-
-  fdWorkTasks:FdWorkTasks={}
-  isLoading=false;
-  isType=false;
-
-  ngOnInit(): void {
-    this.getTasksType();
-    this.fdWorkTasks={
-      type:this.type,
-      parentId:this.parentId
-    }
-  }
-
-
-  type=null;//主页面传入
-  parentId=null;//主页页面传入
-  /**
-   * 查询工时任务类型
-   */
-  tasksType:any=[]
-  getTasksType(){
-    this.dictService.getByDictCode('work_tasks').then(response => {
-      this.tasksType=response.result
-    });
-  }
-
-  /**
-   * 保存按钮
-   */
-  save(){
-    return new Promise((resolve)=>{
-      this.isLoading=true;
-      this.fdWorkTasksService.add(this.fdWorkTasks).then((response)=>{
-        if (response.success) {
-          this.nzNotificationService.success(this.i18NService.fanyi("insert.success"), "")
-          this.nzDrawerRef.close(true);
-          this.isLoading=false;
-          resolve();
-        } else {
-          this.nzNotificationService.error(this.i18NService.fanyi("insert.defeated"), messageShared(this.i18NService,response.message))
-          this.isLoading=false;
-        }
-      })
-    })
-  }
-
-
-  close() {
-    // let aa=[];
-    // this.nonHourItem.forEach((element,index) => {
-    //   element.key=element.key+"f"
-    //   aa.push({id:element.key,name:element.title,type:"3",parentId:"",sort:index});
-    //   if(element.children){
-    //     element.children.forEach((element2,index2) => {
-    //       element2.key=element2.key+"f"
-    //       aa.push({id:element2.key,name:element2.title,type:"3",parentId:element.key,sort:index2});
-          
-    //     });
-    //   }
-    // });
-    // let ff:any={};
-    // ff.fdWorkTasksList=aa;
-    // this.fdWorkTasksService.addAll(ff).then((response)=>{
-
-    // })
-    this.nzDrawerRef.close();
-  }
-}

+ 0 - 100
src/app/routes/basedata/work-tasks/work-tasks.component.html

@@ -1,100 +0,0 @@
-<page-header [action]="phActionTpl">
-  <ng-template #phActionTpl>
-    <!-- <button (click)="add()" nz-button nzType="primary">新建</button> -->
-  </ng-template>
-</page-header>
-<div nz-row [nzGutter]="24">
-  <!--左边card -->
-  <div nz-col nzMd="24" nzLg="12">
-    <nz-card>
-      <!--按钮操作 -->
-      <div nz-row [nzGutter]="24" style="margin-bottom: 10px;">
-        <div nz-col nzMd="24" nzLg="24">
-          <button (click)="add()" nz-button acl [acl-ability]="'work-tasks:add'"
-            nzType="primary">{{ 'button.leve.one' | translate }}{{ 'contract.class' | translate }}</button>
-        </div>
-      </div>
-      <!-- 搜索框 -->
-      <div nz-row [nzGutter]="24">
-        <div nz-col nzMd="24" nzLg="24">
-          <nz-input-group [nzSuffix]="suffixIcon" style="width:100%">
-            <input type="text" nz-input placeholder="{{ 'placeholder' | translate }}{{ 'contract.class' | translate }}"
-              [(ngModel)]="searchValue" />
-          </nz-input-group>
-          <ng-template #suffixIcon>
-            <i nz-icon type="search"></i>
-          </ng-template>
-        </div>
-      </div>
-      <!-- tree -->
-      <div nz-row [nzGutter]="24">
-        <div nz-col nzMd="24" nzLg="24">
-          <nz-tree [nzData]="nodes" nzCheckable [nzSearchValue]="searchValue" (nzClick)="treeClick($event)"
-            (nzDblClick)="openFolder($event)">
-            <ng-template #contextTemplate>
-              <ul nz-menu nzInDropDown>
-                <li nz-menu-item (click)="addChild()" acl [acl-ability]="'work-tasks:add'">
-                  {{ 'button.add' | translate }}</li>
-                <li nz-menu-item (click)="delete()" acl [acl-ability]="'work-tasks:delete'">
-                  {{ 'table.delete' | translate }}</li>
-                <li nz-menu-item (click)="cancel()">{{ 'button.cancel' | translate }}</li>
-              </ul>
-            </ng-template>
-            <ng-template #nzTreeTemplate let-node>
-              <span class="custom-node">
-                <span *ngIf="!node.isLeaf" (contextmenu)="contextMenu(node,$event, contextTemplate)">
-                  <span class="folder-name">{{ node.title }}</span>
-                </span>
-                <span *ngIf="node.isLeaf" (contextmenu)="contextMenu(node,$event, contextTemplate)">
-                  <span class="file-name">{{ node.title }}</span>
-                </span>
-              </span>
-            </ng-template>
-          </nz-tree>
-        </div>
-      </div>
-
-    </nz-card>
-  </div>
-
-  <!--右边card-->
-  <div nz-col nzMd="24" nzLg="12">
-    <nz-card>
-      <!-- form -->
-      <form nz-form>
-        <nz-form-item>
-          <nz-form-label nzRequired [nzSm]="8" [nzXs]="24">{{ 'working.task' | translate }}</nz-form-label>
-          <nz-form-control [nzSm]="14" [nzXs]="24">
-            <input [(ngModel)]="fdWorkTasks.name" name="name" nz-input
-              placeholder="{{ 'placeholder' | translate }}{{ 'working.task' | translate }}" />
-          </nz-form-control>
-        </nz-form-item>
-
-        <nz-form-item>
-          <nz-form-label nzRequired [nzSm]="8" [nzXs]="24">{{ 'financial.management.type' | translate }}</nz-form-label>
-          <nz-form-control [nzSm]="14" [nzXs]="24">
-            <nz-select style="width: 100%;" [(ngModel)]="fdWorkTasks.type" nzShowSearch
-              nzPlaceHolder="{{'pm.choose'|translate}}" name="type" nzDisabled>
-              <nz-option *ngFor="let type of tasksType" [nzLabel]="type.text" [nzValue]="type.value">
-              </nz-option>
-            </nz-select>
-          </nz-form-control>
-        </nz-form-item>
-        <nz-form-item>
-          <nz-form-label nzRequired [nzSm]="8" [nzXs]="24">{{ 'depart.sort' | translate }}</nz-form-label>
-          <nz-form-control [nzSm]="14" [nzXs]="24">
-            <input [(ngModel)]="fdWorkTasks.sort" name="sort" nz-input
-              placeholder="{{ 'placeholder' | translate }}{{ 'depart.sort' | translate }}" />
-          </nz-form-control>
-        </nz-form-item>
-        <nz-form-item style="margin-bottom:8px;">
-          <nz-form-control [nzSpan]="14" [nzOffset]="8">
-            <button nzType="primary" (click)="reset()" nz-button><span>{{ 'button.reset' | translate }}</span></button>
-            <button nzType="primary" (click)="save()" nz-button acl
-              [acl-ability]="'work-tasks:update'"><span>{{ 'button.save' | translate }}</span></button>
-          </nz-form-control>
-        </nz-form-item>
-      </form>
-    </nz-card>
-  </div>
-</div>

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

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

+ 0 - 192
src/app/routes/basedata/work-tasks/work-tasks.component.ts

@@ -1,192 +0,0 @@
-import { Component, OnInit, ViewChild, TemplateRef } from '@angular/core';
-import { _HttpClient, ModalHelper } from '@delon/theme';
-import { STColumn, STComponent } from '@delon/abc';
-import { SFSchema } from '@delon/form';
-import { FdWorkTasksService } from 'app/services/basedata/fd-work-tasks.service';
-import { BasedataWorkTasksAddComponent } from './add/add.component';
-import { NzDrawerService, NzDropdownContextComponent, NzDropdownService, NzNotificationService, NzTreeNode, NzFormatEmitEvent } from 'ng-zorro-antd';
-import { I18NService } from '@core';
-import { FdWorkTasks } from 'app/entity/basedata/fd-work-tasks';
-import { DictService } from 'app/services/dict.service';
-import { messageShared } from '@shared/utils/message';
-
-@Component({
-  selector: 'app-basedata-work-tasks',
-  templateUrl: './work-tasks.component.html',
-  styles: [
-    `
-
-    .custom-node {
-      cursor: pointer;
-      line-height: 24px;
-      margin-left: 4px;
-      display: inline-block;
-      margin: 0 -1000px;
-      padding: 0 1000px;
-    }
-    `
-  ]
-})
-export class BasedataWorkTasksComponent implements OnInit {
-  searchValue = ''; //搜索框的值
-  nodes: any; //工时任务tree集合
-  constructor(
-    private http: _HttpClient,
-    private modal: ModalHelper,
-    private fdWorkTasksService: FdWorkTasksService,
-    private drawerService: NzDrawerService,
-    private i18NService: I18NService,
-    private nzDropdownService: NzDropdownService,
-    private nzNotificationService:NzNotificationService,
-    private dictService:DictService
-  ) {}
-
-  ngOnInit() {
-    this.getListContractTree();
-    this.getTasksType();
-  }
-
-  fdWorkTasks:FdWorkTasks={}
-
-  //查询tree工时任务
-  getListContractTree() {
-    this.fdWorkTasksService.getListTree().then(response => {
-      this.nodes = response.result;
-    });
-  }
-
-  /**
-   * 新增顶级
-   */
-  add() {
-    const drawerAddDepar = this.drawerService.create({
-      nzTitle: this.i18NService.fanyi('button.add'),
-      nzContent: BasedataWorkTasksAddComponent,
-      nzWidth: '35%',
-      nzContentParams: {
-        // parentId: this.contractClassId//父级id
-      },
-    });
-    //回调 添加完关闭抽屉
-    drawerAddDepar.afterClose.subscribe(clo => {
-      if (clo) {
-        //判断是否刷新树列表数据
-        this.getListContractTree();
-      }
-    });
-  }
-
-  //右键树节点
-  dropdown: NzDropdownContextComponent;
-  fdWorkTasksNode: FdWorkTasks = {};
-  contextMenu(node, $event: MouseEvent, template: TemplateRef<void>): void {
-    // this.contractClassId = Fid;
-    this.fdWorkTasksNode = node.origin;
-    this.dropdown = this.nzDropdownService.create($event, template);
-  }
-
-  //右键取消
-  cancel() {
-    this.dropdown.close();
-  }
-
-  /**
-   * 新增子集
-   */
-  addChild() {
-    this.dropdown.close();
-    console.log(this.fdWorkTasksNode);
-    const drawerAddDepar = this.drawerService.create({
-      nzTitle: this.i18NService.fanyi('button.add'),
-      nzContent: BasedataWorkTasksAddComponent,
-      nzWidth: '35%',
-      nzContentParams: {
-        // parentId: this.contractClassId//父级id
-        type: this.fdWorkTasksNode.type,
-        parentId: this.fdWorkTasksNode.id,
-        isType:true
-      },
-    });
-    //回调 添加完关闭抽屉
-    drawerAddDepar.afterClose.subscribe(clo => {
-      if (clo) {
-        //判断是否刷新树列表数据
-        this.getListContractTree();
-      }
-    });
-  }
-
-  /**
-   * 删除
-   */
-  delete(){
-    this.fdWorkTasksService.delete(this.fdWorkTasksNode.id).then((response)=>{
-      if(response.success){//删除成功
-        this.nzNotificationService.success(this.i18NService.fanyi("successful.deletion"),"");
-        this.getListContractTree();
-        this.dropdown.close();
-      }else{//删除失败
-        this.nzNotificationService.error(this.i18NService.fanyi("delete.failed"),"");
-        this.dropdown.close();
-      }
-    })
-  }
-
-  /**
-   * 查询工时任务类型
-   */
-  tasksType:any=[]
-  getTasksType(){
-    this.dictService.getByDictCode('work_tasks').then(response => {
-      this.tasksType=response.result
-    });
-  }
-
-  /**
-   * 树形点击
-   */
-  isType=false;
-  treeClick(event){
-    this.fdWorkTasks=event.node.origin;
-    console.log(this.fdWorkTasks.parentId)
-    if(this.fdWorkTasks.parentId){
-      this.isType=true;
-    }else{
-      this.isType=false;
-    }
-  }
-
-  //双击节点自动打开树分支
-  openFolder(data: NzTreeNode | Required<NzFormatEmitEvent>): void {
-    if (data instanceof NzTreeNode) {
-      data.isExpanded = !data.isExpanded;
-    } else {
-      const node = data.node;
-      if (node) {
-        node.isExpanded = !node.isExpanded;
-      }
-    }
-  }
-
-  /**
-   * 重置按钮
-   */
-  reset(){
-    this.fdWorkTasks={};
-  }
-
-  /**
-   * 保存按钮
-   */
-  save(){
-    this.fdWorkTasksService.edit(this.fdWorkTasks).then((response)=>{
-      if (response.success) {//修改成功
-        this.nzNotificationService.success(this.i18NService.fanyi("successful.revision"), "")
-        this.getListContractTree();
-      } else {//修改失败
-        this.nzNotificationService.error(this.i18NService.fanyi("modification.failed"),messageShared(this.i18NService,response.message))
-      }
-    })
-  }
-
-}

+ 1 - 0
src/app/routes/dashboard/analysis/analysis.component.ts

@@ -82,6 +82,7 @@ export class DashboardAnalysisComponent implements OnInit {
       });
       this.data = res;
       this.loading = false;
+      
     });
     // this.getCircleChartData();
     // this.feeTotal = `&yen ${this.feeData.reduce((pre, now) => now.y + pre, 0).toFixed(2)}`;