Bläddra i källkod

绩效基础配置

seimin 11 månader sedan
förälder
incheckning
0ebda61b9b

+ 5 - 0
src/app/views/main/main-routing.module.ts

@@ -458,6 +458,11 @@ const routes: Routes = [
458 458
         path: "batchOutOfStorage",
459 459
         loadChildren: () => import("../medical-waste-batch-out-of-storage/medical-waste-batch-out-of-storage.module").then((m) => m.MedicalWasteBatchOutOfStorageModule),
460 460
       },
461
+      // 绩效基础配置
462
+      {
463
+        path: "performanceAllocation",
464
+        loadChildren: () => import("../performance-allocation/performance-allocation.module").then((m) => m.PerformanceAllocationModule),
465
+      },
461 466
     ],
462 467
   },
463 468
 ];

+ 14 - 0
src/app/views/performance-allocation/performance-allocation-routing.module.ts

@@ -0,0 +1,14 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { PerformanceAllocationComponent } from './performance-allocation.component';
4
+
5
+
6
+const routes: Routes = [
7
+  { path: '', component: PerformanceAllocationComponent }
8
+];
9
+
10
+@NgModule({
11
+  imports: [RouterModule.forChild(routes)],
12
+  exports: [RouterModule]
13
+})
14
+export class PerformanceAllocationRoutingModule { }

+ 49 - 0
src/app/views/performance-allocation/performance-allocation.component.html

@@ -0,0 +1,49 @@
1
+<div class="TaskTypeManagement">
2
+  <div class="taskTypeInfo">
3
+    <div class="top">
4
+      <div class="item" (click)="tabModal('characteristics')" [ngClass]="{'items':tabModalName=='characteristics'}">
5
+        特性配置
6
+      </div>
7
+    </div>
8
+    <div class="list" *ngIf="!loading">
9
+      <!-- 特性配置 -->
10
+      <div *ngIf="tabModalName=='characteristics'">
11
+        <!-- 起点科室绩效计算方式 -->
12
+        <div class="display_flex align-items_center mb8">
13
+          <nz-form-label class="label" nzRequired>起点科室绩效计算方式</nz-form-label>
14
+          <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择" [(ngModel)]="startCalculate">
15
+            <ng-container *ngFor="let data of grade_calculates">
16
+              <nz-option *ngIf="!dLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
17
+            </ng-container>
18
+            <nz-option *ngIf="dLoading" nzDisabled nzCustomContent>
19
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
20
+            </nz-option>
21
+          </nz-select>
22
+        </div>
23
+        <!-- 终点科室绩效计算方式 -->
24
+        <div class="display_flex align-items_center mb8">
25
+          <nz-form-label class="label" nzRequired>终点科室绩效计算方式</nz-form-label>
26
+          <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择" [(ngModel)]="endCalculate">
27
+            <ng-container *ngFor="let data of grade_calculates">
28
+              <nz-option *ngIf="!dLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
29
+            </ng-container>
30
+            <nz-option *ngIf="dLoading" nzDisabled nzCustomContent>
31
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
32
+            </nz-option>
33
+          </nz-select>
34
+        </div>
35
+      </div>
36
+      <div class="bottom">
37
+        <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>
38
+      </div>
39
+    </div>
40
+    <div class="list" *ngIf="loading">
41
+      <div class="loadingFull display_flex justify-content_flex-center align-items_center">
42
+        <div class="loadingFullInner">
43
+          <img src="../../../assets/images/loading.gif" alt="">
44
+          <div>加载中...</div>
45
+        </div>
46
+      </div>
47
+    </div>
48
+  </div>
49
+</div>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1251 - 0
src/app/views/performance-allocation/performance-allocation.component.less


+ 100 - 0
src/app/views/performance-allocation/performance-allocation.component.ts

