Kaynağa Gözat

解决冲突

maotao 2 ay önce
ebeveyn
işleme
7c7cf87fd5
40 değiştirilmiş dosya ile 3091 ekleme ve 161 silme
  1. 5 0
      src/app/app-routing.module.ts
  2. 1 1
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.html
  3. 3 9
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.ts
  4. 23 0
      src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.html
  5. 14 0
      src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.ts
  6. 13 5
      src/app/services/main.service.ts
  7. 5 0
      src/app/services/tool.service.ts
  8. 80 0
      src/app/share/add-inspect-info/add-inspect-info.component.html
  9. 185 0
      src/app/share/add-inspect-info/add-inspect-info.component.less
  10. 178 0
      src/app/share/add-inspect-info/add-inspect-info.component.ts
  11. 71 0
      src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.html
  12. 185 0
      src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.less
  13. 134 0
      src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.ts
  14. 44 0
      src/app/share/edit-inspect-info/edit-inspect-info.component.html
  15. 160 0
      src/app/share/edit-inspect-info/edit-inspect-info.component.less
  16. 71 0
      src/app/share/edit-inspect-info/edit-inspect-info.component.ts
  17. 44 0
      src/app/share/inspect-log-prompt-modal/inspect-log-prompt-modal.component.html
  18. 165 0
      src/app/share/inspect-log-prompt-modal/inspect-log-prompt-modal.component.less
  19. 55 0
      src/app/share/inspect-log-prompt-modal/inspect-log-prompt-modal.component.ts
  20. 37 0
      src/app/share/select-remark/select-remark.component.html
  21. 123 0
      src/app/share/select-remark/select-remark.component.less
  22. 83 0
      src/app/share/select-remark/select-remark.component.ts
  23. 15 0
      src/app/share/share.module.ts
  24. 28 15
      src/app/share/specimen-package-list-modal/specimen-package-list-modal.component.html
  25. 1 1
      src/app/views/batch-inspection/batch-inspection.component.ts
  26. 28 15
      src/app/views/batch-specimen/batch-specimen.component.html
  27. 61 41
      src/app/views/hushijiandan/hushijiandan.component.ts
  28. 18 0
      src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.html
  29. 41 0
      src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.ts
  30. 17 0
      src/app/views/inspect-info-config/inspect-info-config-routing.module.ts
  31. 136 0
      src/app/views/inspect-info-config/inspect-info-config.component.html
  32. 170 0
      src/app/views/inspect-info-config/inspect-info-config.component.less
  33. 468 0
      src/app/views/inspect-info-config/inspect-info-config.component.ts
  34. 17 0
      src/app/views/inspect-info-config/inspect-info-config.module.ts
  35. 52 42
      src/app/views/inspect-search/inspect-search.component.html
  36. 157 7
      src/app/views/inspect-search/inspect-search.component.ts
  37. 53 21
      src/app/views/patient-search/patient-search.component.html
  38. 23 0
      src/app/views/patient-search/patient-search.component.less
  39. 115 3
      src/app/views/patient-search/patient-search.component.ts
  40. 12 1
      src/common.less

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

@@ -202,6 +202,11 @@ const routes: Routes = [
202 202
     path: 'batchInspection',
203 203
     loadChildren: () => import('./views/batch-inspection/batch-inspection.module').then(m => m.BatchInspectionModule),
204 204
   },
205
+  // 陪检信息配置
206
+  {
207
+    path: 'inspectInfoConfig',
208
+    loadChildren: () => import('./views/inspect-info-config/inspect-info-config.module').then(m => m.InspectInfoConfigModule),
209
+  },
205 210
   // 陪检闭环视图
