seimin 1 年之前
父节点
当前提交
be3ba80ecd
共有 22 个文件被更改,包括 363 次插入14 次删除
  1. 28 2
      src/app/views/blood-search/blood-search.component.html
  2. 19 0
      src/app/views/blood-search/blood-search.component.ts
  3. 3 3
      src/app/views/data-dictionary/data-dictionary.component.html
  4. 5 0
      src/app/views/data-dictionary/data-dictionary.component.less
  5. 7 0
      src/app/views/data-dictionary/data-dictionary.component.ts
  6. 24 0
      src/app/views/drug-search/drug-search.component.html
  7. 19 0
      src/app/views/drug-search/drug-search.component.ts
  8. 2 2
      src/app/views/hushijiandan/hushijiandan.component.html
  9. 4 0
      src/app/views/hushijiandan/hushijiandan.component.less
  10. 24 0
      src/app/views/inspect-search/inspect-search.component.html
  11. 19 0
      src/app/views/inspect-search/inspect-search.component.ts
  12. 24 0
      src/app/views/jp-search/jp-search.component.html
  13. 19 0
      src/app/views/jp-search/jp-search.component.ts
  14. 25 0
      src/app/views/patient-search/patient-search.component.html
  15. 60 0
      src/app/views/patient-search/patient-search.component.ts
  16. 9 0
      src/app/views/timing-message-sending/timing-message-sending.component.html
  17. 18 1
      src/app/views/timing-message-sending/timing-message-sending.component.less
  18. 33 1
      src/app/views/timing-message-sending/timing-message-sending.component.ts
  19. 1 0
      src/app/views/worker-statistics-detail/worker-statistics-detail.component.html
  20. 11 5
      src/app/views/worker-statistics-detail/worker-statistics-detail.component.ts
  21. 3 0
      src/app/views/worker-statistics/worker-statistics.component.html
  22. 6 0
      src/app/views/worker-statistics/worker-statistics.component.ts

+ 28 - 2
src/app/views/blood-search/blood-search.component.html

@@ -10,6 +10,30 @@
10 10
           <span class="label">发血时间:</span>
11 11
           <nz-range-picker [(ngModel)]="searchCriteria.dateRange"></nz-range-picker>
12 12
         </div>
13
+        <div class="list-template__searchItem">
14
+          <span class="label">状态:</span>
15
+          <nz-select
16
+            [nzDropdownMatchSelectWidth]="false"
17
+            class="formItem"
18
+            nzServerSearch
19
+            nzShowSearch
20
+            nzAllowClear
21
+            nzPlaceHolder="请选择状态"
22
+            [(ngModel)]="searchCriteria.state"
23
+            (nzOpenChange)="changeSearch1($event)"
24
+          >
25
+            <ng-container *ngFor="let data of types">
26
+              <nz-option
27
+                *ngIf="!isLoading1"
28
+                nzLabel="{{ data.name }}"
29
+                nzValue="{{ data.id }}"
30
+              ></nz-option>
31
+            </ng-container>
32
+            <nz-option *ngIf="isLoading1" nzDisabled nzCustomContent>
33
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
34
+            </nz-option>
35
+          </nz-select>
36
+        </div>
13 37
       </div>
14 38
       <div nz-col nzXl="8" class="list-template__btns">
15 39
         <button nz-button class="btn default" (click)='reset()'>重置</button>
@@ -24,10 +48,11 @@
24 48
             <th nzWidth="2%">#</th>
25 49
             <th nzWidth="7%">医嘱号</th>
26 50
             <th nzWidth="7%">血袋号</th>
51
+            <th nzWidth="6%">状态</th>
27 52
             <th nzWidth="7%">申请科室</th>
28 53
             <th nzWidth="7%">血液类型</th>
29
-            <th nzWidth="7%">ABO血型</th>
30
-            <th nzWidth="7%">RH(血型)</th>
54
+            <th nzWidth="4%">ABO血型</th>
55
+            <th nzWidth="4%">RH(血型)</th>
31 56
             <th nzWidth="7%">血量(单位)</th>
32 57
             <th nzWidth="7%">患者姓名(住院号)</th>
33 58
             <th nzWidth="7%">发血时间</th>
@@ -43,6 +68,7 @@
43 68
             <td>{{i+1}}</td>
44 69
             <td>{{ data.applyCode || '无'}}</td>
45 70
             <td>{{ data.bloodCode || '无'}}</td>
71
+            <td>{{ data.state?.name }}</td>
46 72
             <td>{{ data.applyDeptDTO ? data.applyDeptDTO.dept :'无' }}</td>
