浏览代码

解决冲突

seimin 2 周之前
父节点
当前提交
8cf6f5d50a
共有 23 个文件被更改,包括 519 次插入70 次删除
  1. 14 0
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect-closed-loop/configuration-inspect-closed-loop.component.html
  2. 7 3
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect-closed-loop/configuration-inspect-closed-loop.component.ts
  3. 23 3
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.html
  4. 10 1
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.less
  5. 8 0
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.ts
  6. 2 0
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect.component.ts
  7. 11 2
      src/app/share/add-inspect-info/add-inspect-info.component.html
  8. 32 3
      src/app/share/add-inspect-info/add-inspect-info.component.ts
  9. 11 2
      src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.html
  10. 32 3
      src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.ts
  11. 12 3
      src/app/share/edit-inspect-info2/edit-inspect-info2.component.html
  12. 42 4
      src/app/share/edit-inspect-info2/edit-inspect-info2.component.ts
  13. 50 8
      src/app/share/order-detail/order-detail.component.html
  14. 71 5
      src/app/share/order-detail/order-detail.component.ts
  15. 25 7
      src/app/views/fuwutai/fuwutai.component.ts
  16. 4 1
      src/app/views/hushijiandan/hushijiandan.component.html
  17. 53 9
      src/app/views/hushijiandan/hushijiandan.component.ts
  18. 5 0
      src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.html
  19. 10 3
      src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.ts
  20. 2 2
      src/app/views/inspect-info-config/inspect-info-config.component.html
  21. 17 2
      src/app/views/inspect-info-config/inspect-info-config.component.ts
  22. 4 4
      src/app/views/inspect-search/inspect-search.component.html
  23. 74 5
      src/app/views/inspect-search/inspect-search.component.ts

+ 14 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-closed-loop/configuration-inspect-closed-loop.component.html

@@ -34,6 +34,20 @@
34 34
               <nz-checkbox-group [(ngModel)]="item.postData.batchPatientDynamicKey"></nz-checkbox-group>
35 35
             </div>
36 36
           </ng-container>
37
+					<!-- 自动标记回科 -->
38
+					<div class="display_flex align-items_center mb8">
39
+					  <nz-form-label class="label">自动标记回科</nz-form-label>
40
+						<nz-checkbox-group [(ngModel)]="item.postData.pilAutoBackDept"></nz-checkbox-group>
41
+					</div>
42
+					<!-- 自动关闭时间 -->
43
+					<div class="display_flex align-items_center mb8" *ngIf="item.postData.pilAutoBackDept[0].checked">
44
+					  <nz-form-label class="label">自动关闭时间</nz-form-label>
45
+						<nz-input-number [(ngModel)]="item.postData.pilAutoBackDeptHour" nz-input [nzMin]="1" [nzMax]="99999" [nzStep]="1"></nz-input-number>&nbsp;&nbsp;<span class="unit">小时</span>
46
+					</div>
47
+					<!-- tip -->
48
+					<div class="display_flex align-items_center mb8 red" *ngIf="item.postData.pilAutoBackDept[0].checked">
49
+						自动标记回科根据闭环数据的最新操作日志标记,超过指定时间后自动标记回科
50
+					</div>
37 51
         </div>
38 52
         <!-- 自动建单配置 -->
39 53
         <div *ngIf="tabModalName=='automaticOrderCreation'">

+ 7 - 3
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-closed-loop/configuration-inspect-closed-loop.component.ts

@@ -55,7 +55,7 @@ export class ConfigurationInspectClosedLoopComponent implements OnInit {
55 55
      this.message.create("warning", "请先配置任务类型!");
56 56
      return;
57 57
    }
58
-
58
+	 let data = this.activeDictionaryKey.postData;
59 59
    let postData:any = {
60 60
      ...this.configs,
61 61
      taskType: this.tasktype.id,
@@ -63,7 +63,9 @@ export class ConfigurationInspectClosedLoopComponent implements OnInit {
63 63
      batchPatientBackDept: this.activeDictionaryKey.postData.batchPatientBackDept[0].checked ? 1 : 0,
64 64
      batchPatientCheckType: this.activeDictionaryKey.postData.batchPatientCheckType || 0,
65 65
      batchPatientDynamicKey: this.activeDictionaryKey.postData.batchPatientDynamicKey[0].checked ? 1 : 0,
66
-   };
66
+		 pilAutoBackDept: data.pilAutoBackDept[0].checked ? 1 : 0,
67
+		 pilAutoBackDeptHour: data.pilAutoBackDept[0].checked ? data.pilAutoBackDeptHour : undefined
68
+	 };
67 69
    console.log(postData);
68 70
    this.btnLoading = true;
69 71
    this.mainService
@@ -138,7 +140,9 @@ export class ConfigurationInspectClosedLoopComponent implements OnInit {
138 140
         this.activeDictionaryKey.postData.batchPatientBackDept[0].checked = this.configs.batchPatientBackDept == 1;
139 141
         this.activeDictionaryKey.postData.batchPatientCheckType = this.configs.batchPatientCheckType || 0;
140 142
         this.activeDictionaryKey.postData.batchPatientDynamicKey[0].checked = this.configs.batchPatientDynamicKey == 1;
141
-       }
143
+				this.activeDictionaryKey.postData.pilAutoBackDept[0].checked = this.configs.pilAutoBackDept == 1;
144
+				this.activeDictionaryKey.postData.pilAutoBackDeptHour = this.configs.pilAutoBackDeptHour || 0;
145
+			 }
142 146
      });
143 147
  }
144 148
 }

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

@@ -47,10 +47,12 @@
47 47
                 <th nzWidth="7%">排序号</th>
48 48
                 <th nzWidth="12%">检查项目标识</th>
49 49
                 <th nzWidth="12%">检查项目名称</th>
50
-                <th nzWidth="12%">检查类型</th>
50
+                <th nzWidth="10%">检查类型</th>
51 51
                 <th nzWidth="12%">默认检查科室</th>
52
-                <th nzWidth="30%">检查科室</th>
53
-                <th nzWidth="15%">操作</th>
52
+                <th nzWidth="12%">检查科室</th>
53
+								<th nzWidth="12%">预估检查时长</th>
54
+								<th nzWidth="12%">预约间隔时长</th>
55
+                <th nzWidth="14%">操作</th>
54 56
               </tr>
55 57
             </thead>
56 58
             <tbody>
@@ -61,6 +63,8 @@
61 63
                 <td>{{data.extra5DTO?.name}}</td>
62 64
                 <td>{{data.extra4DTO?.dept}}</td>
63 65
                 <td>{{data.deptList | multipleName: 'dept'}}</td>
66
+								<td>{{data.extra3}} <span *ngIf="data.extra3">分钟</span></td>
67
+								<td>{{data.extra1}} <span *ngIf="data.extra1">分钟</span></td>
64 68
                 <td>
65 69
                   <div class="coop">
66 70
                     <span (click)="showDelModal(data,'您确认要删除吗?','删除','del')">删除</span>
@@ -163,6 +167,22 @@
163 167
             </nz-select>
164 168
           </nz-form-control>
165 169
         </nz-form-item>
170
+				<nz-form-item>
171
+				  <nz-form-label [nzSpan]="6" nzFor="extra3">预估检查时长</nz-form-label>
172
+				  <nz-form-control [nzSpan]="18">
173
+				    <nz-input-group>
174
+							<nz-input-number formControlName="extra3" nz-input nzPlaceHolder="请输入预估检查时长" [nzMin]="1" [nzMax]="99999" [nzStep]="1"></nz-input-number>&nbsp;&nbsp;<span class="unit">分钟</span>
175
+				    </nz-input-group>
176
+				  </nz-form-control>
177
+				</nz-form-item>
178
+				<nz-form-item>
179
+				  <nz-form-label [nzSpan]="6" nzFor="extra1">预约间隔时长</nz-form-label>
180
+				  <nz-form-control [nzSpan]="18">
181
+				    <nz-input-group>
182
+							<nz-input-number formControlName="extra1" nz-input nzPlaceHolder="请输入预约间隔时长" [nzMin]="1" [nzMax]="99999" [nzStep]="1"></nz-input-number>&nbsp;&nbsp;<span class="unit">分钟</span>
183
+				    </nz-input-group>
184
+				  </nz-form-control>
185
+				</nz-form-item>
166 186
       </form>
167 187
     </div>