@@ -0,0 +1,100 @@
1
+import { Component, OnInit } from "@angular/core";
2
+import { ToolService } from 'src/app/services/tool.service';
3
+import { NzMessageService } from 'ng-zorro-antd';
4
+import { PerformanceAllocationService } from './performance-allocation.service';
5
+
6
+@Component({
7
+  selector: "app-performance-allocation",
8
+  templateUrl: "./performance-allocation.component.html",
9
+  styleUrls: ["./performance-allocation.component.less"],
10
+})
11
+export class PerformanceAllocationComponent implements OnInit {
12
+  loading:boolean = false; //页面加载的loading
13
+  btnLoading:boolean = false; //提交按钮的loading
14
+  tabModalName:string = 'characteristics'; //当前选中的tab
15
+  hosId = this.tool.getCurrentHospital().id; //当前院区
16
+
17
+  // 起点科室绩效计算方式
18
+  startCalculate:any = null;
19
+  // 终点科室绩效计算方式
20
+  endCalculate:any = null;
21
+  // 配置
22
+  configs:any = {};
23
+  constructor(private otherPageControlService: PerformanceAllocationService, private tool: ToolService, private msg: NzMessageService) {}
24
+
25
+  ngOnInit():void {
26
+    this.getIntegralCalculationMethod();
27
+  }
28
+
29
+  //获取绩效计算方式
30
+  grade_calculates:any = [];
31
+  dLoading = false;
32
+  getIntegralCalculationMethod() {
33
+    this.dLoading = true;
34
+    this.otherPageControlService
35
+      .getDictionary("grade_calculate")
36
+      .subscribe((data) => {
37
+        this.dLoading = false;
38
+        this.grade_calculates = data;
39
+        this.getConfig();
40
+      });
41
+  }
42
+
43
+  // 切换tab
44
+  tabModal(tabModalName:string){
45
+    this.tabModalName = tabModalName;
46
+  }
47
+
48
+  // 保存
49
+  submitForm() {
50
+    if(!this.startCalculate){
51
+      this.msg.create("warning", "请选择起点科室绩效计算方式!");
52
+      return;
53
+    }
54
+    if(!this.endCalculate){
55
+      this.msg.create("warning", "请选择终点科室绩效计算方式!");
56
+      return;
57
+    }
58
+    let postData:any = {
59
+      id: this.configs.id,
60
+      hosId: this.hosId,
61
+      startCalculate: this.startCalculate ? { id: this.startCalculate } : undefined,
62
+      endCalculate: this.endCalculate ? { id: this.endCalculate } : undefined,
63
+    };
64
+    this.btnLoading = true;
65
+    this.otherPageControlService
66
+      .simplePost("addData", "workOrderGradeBase", postData)
67
+      .subscribe((result) => {
68
+        this.btnLoading = false;
69
+        if (result.status == 200) {
70
+          this.getConfig();
71
+        }
72
+      });
73
+  }
74
+
75
+  // 获取配置
76
+  getConfig() {
77
+    this.loading = true;
78
+    let postData = {
79
+      idx: 0,
80
+      sum: 10,
81
+      workOrderGradeBase: {
82
+        hosId: this.hosId,
83
+      }
84
+    };
85
+    this.otherPageControlService
86
+      .getConfig(postData)
87
+      .subscribe((result) => {
88
+        this.loading = false;
89
+        if (result.status == 200) {
90
+          this.configs = result.list[0] || {};
91
+          let original_dept = this.grade_calculates.find(v => v.value == 'original_dept');
92
+          this.startCalculate = this.configs.startCalculate ? this.configs.startCalculate.id : (original_dept ? original_dept.id : undefined);
93
+          this.endCalculate = this.configs.endCalculate ? this.configs.endCalculate.id : (original_dept ? original_dept.id : undefined);
94
+        }
95
+      });
96
+  }
97
+}
98
+
99
+
100
+

+ 19 - 0
src/app/views/performance-allocation/performance-allocation.module.ts

@@ -0,0 +1,19 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { PerformanceAllocationRoutingModule } from './performance-allocation-routing.module';
5
+import { PerformanceAllocationComponent } from './performance-allocation.component';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+
8
+
9
+@NgModule({
10
+  declarations: [
11
+    PerformanceAllocationComponent,
12
+  ],
13
+  imports: [
14
+    CommonModule,
15
+    PerformanceAllocationRoutingModule,
16
+    ShareModule,
17
+  ]
18
+})
19
+export class PerformanceAllocationModule { }

+ 28 - 0
src/app/views/performance-allocation/performance-allocation.service.ts

@@ -0,0 +1,28 @@
1
+import { Injectable } from '@angular/core';
2
+import { MainService } from 'src/app/services/main.service';
3
+import { map } from 'rxjs/operators';
4
+
5
+@Injectable({
6
+  providedIn: 'root'
7
+})
8
+export class PerformanceAllocationService {
9
+
10
+  constructor(
11
+    private mainService: MainService,
12
+  ) { }
13
+
14
+  // 字典
15
+  getDictionary(type) {
16
+    return this.mainService.getDictionary("list", type);
17
+  }
18
+
19
+  // 获取配置列表
20
+  getConfig(postData) {
21
+    return this.mainService.getFetchDataList("simple/data", "workOrderGradeBase", postData);
22
+  }
23
+
24
+  // simple增删改
25
+  simplePost(type, model, postData) {
26
+    return this.mainService.simplePost(type, model, postData);
27
+  }
28
+}

+ 1 - 1
src/main.ts

@@ -8,7 +8,7 @@ if (environment.production) {
8 8
   enableProdMode();
9 9
   if (window) {
10 10
     window.console.log = function () { };
11
-    console.info('v2.4.59');
11
+    console.info('v2.4.60');
12 12
   }
13 13
 }
14 14
 platformBrowserDynamic().bootstrapModule(AppModule)