47 73
             <td>{{ data.type ? data.type.name : "无" }}</td>
48 74
             <td>{{ data.aboType || '无' }}</td>

+ 19 - 0
src/app/views/blood-search/blood-search.component.ts

@@ -17,6 +17,7 @@ export class BloodSearchComponent implements OnInit {
17 17
     //搜索条件
18 18
     bloodCode: "", //血袋号
19 19
     dateRange: [],
20
+    state: null,
20 21
   };
21 22
   deptList = []; // 院区下的配送人员列表(搜索框)
22 23
   hosId;
@@ -31,12 +32,29 @@ export class BloodSearchComponent implements OnInit {
31 32
     });
32 33
     this.getHospital();
33 34
   }
35
+  // 搜索类型
36
+  isLoading1 = false;
37
+  types = []; // 类型列表(搜索框)
38
+  searchTypes() {
39
+    this.isLoading1 = true;
40
+    this.mainService.getDictionary("list", "blood_trans_state").subscribe((res) => {
41
+      this.isLoading1 = false;
42
+      this.types = res;
43
+    });
44
+  }
45
+  // 打开搜索框
46
+  changeSearch1(flag) {
47
+    if (flag) {
48
+      this.searchTypes();
49
+    }
50
+  }
34 51
   // 重置
35 52
   reset() {
36 53
     this.searchCriteria = {
37 54
       //搜索条件
38 55
       bloodCode: "",
39 56
       dateRange: [],
57
+      state: null,
40 58
     };
41 59
     this.getList(1);
42 60
   }
@@ -135,6 +153,7 @@ export class BloodSearchComponent implements OnInit {
135 153
       sum: this.pageSize,
136 154
       blood: {
137 155
         hosId: this.hosId,
156
+        state: this.searchCriteria.state ? { id: this.searchCriteria.state } : undefined,
138 157
       },
139 158
     };
140 159
     if (this.searchCriteria.dateRange.length) {

+ 3 - 3
src/app/views/data-dictionary/data-dictionary.component.html

@@ -95,15 +95,15 @@
95 95
             <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">名称</nz-form-label>
96 96
             <nz-form-control nzErrorTip="请输入名称!">
97 97
               <nz-input-group>
98
-                <input nz-input formControlName="name" placeholder="请输入名称" />
98
+                <input nz-input formControlName="name" placeholder="请输入名称" (input)="changeValue()" />
99 99
               </nz-input-group>
100 100
             </nz-form-control>
101 101
           </nz-form-item>
102 102
           <nz-form-item>
103 103
             <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="value">值</nz-form-label>
104
-            <nz-form-control nzErrorTip="请输入值!">
104
+            <nz-form-control [nzErrorTip]="checkedDictionary.type === 'dictionary' ? '' : '请输入值!'">
105 105
               <nz-input-group>
106
-                <input nz-input formControlName="value" placeholder="请输入值" />
106
+                <input nz-input formControlName="value" placeholder="请输入值" [disabled]="checkedDictionary.type === 'dictionary'" [readonly]="checkedDictionary.type === 'dictionary'" />
107 107
               </nz-input-group>
108 108
             </nz-form-control>
109 109
           </nz-form-item>

+ 5 - 0
src/app/views/data-dictionary/data-dictionary.component.less

@@ -4,6 +4,11 @@
4 4
   height: 100%;
5 5
 }
6 6
 