168 188
     <div class=" display_flex justify-content_flex-center">

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

@@ -250,7 +250,16 @@
250 250
               .ant-form-item-label {
251 251
                 text-align: left;
252 252
               }
253
-
253
+							
254
+							.ant-input-number{
255
+								width: 88%;
256
+							}
257
+							
258
+							.unit{
259
+								position: relative;
260
+								top: 5px;
261
+							}
262
+							
254 263
               .desc {
255 264
                 margin-top: 5px;
256 265
               }

+ 8 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.ts

@@ -62,6 +62,8 @@ export class ConfigurationInspectInspectsComponent implements OnInit {
62 62
     this.validateForm.controls.orders.setValue(data.orders);
63 63
     this.validateForm.controls.name.setValue(data.name);
64 64
     this.validateForm.controls.extra6.setValue(data.extra6);
65
+		this.validateForm.controls.extra3.setValue(data.extra3?data.extra3:null);
66
+		this.validateForm.controls.extra1.setValue(data.extra1?data.extra1:null);
65 67
     this.validateForm.controls.extra4.setValue(data.extra4DTO ? data.extra4DTO.id : null);
66 68
     this.validateForm.controls.extra5.setValue(data.extra5DTO ? data.extra5DTO.id : null);
67 69
     this.validateForm.controls.extra7.setValue(data.deptList ? data.deptList.map(v => v.id) : []);
@@ -109,6 +111,8 @@ export class ConfigurationInspectInspectsComponent implements OnInit {
109 111
           desc: "检查项目",
110 112
           orders: this.validateForm.value.orders,
111 113
           name: this.validateForm.value.name,
114
+					extra3: this.validateForm.value.extra3 || undefined,
115
+					extra1: this.validateForm.value.extra1 || undefined,
112 116
           extra6: this.validateForm.value.extra6,
113 117
           extra4: this.validateForm.value.extra4,
114 118
           extra5: this.validateForm.value.extra5,
@@ -123,6 +127,8 @@ export class ConfigurationInspectInspectsComponent implements OnInit {
123 127
           ...this.coopData,
124 128
           orders: this.validateForm.value.orders,
125 129
           name: this.validateForm.value.name,
130
+					extra3: this.validateForm.value.extra3 || undefined,
131
+					extra1: this.validateForm.value.extra1 || undefined,
126 132
           extra6: this.validateForm.value.extra6,
127 133
           value: this.validateForm.value.extra6,
128 134
           extra4: this.validateForm.value.extra4,
@@ -158,6 +164,8 @@ export class ConfigurationInspectInspectsComponent implements OnInit {
158 164
       orders: [null, [Validators.required]],
159 165
       name: [null, [Validators.required]],
160 166
       extra6: [null, [Validators.required]],
167
+			extra1: [null],
168
+			extra3: [null],
161 169
       extra4: [null],
162 170
       extra5: [null, [Validators.required]],
163 171
       extra7: [[]],

+ 2 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect.component.ts

@@ -65,6 +65,8 @@ export class ConfigurationInspectComponent implements OnInit {
65 65
       batchPatientBackDept: [{ label:'是否开启批量患者回科', value: 0 }],
66 66
       batchPatientCheckType: 0,
67 67
       batchPatientDynamicKey: [{ label:'是否支持动态密钥', value: 0 }],
68
+			pilAutoBackDept: [{ label:'是否自动标记回科', value: 0 }],
69
+			pilAutoBackDeptHour: 1,
68 70
     }},
69 71
   ]
70 72
 

+ 11 - 2
src/app/share/add-inspect-info/add-inspect-info.component.html

@@ -90,12 +90,21 @@
90 90
           <div class="formItem flex_1">
91 91
             <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
92 92
             <div class="value">
93
-              <nz-date-picker [(ngModel)]="inspectData.date" [nzAllowClear]="false" [nzShowToday]="false"></nz-date-picker>
94
-              <nz-time-picker class="ml8" nzFormat="HH:mm" [(ngModel)]="inspectData.time" [nzAllowEmpty]="false"></nz-time-picker>
93
+              <nz-date-picker [(ngModel)]="inspectData.date" [nzAllowClear]="false" [nzShowToday]="false" (ngModelChange)="dateChange($event)"></nz-date-picker>
94
+              <nz-time-picker class="ml8" nzFormat="HH:mm" [(ngModel)]="inspectData.time" [nzAllowEmpty]="false" (ngModelChange)="timeChange($event)"></nz-time-picker>
95 95
               <button nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">下一日</button>
96 96
             </div>
97 97
           </div>
98 98
         </div>
99
+				
100
+				<div class="row" *ngIf="endTime">
101
+				  <div class="formItem flex_1">
102
+				    <div class="name"><i class="icon_transport transport-required red"></i>预约结束时间:</div>
103
+				    <div class="value">
104
+							{{endTime}}
105
+				    </div>
106
+				  </div>
107
+				</div>
99 108
       </div>
100 109
     </div>
101 110
     <div class="display_flex justify-content_flex-center">

+ 32 - 3
src/app/share/add-inspect-info/add-inspect-info.component.ts

@@ -1,7 +1,7 @@
1 1
 import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2 2
 import { MainService } from '../../services/main.service';
3 3
 import { ToolService } from 'src/app/services/tool.service';
4
-import { startOfDay, format, addDays } from 'date-fns';
4
+import { startOfDay, format, addDays, addMinutes } from 'date-fns';
5 5
 import { NzMessageService } from 'ng-zorro-antd';
6 6
 import { Subject } from "rxjs";
7 7
 import { debounceTime } from "rxjs/operators";
@@ -20,7 +20,7 @@ export class AddInspectInfoComponent implements OnInit {
20 20
 
21 21
   @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
22 22
   @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
23
-
23
+	@Input() inspectAndPatientTransportConfig:any = {};
24 24
   constructor(
25 25
     private mainService: MainService,
26 26
     private tool: ToolService,
@@ -126,6 +126,7 @@ export class AddInspectInfoComponent implements OnInit {
126 126
   changeInspect(id){
127 127
     this.inspectDTO = this.inspectList.find(v => v.id == id);
128 128
     if(this.inspectDTO){
129
+			this.setTimeData();
129 130
       this.inspectData.id = this.inspectDTO.id;
130 131
       this.execDeptList = this.inspectDTO.deptList || [];
131 132
       this.inspectData.execDeptId = this.execDeptList.length === 1 ? this.execDeptList[0].id : undefined;
@@ -139,7 +140,35 @@ export class AddInspectInfoComponent implements OnInit {
139 140
       this.inspectData.type = '';
140 141
     }
141 142
   }
142
-
143
+	
144
+	// 选择日期
145
+	mdData:any;
146
+	dateChange(e){
147
+		this.mdData = format(e, 'yyyy-MM-dd')
148
+		this.setTimeData();
149
+	}
150
+	
151
+	// 选择时间
152
+	endTime:any;
153
+	timeChange(e){
154
+		if(e){
155
+			this.mdData = format(this.inspectData.date, 'yyyy-MM-dd')
156
+			this.setTimeData();
157
+		}
158
+	}
159
+	
160
+	// 设置结束时间
161
+	setTimeData(){
162
+		if(this.mdData && this.inspectData.time){
163
+			let num = this.inspectDTO.extra1 ? Number(this.inspectDTO.extra1) : undefined
164
+			let time = addMinutes(this.inspectData.time, num ? num : this.inspectAndPatientTransportConfig.yytimeGapMinute)
165
+			let time2 = format(time, 'HH:mm')
166
+			this.endTime = this.mdData +' '+ time2
167
+			let date = new Date(this.endTime);
168
+			this.inspectData.endCheckTime = date.getTime()
169
+		}
170
+	}
171
+	
143 172
   // 打开班次
144 173
   openInspect(e){
145 174
     if(e){

+ 11 - 2
src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.html

@@ -55,12 +55,21 @@
55 55
           <div class="formItem flex_1">
56 56
             <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
57 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>
58
+              <nz-date-picker [(ngModel)]="inspectData.date" [nzAllowClear]="false" [nzShowToday]="false" (ngModelChange)="dateChange($event)"></nz-date-picker>
59
+              <nz-time-picker class="ml8" nzFormat="HH:mm" [(ngModel)]="inspectData.time" [nzAllowEmpty]="false" (ngModelChange)="timeChange($event)"></nz-time-picker>
60 60
               <button nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">下一日</button>
61 61
             </div>
62 62
           </div>
63 63
         </div>
64
+				
65
+				<div class="row" *ngIf="endTime">
66
+				  <div class="formItem flex_1">
67
+				    <div class="name"><i class="icon_transport transport-required red"></i>预约结束时间:</div>
68
+				    <div class="value">
69
+							{{endTime}}
70
+				    </div>
71
+				  </div>
72
+				</div>
64 73
       </div>
65 74
     </div>
66 75
     <div class="display_flex justify-content_flex-center">

+ 32 - 3
src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.ts

@@ -1,7 +1,7 @@
1 1
 import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2 2
 import { MainService } from '../../services/main.service';
3 3
 import { ToolService } from 'src/app/services/tool.service';
4
-import { startOfDay, format, addDays } from 'date-fns';
4
+import { startOfDay, format, addDays, addMinutes } from 'date-fns';
5 5
 import { NzMessageService } from 'ng-zorro-antd';
6 6
 import { Subject } from "rxjs";
7 7
 import { debounceTime } from "rxjs/operators";
@@ -20,7 +20,7 @@ export class AddInspectThreeModalComponent implements OnInit {
20 20
 
21 21
   @Input() patientDTO: any;
22 22
   @Input() deptDisplay: any;
23
-
23
+	@Input() inspectAndPatientTransportConfig:any = {};
24 24
   @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
25 25
   @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
26 26
 
@@ -42,6 +42,7 @@ export class AddInspectThreeModalComponent implements OnInit {
42 42
     });
43 43
     this.hosId = this.tool.getCurrentHospital().id;
44 44
     this.currentDept = this.tool.getCurrentUserDept();
45
+		console.log(777, this.inspectAndPatientTransportConfig)
45 46
   }
46 47
 
47 48
   // 确认弹窗
@@ -74,7 +75,34 @@ export class AddInspectThreeModalComponent implements OnInit {
74 75
   nextDay() {
75 76
     this.inspectData.date = addDays(this.inspectData.date, 1);
76 77
   }
77
-
78
+	
79
+	// 选择日期
80
+	mdData:any = format(this.inspectData.date, 'yyyy-MM-dd');
81
+	dateChange(e){
82
+		this.mdData = format(e, 'yyyy-MM-dd')
83
+		this.setTimeData();
84
+	}
85
+
86
+	// 选择时间
87
+	endTime:any;
88
+	timeChange(e){
89
+		if(e){
90
+			this.setTimeData();
91
+		}
92
+	}
93
+	
94
+	// 设置结束时间
95
+	setTimeData(){
96
+		if(this.mdData && this.inspectData.time){
97
+			let num = this.inspectDTO.extra1 ? Number(this.inspectDTO.extra1) : undefined
98
+			let time = addMinutes(this.inspectData.time, num ? num : this.inspectAndPatientTransportConfig.yytimeGapMinute)
99
+			let time2 = format(time, 'HH:mm')
100
+			this.endTime = this.mdData +' '+ time2
101
+			let date = new Date(this.endTime);
102
+			this.inspectData.endCheckTime = date.getTime()
103
+		}
104
+	}
105
+	
78 106
   isLoading = false;
79 107
   inspectList: Array<any>; //检查项目列表
80 108
   // 获取检查项目
@@ -108,6 +136,7 @@ export class AddInspectThreeModalComponent implements OnInit {
108 136
   changeInspect(id){
109 137
     this.inspectDTO = this.inspectList.find(v => v.id == id);
110 138
     if(this.inspectDTO){
139
+			this.setTimeData();
111 140
       this.inspectData.id = this.inspectDTO.id;
112 141
       this.execDeptList = this.inspectDTO.deptList || [];
113 142
       this.inspectData.execDeptId = this.execDeptList.length === 1 ? this.execDeptList[0].id : undefined;

+ 12 - 3
src/app/share/edit-inspect-info2/edit-inspect-info2.component.html

@@ -59,8 +59,8 @@
59 59
           <div class="formItem flex_1">
60 60
             <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
61 61
             <div class="value">
62
-              <nz-date-picker [(ngModel)]="yyDate" [nzShowToday]="false"></nz-date-picker>
63
-              <nz-time-picker [nzDisabled]="!yyDate" class="ml8" nzFormat="HH:mm" [(ngModel)]="yyTime" [nzAllowEmpty]="false">
62
+              <nz-date-picker [(ngModel)]="yyDate" [nzShowToday]="false" (ngModelChange)="dateChange($event)"></nz-date-picker>
63
+              <nz-time-picker [nzDisabled]="!yyDate" class="ml8" nzFormat="HH:mm" [(ngModel)]="yyTime" [nzAllowEmpty]="false" (ngModelChange)="timeChange($event)">
64 64
               </nz-time-picker>
65 65
               <button [disabled]="!yyDate" nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">
66 66
                 下一日
@@ -68,7 +68,16 @@
68 68
             </div>
69 69
           </div>
70 70
         </div>
71
-
71
+				
72
+				<div class="row" *ngIf="endTime">
73
+				  <div class="formItem flex_1">
74
+				    <div class="name"><i class="icon_transport transport-required red"></i>预约结束时间:</div>
75
+				    <div class="value">
76
+							{{endTime}}
77
+				    </div>
78
+				  </div>
79
+				</div>
80
+				
72 81
         <div class="row">
73 82
           <div class="formItem flex_1">
74 83
             <div class="name"><i class="icon_transport transport-required red" style="visibility: hidden;"></i>医生备注:</div>

+ 42 - 4
src/app/share/edit-inspect-info2/edit-inspect-info2.component.ts

@@ -1,7 +1,7 @@
1 1
 import { Component, OnInit, Output, Input } from '@angular/core';
2 2
 import { EventEmitter } from '@angular/core';
3 3
 import { NzMessageService } from 'ng-zorro-antd';
4
-import { addDays, startOfMinute, format } from 'date-fns';
4
+import { addDays, startOfMinute, format, addMinutes } from 'date-fns';
5 5
 import { Subject } from "rxjs";
6 6
 import { debounceTime } from "rxjs/operators";
7 7
 import { ToolService } from 'src/app/services/tool.service';
@@ -19,7 +19,8 @@ export class EditInspectInfo2Component implements OnInit {
19 19
   @Input() remarkText:any;
20 20
   @Input() applyDept:any = {};
21 21
   @Input() patient:any = {};
22
-  @Input() execDeptList:any[] = [];
22
+  @Input() execDeptList:any;
23
+	@Input() inspectAndPatientTransportConfig:any = {};
23 24
   @Output() submitFormHand = new EventEmitter();
24 25
   @Output() cancelFlagHand = new EventEmitter();
25 26
   yyDate = null; //预约日期-患者其他服务
@@ -63,6 +64,8 @@ export class EditInspectInfo2Component implements OnInit {
63 64
     if(this.date){
64 65
       this.yyDate = new Date(this.date);
65 66
       this.yyTime = new Date(this.date);
67
+			this.mdData = format(this.yyDate, 'yyyy-MM-dd')
68
+			this.setTimeData();
66 69
     }
67 70
 
68 71
     if(this.execDeptList){
@@ -91,7 +94,41 @@ export class EditInspectInfo2Component implements OnInit {
91 94
   changeApplyDept(e){
92 95
     this.inspectData.patientId = undefined;
93 96
   }
94
-
97
+	
98
+	// 选择日期
99
+	mdData:any;
100
+	dateChange(e){
101
+		if(e){
102
+			this.mdData = format(e, 'yyyy-MM-dd')
103
+			this.setTimeData();
104
+		}else{
105
+			this.endTime = null
106
+		}
107
+	}
108
+	
109
+	// 选择时间
110
+	endTime:any;
111
+	timeChange(e){
112
+		if(e){
113
+			this.mdData = format(this.yyDate, 'yyyy-MM-dd')
114
+			this.setTimeData();
115
+		}else{
116
+			this.endTime = null
117
+		}
118
+	}
119
+	
120
+	// 设置结束时间
121
+	setTimeData(){
122
+		if(this.mdData && this.yyTime){
123
+			let num = this.execDeptList.extra1 ? Number(this.execDeptList.extra1) : undefined
124
+			let time = addMinutes(this.yyTime, num ? num : this.inspectAndPatientTransportConfig.yytimeGapMinute)
125
+			let time2 = format(time, 'HH:mm')
126
+			this.endTime = this.mdData +' '+ time2
127
+			let date = new Date(this.endTime);
128
+			this.inspectData.endCheckTime = date.getTime()
129
+		}
130
+	}
131
+	
95 132
   // =========================申请科室=====================
96 133
   applyDeptList: Array<any>; //申请科室列表
97 134
   // 获取申请科室
@@ -198,7 +235,8 @@ export class EditInspectInfo2Component implements OnInit {
198 235
       deptId: this.deptId,
199 236
       remark: this.remark,
200 237
       date: format(this.yyDate, 'yyyy-MM-dd') + ' ' + format(startOfMinute(this.yyTime), 'HH:mm:ss'),
201
-    });
238
+			endCheckTime: this.inspectData.endCheckTime
239
+		});
202 240
   }
203 241
 }
204 242
 

+ 50 - 8
src/app/share/order-detail/order-detail.component.html

@@ -35,7 +35,7 @@
35 35
       #osComponentRef3
36 36
       style="height: 90%; flex: 1"
37 37
       *ngIf="
38
-        tabType == 1 && orderInfo.taskType.associationType.value == 'other'
38
+        tabType == 1 && orderInfo && orderInfo.taskType.associationType.value == 'other'
39 39
       "
40 40
     >
41 41
       <div class="content orders">
@@ -112,6 +112,13 @@
112 112
               特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
113 113
             </div>
114 114
           </div>
115
+					<!-- <div class="info" nz-row *ngIf="orderInfo.yyEndTime">
116
+					  <div nz-col nzSpan="24">
117
+					    预约结束时间:{{
118
+					      orderInfo.yyEndTime
119
+					    }}
120
+					  </div>
121
+					</div> -->
115 122
         </div>
116 123
         <div class="center" *ngIf="amplificationShow">
117 124
           <div class="box">
@@ -163,7 +170,7 @@
163 170
       #osComponentRef4
164 171
       style="height: 90%; flex: 1"
165 172
       *ngIf="
166
-        tabType == 1 && orderInfo.taskType.associationType.value == 'specimen'
173
+        tabType == 1 && orderInfo && orderInfo.taskType.associationType.value == 'specimen'
167 174
       "
168 175
     >
169 176
       <div class="content orders">
@@ -240,6 +247,13 @@
240 247
               特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
241 248
             </div>
242 249
           </div>
250
+					<!-- <div class="info" nz-row *ngIf="orderInfo.yyEndTime">
251
+					  <div nz-col nzSpan="24">
252
+					    预约结束时间:{{
253
+					      orderInfo.yyEndTime
254
+					    }}
255
+					  </div>
256
+					</div> -->
243 257
         </div>
244 258
         <div class="center" *ngIf="amplificationShow">
245 259
           <div class="box">
@@ -291,7 +305,7 @@
291 305
       #osComponentRef5
292 306
       style="height: 90%; flex: 1"
293 307
       *ngIf="
294
-        tabType == 1 &&
308
+        tabType == 1 && orderInfo && 
295 309
         orderInfo.taskType.associationType.value == 'specimenPlan'
296 310
       "
297 311
     >
@@ -325,7 +339,7 @@
325 339
                 orderInfo.createDeptDTO ? orderInfo.createDeptDTO.dept : ""
326 340
               }}
327 341
             </div>
328
-            <div nz-col nzSpan="10">目标科室:{{ endDepts }}</div>
342
+            <div nz-col nzSpan="6">目标科室:{{ endDepts }}</div>
329 343
             <div nz-col nzSpan="4">
330 344
               预计接收:{{ orderInfo.expectReceiveNum }}
331 345
             </div>
@@ -351,6 +365,13 @@
351 365
               特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
352 366
             </div>
353 367
           </div>
368
+				<!-- 	<div class="info" nz-row *ngIf="orderInfo.yyEndTime">
369
+						<div nz-col nzSpan="4">
370
+						  预约结束时间:{{
371
+						    orderInfo.yyEndTime
372
+						  }}
373
+						</div>
374
+					</div> -->
354 375
         </div>
355 376
         <div class="center" *ngIf="amplificationShow">
356 377
           <div class="box">
@@ -402,7 +423,7 @@
402 423
       #osComponentRef6
403 424
       style="height: 90%; flex: 1"
404 425
       *ngIf="
405
-        tabType == 1 &&
426
+        tabType == 1 && orderInfo &&
406 427
         (orderInfo.taskType.associationType.value == 'drugsBag' ||
407 428
           orderInfo.taskType.associationType.value == 'jPBag')
408 429
       "
@@ -462,6 +483,13 @@
462 483
               特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
463 484
             </div>
464 485
           </div>
486
+					<!-- <div class="info" nz-row *ngIf="orderInfo.yyEndTime">
487
+						<div nz-col nzSpan="24">
488
+						  预约结束时间:{{
489
+						    orderInfo.yyEndTime
490
+						  }}
491
+						</div>
492
+					</div> -->
465 493
         </div>
466 494
         <div class="center" *ngIf="amplificationShow">
467 495
           <div class="box">
@@ -599,7 +627,7 @@
599 627
       #osComponentRef1
600 628
       style="height: 90%; flex: 1"
601 629
       *ngIf="
602
-        tabType == 1 &&
630
+        tabType == 1 && orderInfo && 
603 631
         (orderInfo.taskType.associationType.value == 'inspect' ||
604 632
           orderInfo.taskType.associationType.value == 'patientTransport')
605 633
       "
@@ -707,6 +735,13 @@
707 735
               特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
708 736
             </div>
709 737
           </div>
738
+					<!-- <div class="info" nz-row *ngIf="orderInfo.yyEndTime">
739
+					  <div nz-col nzSpan="24">
740
+					    预约结束时间:{{
741
+					      orderInfo.yyEndTime
742
+					    }}
743
+					  </div>
744
+					</div> -->
710 745
         </div>
711 746
         <div class="center" *ngIf="amplificationShow">
712 747
           <div class="box">
@@ -866,7 +901,7 @@
866 901
     #osComponentRef9
867 902
     style="height: 90%; flex: 1"
868 903
     *ngIf="
869
-      tabType == 1 && orderInfo.taskType.associationType.value == 'ordinary'
904
+      tabType == 1 && orderInfo && orderInfo.taskType.associationType.value == 'ordinary'
870 905
     "
871 906
   >
872 907
     <div class="content orders">
@@ -943,6 +978,13 @@
943 978
             特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
944 979
           </div>
945 980
         </div>
981
+			<!-- 	<div class="info" nz-row *ngIf="orderInfo.yyEndTime">
982
+				  <div nz-col nzSpan="24">
983
+				    预约结束时间:{{
984
+				      orderInfo.yyEndTime
985
+				    }}
986
+				  </div>
987
+				</div> -->
946 988
       </div>
947 989
       <div class="center" *ngIf="amplificationShow">
948 990
         <div class="box">
@@ -1271,7 +1313,7 @@
1271 1313
       </div>
1272 1314
     </overlay-scrollbars>
1273 1315
   </div>
1274
-  <div class="btns">
1316
+  <div class="btns" *ngIf="orderInfo">
1275 1317
     <button *ngIf="orderInfo.taskType.associationType.value == 'ordinary' && orderInfo.taskType.ordinaryField.value == 'blood'" class="btn default" nz-button nzType="default" (click)="viewDetail(orderInfo, 'blood')">
1276 1318
       业务数据
1277 1319
     </button>

+ 71 - 5
src/app/share/order-detail/order-detail.component.ts

@@ -10,6 +10,8 @@ import { MainService } from "../../services/main.service";
10 10
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
11 11
 import { NzMessageService } from "ng-zorro-antd";
12 12
 import { forkJoin } from "rxjs";
13
+import { ToolService } from "../../services/tool.service";
14
+import { startOfDay, endOfDay, format, startOfMinute, addMinutes } from 'date-fns';
13 15
 @Component({
14 16
   selector: "app-order-detail",
15 17
   templateUrl: "./order-detail.component.html",
@@ -65,7 +67,8 @@ export class OrderDetailComponent implements OnInit {
65 67
     private message: NzMessageService,
66 68
     private fb: FormBuilder,
67 69
     private route: ActivatedRoute,
68
-    private mainService: MainService
70
+    private mainService: MainService,
71
+		private tool: ToolService,
69 72
   ) {}
70 73
   maskFlag: any = false;
71 74
   id: number; //工单id
@@ -82,10 +85,11 @@ export class OrderDetailComponent implements OnInit {
82 85
   recLoading: boolean = false; //撤回并删除按钮loading状态
83 86
   btnLoading: boolean = false; //确认按钮loading状态
84 87
   amplificationShow = true;
85
-
88
+	hosId:any = this.tool.getCurrentHospital().id; //当前院区
89
+	
86 90
   ngOnInit() {
87 91
     this.tabType = this.route.snapshot.params.type || 1;
88
-    this.getInfo();
92
+		this.getInspectAndPatientTransportConfigTasktype()
89 93
     this.initForm();
90 94
   }
91 95
   ngOnDestroy() {}
@@ -94,7 +98,57 @@ export class OrderDetailComponent implements OnInit {
94 98
   amplification(){
95 99
     this.amplificationShow = !this.amplificationShow;
96 100
   }
97
-
101
+	
102
+  //获取检查页面任务类型
103
+  getInspectAndPatientTransportConfigTasktype() {
104
+    let postData = {
105
+      idx: 0,
106
+      sum: 10,
107
+      taskType: {
108
+        simpleQuery: true,
109
+        hosId: {
110
+          id: this.hosId
111
+        },
112
+        associationType: {
113
+          key:"association_types",
114
+          value: 'inspect'
115
+        }
116
+      }
117
+    };
118
+    this.mainService
119
+      .getFetchDataList("simple/data", "taskType", postData)
120
+      .subscribe((result) => {
121
+        if (result.status == 200) {
122
+          let tasktype:any = result.list[0] || {};
123
+          this.getInspectAndPatientTransportConfig(tasktype);
124
+        }
125
+      });
126
+  }
127
+  // 获取检查页面信息配置
128
+	configObj:any;
129
+  getInspectAndPatientTransportConfig(tasktype) {
130
+    let postData = {
131
+      idx: 0,
132
+      sum: 10,
133
+      taskTypeConfig: {
134
+        taskTypeDTO: {
135
+          hosId: {
136
+            id: this.hosId
137
+          },
138
+          associationType: tasktype.associationType
139
+        }
140
+      }
141
+    };
142
+    this.mainService
143
+      .getFetchDataList("simple/data", "taskTypeConfig", postData)
144
+      .subscribe((result) => {
145
+        if (result.status == 200) {
146
+          this.configObj = result.list[0] || {};
147
+					this.getInfo();
148
+        }
149
+      });
150
+  }
151
+	
98 152
   // 获取工单详情
99 153
   middleDept = []; //中间科室数组
100 154
   getInfo() {
@@ -105,7 +159,19 @@ export class OrderDetailComponent implements OnInit {
105 159
     this.mainService
106 160
       .getFetchData("api", "workOrder", this.id)
107 161
       .subscribe((data) => {
108
-        this.orderInfo = data.data;
162
+				let obj = data.data
163
+				if(obj.yyTime){
164
+					obj.newTime = format(new Date(obj.yyTime), 'MM-dd HH:mm')
165
+					if(obj.endCheckTime){
166
+						obj.newTime2 = format(new Date(obj.endCheckTime), 'HH:mm')
167
+					}else{
168
+						obj.newTime2 = format(addMinutes(new Date(obj.yyTime), this.configObj.yytimeGapMinute), 'HH:mm')
169
+					}
170
+					obj.yyEndTime = obj.newTime + '--' + obj.newTime2
171
+				}else{
172
+					obj.yyEndTime = null
173
+				}
174
+        this.orderInfo = obj;
109 175
         if (data.data.middleDept) {
110 176
           this.middleDept = data.data.middleDept.map((item) => item.dept);
111 177
         } else {

+ 25 - 7
src/app/views/fuwutai/fuwutai.component.ts

@@ -21,7 +21,7 @@ import { Subject, forkJoin } from "rxjs";
21 21
 import { debounceTime, filter, map } from "rxjs/operators";
22 22
 import { SourceId } from "src/app/type/types";
23 23
 import { ToolService } from 'src/app/services/tool.service';
24
-import { addDays, differenceInCalendarDays, getHours, getMinutes, setMinutes, parse, format, addHours, startOfDay, endOfDay } from 'date-fns';
24
+import { addDays, differenceInCalendarDays, getHours, getMinutes, setMinutes, parse, format, addHours, startOfDay, endOfDay, addMinutes } from 'date-fns';
25 25
 import { UploadFile } from 'ng-zorro-antd';
26 26
 import { HttpRequest, HttpClient, HttpResponse } from '@angular/common/http';
27 27
 import cloneDeep from 'lodash-es/cloneDeep'
@@ -5631,14 +5631,20 @@ export class FuwutaiComponent implements OnInit {
5631 5631
       // 如果是患者陪检,则没有起点科室,终点科室
5632 5632
       if(taskType.associationTypeValue === 'inspect'){
5633 5633
         this.linkCheckLis = [];
5634
-        if (data.data && Array.isArray(data.data.data) && data.data.data.length) {
5634
+        if (data.data && Array.isArray(data.data.data) && data.data.data.length>0) {
5635 5635
           let arr = [];
5636 5636
           data.data.data.forEach((e) => {
5637
+						e.newTime = format(new Date(e.yyTime), 'MM-dd HH:mm')
5638
+						if(e.inspectCheckType.extra1){
5639
+							e.newTime2 = format(addMinutes(new Date(e.yyTime), e.inspectCheckType.extra1), 'HH:mm')
5640
+						}else{
5641
+							e.newTime2 = format(addMinutes(new Date(e.yyTime), this.inspectAndPatientTransportConfig.yytimeGapMinute), 'HH:mm')
5642
+						}
5637 5643
             arr.push({
5638 5644
               execDeptId: e.execDept.id,
5639 5645
               yyTime: e.yyTime,
5640 5646
               priority: e.priority,
5641
-              label: (e.yyTime || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName + '-' + e.inspectCode || "检查"),
5647
+              label: (e.newTime + '--' + e.newTime2 || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName + '-' + e.inspectCode || "检查"),
5642 5648
               value: e["id"],
5643 5649
               checked: false,
5644 5650
               remark: e.remark,
@@ -7271,14 +7277,20 @@ export class FuwutaiComponent implements OnInit {
7271 7277
 
7272 7278
       this.mainService.getdeptList(value, this.applyDept, patientCode, (taskType.associationTypeValue === 'inspect' ? format(startOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined), (taskType.associationTypeValue === 'inspect' ? format(endOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined)).subscribe((data:any) => {
7273 7279
         this.linkCheckLis = [];
7274
-        if(data.data && Array.isArray(data.data.data) && data.data.data.length) {
7280
+        if(data.data && Array.isArray(data.data.data) && data.data.data.length>0) {
7275 7281
           let arr = [];
7276 7282
           data.data.data.forEach((e) => {
7283
+						e.newTime = format(new Date(e.yyTime), 'MM-dd HH:mm')
7284
+						if(e.inspectCheckType.extra1){
7285
+							e.newTime2 = format(addMinutes(new Date(e.yyTime), e.inspectCheckType.extra1), 'HH:mm')
7286
+						}else{
7287
+							e.newTime2 = format(addMinutes(new Date(e.yyTime), this.inspectAndPatientTransportConfig.yytimeGapMinute), 'HH:mm')
7288
+						}
7277 7289
             arr.push({
7278 7290
               execDeptId: e.execDept.id,
7279 7291
               yyTime: e.yyTime,
7280 7292
               priority: e.priority,
7281
-              label: (e.yyTime || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName + '-' + e.inspectCode || "检查"),
7293
+              label: (e.newTime + '--' + e.newTime2 || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName + '-' + e.inspectCode || "检查"),
7282 7294
               value: e["id"],
7283 7295
               checked: false,
7284 7296
             });
@@ -7336,14 +7348,20 @@ export class FuwutaiComponent implements OnInit {
7336 7348
   refreshInspectList(){
7337 7349
     this.linkCheckLis = [];
7338 7350
     this.mainService.getdeptList(this.radioValueZy, this.applyDept, this.patientZy, format(startOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss'), format(endOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss')).subscribe((data:any) => {
7339
-      if (data.data && Array.isArray(data.data.data) && data.data.data.length) {
7351
+      if (data.data && Array.isArray(data.data.data) && data.data.data.length>0) {
7340 7352
         let arr = [];
7341 7353
         data.data.data.forEach((e) => {
7354
+					e.newTime = format(new Date(e.yyTime), 'MM-dd HH:mm')
7355
+					if(e.inspectCheckType.extra1){
7356
+						e.newTime2 = format(addMinutes(new Date(e.yyTime), e.inspectCheckType.extra1), 'HH:mm')
7357
+					}else{
7358
+						e.newTime2 = format(addMinutes(new Date(e.yyTime), this.inspectAndPatientTransportConfig.yytimeGapMinute), 'HH:mm')
7359
+					}
7342 7360
           arr.push({
7343 7361
             execDeptId: e.execDept.id,
7344 7362
             yyTime: e.yyTime,
7345 7363
             priority: e.priority,
7346
-            label: (e.yyTime || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName + '-' + e.inspectCode || "检查"),
7364
+            label: (e.newTime + '--' + e.newTime2 || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName + '-' + e.inspectCode || "检查"),
7347 7365
             value: e["id"],
7348 7366
             checked: false,
7349 7367
           });

+ 4 - 1
src/app/views/hushijiandan/hushijiandan.component.html

@@ -2808,4 +2808,7 @@
2808 2808
 <app-specimen-package-list-modal *ngIf="isShowSpecimenPackageList" (closeModelHs)="closeSpecimenPackageList($event)" [specimenPackageStateValue]="specimenPackageStateValue"></app-specimen-package-list-modal>
2809 2809
 
2810 2810
 <!-- 追加检查 -->
2811
-<app-add-inspect-two-modal *ngIf="isShowAddInspect" [deptDisplay]="deptDisplay" (closeModelHs)="closeAddInspectModel($event)" (confirmModelHs)="confirmAddInspectModel($event)"></app-add-inspect-two-modal>
2811
+<!-- <app-add-inspect-two-modal *ngIf="isShowAddInspect" [deptDisplay]="deptDisplay" (closeModelHs)="closeAddInspectModel($event)" (confirmModelHs)="confirmAddInspectModel($event)"></app-add-inspect-two-modal> -->
2812
+
2813
+<!-- 追加检查项目 -->
2814
+<app-add-inspect-three-modal *ngIf="isShowAddInspect" [inspectAndPatientTransportConfig]="inspectAndPatientTransportConfig" [patientDTO]="patientMsg" [deptDisplay]="deptDisplay" (closeModelHs)="closeAddInspectModel($event)" (confirmModelHs)="confirmAddInspectModel($event)"></app-add-inspect-three-modal>

+ 53 - 9
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -34,7 +34,9 @@ import {
34 34
   startOfDay,
35 35
   endOfDay,
36 36
   parse,
37
-	subHours
37
+	subHours,
38
+	startOfMinute,
39
+	addMinutes
38 40
 } from "date-fns";
39 41
 import { SourceId } from "src/app/type/types";
40 42
 import cloneDeep from 'lodash-es/cloneDeep'
@@ -934,7 +936,7 @@ export class HushijiandanComponent implements OnInit {
934 936
         if (result.status == 200) {
935 937
           let inspectAndPatientTransportConfig = result.list[0] || {};
936 938
           this.inspectAndPatientTransportConfig = {...this.inspectAndPatientTransportConfig, ...inspectAndPatientTransportConfig};
937
-
939
+					
938 940
           // 是否显示排队信息
939 941
           if(this.inspectAndPatientTransportConfig.queuingInformation == 1){
940 942
             this.getQueuingInformation();
@@ -3501,13 +3503,19 @@ export class HushijiandanComponent implements OnInit {
3501 3503
         if (data.status == 200 && data.data && data.data.length) {
3502 3504
           let arr = [];
3503 3505
           data.data.forEach((e) => {
3504
-            arr.push({
3505
-              execDeptId: e.execDept.id,
3506
-              yyTime: e.yyTime,
3506
+						e.newTime = format(new Date(e.yyTime), 'MM-dd HH:mm')
3507
+						if(e.endCheckTime){
3508
+							e.newTime2 = format(new Date(e.endCheckTime), 'HH:mm')
3509
+						}else{
3510
+							e.newTime2 = format(addMinutes(new Date(e.yyTime), this.inspectAndPatientTransportConfig.yytimeGapMinute), 'HH:mm')
3511
+						}
3512
+						arr.push({
3513
+						  execDeptId: e.execDept.id,
3514
+						  yyTime: e.yyTime,
3507 3515
               priority: e.priority,
3508 3516
               manualCreate: e.manualCreate,
3509 3517
               label:
3510
-                (e.yyTime || "") +
3518
+                (e.newTime + '--' + e.newTime2 || "") +
3511 3519
                 " " +
3512 3520
                 (this.deptDisplay == 2
3513 3521
                   ? e.execDept.deptalias
@@ -5687,13 +5695,19 @@ export class HushijiandanComponent implements OnInit {
5687 5695
         if (data.status == 200 && data.data && data.data.length) {
5688 5696
           let arr = [];
5689 5697
           data.data.forEach((e) => {
5698
+						e.newTime = format(new Date(e.yyTime), 'MM-dd HH:mm')
5699
+						if(e.endCheckTime){
5700
+							e.newTime2 = format(new Date(e.endCheckTime), 'HH:mm')
5701
+						}else{
5702
+							e.newTime2 = format(addMinutes(new Date(e.yyTime), this.inspectAndPatientTransportConfig.yytimeGapMinute), 'HH:mm')
5703
+						}
5690 5704
             arr.push({
5691 5705
               execDeptId: e.execDept.id,
5692 5706
               yyTime: e.yyTime,
5693 5707
               priority: e.priority,
5694 5708
               manualCreate: e.manualCreate,
5695 5709
               label:
5696
-                (e.yyTime || "") +
5710
+                (e.newTime + '--' + e.newTime2 || "") +
5697 5711
                 " " +
5698 5712
                 (this.deptDisplay == 2
5699 5713
                   ? e.execDept.deptalias
@@ -5736,8 +5750,8 @@ export class HushijiandanComponent implements OnInit {
5736 5750
     console.log(e);
5737 5751
     let obj = JSON.parse(e);
5738 5752
     this.isShowAddInspect = obj.show;
5753
+		let user = JSON.parse(localStorage.getItem("user"));
5739 5754
     if(obj.type == 2){
5740
-      let user = JSON.parse(localStorage.getItem("user"));
5741 5755
       // 手动添加
5742 5756
       let postData:any = {
5743 5757
         inspectList: obj.list.map(v => ({
@@ -5765,6 +5779,36 @@ export class HushijiandanComponent implements OnInit {
5765 5779
             this.message.error(data.msg || '追加检查失败!')
5766 5780
           }
5767 5781
         });
5768
-    }
5782
+    }else{
5783
+			let postData:any = {
5784
+			  inspectList: [{
5785
+			    patientCode: this.patientMsg.patientCode,
5786
+			    patientName: this.patientMsg.patientName,
5787
+			    barCode: this.patientMsg.barCode,
5788
+			    inspectCheckType: { id: obj.inspectData.id },
5789
+			    applyDeptId: user.user.dept.id,
5790
+			    execDeptId: obj.inspectData.execDeptId,
5791
+			    bedNum: this.patientMsg.bedNum,
5792
+			    hosId: this.patientMsg.hosId,
5793
+			    yyTime: format(new Date(obj.inspectData.date), 'yyyy-MM-dd ') + format(startOfMinute(new Date(obj.inspectData.time)), 'HH:mm:ss'),
5794
+					endCheckTime: obj.inspectData.endCheckTime
5795
+				}] || undefined,
5796
+			};
5797
+			this.maskFlag = this.message.loading("正在加载中..", {
5798
+			  nzDuration: 0,
5799
+			}).messageId;
5800
+			this.mainService
5801
+			  .simplePost("addData", "inspect", postData)
5802
+			  .subscribe((data:any) => {
5803
+			    this.message.remove(this.maskFlag);
5804
+			    this.maskFlag = false;
5805
+			    if (data.status == 200) {
5806
+			      this.message.success('追加检查成功!')
5807
+			      this.refreshInspectList();
5808
+			    } else {
5809
+			      this.message.error(data.msg || '追加检查失败!')
5810
+			    }
5811
+			  });
5812
+		}
5769 5813
   }
5770 5814
 }

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

@@ -195,6 +195,11 @@
195 195
           <nz-form-label class="label">是否开通非预约检查顺延</nz-form-label>
196 196
           <nz-checkbox-group [(ngModel)]="inspectDelayOneDay"></nz-checkbox-group>
197 197
         </div>
198
+				<!-- 默认预约间隔时长(分钟) -->
199
+				<div class="display_flex align-items_center mb8">
200
+				  <nz-form-label class="label" nzRequired>默认预约间隔时长(分钟)</nz-form-label>
201
+				  <nz-input-number [(ngModel)]="yytimeGapMinute" [nzMin]="1" [nzMax]="99999" [nzStep]="1"></nz-input-number>
202
+				</div>
198 203
         <!-- 检查预约不进行工单合并 -->
199 204
         <!-- <div class="display_flex align-items_center mb8">
200 205
           <nz-form-label class="label">检查预约不进行工单合并</nz-form-label>

+ 10 - 3
src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.ts

@@ -127,7 +127,10 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
127 127
     { label: '预约陪检', value: 1, },
128 128
     { label: '陪检信息配置', value: 2, },
129 129
   ];
130
-
130
+	
131
+	// 默认预约间隔时长
132
+	yytimeGapMinute:any;
133
+	
131 134
   changeBatchSignExecutionDept(e){
132 135
     if(!e[0].checked){
133 136
       this.batchSignExecutionParent = [
@@ -307,6 +310,10 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
307 310
       this.msg.create("warning", "请选择批量陪检配置方式!");
308 311
       return;
309 312
     }
313
+		if(!this.yytimeGapMinute){
314
+		  this.msg.create("warning", "请输入默认预约间隔时长!");
315
+		  return;
316
+		}
310 317
     // if(!this.handoverMode){
311 318
     //   this.msg.create("warning", "请选择交接方式!");
312 319
     //   return;
@@ -350,7 +357,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
350 357
       addService: this.addService[0].checked ? 1 : 0,
351 358
       addServiceTaskIds: this.addServiceTaskIds.length ? this.addServiceTaskIds.toString() : undefined,
352 359
       batchInspectType: this.radioBatchInspectTypesValue || undefined,
353
-
360
+			yytimeGapMinute: this.yytimeGapMinute || undefined,
354 361
 
355 362
       timeMod: this.timeMod || undefined,
356 363
       batchInspectAutoClearTime: this.batchInspectAutoClearTime ? format(this.batchInspectAutoClearTime, 'yyyy-MM-dd HH:mm:ss') : undefined,
@@ -454,7 +461,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
454 461
           // this.radioCheckModesValue = this.configs.checkType.id;
455 462
           // this.autoCreateOrders[0].checked = this.configs.autoCreate == 1;
456 463
           // this.autoDepts[0].checked = this.configs.autoDept == 1;
457
-
464
+					this.yytimeGapMinute = this.configs.yytimeGapMinute || undefined;
458 465
           this.radioBatchInspectTypesValue = this.configs.batchInspectType || undefined;
459 466
           if(this.configs.signTypeIds){
460 467
             let ids = this.configs.signTypeIds.split(',');

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

@@ -106,8 +106,8 @@
106 106
                   <span class="circle red" title="无预约时间检查"></span>
107 107
                 </ng-container>
108 108
               </ng-template>
109
-              <span [title]="inspect.remark" *ngIf="inspect.remark"><i class="icon_transport transport-chaoshi"></i>{{(inspect.yyTime || "") + " " + (inspect.execDept ? (deptDisplay == 2 ? inspect.execDept.deptalias : inspect.execDept.dept) : '') + " 进行 " + (inspect.inspectName + '-' + inspect.inspectCode || "检查")}} <span class="inspectState" *ngIf="inspect.gdId" (click)="detail($event, inspect.gdId)">{{inspect.inspectState?.name}}</span></span>
110
-              <span *ngIf="!inspect.remark">{{(inspect.yyTime || "") + " " + (inspect.execDept ? (deptDisplay == 2 ? inspect.execDept.deptalias : inspect.execDept.dept) : '') + " 进行 " + (inspect.inspectName + '-' + inspect.inspectCode || "检查")}} <span class="inspectState" *ngIf="inspect.gdId" (click)="detail($event, inspect.gdId)">{{inspect.inspectState?.name}}</span></span>
109
+              <span [title]="inspect.remark" *ngIf="inspect.remark"><i class="icon_transport transport-chaoshi"></i>{{(inspect.yyEndTime || "") + " " + (inspect.execDept ? (deptDisplay == 2 ? inspect.execDept.deptalias : inspect.execDept.dept) : '') + " 进行 " + (inspect.inspectName + '-' + inspect.inspectCode || "检查")}} <span class="inspectState" *ngIf="inspect.gdId" (click)="detail($event, inspect.gdId)">{{inspect.inspectState?.name}}</span></span>
110
+              <span *ngIf="!inspect.remark">{{(inspect.yyEndTime || "") + " " + (inspect.execDept ? (deptDisplay == 2 ? inspect.execDept.deptalias : inspect.execDept.dept) : '') + " 进行 " + (inspect.inspectName + '-' + inspect.inspectCode || "检查")}} <span class="inspectState" *ngIf="inspect.gdId" (click)="detail($event, inspect.gdId)">{{inspect.inspectState?.name}}</span></span>
111 111
             </span>
112 112
             <span *ngIf="!inspect.gdId" class="icon_transport transport-weibiaoti2010104" (click)="editInspect({data: data, inspect: inspect})"></span>
113 113
             <span *ngIf="!inspect.gdId" class="icon_transport transport-shanchu1" (click)="showDelModal({data: data, inspect: inspect}, '您确认要删除吗?','删除','delInspect')"></span>

+ 17 - 2
src/app/views/inspect-info-config/inspect-info-config.component.ts

@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
2 2
 import { ToolService } from 'src/app/services/tool.service';
3 3
 import { MainService } from 'src/app/services/main.service';
4 4
 import { NzMessageService } from 'ng-zorro-antd';
5
-import { startOfDay, endOfDay, format, startOfMinute } from 'date-fns';
5
+import { startOfDay, endOfDay, format, startOfMinute, addMinutes } from 'date-fns';
6 6
 import { Subject } from 'rxjs';
7 7
 import { debounceTime } from 'rxjs/operators';
8 8
 import { Location } from '@angular/common';
@@ -329,6 +329,20 @@ export class InspectInfoConfigComponent implements OnInit {
329 329
         if (data.status == 200) {
330 330
           let listOfData = data.list || [];
331 331
           listOfData.forEach(v => {
332
+						for(let i of v.inspects){
333
+							if(i.yyTime){
334
+								i.newTime = format(new Date(i.yyTime), 'MM-dd HH:mm')
335
+								if(i.endCheckTime){
336
+									i.newTime2 = format(new Date(i.endCheckTime), 'HH:mm')
337
+								}else{
338
+									i.newTime2 = format(addMinutes(new Date(i.yyTime), this.configs.yytimeGapMinute), 'HH:mm')
339
+								}
340
+								i.yyEndTime = i.newTime + '--' + i.newTime2
341
+							}else{
342
+								i.newTime = null
343
+								i.newTime2 = null
344
+							}
345
+						}
332 346
             if(v.illnessState){
333 347
               v.illnessStateCopy = v.illnessState.id;
334 348
             }
@@ -403,7 +417,8 @@ export class InspectInfoConfigComponent implements OnInit {
403 417
         bedNum: this.patientDTO.bedNum,
404 418
         hosId: this.hosId,
405 419
         yyTime: format(new Date(obj.inspectData.date), 'yyyy-MM-dd ') + format(startOfMinute(new Date(obj.inspectData.time)), 'HH:mm:ss'),
406
-      }] || undefined,
420
+				endCheckTime: obj.inspectData.endCheckTime
421
+			}] || undefined,
407 422
     };
408 423
     this.maskFlag = this.message.loading("正在加载中..", {
409 424
       nzDuration: 0,

+ 4 - 4
src/app/views/inspect-search/inspect-search.component.html

@@ -60,7 +60,7 @@
60 60
             <th nzWidth="14%">检查单号|检查项目</th>
61 61
             <th nzWidth="14%">预约时间|入库时间</th>
62 62
             <th nzWidth="8%">检查状态</th>
63
-            <th nzWidth="8%">陪检人员</th>
63
+            <th nzWidth="10%">陪检人员</th>
64 64
             <th nzWidth="14%">陪检方式|注意事项</th>
65 65
             <th nzWidth="10%">操作</th>
66 66
           </tr>
@@ -72,7 +72,7 @@
72 72
             <td>{{ data.applyDept?.dept }}<br>{{ data.remark }}</td>
73 73
             <td>{{ data.execDept?.dept }}</td>
74 74
             <td>{{ data.inspectCode }}<br>{{data.inspectName}}</td>
75
-            <td>{{ data.yyTime }}<br>{{ data.createTime | date:'yyyy-MM-dd HH:mm:ss' }}</td>
75
+            <td>{{ data.yyEndTime }}<br>{{ data.createTime | date:'yyyy-MM-dd HH:mm:ss' }}</td>
76 76
             <td>{{ data.inspectState?.name}}</td>
77 77
             <td>{{ data.workerName }}</td>
78 78
             <td>{{ data.patientDTO?.tripTypeDTO?.inspectMode }}<br>{{ data.patientDTO?.remark }}</td>
@@ -100,10 +100,10 @@
100 100
 </app-prompt-modal>
101 101
 
102 102
 <!-- 修改检查 -->
103
-<app-edit-inspect-info2 [patient]="coopData.patientDTO" [applyDept]="coopData.applyDept" [execDeptList]="coopData.inspectCheckType && coopData.inspectCheckType.deptList" [execDeptId]="coopData.execDept && coopData.execDept.id" [remarkText]="coopData.remark" [date]="coopData.yyTime" *ngIf="isShowSelectDate" (submitFormHand)="submitSelectDate($event)" (cancelFlagHand)="cancelSelectDate($event)"></app-edit-inspect-info2>
103
+<app-edit-inspect-info2 [inspectAndPatientTransportConfig]="configs" [patient]="coopData.patientDTO" [applyDept]="coopData.applyDept" [execDeptList]="coopData.inspectCheckType && coopData.inspectCheckType.deptList" [execDeptId]="coopData.execDept && coopData.execDept.id" [remarkText]="coopData.remark" [date]="coopData.yyTime" *ngIf="isShowSelectDate" (submitFormHand)="submitSelectDate($event)" (cancelFlagHand)="cancelSelectDate($event)"></app-edit-inspect-info2>
104 104
 
105 105
 <!-- 新增检查 -->
106
-<app-add-inspect-info *ngIf="isShowAddInspect" (closeModelHs)="closeAddInspectModel($event)" (confirmModelHs)="confirmAddInspectModel($event)"></app-add-inspect-info>
106
+<app-add-inspect-info *ngIf="isShowAddInspect" [inspectAndPatientTransportConfig]="configs" (closeModelHs)="closeAddInspectModel($event)" (confirmModelHs)="confirmAddInspectModel($event)"></app-add-inspect-info>
107 107
 
108 108
 <!-- 查看日志 -->
109 109
 <app-inspect-log-prompt-modal *ngIf="logPromptModalShow" [show]="logPromptModalShow" [id]="inspectId" (closeModelHs)="closeModelLog($event)"></app-inspect-log-prompt-modal>

+ 74 - 5
src/app/views/inspect-search/inspect-search.component.ts

@@ -4,7 +4,7 @@ import { Subject } from "rxjs";
4 4
 import { debounceTime } from "rxjs/operators";
5 5
 import { MainService } from "src/app/services/main.service";
6 6
 import { ToolService } from "src/app/services/tool.service";
7
-import { startOfDay, endOfDay, format, startOfMinute } from 'date-fns';
7
+import { startOfDay, endOfDay, format, startOfMinute, addMinutes } from 'date-fns';
8 8
 import { NzMessageService } from 'ng-zorro-antd';
9 9
 
10 10
 @Component({
@@ -45,8 +45,10 @@ export class InspectSearchComponent implements OnInit {
45 45
   pageSize: number = 10; //表格每页展示条数
46 46
   listLength: number = 10; //表格总数据量
47 47
   changeInpSubject = new Subject();
48
-
48
+	hosId:any = this.tool.getCurrentHospital().id; //当前院区
49
+	
49 50
   ngOnInit() {
51
+		this.getTaskType();
50 52
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
51 53
       this.searchWorker(v);
52 54
     });
@@ -100,8 +102,60 @@ export class InspectSearchComponent implements OnInit {
100 102
   getAllHospital() {
101 103
     this.allHospital = [this.tool.getCurrentHospital()];
102 104
     this.searchCriteria.hospital = this.tool.getCurrentHospital().id;
103
-    this.getList(1);
104 105
   }
106
+	
107
+	//获取任务类型
108
+	 tasktype:any = {};// 任务类型
109
+	getTaskType() {
110
+	  let postData = {
111
+	    idx: 0,
112
+	    sum: 1,
113
+	    taskType: {
114
+	      simpleQuery: true,
115
+	      hosId: {
116
+	        id: this.hosId
117
+	      },
118
+	      associationType: {
119
+	        key: 'association_types',
120
+	        value: 'inspect',
121
+	      }
122
+	    }
123
+	  };
124
+	  this.mainService
125
+	    .getFetchDataList("simple/data", "taskType", postData)
126
+	    .subscribe((result) => {
127
+	      if (result.status == 200) {
128
+	        this.tasktype = result.list[0] || {};
129
+	        this.getConfig();
130
+	      }
131
+	    });
132
+	}
133
+	
134
+	 // 获取配置
135
+	 configs:any = {};
136
+	 getConfig() {
137
+	   let postData = {
138
+	     idx: 0,
139
+	     sum: 1,
140
+	     taskTypeConfig: {
141
+	       taskTypeDTO: {
142
+	         hosId: {
143
+	           id: this.hosId
144
+	         },
145
+	         associationType: this.tasktype.associationType,
146
+	       }
147
+	     }
148
+	   };
149
+	   this.mainService
150
+	     .getFetchDataList("simple/data", "taskTypeConfig", postData)
151
+	     .subscribe((result) => {
152
+	       if (result.status == 200) {
153
+	         this.configs = result.list[0] || {};
154
+					 this.getList(1);
155
+	       }
156
+	     });
157
+	 }
158
+	 
105 159
   // 查看标本历史记录
106 160
   historyPromptModalShow = false; //标本历史记录弹窗开关
107 161
   scode = ""; //查看历史记录携带
@@ -178,6 +232,19 @@ export class InspectSearchComponent implements OnInit {
178 232
       .subscribe((data) => {
179 233
         this.loading1 = false;
180 234
         if (data["status"] == 200) {
235
+					data["list"].forEach(i =>{
236
+						if(i.yyTime){
237
+							i.newTime = format(new Date(i.yyTime), 'MM-dd HH:mm')
238
+							if(i.endCheckTime){
239
+								i.newTime2 = format(new Date(i.endCheckTime), 'HH:mm')
240
+							}else{
241
+								i.newTime2 = format(addMinutes(new Date(i.yyTime), this.configs.yytimeGapMinute), 'HH:mm')
242
+							}
243
+							i.yyEndTime = i.newTime + '--' + i.newTime2
244
+						}else{
245
+							i.yyEndTime = null
246
+						}
247
+					})
181 248
           this.listOfData = data["list"];
182 249
           this.listLength = data["totalNum"];
183 250
         }
@@ -222,7 +289,8 @@ export class InspectSearchComponent implements OnInit {
222 289
         bedNum: obj.patientDTO.bedNum,
223 290
         hosId: this.searchCriteria.hospital,
224 291
         yyTime: format(new Date(obj.inspectData.date), 'yyyy-MM-dd ') + format(startOfMinute(new Date(obj.inspectData.time)), 'HH:mm:ss'),
225
-      }] || undefined,
292
+				endCheckTime: obj.inspectData.endCheckTime
293
+			}] || undefined,
226 294
     };
227 295
     this.maskFlag = this.message.loading("正在加载中..", {
228 296
       nzDuration: 0,
@@ -252,10 +320,11 @@ export class InspectSearchComponent implements OnInit {
252 320
 
253 321
   // 修改检查项目-确定
254 322
   maskFlag: any = false;
255
-  submitSelectDate({date, deptId, remark, applyDeptId, patientDTO}){
323
+  submitSelectDate({date, endCheckTime, deptId, remark, applyDeptId, patientDTO}){
256 324
     let postData = {
257 325
       id: this.coopData.id,
258 326
       yyTime: date || undefined,
327
+			endCheckTime: endCheckTime,
259 328
       execDeptId: deptId,
260 329
       remark,
261 330
       applyDeptId,