206 211
   {
207 212
     path: 'inspectClosedLoopView',

+ 1 - 1
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.html

@@ -112,7 +112,7 @@
112 112
           </nz-form-control>
113 113
         </nz-form-item>
114 114
         <nz-form-item>
115
-          <nz-form-label [nzSpan]="6" nzRequired nzFor="extra4">默认检查科室</nz-form-label>
115
+          <nz-form-label [nzSpan]="6" nzFor="extra4">默认检查科室</nz-form-label>
116 116
           <nz-form-control [nzSpan]="18" nzErrorTip="请选择默认检查科室!">
117 117
             <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="extra4" nzPlaceHolder="请选择默认检查科室" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeDeptInp($event)" (nzOpenChange)="openChangeDept($event)" (ngModelChange)="setIsSelecting(true)">
118 118
               <ng-container *ngFor="let option of deptList">

+ 3 - 9
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.ts

@@ -101,17 +101,10 @@ export class ConfigurationInspectInspectsComponent implements OnInit {
101 101
 
102 102
     if (this.add) {
103 103
       //增加
104
-      let n = 0;
105
-      if (this.dataList.length > 0) {
106
-        let sortArr = this.dataList.map((item) => Number(item.value));
107
-        n = Math.max.apply(null, sortArr);
108
-      } else {
109
-        n = 0;
110
-      }
111 104
       postData = {
112 105
         // dictionary: {
113 106
           key: "inspect_check_type",
114
-          value: n + 1,
107
+          value: this.validateForm.value.extra6,
115 108
           desc: "检查项目",
116 109
           orders: this.validateForm.value.orders,
117 110
           name: this.validateForm.value.name,
@@ -131,6 +124,7 @@ export class ConfigurationInspectInspectsComponent implements OnInit {
131 124
             orders: this.validateForm.value.orders,
132 125
             name: this.validateForm.value.name,
133 126
             extra6: this.validateForm.value.extra6,
127
+            value: this.validateForm.value.value,
134 128
             extra4: this.validateForm.value.extra4,
135 129
             extra5: this.validateForm.value.extra5,
136 130
             extra7: this.validateForm.value.extra7.toString(),
@@ -164,7 +158,7 @@ export class ConfigurationInspectInspectsComponent implements OnInit {
164 158
       orders: [null, [Validators.required]],
165 159
       name: [null, [Validators.required]],
166 160
       extra6: [null, [Validators.required]],
167
-      extra4: [null, [Validators.required]],
161
+      extra4: [null],
168 162
       extra5: [null, [Validators.required]],
169 163
       extra7: [[]],
170 164
     });

+ 23 - 0
src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.html

@@ -181,6 +181,12 @@
181 181
 								  <nz-form-label class="label">是否默认展开</nz-form-label>
182 182
 								  <nz-checkbox-group [(ngModel)]="speDefaultExpandTube"></nz-checkbox-group>
183 183
 								</div>
184
+
185
+                <!-- 是否空单自动关单 -->
186
+								<div class="display_flex align-items_center mb8">
187
+								  <nz-form-label class="label">是否空单自动关单</nz-form-label>
188
+								  <nz-checkbox-group [(ngModel)]="speAutoCloseEmptyOrder"></nz-checkbox-group>
189
+								</div>
184 190
               </div>
185 191
               <!-- 自动建单配置 -->
186 192
               <div *ngIf="tabModalName=='automaticOrderCreation'">
@@ -418,8 +424,25 @@
418 424
                   <nz-form-label class="label">条码打印尺寸</nz-form-label>
419 425
                   <nz-select class="w320px" nzPlaceHolder="请选择条码打印尺寸" [(ngModel)]="spePackageCodeSize" nzAllowClear>
420 426
                     <nz-option nzLabel="80*80" [nzValue]="1"></nz-option>
427
+                    <nz-option nzLabel="70*50" [nzValue]="2"></nz-option>
421 428
                   </nz-select>
422 429
                 </div>
430
+
431
+                <!-- 是否同时打印试管类型 -->
432
+                <div class="display_flex align-items_center mb8">
433
+                  <nz-form-label class="label">是否同时打印试管类型</nz-form-label>
434
+                  <nz-checkbox-group [(ngModel)]="spePrintTubeType"></nz-checkbox-group>
435
+                </div>
436
+
437
+                <!-- 打印位置 -->
438
+                <div class="display_flex align-items_center mb8">
439
+                  <nz-form-label class="label">打印位置</nz-form-label>
440
+                  <nz-radio-group [(ngModel)]="spePrintPosition">
441
+                    <label nz-radio [nzValue]="1">居左</label>
442
+                    <label nz-radio [nzValue]="2">居中</label>
443
+                    <label nz-radio [nzValue]="3">居右</label>
444
+                  </nz-radio-group>
445
+                </div>
423 446
               </div>
424 447
               <!-- 自动建单配置 -->
425 448
               <div *ngIf="tabModalName=='automaticOrderCreation'">

+ 14 - 0
src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.ts

@@ -45,7 +45,9 @@ export class ConfigurationSpecimenComponent implements OnInit {
45 45
   spePackageTubeIds:any[] = [];// 自动关联试管类型
46 46
   spePackageTubeList:any[] = [];// 自动关联试管类型列表
47 47
   spePackageInventoryTypes:any[] = [{label: '患者', value: 1}, {label: '试管', value: 2}];//清点方式
48
+  spePrintPosition:any = undefined;//打印位置
48 49
   spePackageCreateOrder:any = [{ label:'是否开启', value: 0 }];//生成配送工单
50
+  spePrintTubeType:any = [{ label:'是否开启', value: 0 }];//是否同时打印试管类型
49 51
   spePackageCodeSize:any = undefined;//条码打印尺寸
50 52
 	// 是否允许转派
51 53
 	handoverOrder:any[] = [
@@ -62,6 +64,11 @@ export class ConfigurationSpecimenComponent implements OnInit {
62 64
 	  {label:'是否开启',value: 0}
63 65
 	];
64 66
 
67
+  // 是否空单自动关单
68
+	speAutoCloseEmptyOrder:any[] = [
69
+	  {label:'是否开启',value: 0}
70
+	];
71
+
65 72
   // 工单模式
66 73
   spePackageModelList:any[] = [
67 74
     { label: '一单一包', value: 1 },
@@ -421,6 +428,7 @@ export class ConfigurationSpecimenComponent implements OnInit {
421 428
 			handoverOrder: this.handoverOrder[0].checked ? 1 : 0,
422 429
 			speExpandTube: this.speExpandTube[0].checked ? 1 : 0,
423 430
 			speDefaultExpandTube: this.speDefaultExpandTube[0].checked ? 1 : 0,
431
+			speAutoCloseEmptyOrder: this.speAutoCloseEmptyOrder[0].checked ? 1 : 0,
424 432
 		};
425 433
 		if(this.speCollectLimit[0].checked){
426 434
 			postData.speCollectSupportNotStartDept = this.speCollectSupportNotStartDept[0].checked ? 1 : 0;
@@ -490,7 +498,9 @@ export class ConfigurationSpecimenComponent implements OnInit {
490 498
       spePackageDeptIds: this.spePackageDeptIds.length ? this.spePackageDeptIds.toString() : undefined,
491 499
       spePackageTubeIds: this.spePackageTubeIds.length ? this.spePackageTubeIds.toString() : undefined,
492 500
       spePackageInventoryTypes: this.spePackageInventoryTypes.filter(v => v.checked).map(v => v.value).toString() || undefined,
501
+      spePrintPosition: this.spePrintPosition,
493 502
       spePackageCreateOrder: this.spePackageCreateOrder[0].checked ? 1 : 0,
503
+      spePrintTubeType: this.spePrintTubeType[0].checked ? 1 : 0,
494 504
       spePackageCodeSize: this.spePackageCodeSize || undefined,
495 505
     };
496 506
     this.btnLoading = true;
@@ -642,6 +652,7 @@ export class ConfigurationSpecimenComponent implements OnInit {
642 652
 						this.handoverOrder[0].checked = this.configs.handoverOrder == 1;
643 653
 						this.speExpandTube[0].checked = this.configs.speExpandTube == 1;
644 654
 						this.speDefaultExpandTube[0].checked = this.configs.speDefaultExpandTube == 1;
655
+						this.speAutoCloseEmptyOrder[0].checked = this.configs.speAutoCloseEmptyOrder == 1;
645 656
 						if(this.configs.speCollectLimit == 1){
646 657
 							this.speCollectSupportNotStartDept[0].checked = this.configs.speCollectSupportNotStartDept == 1;
647 658
 							this.speCollectLimitRepeat[0].checked  = this.configs.speCollectLimitRepeat == 1;
@@ -683,7 +694,10 @@ export class ConfigurationSpecimenComponent implements OnInit {
683 694
             this.spePackageTubeIds = this.configs.spePackageTubeIds ? this.configs.spePackageTubeIds.split(',').map(v => +v) : [];
684 695
             this.spePackageInventoryTypes = this.spePackageInventoryTypes.map(v => ({...v, checked: (this.configs.spePackageInventoryTypes || '').split(',').includes(v.value.toString())}));
685 696
             this.spePackageCreateOrder[0].checked = this.configs.spePackageCreateOrder == 1;
697
+            this.spePrintTubeType[0].checked = this.configs.spePrintTubeType == 1;
686 698
             this.spePackageCodeSize = this.configs.spePackageCodeSize || undefined;
699
+
700
+            this.spePrintPosition = this.configs.spePrintPosition;
687 701
 					}
688 702
         }
689 703
       });

+ 13 - 5
src/app/services/main.service.ts

@@ -1223,17 +1223,17 @@ export class MainService {
1223 1223
 		  headers: this.headers,
1224 1224
 		});
1225 1225
 	}
1226
-	
1226
+
1227 1227
 	// 文档管理上传
1228 1228
 	documentImport(folderId, personal): string {
1229 1229
 	  return `${host.host}/document/importFile/${folderId}/${personal}`;
1230 1230
 	}
1231
-	
1231
+
1232 1232
 	// 文档管理更新
1233 1233
 	documentUpdateFile(fileId): string {
1234 1234
 	  return `${host.host}/document/updateFile/${fileId}`;
1235 1235
 	}
1236
-	
1236
+
1237 1237
 	// 文档管理导出
1238 1238
 	documentExport(fileToken): any {
1239 1239
 	  return this.http.post(host.host + `/document/downloadFile/${fileToken}`,{}, {
@@ -1248,14 +1248,22 @@ export class MainService {
1248 1248
 		  headers: this.headers,
1249 1249
 		});
1250 1250
 	}
1251
-	
1251
+
1252
+  // 患者-清空标记
1253
+	clearPatientMark(data = {}){
1254
+		return this.http.post(host.host + `/nurse/inspect/clearPatientMark`, data, {
1255
+		  headers: this.headers,
1256
+		});
1257
+	}
1258
+
1259
+
1252 1260
 	// 调度台删除填写原因
1253 1261
 	delWorkOrderWithReason(id, data){
1254 1262
 		return this.http.post(host.host + `/workerOrder/delWorkOrderWithReason/${id}`, data, {
1255 1263
 		  headers: this.headers,
1256 1264
 		});
1257 1265
 	}
1258
-	
1266
+
1259 1267
 	// 常用耗材缓存刷新
1260 1268
 	resetCache(model){
1261 1269
 		return this.http.post(host.host + `/incident/refresh/cache/${model}`, {}, {

+ 5 - 0
src/app/services/tool.service.ts

@@ -349,6 +349,11 @@ export class ToolService {
349 349
 				case "download":
350 350
 				  coopBtns.download = true; //下载
351 351
 				  break;
352
+        case "removeSign":
353
+				  coopBtns.removeSign = true; //清空标记
354
+				  break;
355
+        case "lookLog":
356
+				  coopBtns.lookLog = true; //查看日志
352 357
 				case "allocation":
353 358
 				  coopBtns.allocation = true; //分配任务
354 359
 				  break;

+ 80 - 0
src/app/share/add-inspect-info/add-inspect-info.component.html

@@ -0,0 +1,80 @@
1
+<div class="modal display_flex justify-content_flex-center align-items_center">
2
+  <div class="modalBody" style="width: 1000px;">
3
+    <div class="title">新增检查信息<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
+    <div class="content">
5
+      <div class="tableWrap">
6
+        <div class="row">
7
+          <div class="formItem flex_1">
8
+            <div class="name"><i class="icon_transport transport-required red"></i>患者信息:</div>
9
+            <div class="value">
10
+              <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="inspectData.patientId" nzShowSearch nzPlaceHolder="请选择患者信息" nzServerSearch (nzOnSearch)="searchPatient($event)" (nzOpenChange)="openPatient($event)" (ngModelChange)="changePatient($event)">
11
+                <ng-container *ngFor="let data of patientList">
12
+                  <nz-option *ngIf="!isLoading" [nzLabel]="data.patientName + '(' + (data.bedNum || '') + ')' + '-' + data.residenceNo" [nzValue]="data.id">
13
+                  </nz-option>
14
+                </ng-container>
15
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
16
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
17
+                </nz-option>
18
+              </nz-select>
19
+            </div>
20
+          </div>
21
+        </div>
22
+
23
+        <div class="row">
24
+          <div class="formItem flex_1">
25
+            <div class="name"><i class="icon_transport transport-required red"></i>检查项目:</div>
26
+            <div class="value">
27
+              <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="inspectData.id" nzShowSearch nzPlaceHolder="请选择检查项目" nzServerSearch (nzOnSearch)="searchInspect($event)" (nzOpenChange)="openInspect($event)" (ngModelChange)="changeInspect($event)">
28
+                <ng-container *ngFor="let data of inspectList">
29
+                  <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id">
30
+                  </nz-option>
31
+                </ng-container>
32
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
33
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
34
+                </nz-option>
35
+              </nz-select>
36
+            </div>
37
+          </div>
38
+        </div>
39
+
40
+        <div class="row">
41
+          <div class="formItem flex_2">
42
+            <div class="name"><i class="icon_transport transport-required red"></i>检查科室:</div>
43
+            <div class="value">
44
+              <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="inspectData.execDeptId" nzPlaceHolder="请选择检查科室">
45
+                <ng-container *ngFor="let data of execDeptList">
46
+                  <nz-option *ngIf="!isLoading" [nzLabel]="data.dept" [nzValue]="data.id">
47
+                  </nz-option>
48
+                </ng-container>
49
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
50
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
51
+                </nz-option>
52
+              </nz-select>
53
+            </div>
54
+          </div>
55
+          <div class="formItem flex_1 justify-content_flex-end">
56
+            检查项目标识:{{inspectData.sign}}
57
+          </div>
58
+          <div class="formItem flex_1 justify-content_flex-end">
59
+            检查类型:{{inspectData.type}}
60
+          </div>
61
+        </div>
62
+
63
+        <div class="row">
64
+          <div class="formItem flex_1">
65
+            <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
66
+            <div class="value">
67
+              <nz-date-picker [(ngModel)]="inspectData.date" [nzAllowClear]="false" [nzShowToday]="false"></nz-date-picker>
68
+              <nz-time-picker class="ml8" nzFormat="HH:mm" [(ngModel)]="inspectData.time" [nzAllowEmpty]="false"></nz-time-picker>
69
+              <button nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">下一日</button>
70
+            </div>
71
+          </div>
72
+        </div>
73
+      </div>
74
+    </div>
75
+    <div class="display_flex justify-content_flex-center">
76
+      <button class="btn" nz-button nzType="primary" (click)="confirmModal()">确认</button>
77
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
78
+    </div>
79
+  </div>
80
+</div>

+ 185 - 0
src/app/share/add-inspect-info/add-inspect-info.component.less

@@ -0,0 +1,185 @@
1
+@import "../../../../src/theme.less";
2
+.transport-required{
3
+  font-size: 10px;
4
+  margin-right: 4px;
5
+  position: relative;
6
+  bottom: 2px;
7
+}
8
+.patient{
9
+  display: flex;
10
+  align-items: center;
11
+  justify-content: space-between;
12
+  height: 56px;
13
+  font-size: 18px;
14
+  padding: 0 24px;
15
+  border-bottom: 1px solid #e5e9ed;
16
+}
17
+.tabs{
18
+  display: flex;
19
+  align-items: center;
20
+  justify-content: space-between;
21
+  height: 45px;
22
+  font-size: 14px;
23
+  border-top: 1px solid #e5e9ed;
24
+  border-bottom: 1px solid #e5e9ed;
25
+  .tab{
26
+    flex: 1;
27
+    display: flex;
28
+    align-items: center;
29
+    justify-content: center;
30
+    height: 100%;
31
+    cursor: pointer;
32
+    &.active{
33
+      background-color: #F0F6ED;
34
+    }
35
+  }
36
+}
37
+.tableWrap{
38
+  padding: 32px 16px;
39
+  .row{
40
+    display: flex;
41
+    align-items: center;
42
+    text-align: left;
43
+    margin-top: 32px;
44
+    &:first-of-type{
45
+      margin-top: 0;
46
+    }
47
+    .formItem{
48
+      display: flex;
49
+      align-items: center;
50
+      justify-content: space-between;
51
+      margin-right: 24px;
52
+      &:last-of-type{
53
+        margin-right: 0;
54
+      }
55
+      .name{}
56
+      .value{
57
+        flex: 1;
58
+      }
59
+    }
60
+  }
61
+}
62
+.modal {
63
+  position: fixed;
64
+  left: 0;
65
+  top: 0;
66
+  width: 100%;
67
+  height: 100%;
68
+  background: rgba(0, 0, 0, 0.4);
69
+  z-index: 999;
70
+  .hospitalTable {
71
+    width: 100%;
72
+    td {
73
+      text-align: center !important;
74
+      position: relative;
75
+      word-break: break-all;
76
+    }
77
+    .thead {
78
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
79
+      th {
80
+        text-align: center !important;
81
+        color: #fff;
82
+        background: transparent;
83
+      }
84
+    }
85
+  }
86
+
87
+  .ji {
88
+    position: absolute;
89
+    right: 0px;
90
+    top: -3px;
91
+    width: 30px;
92
+  }
93
+
94
+  .list-template__top{
95
+    div{
96
+      text-align: left!important;
97
+    }
98
+  }
99
+
100
+  .modalBody {
101
+    width: 700px;
102
+    min-height: 220px;
103
+    background: #fff;
104
+    border-radius: 5px;
105
+    padding: 10px 20px;
106
+    color: #333;
107
+    &.modalBody-search {
108
+      width: 480px;
109
+      min-height: 250px;
110
+    }
111
+
112
+    .title {
113
+      width: 100%;
114
+      text-align: center;
115
+      font-size: 18px;
116
+      position: relative;
117
+
118
+      i {
119
+        position: absolute;
120
+        right: 0;
121
+        top: 0;
122
+        font-size: 20px;
123
+        color: #666;
124
+        cursor: pointer;
125
+        padding: 0 5px;
126
+      }
127
+    }
128
+
129
+    .content {
130
+      background: #f9fafb;
131
+      border: 1px solid #e5e9ed;
132
+      border-radius: 5px;
133
+      overflow: hidden;
134
+      margin-top: 12px;
135
+    }
136
+
137
+    button {
138
+      margin-top: 10px;
139
+
140
+      &.btn {
141
+        margin-left: 8px;
142
+      }
143
+    }
144
+  }
145
+
146
+  // 新增
147
+  &.add {
148
+    .modalBody {
149
+      width: 480px;
150
+      height: auto;
151
+
152
+      .content {
153
+        width: 100%;
154
+        height: auto;
155
+        padding: 18px 14px 0 14px;
156
+
157
+        .addForm {
158
+          .ant-form-item {
159
+            margin-bottom: 15px;
160
+
161
+            .ant-form-item-label {
162
+              line-height: 0;
163
+            }
164
+          }
165
+        }
166
+
167
+        .editForm {
168
+          .ant-form-item {
169
+            margin-bottom: 15px;
170
+
171
+            .ant-form-item-label {
172
+              line-height: 0;
173
+            }
174
+          }
175
+        }
176
+      }
177
+
178
+      button {
179
+        &:nth-child(1) {
180
+          margin-right: 20px;
181
+        }
182
+      }
183
+    }
184
+  }
185
+}

+ 178 - 0
src/app/share/add-inspect-info/add-inspect-info.component.ts

@@ -0,0 +1,178 @@
1
+import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2
+import { MainService } from '../../services/main.service';
3
+import { ToolService } from 'src/app/services/tool.service';
4
+import { startOfDay, format, addDays } from 'date-fns';
5
+import { NzMessageService } from 'ng-zorro-antd';
6
+import { Subject } from "rxjs";
7
+import { debounceTime } from "rxjs/operators";
8
+@Component({
9
+  selector: 'app-add-inspect-info',
10
+  templateUrl: './add-inspect-info.component.html',
11
+  styleUrls: ['./add-inspect-info.component.less']
12
+})
13
+export class AddInspectInfoComponent implements OnInit {
14
+  // 切换科室,切换弹窗
15
+  listOfDisplayData2: any[] = [];
16
+  currentDept; //当前科室
17
+
18
+  hosId;
19
+  hsLoading = false;
20
+
21
+  @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
22
+  @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
23
+
24
+  constructor(
25
+    private mainService: MainService,
26
+    private tool: ToolService,
27
+    private message: NzMessageService,
28
+  ) { }
29
+
30
+  patientDTO:any = {};
31
+  inspectData:any = {
32
+    date: new Date(),
33
+  }; //检查项目
34
+  changeInspectSubject = new Subject(); //防抖
35
+  changePatientSubject = new Subject(); //防抖
36
+
37
+  ngOnInit() {
38
+    //防抖
39
+    this.changeInspectSubject.pipe(debounceTime(500)).subscribe((v) => {
40
+      this.getInspectList(v[0]);
41
+    });
42
+    this.changePatientSubject.pipe(debounceTime(500)).subscribe((v) => {
43
+      this.getPatientList(v[0]);
44
+    });
45
+    this.hosId = this.tool.getCurrentHospital().id;
46
+    this.currentDept = this.tool.getCurrentUserDept();
47
+  }
48
+
49
+  // 确认弹窗
50
+  confirmModal() {
51
+    if(!this.inspectData.patientId){
52
+      this.message.warning('请选择患者!');
53
+      return;
54
+    }
55
+    if(!this.inspectData.id){
56
+      this.message.warning('请选择检查项目!');
57
+      return;
58
+    }
59
+    if(!this.inspectData.execDeptId){
60
+      this.message.warning('请选择检查科室!');
61
+      return;
62
+    }
63
+    if(!this.inspectData.date){
64
+      this.message.warning('请选择预约时间!');
65
+      return;
66
+    }
67
+    if(!this.inspectData.time){
68
+      this.message.warning('请选择预约时间!');
69
+      return;
70
+    }
71
+    this.confirmModelHs.emit(JSON.stringify({ show: false, inspectData: this.inspectData, patientDTO: this.patientDTO }));//emits(向上弹射)事件
72
+  }
73
+
74
+  changePatient(e){
75
+    this.patientDTO = this.patientList.find(v => v.id == this.inspectData.patientId) || {};
76
+  }
77
+
78
+  // 关闭弹窗
79
+  hideModal() {
80
+    this.closeModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
81
+  }
82
+
83
+  // 下一日
84
+  nextDay() {
85
+    this.inspectData.date = addDays(this.inspectData.date, 1);
86
+  }
87
+
88
+  isLoading = false;
89
+  inspectList: Array<any>; //检查项目列表
90
+  // 获取检查项目
91
+  getInspectList(keyword = '') {
92
+    let postData = {
93
+      dictionary: {
94
+        key: "inspect_check_type",
95
+        name: keyword || undefined,
96
+      },
97
+      idx: 0,
98
+      sum: 9999,
99
+    };
100
+    this.isLoading = true;
101
+    this.mainService
102
+      .getFetchDataList("simple/data", "dictionary", postData)
103
+      .subscribe((data) => {
104
+        this.isLoading = false;
105
+        this.inspectList = data.list || [];
106
+      });
107
+  }
108
+
109
+  // 边输边搜节流阀
110
+  searchInspect(e) {
111
+    this.isLoading = true;
112
+    this.changeInspectSubject.next([e]);
113
+  }
114
+
115
+  // 修改检查项目
116
+  inspectDTO:any = {};
117
+  execDeptList:any[] = [];
118
+  changeInspect(id){
119
+    this.inspectDTO = this.inspectList.find(v => v.id == id);
120
+    if(this.inspectDTO){
121
+      this.inspectData.id = this.inspectDTO.id;
122
+      this.execDeptList = this.inspectDTO.deptList || [];
123
+      this.inspectData.execDeptId = this.execDeptList.length === 1 ? this.execDeptList[0].id : undefined;
124
+      this.inspectData.sign = this.inspectDTO.extra6 || '';
125
+      this.inspectData.type = this.inspectDTO.extra5DTO ? this.inspectDTO.extra5DTO.name : '';
126
+    }else{
127
+      this.inspectData.id = undefined;
128
+      this.inspectData.execDeptId= undefined;
129
+      this.execDeptList = [];
130
+      this.inspectData.sign = '';
131
+      this.inspectData.type = '';
132
+    }
133
+  }
134
+
135
+  // 打开班次
136
+  openInspect(e){
137
+    if(e){
138
+      this.getInspectList();
139
+    }
140
+  }
141
+
142
+  // =========================患者=====================
143
+  patientList: Array<any>; //检查项目列表
144
+  // 获取检查项目
145
+  getPatientList(keyword = '') {
146
+    let postData = {
147
+      idx: 0,
148
+      sum: 10,
149
+      hosId: this.hosId,
150
+      patientName: keyword || undefined,
151
+      hasBedNum: 1,//有床号
152
+    };
153
+    this.isLoading = true;
154
+    this.mainService
155
+      .listMsgByMain('listPatient',postData)
156
+      .subscribe((data:any) => {
157
+        this.isLoading = false;
158
+        this.patientList = data.list || [];
159
+      });
160
+  }
161
+
162
+  // 边输边搜节流阀
163
+  searchPatient(e) {
164
+    this.isLoading = true;
165
+    this.changePatientSubject.next([e]);
166
+  }
167
+
168
+  // 打开
169
+  openPatient(e){
170
+    if(e){
171
+      this.getPatientList();
172
+    }
173
+  }
174
+  // =========================患者=====================
175
+}
176
+
177
+
178
+

+ 71 - 0
src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.html

@@ -0,0 +1,71 @@
1
+<div class="modal display_flex justify-content_flex-center align-items_center">
2
+  <div class="modalBody" style="width: 1000px;">
3
+    <div class="title">追加检查项目<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
+    <div class="content">
5
+      <div class="patient">
6
+        <span>患者姓名:{{patientDTO.patientName}}</span>
7
+        <span *ngIf="patientDTO.patientType && patientDTO.patientType.value == 'I'">住院号:{{patientDTO.patientCode}}({{patientDTO.bedNum}})</span>
8
+        <span *ngIf="patientDTO.patientType && patientDTO.patientType.value == 'O'">门诊号:{{patientDTO.patientCode}}</span>
9
+        <span *ngIf="patientDTO.patientType && patientDTO.patientType.value == 'E'">急诊号:{{patientDTO.patientCode}}</span>
10
+        <span>护理级别:{{patientDTO.careLevel?.name}}</span>
11
+        <span>危重等级:{{patientDTO.illnessState?.name}}</span>
12
+      </div>
13
+      <div class="tableWrap">
14
+        <div class="row">
15
+          <div class="formItem flex_1">
16
+            <div class="name"><i class="icon_transport transport-required red"></i>检查项目:</div>
17
+            <div class="value">
18
+              <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="inspectData.id" nzShowSearch nzPlaceHolder="请选择检查项目" nzServerSearch (nzOnSearch)="searchInspect($event)" (nzOpenChange)="openInspect($event)" (ngModelChange)="changeInspect($event)">
19
+                <ng-container *ngFor="let data of inspectList">
20
+                  <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id">
21
+                  </nz-option>
22
+                </ng-container>
23
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
24
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
25
+                </nz-option>
26
+              </nz-select>
27
+            </div>
28
+          </div>
29
+        </div>
30
+
31
+        <div class="row">
32
+          <div class="formItem flex_2">
33
+            <div class="name"><i class="icon_transport transport-required red"></i>检查科室:</div>
34
+            <div class="value">
35
+              <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="inspectData.execDeptId" nzPlaceHolder="请选择检查科室">
36
+                <ng-container *ngFor="let data of execDeptList">
37
+                  <nz-option *ngIf="!isLoading" [nzLabel]="data.dept" [nzValue]="data.id">
38
+                  </nz-option>
39
+                </ng-container>
40
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
41
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
42
+                </nz-option>
43
+              </nz-select>
44
+            </div>
45
+          </div>
46
+          <div class="formItem flex_1 justify-content_flex-end">
47
+            检查项目标识:{{inspectData.sign}}
48
+          </div>
49
+          <div class="formItem flex_1 justify-content_flex-end">
50
+            检查类型:{{inspectData.type}}
51
+          </div>
52
+        </div>
53
+
54
+        <div class="row">
55
+          <div class="formItem flex_1">
56
+            <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
57
+            <div class="value">
58
+              <nz-date-picker [(ngModel)]="inspectData.date" [nzAllowClear]="false" [nzShowToday]="false"></nz-date-picker>
59
+              <nz-time-picker class="ml8" nzFormat="HH:mm" [(ngModel)]="inspectData.time" [nzAllowEmpty]="false"></nz-time-picker>
60
+              <button nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">下一日</button>
61
+            </div>
62
+          </div>
63
+        </div>
64
+      </div>
65
+    </div>
66
+    <div class="display_flex justify-content_flex-center">
67
+      <button class="btn" nz-button nzType="primary" (click)="confirmModal()">确认</button>
68
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
69
+    </div>
70
+  </div>
71
+</div>

+ 185 - 0
src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.less

@@ -0,0 +1,185 @@
1
+@import "../../../../src/theme.less";
2
+.transport-required{
3
+  font-size: 10px;
4
+  margin-right: 4px;
5
+  position: relative;
6
+  bottom: 2px;
7
+}
8
+.patient{
9
+  display: flex;
10
+  align-items: center;
11
+  justify-content: space-between;
12
+  height: 56px;
13
+  font-size: 18px;
14
+  padding: 0 24px;
15
+  border-bottom: 1px solid #e5e9ed;
16
+}
17
+.tabs{
18
+  display: flex;
19
+  align-items: center;
20
+  justify-content: space-between;
21
+  height: 45px;
22
+  font-size: 14px;
23
+  border-top: 1px solid #e5e9ed;
24
+  border-bottom: 1px solid #e5e9ed;
25
+  .tab{
26
+    flex: 1;
27
+    display: flex;
28
+    align-items: center;
29
+    justify-content: center;
30
+    height: 100%;
31
+    cursor: pointer;
32
+    &.active{
33
+      background-color: #F0F6ED;
34
+    }
35
+  }
36
+}
37
+.tableWrap{
38
+  padding: 32px 16px;
39
+  .row{
40
+    display: flex;
41
+    align-items: center;
42
+    text-align: left;
43
+    margin-top: 32px;
44
+    &:first-of-type{
45
+      margin-top: 0;
46
+    }
47
+    .formItem{
48
+      display: flex;
49
+      align-items: center;
50
+      justify-content: space-between;
51
+      margin-right: 24px;
52
+      &:last-of-type{
53
+        margin-right: 0;
54
+      }
55
+      .name{}
56
+      .value{
57
+        flex: 1;
58
+      }
59
+    }
60
+  }
61
+}
62
+.modal {
63
+  position: fixed;
64
+  left: 0;
65
+  top: 0;
66
+  width: 100%;
67
+  height: 100%;
68
+  background: rgba(0, 0, 0, 0.4);
69
+  z-index: 999;
70
+  .hospitalTable {
71
+    width: 100%;
72
+    td {
73
+      text-align: center !important;
74
+      position: relative;
75
+      word-break: break-all;
76
+    }
77
+    .thead {
78
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
79
+      th {
80
+        text-align: center !important;
81
+        color: #fff;
82
+        background: transparent;
83
+      }
84
+    }
85
+  }
86
+
87
+  .ji {
88
+    position: absolute;
89
+    right: 0px;
90
+    top: -3px;
91
+    width: 30px;
92
+  }
93
+
94
+  .list-template__top{
95
+    div{
96
+      text-align: left!important;
97
+    }
98
+  }
99
+
100
+  .modalBody {
101
+    width: 700px;
102
+    min-height: 220px;
103
+    background: #fff;
104
+    border-radius: 5px;
105
+    padding: 10px 20px;
106
+    color: #333;
107
+    &.modalBody-search {
108
+      width: 480px;
109
+      min-height: 250px;
110
+    }
111
+
112
+    .title {
113
+      width: 100%;
114
+      text-align: center;
115
+      font-size: 18px;
116
+      position: relative;
117
+
118
+      i {
119
+        position: absolute;
120
+        right: 0;
121
+        top: 0;
122
+        font-size: 20px;
123
+        color: #666;
124
+        cursor: pointer;
125
+        padding: 0 5px;
126
+      }
127
+    }
128
+
129
+    .content {
130
+      background: #f9fafb;
131
+      border: 1px solid #e5e9ed;
132
+      border-radius: 5px;
133
+      overflow: hidden;
134
+      margin-top: 12px;
135
+    }
136
+
137
+    button {
138
+      margin-top: 10px;
139
+
140
+      &.btn {
141
+        margin-left: 8px;
142
+      }
143
+    }
144
+  }
145
+
146
+  // 新增
147
+  &.add {
148
+    .modalBody {
149
+      width: 480px;
150
+      height: auto;
151
+
152
+      .content {
153
+        width: 100%;
154
+        height: auto;
155
+        padding: 18px 14px 0 14px;
156
+
157
+        .addForm {
158
+          .ant-form-item {
159
+            margin-bottom: 15px;
160
+
161
+            .ant-form-item-label {
162
+              line-height: 0;
163
+            }
164
+          }
165
+        }
166
+
167
+        .editForm {
168
+          .ant-form-item {
169
+            margin-bottom: 15px;
170
+
171
+            .ant-form-item-label {
172
+              line-height: 0;
173
+            }
174
+          }
175
+        }
176
+      }
177
+
178
+      button {
179
+        &:nth-child(1) {
180
+          margin-right: 20px;
181
+        }
182
+      }
183
+    }
184
+  }
185
+}

+ 134 - 0
src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.ts

@@ -0,0 +1,134 @@
1
+import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2
+import { MainService } from '../../services/main.service';
3
+import { ToolService } from 'src/app/services/tool.service';
4
+import { startOfDay, format, addDays } from 'date-fns';
5
+import { NzMessageService } from 'ng-zorro-antd';
6
+import { Subject } from "rxjs";
7
+import { debounceTime } from "rxjs/operators";
8
+@Component({
9
+  selector: 'app-add-inspect-three-modal',
10
+  templateUrl: './add-inspect-three-modal.component.html',
11
+  styleUrls: ['./add-inspect-three-modal.component.less']
12
+})
13
+export class AddInspectThreeModalComponent implements OnInit {
14
+  // 切换科室,切换弹窗
15
+  listOfDisplayData2: any[] = [];
16
+  currentDept; //当前科室
17
+
18
+  hosId;
19
+  hsLoading = false;
20
+
21
+  @Input() patientDTO: any;
22
+  @Input() deptDisplay: any;
23
+
24
+  @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
25
+  @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
26
+
27
+  constructor(
28
+    private mainService: MainService,
29
+    private tool: ToolService,
30
+    private message: NzMessageService,
31
+  ) { }
32
+
33
+  inspectData:any = {
34
+    date: new Date(),
35
+  }; //检查项目
36
+  changeInspectSubject = new Subject(); //防抖
37
+
38
+  ngOnInit() {
39
+    //防抖
40
+    this.changeInspectSubject.pipe(debounceTime(500)).subscribe((v) => {
41
+      this.getInspectList(v[0]);
42
+    });
43
+    this.hosId = this.tool.getCurrentHospital().id;
44
+    this.currentDept = this.tool.getCurrentUserDept();
45
+  }
46
+
47
+  // 确认弹窗
48
+  confirmModal() {
49
+    if(!this.inspectData.id){
50
+      this.message.warning('请选择检查项目!');
51
+      return;
52
+    }
53
+    if(!this.inspectData.execDeptId){
54
+      this.message.warning('请选择检查科室!');
55
+      return;
56
+    }
57
+    if(!this.inspectData.date){
58
+      this.message.warning('请选择预约时间!');
59
+      return;
60
+    }
61
+    if(!this.inspectData.time){
62
+      this.message.warning('请选择预约时间!');
63
+      return;
64
+    }
65
+    this.confirmModelHs.emit(JSON.stringify({ show: false, inspectData: this.inspectData }));//emits(向上弹射)事件
66
+  }
67
+
68
+  // 关闭弹窗
69
+  hideModal() {
70
+    this.closeModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
71
+  }
72
+
73
+  // 下一日
74
+  nextDay() {
75
+    this.inspectData.date = addDays(this.inspectData.date, 1);
76
+  }
77
+
78
+  isLoading = false;
79
+  inspectList: Array<any>; //检查项目列表
80
+  // 获取检查项目
81
+  getInspectList(keyword = '') {
82
+    let postData = {
83
+      dictionary: {
84
+        key: "inspect_check_type",
85
+        keyword: keyword || undefined,
86
+      },
87
+      idx: 0,
88
+      sum: 9999,
89
+    };
90
+    this.isLoading = true;
91
+    this.mainService
92
+      .getFetchDataList("simple/data", "dictionary", postData)
93
+      .subscribe((data) => {
94
+        this.isLoading = false;
95
+        this.inspectList = data.list || [];
96
+      });
97
+  }
98
+
99
+  // 边输边搜节流阀
100
+  searchInspect(e) {
101
+    this.isLoading = true;
102
+    this.changeInspectSubject.next([e]);
103
+  }
104
+
105
+  // 修改检查项目
106
+  inspectDTO:any = {};
107
+  execDeptList:any[] = [];
108
+  changeInspect(id){
109
+    this.inspectDTO = this.inspectList.find(v => v.id == id);
110
+    if(this.inspectDTO){
111
+      this.inspectData.id = this.inspectDTO.id;
112
+      this.execDeptList = this.inspectDTO.deptList || [];
113
+      this.inspectData.execDeptId = this.execDeptList.length === 1 ? this.execDeptList[0].id : undefined;
114
+      this.inspectData.sign = this.inspectDTO.extra6 || '';
115
+      this.inspectData.type = this.inspectDTO.extra5DTO ? this.inspectDTO.extra5DTO.name : '';
116
+    }else{
117
+      this.inspectData.id = undefined;
118
+      this.inspectData.execDeptId= undefined;
119
+      this.execDeptList = [];
120
+      this.inspectData.sign = '';
121
+      this.inspectData.type = '';
122
+    }
123
+  }
124
+
125
+  // 打开班次
126
+  openInspect(e){
127
+    if(e){
128
+      this.getInspectList();
129
+    }
130
+  }
131
+}
132
+
133
+
134
+

+ 44 - 0
src/app/share/edit-inspect-info/edit-inspect-info.component.html

@@ -0,0 +1,44 @@
1
+<div class="save add display_flex align-items_center justify-content_flex-center">
2
+  <div class="modalBody">
3
+    <div class="title">修改检查信息<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
4
+    </div>
5
+    <div class="content">
6
+      <div class="addForm">
7
+        <div class="row">
8
+          <div class="formItem flex_1">
9
+            <div class="name"><i class="icon_transport transport-required red"></i>检查科室:</div>
10
+            <div class="value">
11
+              <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="deptId" nzPlaceHolder="请选择检查科室">
12
+                <ng-container *ngFor="let data of deptList">
13
+                  <nz-option *ngIf="!isLoading" [nzLabel]="data.dept" [nzValue]="data.id">
14
+                  </nz-option>
15
+                </ng-container>
16
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
17
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
18
+                </nz-option>
19
+              </nz-select>
20
+            </div>
21
+          </div>
22
+        </div>
23
+
24
+        <div class="row">
25
+          <div class="formItem flex_1">
26
+            <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
27
+            <div class="value">
28
+              <nz-date-picker [(ngModel)]="yyDate" [nzShowToday]="false"></nz-date-picker>
29
+              <nz-time-picker [nzDisabled]="!yyDate" class="ml8" nzFormat="HH:mm" [(ngModel)]="yyTime" [nzAllowEmpty]="false">
30
+              </nz-time-picker>
31
+              <button [disabled]="!yyDate" nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">
32
+                下一日
33
+              </button>
34
+            </div>
35
+          </div>
36
+        </div>
37
+      </div>
38
+    </div>
39
+    <div class="display_flex justify-content_flex-center">
40
+      <button nzType="primary" nz-button (click)="submitForm()">确认</button>
41
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
42
+    </div>
43
+  </div>
44
+</div>

+ 160 - 0
src/app/share/edit-inspect-info/edit-inspect-info.component.less

@@ -0,0 +1,160 @@
1
+.yyTimeError {
2
+  ::ng-deep .ant-time-picker-input,
3
+  ::ng-deep .ant-calendar-picker-input {
4
+    border: 1px solid red !important;
5
+  }
6
+}
7
+.transport-required{
8
+  font-size: 10px;
9
+  margin-right: 4px;
10
+  position: relative;
11
+  bottom: 2px;
12
+}
13
+.row{
14
+  display: flex;
15
+  align-items: center;
16
+  text-align: left;
17
+  margin-top: 32px;
18
+  &:first-of-type{
19
+    margin-top: 0;
20
+  }
21
+  .formItem{
22
+    display: flex;
23
+    align-items: center;
24
+    justify-content: space-between;
25
+    margin-right: 24px;
26
+    &:last-of-type{
27
+      margin-right: 0;
28
+    }
29
+    .name{}
30
+    .value{
31
+      flex: 1;
32
+    }
33
+  }
34
+}
35
+.save {
36
+  position: fixed;
37
+  left: 0;
38
+  top: 0;
39
+  width: 100%;
40
+  height: 100%;
41
+  background: rgba(0, 0, 0, 0.4);
42
+  z-index: 999;
43
+
44
+  .modalBody {
45
+    width: 350px;
46
+    background: #fff;
47
+    border-radius: 5px;
48
+    padding: 10px 20px;
49
+    color: #333;
50
+
51
+    .title {
52
+      width: 100%;
53
+      text-align: center;
54
+      font-size: 18px;
55
+      position: relative;
56
+
57
+      i {
58
+        position: absolute;
59
+        right: 0;
60
+        top: 0;
61
+        font-size: 20px;
62
+        color: #666;
63
+        cursor: pointer;
64
+        padding: 0 5px;
65
+      }
66
+    }
67
+
68
+    .content {
69
+      width: 100%;
70
+      height: 117px;
71
+      background: #f9fafb;
72
+      border: 1px solid #e5e9ed;
73
+      border-radius: 5px;
74
+      overflow: hidden;
75
+      margin-top: 12px;
76
+
77
+      .tips{
78
+        margin-bottom: 19px;
79
+      }
80
+
81
+      div {
82
+        &.icon {
83
+          margin-top: 17px;
84
+
85
+          i {
86
+            color: #34b349;
87
+            font-size: 30px !important;
88
+
89
+            &.transport-wenhao {
90
+              color: #f5a523;
91
+            }
92
+
93
+            &.transport-shibai {
94
+              color: #ff3a52;
95
+            }
96
+          }
97
+        }
98
+
99
+        &.defeat {
100
+          color: #333;
101
+          font-size: 16px;
102
+        }
103
+
104
+        &:nth-child(3) {
105
+          font-size: 14px;
106
+          color: #666;
107
+        }
108
+      }
109
+    }
110
+
111
+    button {
112
+      margin-top: 10px;
113
+
114
+      &.btn {
115
+        margin-left: 8px;
116
+      }
117
+    }
118
+  }
119
+
120
+  // 新增
121
+  &.add {
122
+    .modalBody {
123
+      width: 560px;
124
+      height: auto;
125
+
126
+      .content {
127
+        width: 100%;
128
+        height: auto;
129
+        padding: 32px 16px;
130
+        max-height: 500px;
131
+        overflow-y: auto;
132
+
133
+        .addForm {
134
+          .ant-form-item {
135
+            margin-bottom: 14px;
136
+
137
+            .ant-form-item-label {
138
+              line-height: 14px;
139
+              text-align: left;
140
+            }
141
+          }
142
+        }
143
+
144
+        .editForm {
145
+          .ant-form-item {
146
+            margin-bottom: 14px;
147
+
148
+            .ant-form-item-label {
149
+              line-height: 0;
150
+            }
151
+          }
152
+        }
153
+      }
154
+
155
+      button:nth-child(1) {
156
+        margin-right: 20px;
157
+      }
158
+    }
159
+  }
160
+}

+ 71 - 0
src/app/share/edit-inspect-info/edit-inspect-info.component.ts

@@ -0,0 +1,71 @@
1
+import { Component, OnInit, Output, Input } from '@angular/core';
2
+import { EventEmitter } from '@angular/core';
3
+import { NzMessageService } from 'ng-zorro-antd';
4
+import { addDays, startOfMinute, format } from 'date-fns';
5
+
6
+@Component({
7
+  selector: 'app-edit-inspect-info',
8
+  templateUrl: './edit-inspect-info.component.html',
9
+  styleUrls: ['./edit-inspect-info.component.less']
10
+})
11
+
12
+export class EditInspectInfoComponent implements OnInit {
13
+  @Input() date:any;
14
+  @Input() execDeptId:any;
15
+  @Input() execDeptList:any[] = [];
16
+  @Output() submitFormHand = new EventEmitter();
17
+  @Output() cancelFlagHand = new EventEmitter();
18
+  yyDate = null; //预约日期-患者其他服务
19
+  yyTime = null; //预约时间-患者其他服务
20
+  deptId = null;
21
+  deptList:any[] = [];
22
+  isLoading:boolean = false;
23
+  constructor(
24
+    private message: NzMessageService,
25
+  ) { }
26
+
27
+  ngOnInit() {
28
+    if(this.date){
29
+      this.yyDate = new Date(this.date);
30
+      this.yyTime = new Date(this.date);
31
+    }
32
+
33
+    if(this.execDeptList){
34
+      this.deptList = this.execDeptList;
35
+    }
36
+
37
+    if(this.execDeptId){
38
+      let flag = this.deptList.some(v => v.id == this.execDeptId);
39
+      if(flag){
40
+        this.deptId = this.execDeptId;
41
+      }
42
+    }
43
+  }
44
+
45
+  // 下一日(患者其他服务)
46
+  nextDay() {
47
+    this.yyDate = addDays(this.yyDate, 1);
48
+  }
49
+
50
+  // 隐藏模态框
51
+  hideModal() {
52
+    this.cancelFlagHand.emit(false)
53
+  }
54
+
55
+  // 表单提交
56
+  submitForm(): void {
57
+    if(!this.deptId) {
58
+      this.message.warning('请选择检查科室!');
59
+      return;
60
+    }
61
+    if(!this.yyDate || !this.yyTime) {
62
+      this.message.warning('请选择完整预约时间!');
63
+      return;
64
+    }
65
+    this.submitFormHand.emit({
66
+      deptId: this.deptId,
67
+      date: format(this.yyDate, 'yyyy-MM-dd') + ' ' + format(startOfMinute(this.yyTime), 'HH:mm:ss'),
68
+    });
69
+  }
70
+}
71
+

+ 44 - 0
src/app/share/inspect-log-prompt-modal/inspect-log-prompt-modal.component.html

@@ -0,0 +1,44 @@
1
+<div class="modal display_flex justify-content_flex-center align-items_center" *ngIf="show">
2
+  <div class="modalBody">
3
+    <div class="title">
4
+      日志<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
5
+    </div>
6
+    <div class="content">
7
+      <nz-table class="hospitalTable" [nzData]="historySpecimenList" nzSize="middle" [nzShowPagination]="false" [nzLoading]="hsLoading">
8
+        <thead>
9
+          <tr class="thead">
10
+            <th nzWidth="8%">序号</th>
11
+            <th nzWidth="23%">动作</th>
12
+            <th nzWidth="23%">时间</th>
13
+            <th nzWidth="23%">备注</th>
14
+            <th nzWidth="23%">操作人</th>
15
+          </tr>
16
+        </thead>
17
+        <tbody>
18
+          <tr *ngFor="let data of historySpecimenList; let i = index">
19
+            <td>{{ i+(historySpecimenPageIndex-1) * historySpecimenPageSize + 1 }}</td>
20
+            <td>{{ data.operationType?.name }}</td>
21
+            <td>{{ data.createTime | date: "MM-dd HH:mm:ss" }}</td>
22
+            <td>{{ data.logRemarks }}</td>
23
+            <td>{{ data.operationUserDTO?.name }}</td>
24
+          </tr>
25
+        </tbody>
26
+      </nz-table>
27
+      <div class="pagination">
28
+        <nz-pagination
29
+          [(nzPageIndex)]="historySpecimenPageIndex"
30
+          [(nzTotal)]="historySpecimenListLength"
31
+          [(nzPageSize)]="historySpecimenPageSize"
32
+          (nzPageIndexChange)="getHistorySpecimen()"
33
+          (nzPageSizeChange)="getHistorySpecimen()"
34
+        >
35
+        </nz-pagination>
36
+      </div>
37
+    </div>
38
+    <div class="display_flex justify-content_flex-center">
39
+      <button class="btn cancel" nz-button (click)="hideModal()">
40
+        关闭
41
+      </button>
42
+    </div>
43
+  </div>
44
+</div>

+ 165 - 0
src/app/share/inspect-log-prompt-modal/inspect-log-prompt-modal.component.less

@@ -0,0 +1,165 @@
1
+@import "../../../../src/theme.less";
2
+.modal {
3
+  position: fixed;
4
+  left: 0;
5
+  top: 0;
6
+  width: 100%;
7
+  height: 100%;
8
+  background: rgba(0, 0, 0, 0.4);
9
+  z-index: 999;
10
+  .hospitalTable {
11
+    width: 100%;
12
+    td {
13
+      text-align: center !important;
14
+    }
15
+    .thead {
16
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
17
+      th {
18
+        text-align: center !important;
19
+        color: #fff;
20
+        background: transparent;
21
+      }
22
+    }
23
+  }
24
+
25
+  .pagination{
26
+    padding: 8px;
27
+    margin-left: auto;
28
+  }
29
+
30
+  .modalBody {
31
+    width: 700px;
32
+    min-height: 220px;
33
+    background: #fff;
34
+    border-radius: 5px;
35
+    padding: 10px 20px;
36
+    color: #333;
37
+    &.modalBody-search {
38
+      width: 480px;
39
+      min-height: 250px;
40
+    }
41
+
42
+    .title {
43
+      width: 100%;
44
+      text-align: center;
45
+      font-size: 18px;
46
+      position: relative;
47
+
48
+      i {
49
+        position: absolute;
50
+        right: 0;
51
+        top: 0;
52
+        font-size: 20px;
53
+        color: #666;
54
+        cursor: pointer;
55
+        padding: 0 5px;
56
+      }
57
+    }
58
+
59
+    .content {
60
+      min-height: 117px;
61
+      background: #f9fafb;
62
+      border: 1px solid #e5e9ed;
63
+      border-radius: 5px;
64
+      overflow: hidden;
65
+      margin-top: 12px;
66
+      display: flex;
67
+      flex-direction: column;
68
+      justify-content: center;
69
+      align-items: center;
70
+      &.content-search {
71
+        min-height: 147px;
72
+        justify-content: start;
73
+        .defeat-search {
74
+          width: 100%;
75
+          height: 52px;
76
+          display: flex;
77
+          justify-content: center;
78
+          align-items: center;
79
+          border-bottom: solid 1px #e5e9ed;
80
+          em {
81
+            color: #666;
82
+            font-style: normal;
83
+          }
84
+        }
85
+        .form {
86
+          width: 100%;
87
+          padding: 0 16px;
88
+          .ant-form-item-label,
89
+          .ant-form-explain {
90
+            text-align: left !important;
91
+          }
92
+        }
93
+      }
94
+
95
+      div {
96
+        &.defeat {
97
+          color: #333;
98
+          font-size: 28px;
99
+        }
100
+        &.countDown {
101
+          font-size: 14px;
102
+          color: 666;
103
+          em {
104
+            font-style: normal;
105
+            color: @primary-color;
106
+          }
107
+        }
108
+
109
+        &:nth-child(3) {
110
+          font-size: 14px;
111
+          color: #666;
112
+          padding-bottom: 10px;
113
+        }
114
+      }
115
+    }
116
+
117
+    button {
118
+      margin-top: 10px;
119
+
120
+      &.btn {
121
+        margin-left: 8px;
122
+      }
123
+    }
124
+  }
125
+
126
+  // 新增
127
+  &.add {
128
+    .modalBody {
129
+      width: 480px;
130
+      height: auto;
131
+
132
+      .content {
133
+        width: 100%;
134
+        height: auto;
135
+        padding: 18px 14px 0 14px;
136
+
137
+        .addForm {
138
+          .ant-form-item {
139
+            margin-bottom: 15px;
140
+
141
+            .ant-form-item-label {
142
+              line-height: 0;
143
+            }
144
+          }
145
+        }
146
+
147
+        .editForm {
148
+          .ant-form-item {
149
+            margin-bottom: 15px;
150
+
151
+            .ant-form-item-label {
152
+              line-height: 0;
153
+            }
154
+          }
155
+        }
156
+      }
157
+
158
+      button {
159
+        &:nth-child(1) {
160
+          margin-right: 20px;
161
+        }
162
+      }
163
+    }
164
+  }
165
+}

+ 55 - 0
src/app/share/inspect-log-prompt-modal/inspect-log-prompt-modal.component.ts

@@ -0,0 +1,55 @@
1
+import { Component, OnInit, Input, Output, EventEmitter } from "@angular/core";
2
+import { MainService } from "../../services/main.service";
3
+import { ToolService } from "src/app/services/tool.service";
4
+
5
+@Component({
6
+  selector: "app-inspect-log-prompt-modal",
7
+  templateUrl: "./inspect-log-prompt-modal.component.html",
8
+  styleUrls: ["./inspect-log-prompt-modal.component.less"],
9
+})
10
+export class InspectLogPromptModalComponent implements OnInit {
11
+  hosId;
12
+  // 切换科室,切换弹窗
13
+  hsLoading = false;
14
+  historySpecimenList: any = [];
15
+  historySpecimenPageIndex: number = 1; //表格当前页码
16
+  historySpecimenPageSize: number = 5; //表格每页展示条数
17
+  historySpecimenListLength: number = 10; //表格总数据量
18
+  @Input() show: Boolean;
19
+  @Input() id: String;
20
+
21
+  @Output() closeModelHs = new EventEmitter<any>(); //1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
22
+
23
+  constructor(private mainService: MainService, private tool: ToolService) {}
24
+
25
+  ngOnInit() {
26
+    this.hosId = this.tool.getCurrentHospital().id;
27
+    this.getHistorySpecimen();
28
+  }
29
+  // 关闭弹窗
30
+  hideModal() {
31
+    this.closeModelHs.emit(JSON.stringify({ show: false })); //emits(向上弹射)事件
32
+  }
33
+  // 获取列表数据
34
+  getHistorySpecimen(idx?) {
35
+    if (idx) {
36
+      this.historySpecimenPageIndex = 1;
37
+    }
38
+    let postData = {
39
+      idx: this.historySpecimenPageIndex - 1,
40
+      sum: this.historySpecimenPageSize,
41
+      inspectLog: {
42
+        hosId: this.hosId,
43
+        inspectId: this.id,
44
+      },
45
+    };
46
+    this.hsLoading = true;
47
+    this.mainService
48
+      .getFetchDataList("simple/data", "inspectLog", postData)
49
+      .subscribe((data) => {
50
+        this.hsLoading = false;
51
+        this.historySpecimenList = data.list || [];
52
+        this.historySpecimenListLength = data.totalNum || 0;
53
+      });
54
+  }
55
+}

+ 37 - 0
src/app/share/select-remark/select-remark.component.html

@@ -0,0 +1,37 @@
1
+<div class="save add display_flex align-items_center justify-content_flex-center" (click)="clickExtra($event)">
2
+  <div class="modalBody">
3
+    <div class="title">编辑注意事项<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
4
+    </div>
5
+    <div class="content">
6
+      <div class="addForm">
7
+        <div class="display_flex align-items_center">
8
+          <form class="w100" nz-form [formGroup]="validateForm">
9
+            <nz-form-item>
10
+              <nz-form-label [nzSpan]="6" nzRequired nzFor="remark">注意事项</nz-form-label>
11
+              <nz-form-control [nzSpan]="18" nzErrorTip="请填写注意事项!">
12
+                <div class="noteSign">
13
+                  <textarea formControlName="remark" class="noteFocus" id="noteFocus" (focus)="focusNote()" nz-input rows="5" placeholder="请填写注意事项" #remarkEle></textarea>
14
+                  <div class="noteList" id="noteList" *ngIf="isShowNoteList">
15
+                    <ng-container *ngIf="!noteLoading && noteList.length">
16
+                      <div class="noteItem ellipsis-oneline" *ngFor="let item of noteList" [title]="item.name" (click)="selectNote(item.name)">{{item.name}}</div>
17
+                    </ng-container>
18
+                    <div *ngIf="!noteLoading && !noteList.length" class="w100 h100 padding8 display_flex justify-content_flex-center align-items_center">
19
+                      <nz-empty></nz-empty>
20
+                    </div>
21
+                    <div *ngIf="noteLoading" class="w100 h100 padding8 display_flex justify-content_flex-center align-items_center">
22
+                      <nz-spin nzSimple></nz-spin>
23
+                    </div>
24
+                  </div>
25
+                </div>
26
+              </nz-form-control>
27
+            </nz-form-item>
28
+          </form>
29
+        </div>
30
+      </div>
31
+    </div>
32
+    <div class="display_flex justify-content_flex-center">
33
+      <button nzType="primary" nz-button (click)="submitForm()">确认</button>
34
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
35
+    </div>
36
+  </div>
37
+</div>

+ 123 - 0
src/app/share/select-remark/select-remark.component.less

@@ -0,0 +1,123 @@
1
+.noteSign{
2
+  position: relative;
3
+  .noteList{
4
+    position: absolute;
5
+    bottom: 100%;
6
+    left: 0;
7
+    width: 100%;
8
+    max-height: 256px;
9
+    z-index: 99;
10
+    background: #fff;
11
+    border: 1px solid #d9d9d9;
12
+    border-radius: 4px;
13
+    overflow: hidden auto;
14
+    .noteItem{
15
+      padding: 5px 12px;
16
+      cursor: pointer;
17
+      line-height: normal;
18
+      &:hover{
19
+        background-color: #e9f7e9;
20
+      }
21
+    }
22
+  }
23
+}
24
+.save {
25
+  position: fixed;
26
+  left: 0;
27
+  top: 0;
28
+  width: 100%;
29
+  height: 100%;
30
+  background: rgba(0, 0, 0, 0.4);
31
+  z-index: 999;
32
+
33
+  .modalBody {
34
+    width: 350px;
35
+    background: #fff;
36
+    border-radius: 5px;
37
+    padding: 10px 20px;
38
+    color: #333;
39
+
40
+    .title {
41
+      width: 100%;
42
+      text-align: center;
43
+      font-size: 18px;
44
+      position: relative;
45
+
46
+      i {
47
+        position: absolute;
48
+        right: 0;
49
+        top: 0;
50
+        font-size: 20px;
51
+        color: #666;
52
+        cursor: pointer;
53
+        padding: 0 5px;
54
+      }
55
+    }
56
+
57
+    .content {
58
+      width: 100%;
59
+      height: 117px;
60
+      background: #f9fafb;
61
+      border: 1px solid #e5e9ed;
62
+      border-radius: 5px;
63
+      // overflow: hidden;
64
+      margin-top: 12px;
65
+
66
+      .tips{
67
+        margin-bottom: 19px;
68
+      }
69
+
70
+    }
71
+
72
+    button {
73
+      margin-top: 10px;
74
+
75
+      &.btn {
76
+        margin-left: 8px;
77
+      }
78
+    }
79
+  }
80
+
81
+  // 新增
82
+  &.add {
83
+    .modalBody {
84
+      width: 480px;
85
+      height: auto;
86
+
87
+      .content {
88
+        width: 100%;
89
+        height: auto;
90
+        padding: 24px;
91
+        max-height: 500px;
92
+        // overflow-y: auto;
93
+
94
+        .addForm {
95
+          .ant-form-item {
96
+            margin-bottom: 14px;
97
+            &:last-of-type{
98
+              margin-bottom: 0;
99
+            }
100
+
101
+            .ant-form-item-label {
102
+              text-align: left;
103
+            }
104
+          }
105
+        }
106
+
107
+        .editForm {
108
+          .ant-form-item {
109
+            margin-bottom: 14px;
110
+
111
+            .ant-form-item-label {
112
+              line-height: 0;
113
+            }
114
+          }
115
+        }
116
+      }
117
+
118
+      button:nth-child(1) {
119
+        margin-right: 20px;
120
+      }
121
+    }
122
+  }
123
+}

+ 83 - 0
src/app/share/select-remark/select-remark.component.ts

@@ -0,0 +1,83 @@
1
+import { Component, OnInit, Output, Input, ViewChild, ElementRef } from '@angular/core';
2
+import { EventEmitter } from '@angular/core';
3
+import { FormBuilder, Validators, FormGroup } from '@angular/forms';
4
+import { MainService } from 'src/app/services/main.service';
5
+
6
+@Component({
7
+  selector: 'app-select-remark',
8
+  templateUrl: './select-remark.component.html',
9
+  styleUrls: ['./select-remark.component.less']
10
+})
11
+export class SelectRemarkComponent implements OnInit {
12
+  @ViewChild("remarkEle", { static: false }) remarkEle: ElementRef;
13
+  @Input() inspect:any = {};
14
+  @Output() submitFormHand = new EventEmitter();
15
+  @Output() cancelFlagHand = new EventEmitter();
16
+
17
+  validateForm: FormGroup;
18
+
19
+  constructor(
20
+    private fb: FormBuilder,
21
+    private mainService: MainService,
22
+  ) { }
23
+
24
+  ngOnInit() {
25
+    this.initForm();
26
+  }
27
+
28
+  initForm(){
29
+    this.validateForm = this.fb.group({
30
+      remark: [this.inspect.remark || '', [Validators.required, Validators.pattern(/\S/)]],
31
+    });
32
+  }
33
+
34
+  // 注意事项获取焦点
35
+  isShowNoteList:boolean = false;
36
+  focusNote(){
37
+    this.isShowNoteList = true;
38
+    this.getNoteList();
39
+  }
40
+
41
+  // 选择注意事项
42
+  selectNote(name){
43
+    this.validateForm.controls.remark.setValue(name);
44
+    this.isShowNoteList = false;
45
+    // this.remarkEle.nativeElement.focus();
46
+  }
47
+
48
+  // 获取注意事项列表
49
+  noteList:any[] = [];
50
+  noteLoading:boolean = false;
51
+  getNoteList() {
52
+    this.noteLoading = true;
53
+    this.mainService.getDictionary('list', 'inspect_notes',).subscribe(result=>{
54
+      this.noteLoading = false;
55
+      this.noteList = result || [];
56
+    });
57
+  }
58
+
59
+  // 点击其他位置
60
+  clickExtra(e){
61
+    if(document.documentElement.contains(document.querySelector('#noteList')) && e.target !== document.querySelector('#noteFocus')){
62
+      this.isShowNoteList = false;
63
+    }
64
+  }
65
+
66
+  // 隐藏模态框
67
+  hideModal() {
68
+    this.cancelFlagHand.emit(false)
69
+  }
70
+
71
+  // 表单提交
72
+  submitForm(): void {
73
+    for (const i in this.validateForm.controls) {
74
+      this.validateForm.controls[i].markAsDirty();
75
+      this.validateForm.controls[i].updateValueAndValidity();
76
+    }
77
+    if (this.validateForm.invalid) {
78
+      return;
79
+    }
80
+    this.submitFormHand.emit(this.validateForm.value.remark);
81
+  }
82
+}
83
+

+ 15 - 0
src/app/share/share.module.ts

@@ -60,14 +60,19 @@ import { PathologyDetailComponent } from './pathology-detail/pathology-detail.co
60 60
 import { StringToFirstValuePipe } from '../pipes/string-to-first-name.pipe';
61 61
 import { BusinessDataDetailInfoModalComponent } from './businessData-detail-info-modal/businessData-detail-info-modal.component';
62 62
 import { SelectDateComponent } from './select-date/select-date.component';
63
+import { EditInspectInfoComponent } from './edit-inspect-info/edit-inspect-info.component';
64
+import { AddInspectInfoComponent } from './add-inspect-info/add-inspect-info.component';
65
+import { SelectRemarkComponent } from './select-remark/select-remark.component';
63 66
 import { AddInspectModalComponent } from './add-inspect-modal/add-inspect-modal.component';
64 67
 import { SelectDateYytimeComponent } from './select-date-yytime/select-date-yytime.component';
65 68
 import { PackageSpecimenRuleComponent } from './package-specimen-rule/package-specimen-rule.component';
66 69
 import { SpecimenPackageListModalComponent } from './specimen-package-list-modal/specimen-package-list-modal.component';
67 70
 import { NgxPrintModule } from 'ngx-print';
68 71
 import { SpecimenPackageLogPromptModalComponent } from './specimen-package-log-prompt-modal/specimen-package-log-prompt-modal.component';
72
+import { InspectLogPromptModalComponent } from './inspect-log-prompt-modal/inspect-log-prompt-modal.component';
69 73
 import { UploadFileComponent } from './upload-file/upload-file.component';
70 74
 import { AddInspectTwoModalComponent } from './add-inspect-two-modal/add-inspect-two-modal.component';
75
+import { AddInspectThreeModalComponent } from './add-inspect-three-modal/add-inspect-three-modal.component';
71 76
 
72 77
 @NgModule({
73 78
   declarations: [
@@ -131,12 +136,17 @@ import { AddInspectTwoModalComponent } from './add-inspect-two-modal/add-inspect
131 136
     MedicalWasteHistoryPromptModalComponent,
132 137
     MedicalWasteLogPromptModalComponent,
133 138
     SelectDateComponent,
139
+    EditInspectInfoComponent,
140
+    AddInspectInfoComponent,
141
+    SelectRemarkComponent,
134 142
     AddInspectModalComponent,
135 143
     AddInspectTwoModalComponent,
144
+    AddInspectThreeModalComponent,
136 145
     SelectDateYytimeComponent,
137 146
     PackageSpecimenRuleComponent,
138 147
     SpecimenPackageListModalComponent,
139 148
     SpecimenPackageLogPromptModalComponent,
149
+    InspectLogPromptModalComponent,
140 150
 		UploadFileComponent
141 151
   ],
142 152
   imports: [
@@ -210,12 +220,17 @@ import { AddInspectTwoModalComponent } from './add-inspect-two-modal/add-inspect
210 220
     MedicalWasteHistoryPromptModalComponent,
211 221
     MedicalWasteLogPromptModalComponent,
212 222
     SelectDateComponent,
223
+    EditInspectInfoComponent,
224
+    AddInspectInfoComponent,
225
+    SelectRemarkComponent,
213 226
     AddInspectModalComponent,
214 227
     AddInspectTwoModalComponent,
228
+    AddInspectThreeModalComponent,
215 229
     SelectDateYytimeComponent,
216 230
     PackageSpecimenRuleComponent,
217 231
     SpecimenPackageListModalComponent,
218 232
     SpecimenPackageLogPromptModalComponent,
233
+    InspectLogPromptModalComponent,
219 234
 		UploadFileComponent
220 235
   ]
221 236
 })

+ 28 - 15
src/app/share/specimen-package-list-modal/specimen-package-list-modal.component.html

@@ -70,23 +70,36 @@
70 70
 <!-- 打印的内容 -->
71 71
 <div id="print-section-package" hidden>
72 72
   <!-- 80mm*80mm -->
73
-  <ng-container *ngIf="configs.spePackageCodeSize == 1">
74
-    <div style="overflow: hidden;padding: 4mm;font-size: 4mm;width: 80mm;height: 80mm;">
75
-      <div style="display: flex;">
76
-        <img [src]="base64" style="width: 23mm;height: 23mm;margin-right: 3mm;">
77
-        <div style="flex: 1;">
78
-          <div>包号:{{package.packCode}}</div>
79
-          <div style="margin-top: 3mm;">打包人:{{package.packUserDTO?.name}}</div>
80
-          <div style="margin-top: 3mm;">标本总数:{{package.specimenNum}}</div>
81
-        </div>
73
+  <div style="overflow: hidden;padding: 4mm;font-size: 4mm;width: 80mm;height: 80mm;" *ngIf="configs.spePackageCodeSize == 1">
74
+    <div style="display: flex;">
75
+      <img [src]="base64" style="width: 23mm;height: 23mm;margin-right: 3mm;">
76
+      <div style="flex: 1;">
77
+        <div>包号:{{package.packCode}}</div>
78
+        <div style="margin-top: 3mm;">打包人:{{package.packUserDTO?.name}}</div>
79
+        <div style="margin-top: 3mm;">标本总数:{{package.specimenNum}}</div>
82 80
       </div>
83
-      <div style="margin-top: 3mm;">打包时间:{{package.packTime | date: 'yyyy-MM-dd HH:mm'}}</div>
84
-      <div style="margin-top: 3mm;">打包科室:{{package.packDeptDTO?.dept}}</div>
85
-      <div style="margin-top: 3mm;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">终点科室:{{package.targetDeptDTO?.dept}}</div>
86
-      <div style="display: flex;flex-wrap: wrap;">
87
-        <div style="width: 33.33%;margin-top: 3mm;" *ngFor="let item of typeSpecimentList | slice:0:9">{{item.name}}:{{item.size}}</div>
81
+    </div>
82
+    <div style="margin-top: 3mm;">打包时间:{{package.packTime | date: 'yyyy-MM-dd HH:mm'}}</div>
83
+    <div style="margin-top: 3mm;">打包科室:{{package.packDeptDTO?.dept}}</div>
84
+    <div style="margin-top: 3mm;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">终点科室:{{package.targetDeptDTO?.dept}}</div>
85
+    <div style="display: flex;flex-wrap: wrap;" *ngIf="configs.spePrintTubeType == 1">
86
+      <div style="width: 33.33%;margin-top: 3mm;" *ngFor="let item of typeSpecimentList | slice:0:9">{{item.name}}:{{item.size}}</div>
87
+    </div>
88
+  </div>
89
+  <!-- 70mm*50mm -->
90
+  <div style="overflow: hidden;padding: 4mm;font-size: 4mm;width: 70mm;height: 50mm;" *ngIf="configs.spePackageCodeSize == 2">
91
+    <div style="display: flex;">
92
+      <img [src]="base64" style="width: 23mm;height: 23mm;margin-right: 3mm;">
93
+      <div style="flex: 1;">
94
+        <div>包号:{{package.packCode}}</div>
95
+        <div>{{package.packDeptDTO?.dept}}</div>
96
+        <div>{{package.packTime | date: 'yyyy-MM-dd HH:mm'}}</div>
97
+        <div>{{package.specimenNum}};{{package.packUserDTO?.name}}</div>
88 98
       </div>
89 99
     </div>
90
-  </ng-container>
100
+    <div style="display: flex;flex-wrap: wrap;" *ngIf="configs.spePrintTubeType == 1">
101
+      <div *ngFor="let item of typeSpecimentList">{{item.name}}:{{item.size}}</div>
102
+    </div>
103
+  </div>
91 104
 </div>
92 105
 <button ngxPrint printSectionId="print-section-package" #printBtnPackage hidden [printStyle]="{ '@page': { margin: '0 !important' }, 'body': { margin: '0 !important' } }">打印</button>

+ 1 - 1
src/app/views/batch-inspection/batch-inspection.component.ts

@@ -61,7 +61,7 @@ export class BatchInspectionComponent implements OnInit {
61 61
         this.message.success("修改陪检方式成功");
62 62
       } else {
63 63
         this.getList();
64
-        this.message.success(data.msg || "修改陪检方式失败");
64
+        this.message.error(data.msg || "修改陪检方式失败");
65 65
       }
66 66
     });
67 67
   }

+ 28 - 15
src/app/views/batch-specimen/batch-specimen.component.html

@@ -80,23 +80,36 @@
80 80
 <!-- 打印的内容 -->
81 81
 <div id="print-section" hidden>
82 82
   <!-- 80mm*80mm -->
83
-  <ng-container *ngIf="configs.spePackageCodeSize == 1">
84
-    <div style="overflow: hidden;padding: 4mm;font-size: 4mm;width: 80mm;height: 80mm;">
85
-      <div style="display: flex;">
86
-        <img [src]="base64" style="width: 23mm;height: 23mm;margin-right: 3mm;">
87
-        <div style="flex: 1;">
88
-          <div>包号:{{package.packCode}}</div>
89
-          <div style="margin-top: 3mm;">打包人:{{package.packUserDTO?.name}}</div>
90
-          <div style="margin-top: 3mm;">标本总数:{{package.specimenNum}}</div>
91
-        </div>
83
+  <div style="overflow: hidden;padding: 4mm;font-size: 4mm;width: 80mm;max-height: 80mm;" *ngIf="configs.spePackageCodeSize == 1">
84
+    <div style="display: flex;">
85
+      <img [src]="base64" style="width: 23mm;height: 23mm;margin-right: 3mm;">
86
+      <div style="flex: 1;">
87
+        <div>包号:{{package.packCode}}</div>
88
+        <div style="margin-top: 3mm;">打包人:{{package.packUserDTO?.name}}</div>
89
+        <div style="margin-top: 3mm;">标本总数:{{package.specimenNum}}</div>
92 90
       </div>
93
-      <div style="margin-top: 3mm;">打包时间:{{package.packTime | date: 'yyyy-MM-dd HH:mm'}}</div>
94
-      <div style="margin-top: 3mm;">打包科室:{{package.packDeptDTO?.dept}}</div>
95
-      <div style="margin-top: 3mm;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">终点科室:{{package.targetDeptDTO?.dept}}</div>
96
-      <div style="display: flex;flex-wrap: wrap;">
97
-        <div style="width: 33.33%;margin-top: 3mm;" *ngFor="let item of typeSpecimentList | slice:0:9">{{item.name}}:{{item.size}}</div>
91
+    </div>
92
+    <div style="margin-top: 3mm;">打包时间:{{package.packTime | date: 'yyyy-MM-dd HH:mm'}}</div>
93
+    <div style="margin-top: 3mm;">打包科室:{{package.packDeptDTO?.dept}}</div>
94
+    <div style="margin-top: 3mm;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">终点科室:{{package.targetDeptDTO?.dept}}</div>
95
+    <div style="display: flex;flex-wrap: wrap;" *ngIf="configs.spePrintTubeType == 1">
96
+      <div style="width: 33.33%;margin-top: 3mm;" *ngFor="let item of typeSpecimentList | slice:0:9">{{item.name}}:{{item.size}}</div>
97
+    </div>
98
+  </div>
99
+  <!-- 70mm*50mm -->
100
+  <div style="overflow: hidden;padding: 4mm;font-size: 4mm;width: 70mm;max-height: 50mm;" *ngIf="configs.spePackageCodeSize == 2">
101
+    <div style="display: flex;">
102
+      <img [src]="base64" style="width: 23mm;height: 23mm;margin-right: 1mm;">
103
+      <div style="flex: 1;">
104
+        <div>包号:{{package.packCode}}</div>
105
+        <div>{{package.packDeptDTO?.dept}}</div>
106
+        <div>{{package.packTime | date: 'yyyy-MM-dd HH:mm'}}</div>
107
+        <div>{{package.specimenNum}};{{package.packUserDTO?.name}}</div>
98 108
       </div>
99 109
     </div>
100
-  </ng-container>
110
+    <div style="display: flex;flex-wrap: wrap;" *ngIf="configs.spePrintTubeType == 1">
111
+      <div *ngFor="let item of typeSpecimentList">{{item.name}}:{{item.size}}</div>
112
+    </div>
113
+  </div>
101 114
 </div>
102 115
 <button ngxPrint printSectionId="print-section" #printBtn hidden [printStyle]="{ '@page': { margin: '0 !important' }, 'body': { margin: '0 !important' } }">打印</button>

+ 61 - 41
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -421,8 +421,10 @@ export class HushijiandanComponent implements OnInit {
421 421
 		  .getFetchDataList("simple/data", "taskTypeConfig", postData)
422 422
 		  .subscribe((result) => {
423 423
 		    if (result.status == 200) {
424
-					this.autoCreate = result.list[0].autoCreate;
425
-					this.pathologyFrozenSpecime = result.list[0].pathologyFrozenSpecimenNum;
424
+          if(Array.isArray(result.list) && result.list[0]){
425
+            this.autoCreate = result.list[0].autoCreate;
426
+					  this.pathologyFrozenSpecime = result.list[0].pathologyFrozenSpecimenNum;
427
+          }
426 428
 		    }
427 429
 		  });
428 430
 	}
@@ -1994,14 +1996,16 @@ export class HushijiandanComponent implements OnInit {
1994 1996
 				.subscribe((result) => {
1995 1997
 					let arr = result.start.start.list;
1996 1998
 					arr.forEach(i=>{
1997
-						i.inputcode = i.inputcode.toUpperCase()
1998
-						if(this.deptDisplay == 2){
1999
-							i.deptalias = i.deptalias + '('+i.inputcode+')'
2000
-						}else{
2001
-							i.dept = i.dept + '('+i.inputcode+')'
2002
-						}
1999
+            if(i.inputcode){
2000
+                i.inputcode = i.inputcode.toUpperCase()
2001
+              if(this.deptDisplay == 2){
2002
+                i.deptalias = i.deptalias + '('+i.inputcode+')'
2003
+              }else{
2004
+                i.dept = i.dept + '('+i.inputcode+')'
2005
+              }
2006
+            }
2003 2007
 					})
2004
-					
2008
+
2005 2009
 					if(key!=''){
2006 2010
 						if(this.deptDisplay ==2){
2007 2011
 							data = arr.filter(i=>i.deptalias.indexOf(key) !=-1)
@@ -2019,14 +2023,16 @@ export class HushijiandanComponent implements OnInit {
2019 2023
 				.subscribe((result) => {
2020 2024
 					let arr = result.end.end.list;
2021 2025
 					arr.forEach(i=>{
2022
-						i.inputcode = i.inputcode.toUpperCase()
2023
-						if(this.deptDisplay == 2){
2024
-							i.deptalias = i.deptalias + '('+i.inputcode+')'
2025
-						}else{
2026
-							i.dept = i.dept + '('+i.inputcode+')'
2027
-						}
2026
+            if(i.inputcode){
2027
+              i.inputcode = i.inputcode.toUpperCase()
2028
+              if(this.deptDisplay == 2){
2029
+                i.deptalias = i.deptalias + '('+i.inputcode+')'
2030
+              }else{
2031
+                i.dept = i.dept + '('+i.inputcode+')'
2032
+              }
2033
+            }
2028 2034
 					})
2029
-					
2035
+
2030 2036
 					if(key!=''){
2031 2037
 						if(this.deptDisplay ==2){
2032 2038
 							data = arr.filter(i=>i.deptalias.indexOf(key) !=-1)
@@ -2068,22 +2074,26 @@ export class HushijiandanComponent implements OnInit {
2068 2074
       .subscribe((data) => {
2069 2075
         if (type == "target") {
2070 2076
 					data.list.forEach(i=>{
2071
-						i.inputcode = i.inputcode.toUpperCase()
2072
-						if(this.deptDisplay == 2){
2073
-							i.deptalias = i.deptalias + '('+i.inputcode+')'
2074
-						}else{
2075
-							i.dept = i.dept + '('+i.inputcode+')'
2076
-						}
2077
+            if(i.inputcode){
2078
+              i.inputcode = i.inputcode.toUpperCase()
2079
+              if(this.deptDisplay == 2){
2080
+                i.deptalias = i.deptalias + '('+i.inputcode+')'
2081
+              }else{
2082
+                i.dept = i.dept + '('+i.inputcode+')'
2083
+              }
2084
+            }
2077 2085
 					})
2078 2086
           msg.end.end.list = data.list;
2079 2087
         } else if (type == "start") {
2080 2088
 					data.list.forEach(i=>{
2081
-						i.inputcode = i.inputcode.toUpperCase()
2082
-						if(this.deptDisplay == 2){
2083
-							i.deptalias = i.deptalias + '('+i.inputcode+')'
2084
-						}else{
2085
-							i.dept = i.dept + '('+i.inputcode+')'
2086
-						}
2089
+            if(i.inputcode){
2090
+              i.inputcode = i.inputcode.toUpperCase()
2091
+              if(this.deptDisplay == 2){
2092
+                i.deptalias = i.deptalias + '('+i.inputcode+')'
2093
+              }else{
2094
+                i.dept = i.dept + '('+i.inputcode+')'
2095
+              }
2096
+            }
2087 2097
 					})
2088 2098
           msg.start.start.list = data.list;
2089 2099
         }
@@ -3592,20 +3602,24 @@ export class HushijiandanComponent implements OnInit {
3592 3602
       .postCustom("nurse", "workOrder/buildTrip", postData)
3593 3603
       .subscribe((result) => {
3594 3604
 				result.start.start.list.forEach(i=>{
3595
-					i.inputcode = i.inputcode.toUpperCase()
3596
-					if(this.deptDisplay ==2){
3597
-						i.deptalias = i.deptalias + '('+i.inputcode+')'
3598
-					}else{
3599
-						i.dept = i.dept + '('+i.inputcode+')'
3600
-					}
3605
+          if(i.inputcode){
3606
+            i.inputcode = i.inputcode.toUpperCase()
3607
+            if(this.deptDisplay ==2){
3608
+              i.deptalias = i.deptalias + '('+i.inputcode+')'
3609
+            }else{
3610
+              i.dept = i.dept + '('+i.inputcode+')'
3611
+            }
3612
+          }
3601 3613
 				})
3602 3614
 				result.end.end.list.forEach(i=>{
3603
-					i.inputcode = i.inputcode.toUpperCase()
3604
-					if(this.deptDisplay ==2){
3605
-						i.deptalias = i.deptalias + '('+i.inputcode+')'
3606
-					}else{
3607
-						i.dept = i.dept + '('+i.inputcode+')'
3608
-					}
3615
+          if(i.inputcode){
3616
+            i.inputcode = i.inputcode.toUpperCase()
3617
+            if(this.deptDisplay ==2){
3618
+              i.deptalias = i.deptalias + '('+i.inputcode+')'
3619
+            }else{
3620
+              i.dept = i.dept + '('+i.inputcode+')'
3621
+            }
3622
+          }
3609 3623
 				})
3610 3624
         this.buildMsg = result;
3611 3625
 				if(result.end){
@@ -5408,7 +5422,13 @@ export class HushijiandanComponent implements OnInit {
5408 5422
       this.isShowBuildQuickConfirm = true;
5409 5423
     }else if(data.bussType.value === 'inspect'){
5410 5424
       // 陪检
5411
-      this.router.navigateByUrl("/batchInspection");
5425
+      if(this.inspectAndPatientTransportConfig.batchInspectType == 1){
5426
+        // 预约陪检
5427
+        this.router.navigateByUrl("/batchInspection");
5428
+      }else if(this.inspectAndPatientTransportConfig.batchInspectType == 2){
5429
+        // 陪检信息配置
5430
+        this.router.navigateByUrl("/inspectInfoConfig");
5431
+      }
5412 5432
     }
5413 5433
   }
5414 5434
   cancelBuildQuickConfirm(e){

+ 18 - 0
src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.html

@@ -167,6 +167,24 @@
167 167
           <nz-form-label class="label">是否支持签到并转派</nz-form-label>
168 168
           <nz-checkbox-group [(ngModel)]="signReassign"></nz-checkbox-group>
169 169
         </div>
170
+        <!-- 批量陪检配置方式 -->
171
+        <div class="display_flex align-items_center mb8">
172
+          <nz-form-label class="label" nzRequired>批量陪检配置方式</nz-form-label>
173
+          <nz-radio-group [(ngModel)]="radioBatchInspectTypesValue">
174
+            <label style="display: block;" nz-radio [nzValue]="item.value" *ngFor="let item of batchInspectTypes">{{ item.label }}</label>
175
+          </nz-radio-group>
176
+        </div>
177
+        <!-- 是否自动清空患者标记 -->
178
+        <div class="display_flex align-items_center mb8">
179
+          <nz-form-label class="label">是否自动清空患者标记</nz-form-label>
180
+          <nz-checkbox-group [(ngModel)]="batchInspectAutoClear" (ngModelChange)="changeBatchInspectAutoClear($event)"></nz-checkbox-group>
181
+          <nz-time-picker *ngIf="batchInspectAutoClear[0].checked" [(ngModel)]="batchInspectAutoClearTime" nzFormat="HH:mm"></nz-time-picker>
182
+        </div>
183
+        <!-- 是否修改危重等级 -->
184
+        <div class="display_flex align-items_center mb8">
185
+          <nz-form-label class="label">是否修改危重等级</nz-form-label>
186
+          <nz-checkbox-group [(ngModel)]="updatePatientIllness"></nz-checkbox-group>
187
+        </div>
170 188
         <!-- 检查预约不进行工单合并 -->
171 189
         <!-- <div class="display_flex align-items_center mb8">
172 190
           <nz-form-label class="label">检查预约不进行工单合并</nz-form-label>

+ 41 - 0
src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.ts

@@ -4,6 +4,7 @@ import { ToolService } from 'src/app/services/tool.service';
4 4
 import { NzMessageService } from 'ng-zorro-antd';
5 5
 import { Subject } from 'rxjs';
6 6
 import { debounceTime } from 'rxjs/operators';
7
+import { format } from 'date-fns';
7 8
 
8 9
 @Component({
9 10
   selector: "app-inspect-and-patient-transport-config",
@@ -25,6 +26,10 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
25 26
   accurateTimeFilling:any[] = [
26 27
     {label:'是否开启',value: 0}
27 28
   ];
29
+  // 是否自动清空患者标记
30
+  batchInspectAutoClear:any[] = [
31
+    {label:'是否开启',value: 0}
32
+  ];
28 33
   // 是否显示排队信息
29 34
   queuingInformation:any[] = [
30 35
     {label:'是否开启',value: 0}
@@ -100,11 +105,21 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
100 105
   signReassign:any[] = [
101 106
     {label:'是否开启',value: 0}
102 107
   ];
108
+  // 是否修改危重等级
109
+  updatePatientIllness:any[] = [
110
+    {label:'是否开启',value: 0}
111
+  ];
103 112
   // 检查预约不进行工单合并
104 113
   // yyInspectMergeOrder:any[] = [
105 114
   //   {label:'是否开启',value: 0}
106 115
   // ];
107 116
 
117
+  // 批量陪检配置方式
118
+  batchInspectTypes:any[] = [
119
+    { label: '预约陪检', value: 1, },
120
+    { label: '陪检信息配置', value: 2, },
121
+  ];
122
+
108 123
   changeBatchSignExecutionDept(e){
109 124
     if(!e[0].checked){
110 125
       this.batchSignExecutionParent = [
@@ -122,6 +137,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
122 137
   }
123 138
 
124 139
   timeMod:any;
140
+  batchInspectAutoClearTime:any;
125 141
   // 交接方式
126 142
   // handoverMode:any;
127 143
   // handoverModes:any[] = [];
@@ -180,6 +196,14 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
180 196
       this.timeMod = null;
181 197
     }
182 198
   }
199
+  // 修改是否自动清空患者标记
200
+  changeBatchInspectAutoClear(e){
201
+    console.log(e);
202
+    if(!e[0].checked){
203
+      // todo
204
+      this.batchInspectAutoClearTime = undefined;
205
+    }
206
+  }
183 207
   // 修改是否允许追加服务
184 208
   changeAddService(e){
185 209
     console.log(e);
@@ -263,10 +287,18 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
263 287
       this.msg.create("warning", "请选择精确时间模式!");
264 288
       return;
265 289
     }
290
+    if(this.batchInspectAutoClear[0].checked && !this.batchInspectAutoClearTime){
291
+      this.msg.create("warning", "请选择时分!");
292
+      return;
293
+    }
266 294
     if(this.addService[0].checked && !this.addServiceTaskIds.length){
267 295
       this.msg.create("warning", "请选择追加服务任务类型!");
268 296
       return;
269 297
     }
298
+    if(!this.radioBatchInspectTypesValue){
299
+      this.msg.create("warning", "请选择批量陪检配置方式!");
300
+      return;
301
+    }
270 302
     // if(!this.handoverMode){
271 303
     //   this.msg.create("warning", "请选择交接方式!");
272 304
     //   return;
@@ -284,6 +316,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
284 316
       multiplayerMode: this.multiplayerMode[0].checked ? 1 : 0,
285 317
       integralCalculationMethod: this.multiplayerMode[0].checked ? this.integralCalculationMethod : undefined,
286 318
       accurateTimeFilling: this.accurateTimeFilling[0].checked ? 1 : 0,
319
+      batchInspectAutoClear: this.batchInspectAutoClear[0].checked ? 1 : 0,
287 320
       queuingInformation: this.queuingInformation[0].checked ? 1 : 0,
288 321
 
289 322
       startShowAnotherService: this.startShowAnotherService[0].checked ? 1 : 0,
@@ -302,12 +335,15 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
302 335
       enableTripType: this.enableTripType[0].checked ? 1 : 0,
303 336
       nurseAppendInspect: this.nurseAppendInspect[0].checked ? 1 : 0,
304 337
       signReassign: this.signReassign[0].checked ? 1 : 0,
338
+      updatePatientIllness: this.updatePatientIllness[0].checked ? 1 : 0,
305 339
       // yyInspectMergeOrder: this.yyInspectMergeOrder[0].checked ? 1 : 0,
306 340
       addService: this.addService[0].checked ? 1 : 0,
307 341
       addServiceTaskIds: this.addServiceTaskIds.length ? this.addServiceTaskIds.toString() : undefined,
342
+      batchInspectType: this.radioBatchInspectTypesValue || undefined,
308 343
 
309 344
 
310 345
       timeMod: this.timeMod || undefined,
346
+      batchInspectAutoClearTime: this.batchInspectAutoClearTime ? format(this.batchInspectAutoClearTime, 'yyyy-MM-dd HH:mm:ss') : undefined,
311 347
       // autoCreate: this.autoCreateOrders[0].checked ? 1 : 0,
312 348
       // autoDept: this.autoDepts[0].checked ? 1 : 0,
313 349
       // handoverType: {id: this.handoverMode},
@@ -383,6 +419,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
383 419
   }
384 420
   // 获取配置
385 421
   // radioCheckModesValue = '';
422
+  radioBatchInspectTypesValue = '';
386 423
   getConfig() {
387 424
     this.loading = true;
388 425
     let postData = {
@@ -408,6 +445,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
408 445
           // this.autoCreateOrders[0].checked = this.configs.autoCreate == 1;
409 446
           // this.autoDepts[0].checked = this.configs.autoDept == 1;
410 447
 
448
+          this.radioBatchInspectTypesValue = this.configs.batchInspectType || undefined;
411 449
           if(this.configs.signTypeIds){
412 450
             let ids = this.configs.signTypeIds.split(',');
413 451
             this.checkInModes = this.checkInModes.map(v => ({...v, checked: ids.includes(v.value.toString())}));
@@ -415,7 +453,9 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
415 453
           this.multiplayerMode[0].checked = this.configs.multiplayerMode == 1;
416 454
           this.integralCalculationMethod = this.configs.integralCalculationMethod;
417 455
           this.accurateTimeFilling[0].checked = this.configs.accurateTimeFilling == 1;
456
+          this.batchInspectAutoClear[0].checked = this.configs.batchInspectAutoClear == 1;
418 457
           this.timeMod = this.configs.timeMod || null;
458
+          this.batchInspectAutoClearTime = this.configs.batchInspectAutoClearTime ? new Date(this.configs.batchInspectAutoClearTime) : undefined;
419 459
           this.queuingInformation[0].checked = this.configs.queuingInformation == 1;
420 460
 
421 461
           this.startShowAnotherService[0].checked = this.configs.startShowAnotherService == 1;
@@ -434,6 +474,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
434 474
           this.enableTripType[0].checked = this.configs.enableTripType == 1;
435 475
           this.nurseAppendInspect[0].checked = this.configs.nurseAppendInspect == 1;
436 476
           this.signReassign[0].checked = this.configs.signReassign == 1;
477
+          this.updatePatientIllness[0].checked = this.configs.updatePatientIllness == 1;
437 478
           // this.yyInspectMergeOrder[0].checked = this.configs.yyInspectMergeOrder == 1;
438 479
           this.addService[0].checked = this.configs.addService == 1;
439 480
           this.addServiceTaskIds = this.configs.addServiceTaskIds ? this.configs.addServiceTaskIds.split(',').map(v => +v) : [];

+ 17 - 0
src/app/views/inspect-info-config/inspect-info-config-routing.module.ts

@@ -0,0 +1,17 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { InspectInfoConfigComponent } from './inspect-info-config.component';
4
+
5
+
6
+const routes: Routes = [
7
+  {
8
+    path: "",
9
+    component: InspectInfoConfigComponent,
10
+  },
11
+];
12
+
13
+@NgModule({
14
+  imports: [RouterModule.forChild(routes)],
15
+  exports: [RouterModule]
16
+})
17
+export class InspectInfoConfigRoutingModule { }

+ 136 - 0
src/app/views/inspect-info-config/inspect-info-config.component.html

@@ -0,0 +1,136 @@
1
+<div class="header">
2
+  <div class="display_flex align-items_center">
3
+    <div class="dept">{{deptDisplay == 2 ? deptDTO.deptalias : deptDTO.dept}}</div>
4
+    <div class="yyTime">
5
+      <span class="label">检查时间:</span>
6
+      <nz-date-picker [(ngModel)]="searchData.dateRange" [nzAllowClear]="false"></nz-date-picker>
7
+    </div>
8
+    <div class="searchItem">
9
+      <span class="label">患者:</span>
10
+      <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择患者" [(ngModel)]="searchData.id" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeInp('patient', $event)" (nzOpenChange)="openChangePatient($event)">
11
+        <ng-container *ngFor="let option of patientList">
12
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.patientName + '(' + (option.bedNum || '') + ')' + '-' + option.residenceNo" [nzValue]="option.id"></nz-option>
13
+        </ng-container>
14
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
15
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
16
+        </nz-option>
17
+      </nz-select>
18
+    </div>
19
+    <div class="searchItem">
20
+        <div class="patient">
21
+          <label nz-checkbox [(ngModel)]="searchData.noneTripType">未标记患者</label>
22
+        </div>
23
+        <div class="patient">
24
+          <label nz-checkbox [(ngModel)]="searchData.noneEndDept">未标记检查科室</label>
25
+          <span class="circle red" title="未标记检查科室"></span>
26
+          <span class="circle red" style="right: -21px;" title="未标记检查科室"></span>
27
+        </div>
28
+        <div class="patient">
29
+          <label nz-checkbox [(ngModel)]="searchData.noneYY">无预约时间检查</label>
30
+          <span class="circle red" title="无预约时间检查"></span>
31
+        </div>
32
+    </div>
33
+  </div>
34
+  <div class="display_flex align-items_center">
35
+    <button nz-button class="btn default" (click)='reset()'>重置</button>
36
+    <button nz-button class="btn default ml8" (click)='getList()'>搜索</button>
37
+    <button nz-button nzType="default" class="ml8" (click)='goBack()'>返回</button>
38
+    <div class="info">
39
+      <span>患者:{{listOfData.length}}</span>
40
+      <span class="infoNum">检查项:{{inspectTotalCount}}</span>
41
+    </div>
42
+  </div>
43
+</div>
44
+<div class="table">
45
+  <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1">
46
+    <thead>
47
+      <tr class="thead">
48
+        <th nzWidth="12%">患者信息</th>
49
+        <th nzWidth="12%">护理信息</th>
50
+        <th nzWidth="12%">陪检方式</th>
51
+        <th nzWidth="22%">注意事项</th>
52
+        <th nzWidth="30%">检查项目</th>
53
+        <th nzWidth="12%">操作</th>
54
+      </tr>
55
+    </thead>
56
+    <tbody>
57
+      <tr *ngFor="let data of listOfData">
58
+        <td>
59
+          <span class="patient">
60
+            <ng-container *ngIf="!data.tripType">
61
+              <span class="circle red" title="未标记患者"></span>
62
+            </ng-container>
63
+            <span>{{data.patientName}}<ng-container *ngIf="data.age !== undefined">({{data.age}}岁)</ng-container></span>
64
+          </span>
65
+          <br>
66
+          <ng-container *ngIf="data.patientType && data.patientType.value == 'I'">住:{{data.patientCode}}({{data.bedNum}})</ng-container><ng-container *ngIf="data.patientType && data.patientType.value == 'O'">门诊:{{data.patientCode}}</ng-container><ng-container *ngIf="data.patientType && data.patientType.value == 'E'">急:{{data.patientCode}}</ng-container>
67
+        </td>
68
+        <td>
69
+          <ng-container *ngIf="configs.updatePatientIllness == 1;else elseIllnessStateTpl">
70
+            <nz-radio-group [(ngModel)]="data.illnessStateCopy" (ngModelChange)="changeIllnessState($event, data.id)">
71
+              <label nz-radio class="display_block" [nzValue]="item.id" *ngFor="let item of illnessStateList">{{item.name}}</label>
72
+            </nz-radio-group>
73
+          </ng-container>
74
+          <ng-template #elseIllnessStateTpl>
75
+            {{data.careLevel?.name}}<br>{{data.illnessState?.name}}
76
+          </ng-template>
77
+        </td>
78
+        <td>
79
+          <nz-radio-group [(ngModel)]="data.tripType" (ngModelChange)="changeTripType($event, data.id)">
80
+            <label nz-radio class="display_block" [nzValue]="item.id" *ngFor="let item of workOrderInspectScoreList">{{item.inspectMode}}</label>
81
+          </nz-radio-group>
82
+        </td>
83
+        <td class="text_align_left">
84
+          <div class="remarkText">
85
+            <span class="remarkTextInner" (click)="editRemark({data: data, inspect: inspect})"><span [ngStyle]="{ color: data.remark ? '#333' : '#999'}">{{data.remark || '请点击填写注意事项!'}}</span><span style="margin-top: 2px;" class="icon_transport transport-weibiaoti2010104 remarkTextEdit"></span></span>
86
+          </div>
87
+        </td>
88
+        <td>
89
+          <div *ngFor="let inspect of data.inspects" class="display_flex align-items_center" style="padding-left: 30px;">
90
+            <span class="patient">
91
+              <ng-container *ngIf="!inspect.execDept;else elseTpl">
92
+                <span class="circle red" title="未标记检查科室"></span>
93
+                <span class="circle red" style="left: -21px;" title="未标记检查科室"></span>
94
+              </ng-container>
95
+              <ng-template #elseTpl>
96
+                <ng-container *ngIf="!inspect.yyTime">
97
+                  <span class="circle red" title="无预约时间检查"></span>
98
+                </ng-container>
99
+              </ng-template>
100
+              {{(inspect.yyTime || "") + " " + (inspect.execDept ? (deptDisplay == 2 ? inspect.execDept.deptalias : inspect.execDept.dept) : '') + " 进行 " + (inspect.inspectName || "检查")}}
101
+            </span>
102
+            <span class="icon_transport transport-weibiaoti2010104" (click)="editInspect({data: data, inspect: inspect})"></span>
103
+            <span class="icon_transport transport-shanchu1" (click)="showDelModal({data: data, inspect: inspect}, '您确认要删除吗?','删除','delInspect')"></span>
104
+          </div>
105
+        </td>
106
+        <td>
107
+          <div class="coop">
108
+            <span (click)="showDelModal(data, '您确认要清空标记吗?','清空标记','clearSign')">清空标记</span>
109
+            <span (click)="addInspect(data)">增加检查项目</span>
110
+          </div>
111
+        </td>
112
+      </tr>
113
+    </tbody>
114
+  </nz-table>
115
+</div>
116
+
117
+<!-- 操作成功/失败提示框 -->
118
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
119
+  [info]="promptInfo">
120
+</app-prompt-modal>
121
+
122
+<!-- 删除模态框 -->
123
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
124
+(confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
125
+
126
+<!-- 遮罩 -->
127
+<app-mask *ngIf="maskFlag"></app-mask>
128
+
129
+<!-- 修改检查 -->
130
+<app-edit-inspect-info [execDeptList]="coopData.inspect && coopData.inspect.inspectCheckType && coopData.inspect.inspectCheckType.deptList" [execDeptId]="coopData.inspect && coopData.inspect.execDeptId" [date]="coopData.inspect && coopData.inspect.yyTime" *ngIf="isShowSelectDate" (submitFormHand)="submitSelectDate($event)" (cancelFlagHand)="cancelSelectDate($event)"></app-edit-inspect-info>
131
+
132
+<!-- 修改注意事项 -->
133
+<app-select-remark [inspect]="coopData.data" *ngIf="isShowSelectRemark" (submitFormHand)="submitSelectRemark($event)" (cancelFlagHand)="cancelSelectRemark($event)"></app-select-remark>
134
+
135
+<!-- 追加检查项目 -->
136
+<app-add-inspect-three-modal *ngIf="isShowAddInspect" [patientDTO]="patientDTO" [deptDisplay]="deptDisplay" (closeModelHs)="closeAddInspectModel($event)" (confirmModelHs)="confirmAddInspectModel($event)"></app-add-inspect-three-modal>

+ 170 - 0
src/app/views/inspect-info-config/inspect-info-config.component.less

@@ -0,0 +1,170 @@
1
+@import "../../../../src/theme.less";
2
+
3
+:host {
4
+  width: 100vw;
5
+  height: 100vh;
6
+  overflow: hidden;
7
+  background-color: #F0F2F5;
8
+  display: flex;
9
+  flex-direction: column;
10
+  .remarkText{
11
+    padding-right: 24px;
12
+    .remarkTextInner{
13
+      position: relative;
14
+      display: inline-block;
15
+      cursor: pointer;
16
+      .remarkTextEdit{
17
+        position: absolute;
18
+        top: 50%;
19
+        right: -24px;
20
+        transform: translateY(-50%);
21
+      }
22
+    }
23
+  }
24
+  .header{
25
+    height: 100px;
26
+    background-color: #fff;
27
+    display: flex;
28
+    align-items: center;
29
+    justify-content: space-between;
30
+    padding: 0 24px;
31
+    font-size: 16px;
32
+    .dept{
33
+      margin-right: 48px;
34
+    }
35
+    .searchItem{
36
+      margin-left: 24px;
37
+      .patient{
38
+        position: relative;
39
+        text-align: left;
40
+        .circle{
41
+          width: 8px;
42
+          height: 8px;
43
+          border-radius: 50%;
44
+          background-color: @primary-color;
45
+          position: absolute;
46
+          top: 51%;
47
+          right: -8px;
48
+          transform: translate(-50%,-50%);
49
+          &.red{
50
+            background-color: red;
51
+          }
52
+        }
53
+      }
54
+    }
55
+    .label{
56
+      padding-right: 16px;
57
+      font-size: 14px;
58
+    }
59
+    .formItem{
60
+      width: 173px;
61
+    }
62
+    .info{
63
+      margin-left: 24px;
64
+      font-weight: bold;
65
+      .infoNum{
66
+        margin-left: 10px;
67
+      }
68
+    }
69
+  }
70
+  .table{
71
+    flex: 1;
72
+    min-height: 0;
73
+    margin-top: 10px;
74
+    background-color: #fff;
75
+    overflow: auto;
76
+    padding: 8px 16px;
77
+    .patient{
78
+      position: relative;
79
+      text-align: left;
80
+      .circle{
81
+        width: 8px;
82
+        height: 8px;
83
+        border-radius: 50%;
84
+        background-color: @primary-color;
85
+        position: absolute;
86
+        top: 50%;
87
+        left: -8px;
88
+        transform: translate(-50%,-50%);
89
+        &.red{
90
+          background-color: red;
91
+        }
92
+      }
93
+    }
94
+    .transport-weibiaoti2010104{
95
+      font-size: 15px;
96
+      color: #999;
97
+      margin-left: 10px;
98
+      margin-top: 3px;
99
+      cursor: pointer;
100
+    }
101
+    .transport-shanchu1{
102
+      font-size: 15px;
103
+      color: #999;
104
+      margin-left: 5px;
105
+      margin-top: 3px;
106
+      cursor: pointer;
107
+    }
108
+    .thead{
109
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
110
+      th {
111
+        background: transparent;
112
+        color: #fff;
113
+        text-align: center;
114
+      }
115
+    }
116
+    .ant-table-body {
117
+      border-bottom: 1px solid #e5e9ed;
118
+    }
119
+
120
+    .ant-table-tbody {
121
+      tr {
122
+        text-align: center;
123
+        color: #333;
124
+
125
+        td {
126
+          border: none;
127
+
128
+          &.tab_hover:hover{
129
+            text-decoration: underline;
130
+            cursor: pointer;
131
+          }
132
+
133
+          .coop {
134
+            button{
135
+              color: #333;
136
+            }
137
+            span,button {
138
+              display: inline-block;
139
+              padding: 0 8px;
140
+              cursor: pointer;
141
+              position: relative;
142
+
143
+              &::after {
144
+                content: "|";
145
+                position: absolute;
146
+                top: 0;
147
+                right: 0;
148
+              }
149
+
150
+              &:hover,
151
+              &:active {
152
+                color: @primary-color;
153
+              }
154
+
155
+              &:nth-last-child(1) {
156
+                &::after {
157
+                  content: "";
158
+                }
159
+              }
160
+            }
161
+          }
162
+        }
163
+      }
164
+    }
165
+  }
166
+  .footer{
167
+    height: 60px;
168
+    background-color: #fff;
169
+  }
170
+}

+ 468 - 0
src/app/views/inspect-info-config/inspect-info-config.component.ts

@@ -0,0 +1,468 @@
1
+import { Component, OnInit } from '@angular/core';
2
+import { ToolService } from 'src/app/services/tool.service';
3
+import { MainService } from 'src/app/services/main.service';
4
+import { NzMessageService } from 'ng-zorro-antd';
5
+import { startOfDay, endOfDay, format, startOfMinute } from 'date-fns';
6
+import { Subject } from 'rxjs';
7
+import { debounceTime } from 'rxjs/operators';
8
+import { Location } from '@angular/common';
9
+import cloneDeep from 'lodash-es/cloneDeep'
10
+@Component({
11
+  selector: 'app-inspect-info-config',
12
+  templateUrl: './inspect-info-config.component.html',
13
+  styleUrls: ['./inspect-info-config.component.less']
14
+})
15
+export class InspectInfoConfigComponent implements OnInit {
16
+
17
+  constructor(
18
+    private mainService: MainService,
19
+    private tool: ToolService,
20
+    private message: NzMessageService,
21
+    private _location: Location,
22
+  ) { }
23
+
24
+  searchData:any = {
25
+    dateRange: new Date(), //检查时间
26
+  }
27
+  hosId:any = this.tool.getCurrentHospital().id; //当前院区
28
+  deptDTO:any = this.tool.getCurrentUserDept(); //当前科室
29
+  deptDisplay; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
30
+  listOfData: any[] = []; //表格数据
31
+
32
+  searchTimerSubject = new Subject(); //防抖
33
+
34
+  ngOnInit() {
35
+    //防抖
36
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
37
+      let fun = v[0];
38
+      fun.call(this, v[1]);
39
+    });
40
+
41
+    this.tool.getDeptDisplay().subscribe((result) => {
42
+      if (result.status == 200) {
43
+        this.deptDisplay = result.list[0].valueconfig;
44
+      }
45
+    });
46
+    this.getTaskType();
47
+    this.init();
48
+  }
49
+
50
+  // 修改陪检方式
51
+  changeTripType(tripTypeId, id){
52
+    this.maskFlag = this.message.loading("正在加载中..", {
53
+      nzDuration: 0,
54
+    }).messageId;
55
+    let postData = this.listOfData.find(v => v.id == id);
56
+    this.mainService
57
+    .simplePost("addData", 'patient', postData)
58
+    .subscribe((data) => {
59
+      this.message.remove(this.maskFlag);
60
+      this.maskFlag = false;
61
+      if (data.status == 200) {
62
+        this.message.success("修改陪检方式成功");
63
+      } else {
64
+        this.getList();
65
+        this.message.error(data.msg || "修改陪检方式失败");
66
+      }
67
+    });
68
+  }
69
+
70
+  // 修改危重等级
71
+  changeIllnessState(illnessStateId, id){
72
+    this.maskFlag = this.message.loading("正在加载中..", {
73
+      nzDuration: 0,
74
+    }).messageId;
75
+    let postData = this.listOfData.find(v => v.id == id);
76
+    postData.illnessState = {
77
+      id: illnessStateId,
78
+    }
79
+    this.mainService
80
+    .simplePost("addData", 'patient', postData)
81
+    .subscribe((data) => {
82
+      this.message.remove(this.maskFlag);
83
+      this.maskFlag = false;
84
+      if (data.status == 200) {
85
+        this.message.success("修改危重等级成功");
86
+      } else {
87
+        this.getList();
88
+        this.message.error(data.msg || "修改危重等级失败");
89
+      }
90
+    });
91
+  }
92
+
93
+  init(){
94
+    this.getIllnessState();
95
+    this.getWorkOrderInspectScore();
96
+    this.getList();
97
+  }
98
+
99
+  // 防抖
100
+  isLoading = false;
101
+  isSelecting:boolean = false; // 是否在选中状态
102
+  searchTimer(fun, e) {
103
+    if (this.isSelecting) {
104
+      this.isSelecting = false; // 重置标志
105
+      return; // 跳过处理
106
+    }
107
+    this.isLoading = true;
108
+    this.searchTimerSubject.next([fun, e]);
109
+  }
110
+
111
+  // 搜索
112
+  changeInp(type, e) {
113
+    if(type === 'patient'){
114
+      this.searchTimer(this.getPatientList, e);
115
+    }
116
+  }
117
+
118
+  // 设置标志
119
+  setIsSelecting(flag){
120
+    this.isSelecting = flag; // 设置标志
121
+  }
122
+
123
+
124
+  openChangePatient(flag){
125
+    flag && this.setIsSelecting(false);
126
+    flag && this.getPatientList();
127
+  }
128
+
129
+  // 获取患者
130
+  patientList: any = [];
131
+  getPatientList(e = undefined) {
132
+    let postData = {
133
+      idx: 0,
134
+      sum: 10,
135
+      hosId: this.hosId,
136
+      department: this.deptDTO.id,
137
+      hasBedNum: 1,//有床号
138
+      patientName: e,
139
+    };
140
+    this.isLoading = true;
141
+    this.mainService
142
+      .listMsgByMain('listPatient',postData)
143
+      .subscribe((data:any) => {
144
+        this.isLoading = false;
145
+        this.patientList = data.list || [];
146
+      });
147
+  }
148
+
149
+  maskFlag: any = false;
150
+
151
+  inspectActiveList: any = [];//选中检查列表
152
+  patientActiveList: any = [];//选中患者列表
153
+
154
+  coopData: any = {}; //当前操作列
155
+  btnLoading: boolean = false; //提交按钮loading状态
156
+
157
+  delModal: boolean = false; //删除模态框
158
+  tipsMsg1: string; //提示框信息
159
+  tipsMsg2: string; //操作后信息
160
+  confirmDelType: string; //确认的类型(启用/停用,删除)
161
+  showDelModal(
162
+    data,
163
+    tipsMsg1: string,
164
+    tipsMsg2: string,
165
+    type: string,
166
+  ) {
167
+    this.confirmDelType = type;
168
+    this.delModal = true;
169
+    this.coopData = data;
170
+    this.tipsMsg1 = tipsMsg1;
171
+    this.tipsMsg2 = tipsMsg2;
172
+  }
173
+  // 隐藏删除框
174
+  hideDelModal() {
175
+    this.delModal = false;
176
+  }
177
+  // 确认删除
178
+  confirmDel() {
179
+    this.btnLoading = true;
180
+    if (this.confirmDelType === "clearSign") {
181
+      //清空标记
182
+      this.mainService
183
+        .clearPatientMark({ patientId: this.coopData.id })
184
+        .subscribe((data:any) => {
185
+          this.btnLoading = false;
186
+          this.delModal = false;
187
+          if (data.status == 200) {
188
+            this.showPromptModal(this.tipsMsg2, true, "");
189
+          } else {
190
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
191
+          }
192
+        });
193
+    }else if (this.confirmDelType === "delInspect") {
194
+      //删除-检查
195
+      this.mainService
196
+        .simplePost("rmvData", "inspect", [this.coopData.inspect.id])
197
+        .subscribe((data) => {
198
+          this.btnLoading = false;
199
+          this.delModal = false;
200
+          if (data.status == 200) {
201
+            this.showPromptModal(this.tipsMsg2, true, "");
202
+          } else {
203
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
204
+          }
205
+        });
206
+    }
207
+  }
208
+
209
+  // 修改检验项目
210
+  isShowSelectDate:boolean = false;
211
+  editInspect(data){
212
+    this.isShowSelectDate = true;
213
+    this.coopData = data;
214
+  }
215
+
216
+  // 修改检查项目-确定
217
+  submitSelectDate({date, deptId}){
218
+    let postData = {
219
+      id: this.coopData.inspect.id,
220
+      yyTime: date || undefined,
221
+      execDeptId: deptId,
222
+    }
223
+    this.maskFlag = this.message.loading("正在加载中..", {
224
+      nzDuration: 0,
225
+    }).messageId;
226
+    this.mainService
227
+      .simplePost("updData", 'inspect', postData)
228
+      .subscribe((data:any) => {
229
+        this.message.remove(this.maskFlag);
230
+        this.maskFlag = false;
231
+        if (data.status == 200) {
232
+          this.isShowSelectDate = false;
233
+          this.showPromptModal('修改', true, "");
234
+        } else {
235
+          this.showPromptModal('修改', false, data.msg);
236
+        }
237
+      });
238
+  }
239
+
240
+  // 修改检验项目-取消
241
+  cancelSelectDate(e) {
242
+    this.isShowSelectDate = false;
243
+  }
244
+
245
+  // 修改注意事项
246
+  isShowSelectRemark:boolean = false;
247
+  editRemark(data){
248
+    this.isShowSelectRemark = true;
249
+    this.coopData = data;
250
+  }
251
+
252
+  // 修改注意事项-确定
253
+  submitSelectRemark(remark){
254
+    this.maskFlag = this.message.loading("正在加载中..", {
255
+      nzDuration: 0,
256
+    }).messageId;
257
+
258
+    let postData = {
259
+      ...this.coopData.data,
260
+      remark,
261
+    };
262
+
263
+    this.mainService
264
+    .simplePost("addData", 'patient', postData)
265
+    .subscribe((data) => {
266
+      this.message.remove(this.maskFlag);
267
+      this.maskFlag = false;
268
+      this.getList();
269
+      if (data.status == 200) {
270
+        this.isShowSelectRemark = false;
271
+        this.message.success("编辑注意事项成功");
272
+      } else {
273
+        this.message.error(data.msg || "编辑注意事项失败");
274
+      }
275
+    });
276
+  }
277
+
278
+  // 修改注意事项-取消
279
+  cancelSelectRemark(e) {
280
+    this.isShowSelectRemark = false;
281
+  }
282
+
283
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
284
+  promptContent: string; //操作提示框提示信息
285
+  ifSuccess: boolean; //操作成功/失败
286
+  promptInfo: string; //操作结果提示信息
287
+  promptModalShow: boolean; //操作提示框是否展示
288
+  showPromptModal(con, success, promptInfo?) {
289
+    this.promptModalShow = false;
290
+    this.promptContent = con;
291
+    this.ifSuccess = success;
292
+    this.promptInfo = promptInfo;
293
+    setTimeout(() => {
294
+      this.promptModalShow = true;
295
+    }, 100);
296
+    this.getList();
297
+  }
298
+
299
+  loading1:boolean = false;
300
+  inspectTotalCount:number = 0;
301
+
302
+  getList(){
303
+    let postData = {
304
+      idx: 0,
305
+      sum: 99999,
306
+      hosId: this.hosId,
307
+      department: this.deptDTO.id,
308
+      queryInspect: 1,//带inspects
309
+      hasBedNum: 1,//有床号
310
+      startTime: this.searchData.dateRange ? format(startOfDay(this.searchData.dateRange), 'yyyy-MM-dd HH:mm:ss') : undefined,
311
+      endTime: this.searchData.dateRange ? format(endOfDay(this.searchData.dateRange), 'yyyy-MM-dd HH:mm:ss') : undefined,
312
+      id: this.searchData.id || undefined,
313
+      noneTripType: this.searchData.noneTripType || undefined,
314
+      noneEndDept: this.searchData.noneEndDept || undefined,
315
+      noneYY: this.searchData.noneYY || undefined,
316
+    };
317
+    this.loading1 = true;
318
+    this.mainService
319
+      .listMsgByMain('listPatient',postData)
320
+      .subscribe((data:any) => {
321
+        this.loading1 = false;
322
+        if (data.status == 200) {
323
+          let listOfData = data.list || [];
324
+          listOfData.forEach(v => {
325
+            if(v.illnessState){
326
+              v.illnessStateCopy = v.illnessState.id;
327
+            }
328
+          })
329
+          this.listOfData = listOfData;
330
+          this.inspectTotalCount = this.listOfData.reduce((v, i) => v + i.inspects.length, 0);
331
+        }else{
332
+          this.message.error(data.msg || "请求数据失败");
333
+        }
334
+      });
335
+  }
336
+
337
+  // 重置
338
+  reset(){
339
+    this.searchData = {
340
+      dateRange: new Date(),
341
+    };
342
+    this.getList();
343
+  }
344
+
345
+  //获取陪检方式
346
+  workOrderInspectScoreList:any[] = [];
347
+  getWorkOrderInspectScore() {
348
+    let postData = { idx: 0, sum: 9999, workOrderInspectScore: { hosId: this.hosId } };
349
+    this.mainService
350
+      .getFetchDataList("simple/data", "workOrderInspectScore", postData)
351
+      .subscribe((result) => {
352
+        if (result.status == 200) {
353
+          this.workOrderInspectScoreList = result.list || [];
354
+        } else {
355
+          this.message.error("请求数据失败");
356
+        }
357
+      });
358
+  }
359
+
360
+  //获取危重等级
361
+  illnessStateList:any[] = [];
362
+  getIllnessState() {
363
+    this.mainService.getDictionary('list', 'stateOfAnIllness').subscribe((data) => {
364
+      this.illnessStateList = data || [];
365
+    });
366
+  }
367
+
368
+  // 返回
369
+  goBack(){
370
+    this._location.back();
371
+  }
372
+
373
+  // 追加项目
374
+  patientDTO:any = {};
375
+  isShowAddInspect = false; //弹窗开关
376
+  addInspect(patientDTO){
377
+    this.patientDTO = patientDTO;
378
+    this.isShowAddInspect = true;
379
+  }
380
+  // 关闭弹窗
381
+  closeAddInspectModel(e) {
382
+    this.isShowAddInspect = JSON.parse(e).show;
383
+  }
384
+  // 确定弹窗
385
+  confirmAddInspectModel(e) {
386
+    console.log(e);
387
+    let obj = JSON.parse(e);
388
+    let postData:any = {
389
+      inspectList: [{
390
+        patientCode: this.patientDTO.patientCode,
391
+        patientName: this.patientDTO.patientName,
392
+        barCode: this.patientDTO.barCode,
393
+        inspectCheckType: { id: obj.inspectData.id },
394
+        applyDeptId: this.deptDTO.id,
395
+        execDeptId: obj.inspectData.execDeptId,
396
+        bedNum: this.patientDTO.bedNum,
397
+        hosId: this.hosId,
398
+        yyTime: format(new Date(obj.inspectData.date), 'yyyy-MM-dd ') + format(startOfMinute(new Date(obj.inspectData.time)), 'HH:mm:ss'),
399
+      }] || undefined,
400
+    };
401
+    this.maskFlag = this.message.loading("正在加载中..", {
402
+      nzDuration: 0,
403
+    }).messageId;
404
+    this.mainService
405
+      .simplePost("addData", "inspect", postData)
406
+      .subscribe((data:any) => {
407
+        this.message.remove(this.maskFlag);
408
+        this.maskFlag = false;
409
+        if (data.status == 200) {
410
+          this.isShowAddInspect = obj.show;
411
+          this.showPromptModal('添加', true, "");
412
+        } else {
413
+          this.showPromptModal('添加', false, data.msg);
414
+        }
415
+      });
416
+  }
417
+
418
+  //获取任务类型
419
+  tasktype:any = {};// 任务类型
420
+ getTaskType() {
421
+   let postData = {
422
+     idx: 0,
423
+     sum: 1,
424
+     taskType: {
425
+       simpleQuery: true,
426
+       hosId: {
427
+         id: this.hosId
428
+       },
429
+       associationType: {
430
+         key: 'association_types',
431
+         value: 'inspect',
432
+       }
433
+     }
434
+   };
435
+   this.mainService
436
+     .getFetchDataList("simple/data", "taskType", postData)
437
+     .subscribe((result) => {
438
+       if (result.status == 200) {
439
+         this.tasktype = result.list[0] || {};
440
+         this.getConfig();
441
+       }
442
+     });
443
+ }
444
+
445
+  // 获取配置
446
+  configs:any = {};
447
+  getConfig() {
448
+    let postData = {
449
+      idx: 0,
450
+      sum: 1,
451
+      taskTypeConfig: {
452
+        taskTypeDTO: {
453
+          hosId: {
454
+            id: this.hosId
455
+          },
456
+          associationType: this.tasktype.associationType,
457
+        }
458
+      }
459
+    };
460
+    this.mainService
461
+      .getFetchDataList("simple/data", "taskTypeConfig", postData)
462
+      .subscribe((result) => {
463
+        if (result.status == 200) {
464
+          this.configs = result.list[0] || {};
465
+        }
466
+      });
467
+  }
468
+}

+ 17 - 0
src/app/views/inspect-info-config/inspect-info-config.module.ts

@@ -0,0 +1,17 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { InspectInfoConfigRoutingModule } from './inspect-info-config-routing.module';
5
+import { InspectInfoConfigComponent } from './inspect-info-config.component';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+
8
+
9
+@NgModule({
10
+  declarations: [InspectInfoConfigComponent],
11
+  imports: [
12
+    CommonModule,
13
+    InspectInfoConfigRoutingModule,
14
+    ShareModule,
15
+  ]
16
+})
17
+export class InspectInfoConfigModule { }

+ 52 - 42
src/app/views/inspect-search/inspect-search.component.html

@@ -1,7 +1,11 @@
1 1
 <div class="list-template">
2 2
   <div class="list-template__content">
3 3
     <div class="list-template__top" nz-row>
4
-      <div nz-col nzXl='16' class="list-template__searchBox">
4
+      <div nz-col nzXl='18' class="list-template__searchBox">
5
+        <div class="list-template__searchItem">
6
+          <span class="label">入库时间</span>:
7
+          <nz-range-picker nzShowTime [(ngModel)]="dateRange" (nzOnCalendarChange)="onCalendarChangeDate($event)"></nz-range-picker>
8
+        </div>
5 9
         <div class="list-template__searchItem">
6 10
           <span class="label">患者姓名:</span>
7 11
           <input nz-input class="formItem" placeholder="请输入患者姓名" [(ngModel)]="searchCriteria.patientName" />
@@ -16,7 +20,7 @@
16 20
             nzPlaceHolder="请选择配送人员" [(ngModel)]="searchCriteria.workerId" (nzOnSearch)="changeInp($event)"
17 21
             (nzOpenChange)="changeSearch($event)">
18 22
             <ng-container *ngFor="let data of workerSearch">
19
-              <nz-option *ngIf="!isLoading" nzLabel="{{data.name}}" nzValue="{{data.id}}"></nz-option>
23
+              <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
20 24
             </ng-container>
21 25
             <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
22 26
               <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -25,22 +29,9 @@
25 29
         </div>
26 30
         <div class="list-template__searchItem">
27 31
           <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
-          >
32
+          <nz-select [nzDropdownMatchSelectWidth]="false" class="formItem" nzServerSearch nzShowSearch nzAllowClear nzPlaceHolder="请选择状态" [(ngModel)]="searchCriteria.inspectState" (nzOpenChange)="changeSearch1($event)">
38 33
             <ng-container *ngFor="let data of types">
39
-              <nz-option
40
-                *ngIf="!isLoading1"
41
-                nzLabel="{{ data.name }}"
42
-                nzValue="{{ data.id }}"
43
-              ></nz-option>
34
+              <nz-option *ngIf="!isLoading1" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
44 35
             </ng-container>
45 36
             <nz-option *ngIf="isLoading1" nzDisabled nzCustomContent>
46 37
               <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -48,44 +39,49 @@
48 39
           </nz-select>
49 40
         </div>
50 41
       </div>
51
-      <div nz-col nzXl="8" class="list-template__btns">
52
-        <button nz-button class="btn default" (click)='reset()'>重置</button>
53
-        <button nz-button class="btn default ml8" (click)='getList(1)'>搜索</button>
42
+      <div nz-col nzXl="6" class="list-template__btns">
43
+        <button nz-button class="btn default" (click)='getList(1)'>搜索</button>
44
+        <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
45
+        <button nz-button *ngIf="coopBtns.add" class="btn default ml8" (click)="addModal()">新增</button>
54 46
       </div>
55 47
     </div>
48
+    <div class="list-template__checkBoxes">
49
+      <nz-checkbox-group [(ngModel)]="checkOptionsOne" (ngModelChange)="log(checkOptionsOne)"></nz-checkbox-group>
50
+    </div>
56 51
     <div class="list-template__bottom">
57 52
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
58 53
         [nzLoading]="loading1">
59 54
         <thead>
60 55
           <tr class="thead">
61
-            <th nzWidth="6%">序号</th>
62
-            <th nzWidth="8%">患者姓名</th>
63
-            <th nzWidth="8%">住院号</th>
64
-            <th nzWidth="8%">申请科室</th>
65
-            <th nzWidth="8%">检查科室</th>
66
-            <th nzWidth="8%">检查单号</th>
67
-            <th nzWidth="8%">患者床号</th>
68
-            <th nzWidth="8%">检查项目</th>
69
-            <th nzWidth="11%">预约时间</th>
70
-            <th nzWidth="11%">到达时间</th>
56
+            <th nzWidth="4%">序号</th>
57
+            <th nzWidth="8%">患者姓名|住院号</th>
58
+            <th nzWidth="10%">申请科室</th>
59
+            <th nzWidth="10%">检查科室</th>
60
+            <th nzWidth="14%">检查单号|检查项目</th>
61
+            <th nzWidth="14%">预约时间|入库时间</th>
71 62
             <th nzWidth="8%">检查状态</th>
72
-            <th nzWidth="8%">配送人员</th>
63
+            <th nzWidth="8%">陪检人员</th>
64
+            <th nzWidth="14%">出行方式|注意事项</th>
65
+            <th nzWidth="10%">操作</th>
73 66
           </tr>
74 67
         </thead>
75 68
         <tbody>
76 69
           <tr *ngFor="let data of listOfData;let i = index">
77 70
             <td>{{i+(pageIndex-1) * pageSize + 1}}</td>
78
-            <td>{{ data.patientName||'-' }}</td>
79
-            <td>{{ data.residenceNo||'-' }}</td>
80
-            <td>{{ data.applyDept ? data.applyDept.dept : '-' }}</td>
81
-            <td>{{ data.execDept ? data.execDept.dept : '-' }}</td>
82
-            <td>{{ data.inspectCode||'-' }}</td>
83
-            <td>{{ data.patientBedNum||'-' }}</td>
84
-            <td>{{data.inspectName||'-'}}</td>
85
-            <td>{{ data.yyTime||'-' }}</td>
86
-            <td>{{data.arriveTime||'-'}}</td>
87
-            <td>{{ data.inspectState?data.inspectState.name:''}}</td>
88
-            <td>{{ data.workerName||'-' }}</td>
71
+            <td>{{ data.patientName }}({{ data.patientBedNum }})<br>{{ data.residenceNo }}</td>
72
+            <td>{{ data.applyDept?.dept }}</td>
73
+            <td>{{ data.execDept?.dept }}</td>
74
+            <td>{{ data.inspectCode }}<br>{{data.inspectName}}</td>
75
+            <td>{{ data.yyTime }}<br>{{ data.createTime | date:'yyyy-MM-dd HH:mm:ss' }}</td>
76
+            <td>{{ data.inspectState?.name}}</td>
77
+            <td>{{ data.workerName }}</td>
78
+            <td>{{ data.patientDTO?.tripTypeDTO?.inspectMode }}<br>{{ data.patientDTO?.remark }}</td>
79
+            <td>
80
+              <div class="coop">
81
+                <span *ngIf="coopBtns.lookLog" (click)="showLogs(data)">查看日志</span>
82
+                <span *ngIf="coopBtns.edit" (click)="edit(data)">编辑</span>
83
+              </div>
84
+            </td>
89 85
           </tr>
90 86
         </tbody>
91 87
       </nz-table>
@@ -97,3 +93,17 @@
97 93
     </div>
98 94
   </div>
99 95
 </div>
96
+
97
+<!-- 操作成功/失败提示框 -->
98
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
99
+  [info]="promptInfo">
100
+</app-prompt-modal>
101
+
102
+<!-- 修改检查 -->
103
+<app-edit-inspect-info [execDeptList]="coopData.inspectCheckType && coopData.inspectCheckType.deptList" [execDeptId]="coopData.execDept && coopData.execDept.id" [date]="coopData.yyTime" *ngIf="isShowSelectDate" (submitFormHand)="submitSelectDate($event)" (cancelFlagHand)="cancelSelectDate($event)"></app-edit-inspect-info>
104
+
105
+<!-- 新增检查 -->
106
+<app-add-inspect-info *ngIf="isShowAddInspect" (closeModelHs)="closeAddInspectModel($event)" (confirmModelHs)="confirmAddInspectModel($event)"></app-add-inspect-info>
107
+
108
+<!-- 查看日志 -->
109
+<app-inspect-log-prompt-modal *ngIf="logPromptModalShow" [show]="logPromptModalShow" [id]="inspectId" (closeModelHs)="closeModelLog($event)"></app-inspect-log-prompt-modal>

+ 157 - 7
src/app/views/inspect-search/inspect-search.component.ts

@@ -1,8 +1,11 @@
1 1
 import { Component, OnInit } from "@angular/core";
2
+import { ActivatedRoute } from "@angular/router";
2 3
 import { Subject } from "rxjs";
3 4
 import { debounceTime } from "rxjs/operators";
4 5
 import { MainService } from "src/app/services/main.service";
5 6
 import { ToolService } from "src/app/services/tool.service";
7
+import { startOfDay, endOfDay, format, startOfMinute } from 'date-fns';
8
+import { NzMessageService } from 'ng-zorro-antd';
6 9
 
7 10
 @Component({
8 11
   selector: "app-inspect-search",
@@ -10,7 +13,22 @@ import { ToolService } from "src/app/services/tool.service";
10 13
   styleUrls: ["./inspect-search.component.less"],
11 14
 })
12 15
 export class InspectSearchComponent implements OnInit {
13
-  constructor(private mainService: MainService, private tool: ToolService) {}
16
+  constructor(
17
+    private mainService: MainService,
18
+    private tool: ToolService,
19
+    private route: ActivatedRoute,
20
+    private message: NzMessageService,
21
+  ) {}
22
+
23
+  // 初始化增删改按钮
24
+  coopBtns: any = {};
25
+
26
+  checkOptionsOne: Array<any> = [
27
+    { label: "未标记检查科室", value: "0", checked: false },
28
+    { label: "无预约时间检查", value: "1", checked: false },
29
+  ];
30
+
31
+  dateRange: any = []; //入库时间区间
14 32
 
15 33
   searchCriteria = {
16 34
     //搜索条件
@@ -27,12 +45,27 @@ export class InspectSearchComponent implements OnInit {
27 45
   pageSize: number = 10; //表格每页展示条数
28 46
   listLength: number = 10; //表格总数据量
29 47
   changeInpSubject = new Subject();
48
+
30 49
   ngOnInit() {
31 50
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
32 51
       this.searchWorker(v);
33 52
     });
53
+    this.coopBtns = this.tool.initCoopBtns(this.route);
34 54
     this.getAllHospital();
35 55
   }
56
+
57
+  // 表格筛选
58
+  log(value: object[]): void {
59
+    this.getList(1);
60
+  }
61
+
62
+  // 日期选择
63
+  onCalendarChangeDate(dateArr){
64
+    if(dateArr.length == 2){
65
+      this.dateRange = [startOfDay(dateArr[0]), endOfDay(dateArr[1])];
66
+    }
67
+  }
68
+
36 69
   // 搜索类型
37 70
   isLoading1 = false;
38 71
   types = []; // 类型列表(搜索框)
@@ -51,11 +84,12 @@ export class InspectSearchComponent implements OnInit {
51 84
   }
52 85
   // 重置
53 86
   reset() {
87
+    this.dateRange = [];
54 88
     this.searchCriteria = {
55 89
       //搜索条件
56 90
       patientName: "",
57 91
       inspectCode: "",
58
-      hospital: this.allHospital[0] ? this.allHospital[0]["id"] + "" : null,
92
+      hospital: this.allHospital[0] ? this.allHospital[0]["id"] : null,
59 93
       workerId: null,
60 94
       inspectState: null,
61 95
     };
@@ -65,7 +99,7 @@ export class InspectSearchComponent implements OnInit {
65 99
   // 获取所有院区
66 100
   getAllHospital() {
67 101
     this.allHospital = [this.tool.getCurrentHospital()];
68
-    this.searchCriteria.hospital = this.tool.getCurrentHospital().id + "";
102
+    this.searchCriteria.hospital = this.tool.getCurrentHospital().id;
69 103
     this.getList(1);
70 104
   }
71 105
   // 查看标本历史记录
@@ -127,11 +161,16 @@ export class InspectSearchComponent implements OnInit {
127 161
     let postData = {
128 162
       idx: this.pageIndex - 1,
129 163
       sum: this.pageSize,
130
-      hosId: this.searchCriteria.hospital,
131
-      patientName: this.searchCriteria.patientName,
132
-      inspectCode: this.searchCriteria.inspectCode,
133
-      workerId: this.searchCriteria.workerId,
164
+      hosId: this.searchCriteria.hospital || undefined,
165
+      patientName: this.searchCriteria.patientName || undefined,
166
+      inspectCode: this.searchCriteria.inspectCode || undefined,
167
+      workerId: this.searchCriteria.workerId || undefined,
134 168
       inspectState: this.searchCriteria.inspectState || undefined,
169
+      createStartTime: this.dateRange.length ? format(this.dateRange[0], 'yyyy-MM-dd HH:mm:ss') : undefined,
170
+      createEndTime: this.dateRange.length ? format(this.dateRange[1], 'yyyy-MM-dd HH:mm:ss') : undefined,
171
+      noneEndDept: this.checkOptionsOne[0].checked ? true : undefined,
172
+      noneYytime: this.checkOptionsOne[1].checked ? true : undefined,
173
+      queryInspect: 1,//带检查项目
135 174
     };
136 175
     this.loading1 = true;
137 176
     this.mainService
@@ -144,4 +183,115 @@ export class InspectSearchComponent implements OnInit {
144 183
         }
145 184
       });
146 185
   }
186
+
187
+  // 查看日志弹窗
188
+  logPromptModalShow = false; //弹窗开关
189
+  inspectId = ""; //查看记录携带id
190
+  showLogs(data) {
191
+    this.inspectId = data.id;
192
+    this.logPromptModalShow = true;
193
+  }
194
+  // 关闭日志弹窗
195
+  closeModelLog(e) {
196
+    this.logPromptModalShow = JSON.parse(e).show;
197
+  }
198
+
199
+  // ============================add start==================
200
+  // 新增检查
201
+  isShowAddInspect = false; //弹窗开关
202
+  addModal(){
203
+    this.isShowAddInspect = true;
204
+  }
205
+  // 关闭弹窗
206
+  closeAddInspectModel(e) {
207
+    this.isShowAddInspect = JSON.parse(e).show;
208
+  }
209
+  // 确定弹窗
210
+  confirmAddInspectModel(e) {
211
+    console.log(e);
212
+    let obj = JSON.parse(e);
213
+    let postData:any = {
214
+      inspectList: [{
215
+        patientCode: obj.patientDTO.patientCode,
216
+        patientName: obj.patientDTO.patientName,
217
+        barCode: obj.patientDTO.barCode,
218
+        inspectCheckType: { id: obj.inspectData.id },
219
+        applyDeptId: this.tool.getCurrentUserDept().id,
220
+        execDeptId: obj.inspectData.execDeptId,
221
+        bedNum: obj.patientDTO.bedNum,
222
+        hosId: this.searchCriteria.hospital,
223
+        yyTime: format(new Date(obj.inspectData.date), 'yyyy-MM-dd ') + format(startOfMinute(new Date(obj.inspectData.time)), 'HH:mm:ss'),
224
+      }] || undefined,
225
+    };
226
+    this.maskFlag = this.message.loading("正在加载中..", {
227
+      nzDuration: 0,
228
+    }).messageId;
229
+    this.mainService
230
+      .simplePost("addData", "inspect", postData)
231
+      .subscribe((data:any) => {
232
+        this.message.remove(this.maskFlag);
233
+        this.maskFlag = false;
234
+        if (data.status == 200) {
235
+          this.isShowAddInspect = obj.show;
236
+          this.showPromptModal('添加', true, "");
237
+        } else {
238
+          this.showPromptModal('添加', false, data.msg);
239
+        }
240
+      });
241
+  }
242
+  // ============================add end==================
243
+
244
+  coopData: any = {}; //当前操作列
245
+  // 修改检验项目
246
+  isShowSelectDate:boolean = false;
247
+  edit(data){
248
+    this.isShowSelectDate = true;
249
+    this.coopData = data;
250
+  }
251
+
252
+  // 修改检查项目-确定
253
+  maskFlag: any = false;
254
+  submitSelectDate({date, deptId}){
255
+    let postData = {
256
+      id: this.coopData.id,
257
+      yyTime: date || undefined,
258
+      execDeptId: deptId,
259
+    }
260
+    this.maskFlag = this.message.loading("正在加载中..", {
261
+      nzDuration: 0,
262
+    }).messageId;
263
+    this.mainService
264
+      .simplePost("updData", 'inspect', postData)
265
+      .subscribe((data:any) => {
266
+        this.message.remove(this.maskFlag);
267
+        this.maskFlag = false;
268
+        if (data.status == 200) {
269
+          this.isShowSelectDate = false;
270
+          this.showPromptModal('修改', true, "");
271
+        } else {
272
+          this.showPromptModal('修改', false, data.msg);
273
+        }
274
+      });
275
+  }
276
+
277
+  // 修改检验项目-取消
278
+  cancelSelectDate(e) {
279
+    this.isShowSelectDate = false;
280
+  }
281
+
282
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
283
+  promptContent: string; //操作提示框提示信息
284
+  ifSuccess: boolean; //操作成功/失败
285
+  promptInfo: string; //操作结果提示信息
286
+  promptModalShow: boolean; //操作提示框是否展示
287
+  showPromptModal(con, success, promptInfo?) {
288
+    this.promptModalShow = false;
289
+    this.promptContent = con;
290
+    this.ifSuccess = success;
291
+    this.promptInfo = promptInfo;
292
+    setTimeout(() => {
293
+      this.promptModalShow = true;
294
+    }, 100);
295
+    this.getList(1);
296
+  }
147 297
 }

+ 53 - 21
src/app/views/patient-search/patient-search.component.html

@@ -74,37 +74,32 @@
74 74
         <thead>
75 75
           <tr class="thead">
76 76
             <th nzWidth="8%">患者类别</th>
77
-            <th nzWidth="8%">患者姓名</th>
78
-            <th nzWidth="8%">患者标识</th>
79
-            <th nzWidth="8%">住院号</th>
80
-            <th nzWidth="8%">条码号</th>
81
-            <th nzWidth="8%">床号</th>
82
-            <th nzWidth="8%">院区</th>
83
-            <th nzWidth="8%">当前科室</th>
84
-            <th nzWidth="8%">护理等级</th>
85
-            <th nzWidth="8%">病情级别</th>
86
-            <th nzWidth="8%">年龄</th>
87
-            <th nzWidth="8%">性别</th>
88
-            <th nzWidth="7%">操作</th>
77
+            <th nzWidth="10%">患者姓名(床号)</th>
78
+            <th nzWidth="10%">患者标识</th>
79
+            <th nzWidth="10%">住院号|条码号</th>
80
+            <th nzWidth="10%">院区|当前科室</th>
81
+            <th nzWidth="10%">护理等级</th>
82
+            <th nzWidth="10%">病情级别</th>
83
+            <th nzWidth="10%">性别、年龄</th>
84
+            <th nzWidth="12%">出行方式|注意事项</th>
85
+            <th nzWidth="10%">操作</th>
89 86
           </tr>
90 87
         </thead>
91 88
         <tbody>
92 89
           <tr *ngFor="let data of listOfData;let i = index">
93 90
             <td>{{ data.patientType?.name }}</td>
94
-            <td>{{ data.patientName }}</td>
91
+            <td>{{ data.patientName }}({{ data.bedNum }})</td>
95 92
             <td>{{ data.patientCode }}</td>
96
-            <td>{{ data.residenceNo }}</td>
97
-            <td>{{ data.barCode }}</td>
98
-            <td>{{ data.bedNum }}</td>
99
-            <td>{{ data.hospitalDTO?.hosName }}</td>
100
-            <td>{{ data.department?.dept }}</td>
93
+            <td>{{ data.residenceNo }}<br>{{ data.barCode }}</td>
94
+            <td>{{ data.hospitalDTO?.hosName }}<br>{{ data.department?.dept }}</td>
101 95
             <td>{{ data.careLevel?.name }}</td>
102 96
             <td>{{ data.illnessState?.name }}</td>
103
-            <td>{{ data.age }}</td>
104
-            <td>{{ data.gender?.name }}</td>
97
+            <td>{{ data.gender?.name }}、{{ data.age }}</td>
98
+            <td>{{ data.tripTypeDTO?.inspectMode }}<br>{{ data.remark }}</td>
105 99
             <td>
106 100
               <div class="coop">
107 101
                 <span *ngIf="coopBtns.edit" (click)="edit(data)">编辑</span>
102
+                <span *ngIf="coopBtns.removeSign" (click)="showDelModal(data, '您确认要清空标记吗?','清空标记','clearSign')">清空标记</span>
108 103
               </div>
109 104
             </td>
110 105
           </tr>
@@ -120,7 +115,7 @@
120 115
 </div>
121 116
 
122 117
 <!-- 新增/编辑模态框 -->
123
-<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
118
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal" (click)="clickExtra($event)">
124 119
   <div class="modalBody">
125 120
     <div class="title">{{add?"新增":"编辑"}}<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
126 121
     </div>
@@ -251,6 +246,39 @@
251 246
             </nz-select>
252 247
           </nz-form-control>
253 248
         </nz-form-item>
249
+        <nz-form-item>
250
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="tripType">出行方式</nz-form-label>
251
+          <nz-form-control nzErrorTip="请选择出行方式!">
252
+            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="tripType" nzAllowClear nzPlaceHolder="请选择出行方式" (nzOpenChange)="openTripType($event)">
253
+              <ng-container *ngFor="let data of tripTypeList">
254
+                <nz-option *ngIf="!isLoading" [nzLabel]="data.inspectMode" [nzValue]="data.id">
255
+                </nz-option>
256
+              </ng-container>
257
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
258
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
259
+              </nz-option>
260
+            </nz-select>
261
+          </nz-form-control>
262
+        </nz-form-item>
263
+        <nz-form-item>
264
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="remark">注意事项</nz-form-label>
265
+          <nz-form-control nzErrorTip="请选择注意事项!">
266
+            <div class="noteSign">
267
+              <textarea formControlName="remark" class="noteFocus mt8" id="noteFocus" (focus)="focusNote()" nz-input rows="5" placeholder="请填写注意事项" #remarkEle></textarea>
268
+              <div class="noteList" id="noteList" *ngIf="isShowNoteList">
269
+                <ng-container *ngIf="!noteLoading && noteList.length">
270
+                  <div class="noteItem ellipsis-oneline" *ngFor="let item of noteList" [title]="item.name" (click)="selectNote(item.name)">{{item.name}}</div>
271
+                </ng-container>
272
+                <div *ngIf="!noteLoading && !noteList.length" class="w100 h100 padding8 display_flex justify-content_flex-center align-items_center">
273
+                  <nz-empty></nz-empty>
274
+                </div>
275
+                <div *ngIf="noteLoading" class="w100 h100 padding8 display_flex justify-content_flex-center align-items_center">
276
+                  <nz-spin nzSimple></nz-spin>
277
+                </div>
278
+              </div>
279
+            </div>
280
+          </nz-form-control>
281
+        </nz-form-item>
254 282
       </form>
255 283
     </overlay-scrollbars>
256 284
     <div class="display_flex justify-content_flex-center">
@@ -260,6 +288,10 @@
260 288
   </div>
261 289
 </div>
262 290
 
291
+<!-- 删除模态框 -->
292
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
293
+(confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
294
+
263 295
 <!-- 操作成功/失败提示框 -->
264 296
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
265 297
   [info]="promptInfo"></app-prompt-modal>

+ 23 - 0
src/app/views/patient-search/patient-search.component.less

@@ -1,5 +1,28 @@
1 1
 @import "../../../../src/theme.less";
2 2
 
3
+.noteSign{
4
+  position: relative;
5
+  .noteList{
6
+    position: absolute;
7
+    bottom: 100%;
8
+    left: 0;
9
+    width: 100%;
10
+    max-height: 256px;
11
+    z-index: 99;
12
+    background: #fff;
13
+    border: 1px solid #d9d9d9;
14
+    border-radius: 4px;
15
+    overflow: hidden auto;
16
+    .noteItem{
17
+      padding: 5px 12px;
18
+      cursor: pointer;
19
+      line-height: normal;
20
+      &:hover{
21
+        background-color: #e9f7e9;
22
+      }
23
+    }
24
+  }
25
+}
3 26
 .save {
4 27
   position: fixed;
5 28
   left: 0;

+ 115 - 3
src/app/views/patient-search/patient-search.component.ts

@@ -1,4 +1,4 @@
1
-import { Component, OnInit } from "@angular/core";
1
+import { Component, OnInit, ViewChild, ElementRef } from "@angular/core";
2 2
 import { MainService } from "src/app/services/main.service";
3 3
 import { ToolService } from "src/app/services/tool.service";
4 4
 import { Subject } from 'rxjs';
@@ -12,6 +12,7 @@ import { FormGroup, FormBuilder, Validators } from '@angular/forms';
12 12
   styleUrls: ["./patient-search.component.less"],
13 13
 })
14 14
 export class PatientSearchComponent implements OnInit {
15
+  @ViewChild("remarkEle", { static: false }) remarkEle: ElementRef;
15 16
   constructor(
16 17
     private mainService: MainService,
17 18
     private tool: ToolService,
@@ -59,6 +60,9 @@ export class PatientSearchComponent implements OnInit {
59 60
   changeHospital(e){
60 61
     this.deptList = [];
61 62
     this.validateForm.controls.department.setValue(null);
63
+
64
+    this.tripTypeList = [];
65
+    this.validateForm.controls.tripType.setValue(null);
62 66
   }
63 67
 
64 68
   // 获取院区列表
@@ -140,6 +144,12 @@ export class PatientSearchComponent implements OnInit {
140 144
       this.changeInp("", "departmentSearch");
141 145
     }
142 146
   }
147
+  // 打开搜索框
148
+  openTripType(flag) {
149
+    if (flag) {
150
+      this.getTripTypeList();
151
+    }
152
+  }
143 153
   // 重置
144 154
   reset() {
145 155
     this.searchCriteria = {
@@ -218,6 +228,8 @@ export class PatientSearchComponent implements OnInit {
218 228
       careLevel: [null, [Validators.required]],
219 229
       illnessState: [null],
220 230
       patientType: [null, [Validators.required]],
231
+      tripType: [null],
232
+      remark: [null],
221 233
     });
222 234
   }
223 235
   // 表单提交
@@ -255,6 +267,8 @@ export class PatientSearchComponent implements OnInit {
255 267
           patientType: {
256 268
             id: this.validateForm.value.patientType,
257 269
           },
270
+          tripType:  this.validateForm.value.tripType || undefined,
271
+          remark:  this.validateForm.value.remark || undefined,
258 272
         }
259 273
       }
260 274
     }else{
@@ -283,6 +297,8 @@ export class PatientSearchComponent implements OnInit {
283 297
           patientType: {
284 298
             id: this.validateForm.value.patientType,
285 299
           },
300
+          tripType:  this.validateForm.value.tripType || undefined,
301
+          remark:  this.validateForm.value.remark || undefined,
286 302
         }
287 303
       }
288 304
     }
@@ -317,8 +333,8 @@ export class PatientSearchComponent implements OnInit {
317 333
   }
318 334
 
319 335
   // 编辑
320
-  maskFlag: any = false;
321
-  coopData = {};
336
+  maskFlag:any = false;
337
+  coopData:any = {};
322 338
   edit(data) {
323 339
     this.initForm();
324 340
     this.validateForm.controls.hosId.setValue(data.hosId);
@@ -354,6 +370,8 @@ export class PatientSearchComponent implements OnInit {
354 370
     }else{
355 371
       this.validateForm.controls.patientType.setValue(null);
356 372
     }
373
+    this.validateForm.controls.tripType.setValue(data.tripType);
374
+    this.validateForm.controls.remark.setValue(data.remark);
357 375
 
358 376
     this.modal = true;
359 377
     this.add = false;
@@ -391,4 +409,98 @@ export class PatientSearchComponent implements OnInit {
391 409
       this.patientTypeList = data || [];
392 410
     });
393 411
 	}
412
+
413
+  // 获取出行方式
414
+	tripTypeList: any = [];
415
+	getTripTypeList() {
416
+    let postData = {
417
+      workOrderInspectScore: {
418
+        hosId: this.validateForm.value.hosId
419
+      },
420
+      idx: 0,
421
+      sum: 99999,
422
+    };
423
+    this.isLoading = true;
424
+    this.mainService
425
+      .getFetchDataList("simple/data", "workOrderInspectScore", postData)
426
+      .subscribe((res) => {
427
+        this.isLoading = false;
428
+        if (res.status == 200) {
429
+          this.tripTypeList = res.list;
430
+        }else{
431
+          this.tripTypeList = [];
432
+        }
433
+      });
434
+	}
435
+
436
+  // 注意事项获取焦点
437
+  isShowNoteList:boolean = false;
438
+  focusNote(){
439
+    this.isShowNoteList = true;
440
+    this.getNoteList();
441
+  }
442
+
443
+  // 选择注意事项
444
+  selectNote(name){
445
+    this.validateForm.controls.remark.setValue(name);
446
+    this.isShowNoteList = false;
447
+    // this.remarkEle.nativeElement.focus();
448
+  }
449
+
450
+  // 获取注意事项列表
451
+  noteList:any[] = [];
452
+  noteLoading:boolean = false;
453
+  getNoteList() {
454
+    this.noteLoading = true;
455
+    this.mainService.getDictionary('list', 'inspect_notes',).subscribe(result=>{
456
+      this.noteLoading = false;
457
+      this.noteList = result || [];
458
+    });
459
+  }
460
+
461
+  // 点击其他位置
462
+  clickExtra(e){
463
+    if(document.documentElement.contains(document.querySelector('#noteList')) && e.target !== document.querySelector('#noteFocus')){
464
+      this.isShowNoteList = false;
465
+    }
466
+  }
467
+
468
+  delModal: boolean = false; //删除模态框
469
+  tipsMsg1: string; //提示框信息
470
+  tipsMsg2: string; //操作后信息
471
+  confirmDelType: string; //确认的类型(启用/停用,删除)
472
+  showDelModal(
473
+    data,
474
+    tipsMsg1: string,
475
+    tipsMsg2: string,
476
+    type: string,
477
+  ) {
478
+    this.confirmDelType = type;
479
+    this.delModal = true;
480
+    this.coopData = data;
481
+    this.tipsMsg1 = tipsMsg1;
482
+    this.tipsMsg2 = tipsMsg2;
483
+  }
484
+  // 隐藏删除框
485
+  hideDelModal() {
486
+    this.delModal = false;
487
+  }
488
+  // 确认删除
489
+  confirmDel() {
490
+    this.btnLoading = true;
491
+    if (this.confirmDelType === "clearSign") {
492
+      //清空标记
493
+      this.mainService
494
+        .clearPatientMark({ patientId: this.coopData.id })
495
+        .subscribe((data:any) => {
496
+          this.btnLoading = false;
497
+          this.delModal = false;
498
+          if (data.status == 200) {
499
+            this.showPromptModal(this.tipsMsg2, true, "");
500
+          } else {
501
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
502
+          }
503
+        });
504
+    }
505
+  }
394 506
 }

+ 12 - 1
src/common.less

@@ -1,3 +1,6 @@
1
+textarea{
2
+  margin-bottom: 0!important;
3
+}
1 4
 .ant-table-tbody tr:nth-of-type(2n){
2 5
   background-color: #e9f7e9!important;
3 6
 }
@@ -117,7 +120,7 @@
117 120
 }
118 121
 
119 122
 .justify-content_flex-end {
120
-  justify-content: flex-end;
123
+  justify-content: flex-end !important;
121 124
 }
122 125
 
123 126
 .justify-content_space-between {
@@ -162,6 +165,14 @@
162 165
   width: 0;
163 166
   flex: 1;
164 167
 }
168
+.flex_2 {
169
+  width: 0;
170
+  flex: 2;
171
+}
172
+.flex_3 {
173
+  width: 0;
174
+  flex: 3;
175
+}
165 176
 
166 177
 /*显示顺序*/
167 178
 .order_2 {