7
+input[readonly]{
8
+  border: 1px solid #d9d9d9!important;
9
+  background-color: #f5f5f5!important;
10
+}
11
+
7 12
 .groupManagement {
8 13
   width: 100%;
9 14
   height: 100%;

+ 7 - 0
src/app/views/data-dictionary/data-dictionary.component.ts

@@ -236,6 +236,13 @@ export class DataDictionaryComponent implements OnInit {
236 236
 
237 237
   }
238 238
 
239
+  // 数据字典修改name,value自动变化,且value禁止修改
240
+  changeValue(){
241
+    if(this.checkedDictionary.type === 'dictionary'){
242
+      this.validateForm.controls.value.setValue(this.validateForm.value.name);
243
+    }
244
+  }
245
+
239 246
   // 新增/编辑提交
240 247
   submitForm(): void {
241 248
     for (const i in this.validateForm.controls) {

+ 24 - 0
src/app/views/drug-search/drug-search.component.html

@@ -32,6 +32,30 @@
32 32
             </nz-option>
33 33
           </nz-select>
34 34
         </div>
35
+        <div class="list-template__searchItem">
36
+          <span class="label">状态:</span>
37
+          <nz-select
38
+            [nzDropdownMatchSelectWidth]="false"
39
+            class="formItem"
40
+            nzServerSearch
41
+            nzShowSearch
42
+            nzAllowClear
43
+            nzPlaceHolder="请选择状态"
44
+            [(ngModel)]="searchCriteria.drugsState"
45
+            (nzOpenChange)="changeSearch1($event)"
46
+          >
47
+            <ng-container *ngFor="let data of types">
48
+              <nz-option
49
+                *ngIf="!isLoading1"
50
+                nzLabel="{{ data.name }}"
51
+                nzValue="{{ data.id }}"
52
+              ></nz-option>
53
+            </ng-container>
54
+            <nz-option *ngIf="isLoading1" nzDisabled nzCustomContent>
55
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
56
+            </nz-option>
57
+          </nz-select>
58
+        </div>
35 59
       </div>
36 60
       <div nz-col nzXl="8" class="list-template__btns">
37 61
         <button nz-button class="btn default" (click)="showDelModal('您确认要清空药品吗?')" *ngIf="currentUserAccount == 'dsadmin'">清空药品</button>

+ 19 - 0
src/app/views/drug-search/drug-search.component.ts

@@ -18,6 +18,7 @@ export class DrugSearchComponent implements OnInit {
18 18
     packid: "", //请领单号
19 19
     launch: null, //发药科室
20 20
     target: null, //发药科室
21
+    drugsState: null,
21 22
   };
22 23
   deptList = []; // 院区下的配送人员列表(搜索框)
23 24
   hosId;
@@ -87,6 +88,22 @@ export class DrugSearchComponent implements OnInit {
87 88
     }, 100);
88 89
     this.getList(0);
89 90
   }
91
+  // 搜索类型
92
+  isLoading1 = false;
93
+  types = []; // 类型列表(搜索框)
94
+  searchTypes() {
95
+    this.isLoading1 = true;
96
+    this.mainService.getDictionary("list", "drug_state").subscribe((res) => {
97
+      this.isLoading1 = false;
98
+      this.types = res;
99
+    });
100
+  }
101
+  // 打开搜索框
102
+  changeSearch1(flag) {
103
+    if (flag) {
104
+      this.searchTypes();
105
+    }
106
+  }
90 107
   // 重置
91 108
   reset() {
92 109
     this.searchCriteria = {
@@ -94,6 +111,7 @@ export class DrugSearchComponent implements OnInit {
94 111
       packid: "",
95 112
       launch: null,
96 113
       target: null,
114
+      drugsState: null,
97 115
     };
98 116
     this.getList(1);
99 117
   }
@@ -163,6 +181,7 @@ export class DrugSearchComponent implements OnInit {
163 181
       sum: this.pageSize,
164 182
       drugsBag: {
165 183
         hosId: this.hosId,
184
+        drugsState: this.searchCriteria.drugsState ? { id: this.searchCriteria.drugsState } : undefined,
166 185
       },
167 186
     };
168 187
     if (this.searchCriteria.target) {

+ 2 - 2
src/app/views/hushijiandan/hushijiandan.component.html

@@ -2320,14 +2320,14 @@
2320 2320
                           </div>
2321 2321
                           <div
2322 2322
                             *ngIf="isAssign && item.gdState.value == 2"
2323
-                            class="btn flex_1 revocation borderR"
2323
+                            class="btn flex_1 revocation borderR primary"
2324 2324
                             (click)="allotWorker(item.id, item.gdState.id)"
2325 2325
                           >
2326 2326
                             指派
2327 2327
                           </div>
2328 2328
                           <div
2329 2329
                             *ngIf="isAssign && item.gdState.value == 4"
2330
-                            class="btn flex_1 revocation borderR"
2330
+                            class="btn flex_1 revocation borderR primary"
2331 2331
                             (click)="allotWorker(item.id, item.gdState.id, 1)"
2332 2332
                           >
2333 2333
                             指派

+ 4 - 0
src/app/views/hushijiandan/hushijiandan.component.less

@@ -1547,6 +1547,10 @@
1547 1547
                         border-bottom: 0;
1548 1548
                         line-height: 32px;
1549 1549
                         border-radius: 0;
1550
+                        &.primary{
1551
+                          color: #fff;
1552
+                          background-color: @primary-color;
1553
+                        }
1550 1554
                       }
1551 1555
                     }
1552 1556
                   }

+ 24 - 0
src/app/views/inspect-search/inspect-search.component.html

@@ -23,6 +23,30 @@
23 23
             </nz-option>
24 24
           </nz-select>
25 25
         </div>
26
+        <div class="list-template__searchItem">
27
+          <span class="label">状态:</span>
28
+          <nz-select
29
+            [nzDropdownMatchSelectWidth]="false"
30
+            class="formItem"
31
+            nzServerSearch
32
+            nzShowSearch
33
+            nzAllowClear
34
+            nzPlaceHolder="请选择状态"
35
+            [(ngModel)]="searchCriteria.inspectState"
36
+            (nzOpenChange)="changeSearch1($event)"
37
+          >
38
+            <ng-container *ngFor="let data of types">
39
+              <nz-option
40
+                *ngIf="!isLoading1"
41
+                nzLabel="{{ data.name }}"
42
+                nzValue="{{ data.id }}"
43
+              ></nz-option>
44
+            </ng-container>
45
+            <nz-option *ngIf="isLoading1" nzDisabled nzCustomContent>
46
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
47
+            </nz-option>
48
+          </nz-select>
49
+        </div>
26 50
       </div>
27 51
       <div nz-col nzXl="8" class="list-template__btns">
28 52
         <button nz-button class="btn default" (click)='reset()'>重置</button>

+ 19 - 0
src/app/views/inspect-search/inspect-search.component.ts

@@ -18,6 +18,7 @@ export class InspectSearchComponent implements OnInit {
18 18
     inspectCode: "",
19 19
     hospital: null,
20 20
     workerId: null,
21
+    inspectState: null,
21 22
   };
22 23
   workerSearch = []; // 院区下的配送人员列表(搜索框)
23 24
   allHospital: any = []; //院区下拉框
@@ -32,6 +33,22 @@ export class InspectSearchComponent implements OnInit {
32 33
     });
33 34
     this.getAllHospital();
34 35
   }
36
+  // 搜索类型
37
+  isLoading1 = false;
38
+  types = []; // 类型列表(搜索框)
39
+  searchTypes() {
40
+    this.isLoading1 = true;
41
+    this.mainService.getDictionary("list", "inspect_state").subscribe((res) => {
42
+      this.isLoading1 = false;
43
+      this.types = res;
44
+    });
45
+  }
46
+  // 打开搜索框
47
+  changeSearch1(flag) {
48
+    if (flag) {
49
+      this.searchTypes();
50
+    }
51
+  }
35 52
   // 重置
36 53
   reset() {
37 54
     this.searchCriteria = {
@@ -40,6 +57,7 @@ export class InspectSearchComponent implements OnInit {
40 57
       inspectCode: "",
41 58
       hospital: this.allHospital[0] ? this.allHospital[0]["id"] + "" : null,
42 59
       workerId: null,
60
+      inspectState: null,
43 61
     };
44 62
     this.getList(1);
45 63
   }
@@ -113,6 +131,7 @@ export class InspectSearchComponent implements OnInit {
113 131
       patientName: this.searchCriteria.patientName,
114 132
       inspectCode: this.searchCriteria.inspectCode,
115 133
       workerId: this.searchCriteria.workerId,
134
+      inspectState: this.searchCriteria.inspectState || undefined,
116 135
     };
117 136
     this.loading1 = true;
118 137
     this.mainService

+ 24 - 0
src/app/views/jp-search/jp-search.component.html

@@ -32,6 +32,30 @@
32 32
             </nz-option>
33 33
           </nz-select>
34 34
         </div>
35
+        <div class="list-template__searchItem">
36
+          <span class="label">状态:</span>
37
+          <nz-select
38
+            [nzDropdownMatchSelectWidth]="false"
39
+            class="formItem"
40
+            nzServerSearch
41
+            nzShowSearch
42
+            nzAllowClear
43
+            nzPlaceHolder="请选择状态"
44
+            [(ngModel)]="searchCriteria.jpstate"
45
+            (nzOpenChange)="changeSearch1($event)"
46
+          >
47
+            <ng-container *ngFor="let data of types">
48
+              <nz-option
49
+                *ngIf="!isLoading1"
50
+                nzLabel="{{ data.name }}"
51
+                nzValue="{{ data.id }}"
52
+              ></nz-option>
53
+            </ng-container>
54
+            <nz-option *ngIf="isLoading1" nzDisabled nzCustomContent>
55
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
56
+            </nz-option>
57
+          </nz-select>
58
+        </div>
35 59
       </div>
36 60
       <div nz-col nzXl="8" class="list-template__btns">
37 61
         <button nz-button class="btn default" (click)='reset()'>重置</button>

+ 19 - 0
src/app/views/jp-search/jp-search.component.ts

@@ -17,6 +17,7 @@ export class JpSearchComponent implements OnInit {
17 17
     id: "", //静配标识
18 18
     launch: null, //发药科室
19 19
     target: null, //发药科室
20
+    jpstate: null,
20 21
   };
21 22
   deptList = []; // 院区下的配送人员列表(搜索框)
22 23
   hosId;
@@ -31,6 +32,22 @@ export class JpSearchComponent implements OnInit {
31 32
     });
32 33
     this.getHospital();
33 34
   }
35
+  // 搜索类型
36
+  isLoading1 = false;
37
+  types = []; // 类型列表(搜索框)
38
+  searchTypes() {
39
+    this.isLoading1 = true;
40
+    this.mainService.getDictionary("list", "jp_state").subscribe((res) => {
41
+      this.isLoading1 = false;
42
+      this.types = res;
43
+    });
44
+  }
45
+  // 打开搜索框
46
+  changeSearch1(flag) {
47
+    if (flag) {
48
+      this.searchTypes();
49
+    }
50
+  }
34 51
   // 重置
35 52
   reset() {
36 53
     this.searchCriteria = {
@@ -38,6 +55,7 @@ export class JpSearchComponent implements OnInit {
38 55
       id: "",
39 56
       launch: null,
40 57
       target: null,
58
+      jpstate: null,
41 59
     };
42 60
     this.getList(1);
43 61
   }
@@ -107,6 +125,7 @@ export class JpSearchComponent implements OnInit {
107 125
       sum: this.pageSize,
108 126
       jPBag: {
109 127
         hosId: this.hosId,
128
+        jpstate: this.searchCriteria.jpstate ? { id: this.searchCriteria.jpstate } : undefined,
110 129
       },
111 130
     };
112 131
     if (this.searchCriteria.target) {

+ 25 - 0
src/app/views/patient-search/patient-search.component.html

@@ -10,6 +10,31 @@
10 10
           <span class="label">床号:</span>
11 11
           <input nz-input class="formItem" placeholder="请输入床号" [(ngModel)]="searchCriteria.bedNum" />
12 12
         </div>
13
+        <div class="list-template__searchItem">
14
+          <span class="label">当前科室:</span>
15
+          <nz-select
16
+            [nzDropdownMatchSelectWidth]="false"
17
+            class="formItem"
18
+            nzServerSearch
19
+            nzShowSearch
20
+            nzAllowClear
21
+            nzPlaceHolder="请选择当前科室"
22
+            [(ngModel)]="searchCriteria.department"
23
+            (nzOnSearch)="changeInp($event, 'search')"
24
+            (nzOpenChange)="changeSearch($event)"
25
+          >
26
+            <ng-container *ngFor="let data of departmentSearch">
27
+              <nz-option
28
+                *ngIf="!isLoading"
29
+                nzLabel="{{ data.dept }}"
30
+                nzValue="{{ data.id }}"
31
+              ></nz-option>
32
+            </ng-container>
33
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
34
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
35
+            </nz-option>
36
+          </nz-select>
37
+        </div>
13 38
       </div>
14 39
       <div nz-col nzXl="8" class="list-template__btns">
15 40
         <button nz-button class="btn default" (click)='reset()'>重置</button>

+ 60 - 0
src/app/views/patient-search/patient-search.component.ts

@@ -1,6 +1,8 @@
1 1
 import { Component, OnInit } from "@angular/core";
2 2
 import { MainService } from "src/app/services/main.service";
3 3
 import { ToolService } from "src/app/services/tool.service";
4
+import { Subject } from 'rxjs';
5
+import { debounceTime } from 'rxjs/operators';
4 6
 
5 7
 @Component({
6 8
   selector: "app-patient-search",
@@ -15,15 +17,71 @@ export class PatientSearchComponent implements OnInit {
15 17
     patientName: "",
16 18
     bedNum: "",
17 19
     hospital: null,
20
+    department: null,
18 21
   };
19 22
   allHospital: any = []; //院区下拉框
20 23
   listOfData: any[] = []; //表格数据
21 24
   pageIndex: number = 1; //表格当前页码
22 25
   pageSize: number = 10; //表格每页展示条数
23 26
   listLength: number = 10; //表格总数据量
27
+  changeInpSubject = new Subject();
24 28
   ngOnInit() {
29
+    this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
30
+      this.searchDepartment(v[0], v[1]);
31
+    });
25 32
     this.getAllHospital();
26 33
   }
34
+  // 选择院区
35
+  changeHospital(id, type) {
36
+    if (type === "search") {
37
+      this.searchCriteria.department = null;
38
+    }
39
+  }
40
+  // 搜索科室
41
+  departmentSearch = []; // 院区下的科室列表(搜索框)
42
+  deptKey = "";
43
+  isLoading = false;
44
+  searchDepartment(dept, type) {
45
+    let data = {
46
+      department: {
47
+        dept,
48
+        hospital: {
49
+          id: this.searchCriteria.hospital,
50
+        },
51
+      },
52
+      idx: 0,
53
+      sum: 10,
54
+    };
55
+    this.mainService
56
+      .getFetchDataList("data", "department", data)
57
+      .subscribe((data) => {
58
+        if (data.status == 200) {
59
+          if (type === "search") {
60
+            if (this.deptKey === dept) {
61
+              this.isLoading = false;
62
+              this.departmentSearch = data.list;
63
+            }
64
+          }
65
+        }
66
+      });
67
+  }
68
+  changeInp(dept, type) {
69
+    if (!dept) {
70
+      return;
71
+    }
72
+    if (dept === "no") {
73
+      dept = "";
74
+    }
75
+    this.deptKey = dept;
76
+    this.isLoading = true;
77
+    this.changeInpSubject.next([dept, type]);
78
+  }
79
+  // 打开搜索框
80
+  changeSearch(flag) {
81
+    if (flag) {
82
+      this.changeInp("no", "search");
83
+    }
84
+  }
27 85
   // 重置
28 86
   reset() {
29 87
     this.searchCriteria = {
@@ -31,6 +89,7 @@ export class PatientSearchComponent implements OnInit {
31 89
       patientName: "",
32 90
       bedNum: "",
33 91
       hospital: this.allHospital[0] ? this.allHospital[0]["id"] + "" : null,
92
+      department: null,
34 93
     };
35 94
     this.getList(1);
36 95
   }
@@ -65,6 +124,7 @@ export class PatientSearchComponent implements OnInit {
65 124
       hosId: this.searchCriteria.hospital,
66 125
       patientName: this.searchCriteria.patientName,
67 126
       bedNum: this.searchCriteria.bedNum,
127
+      department: this.searchCriteria.department || undefined,
68 128
     };
69 129
     this.loading1 = true;
70 130
     this.mainService.listMsgByMain('listPatient',postData).subscribe((data) => {

+ 9 - 0
src/app/views/timing-message-sending/timing-message-sending.component.html

@@ -143,6 +143,15 @@
143 143
               </nz-select>
144 144
             </nz-form-control>
145 145
           </nz-form-item>
146
+          <nz-form-item>
147
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="content">发送内容</nz-form-label>
148
+            <nz-form-control nzErrorTip="请填写发送内容!" class="textarea">
149
+              <textarea formControlName="content" nz-input rows="6" placeholder="请填写发送内容"></textarea>
150
+              <p>[$各类日期$]可添加<span *ngFor="let item of variableNames1; let last = last;" (click)="writeIn(item, $event)"><strong>{{item}}</strong><em *ngIf="!last">、</em><em *ngIf="last">。</em></span></p>
151
+              <p>[$业务统计$]可添加<span *ngFor="let item of variableNames2; let last = last;" (click)="writeIn(item, $event)"><strong>{{item}}</strong><em *ngIf="!last">、</em><em *ngIf="last">。</em></span></p>
152
+              <p>[$工单数统计$]可添加<span *ngFor="let item of variableNames3; let last = last;" (click)="writeIn(item, $event)"><strong>{{item}}</strong><em *ngIf="!last">、</em><em *ngIf="last">。</em></span></p>
153
+            </nz-form-control>
154
+          </nz-form-item>
146 155
         </form>
147 156
       </overlay-scrollbars>
148 157
       <div class=" display_flex justify-content_flex-center">

+ 18 - 1
src/app/views/timing-message-sending/timing-message-sending.component.less

@@ -10,6 +10,23 @@
10 10
   width: 410px !important;
11 11
 }
12 12
 
13
+.textarea{
14
+  p{
15
+    margin: 0;
16
+    color: #777;
17
+    line-height: 1.5;
18
+    margin-top: 8px;
19
+    strong{
20
+      font-weight: normal;
21
+      cursor: pointer;
22
+      color: #266CA4;
23
+    }
24
+    em{
25
+      font-style: normal;
26
+    }
27
+  }
28
+}
29
+
13 30
 .save {
14 31
   position: fixed;
15 32
   left: 0;
@@ -101,7 +118,7 @@
101 118
   // 新增
102 119
   &.add {
103 120
     .modalBody {
104
-      width: 480px;
121
+      width: 600px;
105 122
       height: auto;
106 123
 
107 124
       .content {

+ 33 - 1
src/app/views/timing-message-sending/timing-message-sending.component.ts

@@ -31,6 +31,9 @@ export class TimingMessageSendingComponent implements OnInit {
31 31
     private tool: ToolService
32 32
   ) {}
33 33
 
34
+  variableNames1 = ['[$当天日期$]', '[$统计日期范围$]',];
35
+  variableNames2 = ['[$配送标本数量$]', '[$服务患者数量$]', '[$配送药品数量$]', '[$配送静配药品数量$]', '[$配送血制品数量$]',];
36
+  variableNames3 = [];
34 37
   userInfo: any = JSON.parse(localStorage.getItem("user")) || {}; //登录用户信息
35 38
   hosId;
36 39
   createUser = "";
@@ -55,10 +58,37 @@ export class TimingMessageSendingComponent implements OnInit {
55 58
 
56 59
   ngOnInit() {
57 60
     this.hosId = this.tool.getCurrentHospital().id;
61
+    this.get_statistics_date_type();
58 62
     this.getList();
59 63
     this.coopBtns = this.tool.initCoopBtns(this.route);
60 64
     this.initForm();
61 65
   }
66
+
67
+  // 统计分类
68
+  get_statistics_date_type() {
69
+    this.mainService
70
+      .getDictionary("list", "statistics_date_type")
71
+      .subscribe((data) => {
72
+        this.variableNames3 = data.map(v => `[$${v.name}$]`);
73
+      });
74
+  }
75
+  // 写入
76
+  writeIn(content, event){
77
+    var element = event.target.parentElement.parentElement.parentElement.querySelector("textarea");
78
+    if (element.selectionStart || element.selectionStart == '0') {
79
+        var startPos = element.selectionStart;
80
+        var endPos = element.selectionEnd;
81
+        this.validateForm.controls.content.setValue(element.value.substring(0, startPos) + content + element.value.substring(endPos));
82
+        element.focus();
83
+        setTimeout(() => {
84
+          element.setSelectionRange(startPos + content.length, startPos + content.length);
85
+        },0)
86
+    } else {
87
+        var val = element.value + content;
88
+        this.validateForm.controls.content.setValue(val);
89
+        element.focus();
90
+    }
91
+  }
62 92
   changeForm(flag) {
63 93
     if (flag) {
64 94
       this.changeInp("no", "form");
@@ -155,6 +185,7 @@ export class TimingMessageSendingComponent implements OnInit {
155 185
       executeTime: [null, [Validators.required]], //定时发送时间
156 186
       active: [false, [Validators.required]], //是否启用
157 187
       userIds: [null, [Validators.required]], //接收人
188
+      content: ['', [Validators.required]], //发送内容
158 189
     });
159 190
   }
160 191
   //修改重复策略
@@ -209,7 +240,7 @@ export class TimingMessageSendingComponent implements OnInit {
209 240
       executeTime: new Date(this.validateForm.value.executeTime).getTime(),
210 241
       userIds: this.validateForm.value.userIds.join(),
211 242
       active: this.validateForm.value.active,
212
-      content: this.dataContent.content,
243
+      content: this.validateForm.value.content,
213 244
       key: this.dataContent.key,
214 245
       id: this.dataContent.id,
215 246
       timeStep: this.validateForm.value.timeStep,
@@ -250,6 +281,7 @@ export class TimingMessageSendingComponent implements OnInit {
250 281
     this.validateForm.controls.executeTime.setValue(new Date(data.executeTime)); //定时发送时间
251 282
     this.validateForm.controls.title.setValue(data.title); //标题
252 283
     this.validateForm.controls.active.setValue(data.active); //是否启用
284
+    this.validateForm.controls.content.setValue(data.content); //发送内容
253 285
     this.timeStepChange(data.timeStep);
254 286
     this.validateForm.controls.timeStep.setValue(data.timeStep); //重复策略
255 287
     if (data.timeStep == "year") {

+ 1 - 0
src/app/views/worker-statistics-detail/worker-statistics-detail.component.html

@@ -3,6 +3,7 @@
3 3
     <div>
4 4
       工单详情
5 5
       <label class="isFiveOrder" nz-checkbox [ngModel]="isFiveOrder" (ngModelChange)="changeIsFiveOrder($event)">执行时长五分钟以内工单</label>
6
+      <label class="isFiveOrder" nz-checkbox [ngModel]="specialClose" (ngModelChange)="changeSpecialClose($event)">特殊关闭工单</label>
6 7
     </div>
7 8
     <i class="icon_transport transport-guanbi" (click)="close()"></i>
8 9
   </div>

+ 11 - 5
src/app/views/worker-statistics-detail/worker-statistics-detail.component.ts

@@ -23,6 +23,7 @@ export class WorkerStatisticsDetailComponent implements OnInit {
23 23
   listLength: number = 0; //总数据条目数
24 24
   pageSize: number = 10; //每页条数
25 25
   isFiveOrder: boolean = false; //是否执行时长五分钟以内工单
26
+  specialClose: boolean = false; //特殊关闭工单
26 27
   constructor(
27 28
     private mainService: MainService,
28 29
     private tool: ToolService,
@@ -46,11 +47,13 @@ export class WorkerStatisticsDetailComponent implements OnInit {
46 47
   changeIsFiveOrder(e: boolean) {
47 48
     this.isFiveOrder = e;
48 49
     this.pageIndex = 1;
49
-    if (e) {
50
-      this.getOrdersByPerson(this.hosId, this.currentPersonId);
51
-    } else {
52
-      this.getOrdersByPerson(this.hosId, this.currentPersonId);
53
-    }
50
+    this.getOrdersByPerson(this.hosId, this.currentPersonId);
51
+  }
52
+  // 是否特殊关闭工单
53
+  changeSpecialClose(e: boolean) {
54
+    this.specialClose = e;
55
+    this.pageIndex = 1;
56
+    this.getOrdersByPerson(this.hosId, this.currentPersonId);
54 57
   }
55 58
   //获取选中配送人员的工单列表
56 59
   getOrdersByPerson(
@@ -68,6 +71,9 @@ export class WorkerStatisticsDetailComponent implements OnInit {
68 71
     if(this.isFiveOrder){
69 72
       postData.difLong = true;
70 73
     }
74
+    if(this.specialClose){
75
+      postData.specialClose = 1;
76
+    }
71 77
     if(this.type === 'workerStatistics'){
72 78
       postData.groupId = this.groupId === 'null' ? undefined : this.groupId;
73 79
       postData.worker = currentPersonId;

+ 3 - 0
src/app/views/worker-statistics/worker-statistics.component.html

@@ -57,6 +57,9 @@
57 57
         </button>
58 58
       </div>
59 59
     </div>
60
+    <div class="list-template__checkBoxes">
61
+      <nz-checkbox-group [(ngModel)]="checkOptionsOne" (ngModelChange)="getList(1, sortCurrentKey, sortCurrentValue)"></nz-checkbox-group>
62
+    </div>
60 63
     <div class="list-template__bottom">
61 64
       <nz-table
62 65
         class="list-template__nzTable"

+ 6 - 0
src/app/views/worker-statistics/worker-statistics.component.ts

@@ -55,6 +55,10 @@ export class WorkerStatisticsComponent implements OnInit {
55 55
   promptInfo: string; //操作结果提示信息
56 56
   promptModalShow: boolean; //操作提示框是否展示
57 57
 
58
+  checkOptionsOne: Array<any> = [
59
+    { label: "特殊关闭不统计积分", value: "1", checked: false },
60
+  ];
61
+
58 62
   // 初始化增删改按钮
59 63
   coopBtns: any = {};
60 64
   searchData: any = {}; // 综合统计页面带过来的参数
@@ -118,6 +122,7 @@ export class WorkerStatisticsComponent implements OnInit {
118 122
       startTime: this.startDate + " " + "00:00:00",
119 123
       endTime: this.endDate + " " + "23:59:59",
120 124
       groupId: this.group || "",
125
+      specialClose: this.checkOptionsOne[0].checked ? 0 : undefined,
121 126
     };
122 127
     if (this.sortCurrentKey && this.sortCurrentValue) {
123 128
       postData[this.sortCurrentKey] = this.sortCurrentValue === "ascend" ? `asc` : `desc`;
@@ -178,6 +183,7 @@ export class WorkerStatisticsComponent implements OnInit {
178 183
       endTime: this.searchData.dateRange.end,
179 184
       hosId: this.searchData.hosId,
180 185
       groupId: this.group || "",
186
+      specialClose: this.checkOptionsOne[0].checked ? 0 : undefined,
181 187
     };
182 188
     if (field && sort) {
183 189
       postData[field] = sort === "ascend" ? `asc` : `desc`;