Selaa lähdekoodia

Merge branch 'master' into develop

seimin 1 viikko sitten
vanhempi
commit
571e33e3b7
27 muutettua tiedostoa jossa 629 lisäystä ja 102 poistoa
  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. 33 3
      src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.ts
  11. 1 1
      src/app/share/detail-patients/detail-patients.component.html
  12. 27 17
      src/app/share/detail-patients/detail-patients.component.ts
  13. 12 3
      src/app/share/edit-inspect-info/edit-inspect-info.component.html
  14. 48 5
      src/app/share/edit-inspect-info/edit-inspect-info.component.ts
  15. 12 3
      src/app/share/edit-inspect-info2/edit-inspect-info2.component.html
  16. 46 4
      src/app/share/edit-inspect-info2/edit-inspect-info2.component.ts
  17. 51 9
      src/app/share/order-detail/order-detail.component.html
  18. 71 5
      src/app/share/order-detail/order-detail.component.ts
  19. 29 7
      src/app/views/fuwutai/fuwutai.component.ts
  20. 4 1
      src/app/views/hushijiandan/hushijiandan.component.html
  21. 60 11
      src/app/views/hushijiandan/hushijiandan.component.ts
  22. 5 0
      src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.html
  23. 10 3
      src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.ts
  24. 4 4
      src/app/views/inspect-info-config/inspect-info-config.component.html
  25. 20 3
      src/app/views/inspect-info-config/inspect-info-config.component.ts
  26. 4 4
      src/app/views/inspect-search/inspect-search.component.html
  27. 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
               <nz-checkbox-group [(ngModel)]="item.postData.batchPatientDynamicKey"></nz-checkbox-group>
34
               <nz-checkbox-group [(ngModel)]="item.postData.batchPatientDynamicKey"></nz-checkbox-group>
35
             </div>
35
             </div>
36
           </ng-container>
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
         </div>
51
         </div>
38
         <!-- 自动建单配置 -->
52
         <!-- 自动建单配置 -->
39
         <div *ngIf="tabModalName=='automaticOrderCreation'">
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
      this.message.create("warning", "请先配置任务类型!");
55
      this.message.create("warning", "请先配置任务类型!");
56
      return;
56
      return;
57
    }
57
    }
58
-
58
+	 let data = this.activeDictionaryKey.postData;
59
    let postData:any = {
59
    let postData:any = {
60
      ...this.configs,
60
      ...this.configs,
61
      taskType: this.tasktype.id,
61
      taskType: this.tasktype.id,
@@ -63,7 +63,9 @@ export class ConfigurationInspectClosedLoopComponent implements OnInit {
63
      batchPatientBackDept: this.activeDictionaryKey.postData.batchPatientBackDept[0].checked ? 1 : 0,
63
      batchPatientBackDept: this.activeDictionaryKey.postData.batchPatientBackDept[0].checked ? 1 : 0,
64
      batchPatientCheckType: this.activeDictionaryKey.postData.batchPatientCheckType || 0,
64
      batchPatientCheckType: this.activeDictionaryKey.postData.batchPatientCheckType || 0,
65
      batchPatientDynamicKey: this.activeDictionaryKey.postData.batchPatientDynamicKey[0].checked ? 1 : 0,
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
    console.log(postData);
69
    console.log(postData);
68
    this.btnLoading = true;
70
    this.btnLoading = true;
69
    this.mainService
71
    this.mainService
@@ -138,7 +140,9 @@ export class ConfigurationInspectClosedLoopComponent implements OnInit {
138
         this.activeDictionaryKey.postData.batchPatientBackDept[0].checked = this.configs.batchPatientBackDept == 1;
140
         this.activeDictionaryKey.postData.batchPatientBackDept[0].checked = this.configs.batchPatientBackDept == 1;
139
         this.activeDictionaryKey.postData.batchPatientCheckType = this.configs.batchPatientCheckType || 0;
141
         this.activeDictionaryKey.postData.batchPatientCheckType = this.configs.batchPatientCheckType || 0;
140
         this.activeDictionaryKey.postData.batchPatientDynamicKey[0].checked = this.configs.batchPatientDynamicKey == 1;
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
                 <th nzWidth="7%">排序号</th>
47
                 <th nzWidth="7%">排序号</th>
48
                 <th nzWidth="12%">检查项目标识</th>
48
                 <th nzWidth="12%">检查项目标识</th>
49
                 <th nzWidth="12%">检查项目名称</th>
49
                 <th nzWidth="12%">检查项目名称</th>
50
-                <th nzWidth="12%">检查类型</th>
50
+                <th nzWidth="10%">检查类型</th>
51
                 <th nzWidth="12%">默认检查科室</th>
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
               </tr>
56
               </tr>
55
             </thead>
57
             </thead>
56
             <tbody>
58
             <tbody>
@@ -61,6 +63,8 @@
61
                 <td>{{data.extra5DTO?.name}}</td>
63
                 <td>{{data.extra5DTO?.name}}</td>
62
                 <td>{{data.extra4DTO?.dept}}</td>
64
                 <td>{{data.extra4DTO?.dept}}</td>
63
                 <td>{{data.deptList | multipleName: 'dept'}}</td>
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
                 <td>
68
                 <td>
65
                   <div class="coop">
69
                   <div class="coop">
66
                     <span (click)="showDelModal(data,'您确认要删除吗?','删除','del')">删除</span>
70
                     <span (click)="showDelModal(data,'您确认要删除吗?','删除','del')">删除</span>
@@ -163,6 +167,22 @@
163
             </nz-select>
167
             </nz-select>
164
           </nz-form-control>
168
           </nz-form-control>
165
         </nz-form-item>
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
       </form>
186
       </form>
167
     </div>
187
     </div>
168
     <div class=" display_flex justify-content_flex-center">
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
               .ant-form-item-label {
250
               .ant-form-item-label {
251
                 text-align: left;
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
               .desc {
263
               .desc {
255
                 margin-top: 5px;
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
     this.validateForm.controls.orders.setValue(data.orders);
62
     this.validateForm.controls.orders.setValue(data.orders);
63
     this.validateForm.controls.name.setValue(data.name);
63
     this.validateForm.controls.name.setValue(data.name);
64
     this.validateForm.controls.extra6.setValue(data.extra6);
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
     this.validateForm.controls.extra4.setValue(data.extra4DTO ? data.extra4DTO.id : null);
67
     this.validateForm.controls.extra4.setValue(data.extra4DTO ? data.extra4DTO.id : null);
66
     this.validateForm.controls.extra5.setValue(data.extra5DTO ? data.extra5DTO.id : null);
68
     this.validateForm.controls.extra5.setValue(data.extra5DTO ? data.extra5DTO.id : null);
67
     this.validateForm.controls.extra7.setValue(data.deptList ? data.deptList.map(v => v.id) : []);
69
     this.validateForm.controls.extra7.setValue(data.deptList ? data.deptList.map(v => v.id) : []);
@@ -109,6 +111,8 @@ export class ConfigurationInspectInspectsComponent implements OnInit {
109
           desc: "检查项目",
111
           desc: "检查项目",
110
           orders: this.validateForm.value.orders,
112
           orders: this.validateForm.value.orders,
111
           name: this.validateForm.value.name,
113
           name: this.validateForm.value.name,
114
+					extra3: this.validateForm.value.extra3 || undefined,
115
+					extra1: this.validateForm.value.extra1 || undefined,
112
           extra6: this.validateForm.value.extra6,
116
           extra6: this.validateForm.value.extra6,
113
           extra4: this.validateForm.value.extra4,
117
           extra4: this.validateForm.value.extra4,
114
           extra5: this.validateForm.value.extra5,
118
           extra5: this.validateForm.value.extra5,
@@ -123,6 +127,8 @@ export class ConfigurationInspectInspectsComponent implements OnInit {
123
           ...this.coopData,
127
           ...this.coopData,
124
           orders: this.validateForm.value.orders,
128
           orders: this.validateForm.value.orders,
125
           name: this.validateForm.value.name,
129
           name: this.validateForm.value.name,
130
+					extra3: this.validateForm.value.extra3 || undefined,
131
+					extra1: this.validateForm.value.extra1 || undefined,
126
           extra6: this.validateForm.value.extra6,
132
           extra6: this.validateForm.value.extra6,
127
           value: this.validateForm.value.extra6,
133
           value: this.validateForm.value.extra6,
128
           extra4: this.validateForm.value.extra4,
134
           extra4: this.validateForm.value.extra4,
@@ -158,6 +164,8 @@ export class ConfigurationInspectInspectsComponent implements OnInit {
158
       orders: [null, [Validators.required]],
164
       orders: [null, [Validators.required]],
159
       name: [null, [Validators.required]],
165
       name: [null, [Validators.required]],
160
       extra6: [null, [Validators.required]],
166
       extra6: [null, [Validators.required]],
167
+			extra1: [null],
168
+			extra3: [null],
161
       extra4: [null],
169
       extra4: [null],
162
       extra5: [null, [Validators.required]],
170
       extra5: [null, [Validators.required]],
163
       extra7: [[]],
171
       extra7: [[]],

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

@@ -65,6 +65,8 @@ export class ConfigurationInspectComponent implements OnInit {
65
       batchPatientBackDept: [{ label:'是否开启批量患者回科', value: 0 }],
65
       batchPatientBackDept: [{ label:'是否开启批量患者回科', value: 0 }],
66
       batchPatientCheckType: 0,
66
       batchPatientCheckType: 0,
67
       batchPatientDynamicKey: [{ label:'是否支持动态密钥', value: 0 }],
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
           <div class="formItem flex_1">
90
           <div class="formItem flex_1">
91
             <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
91
             <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
92
             <div class="value">
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
               <button nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">下一日</button>
95
               <button nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">下一日</button>
96
             </div>
96
             </div>
97
           </div>
97
           </div>
98
         </div>
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
       </div>
108
       </div>
100
     </div>
109
     </div>
101
     <div class="display_flex justify-content_flex-center">
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
 import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
1
 import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2
 import { MainService } from '../../services/main.service';
2
 import { MainService } from '../../services/main.service';
3
 import { ToolService } from 'src/app/services/tool.service';
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
 import { NzMessageService } from 'ng-zorro-antd';
5
 import { NzMessageService } from 'ng-zorro-antd';
6
 import { Subject } from "rxjs";
6
 import { Subject } from "rxjs";
7
 import { debounceTime } from "rxjs/operators";
7
 import { debounceTime } from "rxjs/operators";
@@ -20,7 +20,7 @@ export class AddInspectInfoComponent implements OnInit {
20
 
20
 
21
   @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
21
   @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
22
   @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
22
   @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
23
-
23
+	@Input() inspectAndPatientTransportConfig:any = {};
24
   constructor(
24
   constructor(
25
     private mainService: MainService,
25
     private mainService: MainService,
26
     private tool: ToolService,
26
     private tool: ToolService,
@@ -126,6 +126,7 @@ export class AddInspectInfoComponent implements OnInit {
126
   changeInspect(id){
126
   changeInspect(id){
127
     this.inspectDTO = this.inspectList.find(v => v.id == id);
127
     this.inspectDTO = this.inspectList.find(v => v.id == id);
128
     if(this.inspectDTO){
128
     if(this.inspectDTO){
129
+			this.setTimeData();
129
       this.inspectData.id = this.inspectDTO.id;
130
       this.inspectData.id = this.inspectDTO.id;
130
       this.execDeptList = this.inspectDTO.deptList || [];
131
       this.execDeptList = this.inspectDTO.deptList || [];
131
       this.inspectData.execDeptId = this.execDeptList.length === 1 ? this.execDeptList[0].id : undefined;
132
       this.inspectData.execDeptId = this.execDeptList.length === 1 ? this.execDeptList[0].id : undefined;
@@ -139,7 +140,35 @@ export class AddInspectInfoComponent implements OnInit {
139
       this.inspectData.type = '';
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
   openInspect(e){
173
   openInspect(e){
145
     if(e){
174
     if(e){

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

@@ -55,12 +55,21 @@
55
           <div class="formItem flex_1">
55
           <div class="formItem flex_1">
56
             <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
56
             <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
57
             <div class="value">
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
               <button nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">下一日</button>
60
               <button nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">下一日</button>
61
             </div>
61
             </div>
62
           </div>
62
           </div>
63
         </div>
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
       </div>
73
       </div>
65
     </div>
74
     </div>
66
     <div class="display_flex justify-content_flex-center">
75
     <div class="display_flex justify-content_flex-center">

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

@@ -1,7 +1,7 @@
1
 import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
1
 import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2
 import { MainService } from '../../services/main.service';
2
 import { MainService } from '../../services/main.service';
3
 import { ToolService } from 'src/app/services/tool.service';
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
 import { NzMessageService } from 'ng-zorro-antd';
5
 import { NzMessageService } from 'ng-zorro-antd';
6
 import { Subject } from "rxjs";
6
 import { Subject } from "rxjs";
7
 import { debounceTime } from "rxjs/operators";
7
 import { debounceTime } from "rxjs/operators";
@@ -20,7 +20,7 @@ export class AddInspectThreeModalComponent implements OnInit {
20
 
20
 
21
   @Input() patientDTO: any;
21
   @Input() patientDTO: any;
22
   @Input() deptDisplay: any;
22
   @Input() deptDisplay: any;
23
-
23
+	@Input() inspectAndPatientTransportConfig:any = {};
24
   @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
24
   @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
25
   @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
25
   @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
26
 
26
 
@@ -42,6 +42,7 @@ export class AddInspectThreeModalComponent implements OnInit {
42
     });
42
     });
43
     this.hosId = this.tool.getCurrentHospital().id;
43
     this.hosId = this.tool.getCurrentHospital().id;
44
     this.currentDept = this.tool.getCurrentUserDept();
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
   nextDay() {
75
   nextDay() {
75
     this.inspectData.date = addDays(this.inspectData.date, 1);
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
   isLoading = false;
106
   isLoading = false;
79
   inspectList: Array<any>; //检查项目列表
107
   inspectList: Array<any>; //检查项目列表
80
   // 获取检查项目
108
   // 获取检查项目
@@ -107,7 +135,9 @@ export class AddInspectThreeModalComponent implements OnInit {
107
   execDeptList:any[] = [];
135
   execDeptList:any[] = [];
108
   changeInspect(id){
136
   changeInspect(id){
109
     this.inspectDTO = this.inspectList.find(v => v.id == id);
137
     this.inspectDTO = this.inspectList.find(v => v.id == id);
138
+		console.log(4545, this.inspectDTO)
110
     if(this.inspectDTO){
139
     if(this.inspectDTO){
140
+			this.setTimeData();
111
       this.inspectData.id = this.inspectDTO.id;
141
       this.inspectData.id = this.inspectDTO.id;
112
       this.execDeptList = this.inspectDTO.deptList || [];
142
       this.execDeptList = this.inspectDTO.deptList || [];
113
       this.inspectData.execDeptId = this.execDeptList.length === 1 ? this.execDeptList[0].id : undefined;
143
       this.inspectData.execDeptId = this.execDeptList.length === 1 ? this.execDeptList[0].id : undefined;

+ 1 - 1
src/app/share/detail-patients/detail-patients.component.html

@@ -139,7 +139,7 @@
139
               <div nz-col nzSpan="8">
139
               <div nz-col nzSpan="8">
140
                 <p>
140
                 <p>
141
                   <span class="label">预约时间:</span>
141
                   <span class="label">预约时间:</span>
142
-                  <span>{{item.yyTime||'-'}}</span>
142
+                  <span>{{item.yyEndTime||'-'}}</span>
143
                 </p>
143
                 </p>
144
               </div>
144
               </div>
145
               <div nz-col nzSpan="8">
145
               <div nz-col nzSpan="8">

+ 27 - 17
src/app/share/detail-patients/detail-patients.component.ts

@@ -5,6 +5,7 @@ import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5
 import { NzMessageService } from "ng-zorro-antd";
5
 import { NzMessageService } from "ng-zorro-antd";
6
 import { forkJoin } from "rxjs";
6
 import { forkJoin } from "rxjs";
7
 import { ToolService } from "src/app/services/tool.service";
7
 import { ToolService } from "src/app/services/tool.service";
8
+import { startOfDay, endOfDay, format, startOfMinute, addMinutes } from 'date-fns';
8
 
9
 
9
 @Component({
10
 @Component({
10
   selector: "app-detail-patients",
11
   selector: "app-detail-patients",
@@ -63,23 +64,32 @@ export class DetailPatientsComponent implements OnInit {
63
       // getDetail
64
       // getDetail
64
       this.orderInfo = res[1]["data"];
65
       this.orderInfo = res[1]["data"];
65
       if (this.orderInfo["checkList"] && this.orderInfo["checkList"].length) {
66
       if (this.orderInfo["checkList"] && this.orderInfo["checkList"].length) {
66
-        let arr = [];
67
-        let orderInfo = this.orderInfo["checkList"].filter(
68
-          (item) => item.yyTime
69
-        );
70
-        if (orderInfo.length) {
71
-          arr = orderInfo.map((item) => [
72
-            new Date(item.yyTime).getTime() - new Date().getTime(),
73
-            item.yyTime,
74
-          ]);
75
-          arr.sort((a, b) => a - b);
76
-          this.orderInfo["yyTime"] = arr[0][1];
77
-        } else {
78
-          this.orderInfo["yyTime"] = "";
79
-        }
80
-      } else {
81
-        this.orderInfo["yyTime"] = "";
82
-      }
67
+        // let arr = [];
68
+        // let orderInfo = this.orderInfo["checkList"].filter(
69
+        //   (item) => item.yyTime
70
+        // );
71
+        // if (orderInfo.length) {
72
+        //   arr = orderInfo.map((item) => [
73
+        //     new Date(item.yyTime).getTime() - new Date().getTime(),
74
+        //     item.yyTime,
75
+        //   ]);
76
+        //   arr.sort((a, b) => a - b);
77
+        //   this.orderInfo["yyTime"] = arr[0][1];
78
+        // } else {
79
+        //   this.orderInfo["yyTime"] = "";
80
+        // }
81
+				
82
+				this.orderInfo["checkList"].forEach(i =>{
83
+					i.newTime = format(new Date(i.yyTime), 'MM-dd HH:mm')
84
+					if(i.endCheckTime){
85
+						i.newTime2 = format(new Date(i.endCheckTime), 'HH:mm')
86
+						i.yyEndTime = i.newTime + '--' + i.newTime2
87
+					}else{
88
+						i.yyEndTime = i.newTime
89
+					}
90
+				})
91
+      } 
92
+			
83
       if (res[1]["data"].middleDept) {
93
       if (res[1]["data"].middleDept) {
84
         this.middleDept = res[1]["data"].middleDept.map((item) =>
94
         this.middleDept = res[1]["data"].middleDept.map((item) =>
85
           !this.showCoop && this.deptDisplay == 2 ? item.deptalias : item.dept
95
           !this.showCoop && this.deptDisplay == 2 ? item.deptalias : item.dept

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

@@ -25,8 +25,8 @@
25
           <div class="formItem flex_1">
25
           <div class="formItem flex_1">
26
             <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
26
             <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
27
             <div class="value">
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">
28
+              <nz-date-picker [(ngModel)]="yyDate" [nzShowToday]="false" (ngModelChange)="dateChange($event)"></nz-date-picker>
29
+              <nz-time-picker [nzDisabled]="!yyDate" class="ml8" nzFormat="HH:mm" [(ngModel)]="yyTime" [nzAllowEmpty]="false" (ngModelChange)="timeChange($event)">
30
               </nz-time-picker>
30
               </nz-time-picker>
31
               <button [disabled]="!yyDate" nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">
31
               <button [disabled]="!yyDate" nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">
32
                 下一日
32
                 下一日
@@ -34,7 +34,16 @@
34
             </div>
34
             </div>
35
           </div>
35
           </div>
36
         </div>
36
         </div>
37
-
37
+				
38
+				<div class="row" *ngIf="endTime">
39
+				  <div class="formItem flex_1">
40
+				    <div class="name"><i class="icon_transport transport-required red"></i>预约结束时间:</div>
41
+				    <div class="value">
42
+							{{endTime}}
43
+				    </div>
44
+				  </div>
45
+				</div>
46
+				
38
         <div class="row">
47
         <div class="row">
39
           <div class="formItem flex_1">
48
           <div class="formItem flex_1">
40
             <div class="name"><i class="icon_transport transport-required red" style="visibility: hidden;"></i>医生备注:</div>
49
             <div class="name"><i class="icon_transport transport-required red" style="visibility: hidden;"></i>医生备注:</div>

+ 48 - 5
src/app/share/edit-inspect-info/edit-inspect-info.component.ts

@@ -1,7 +1,7 @@
1
 import { Component, OnInit, Output, Input } from '@angular/core';
1
 import { Component, OnInit, Output, Input } from '@angular/core';
2
 import { EventEmitter } from '@angular/core';
2
 import { EventEmitter } from '@angular/core';
3
 import { NzMessageService } from 'ng-zorro-antd';
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
 
6
 @Component({
6
 @Component({
7
   selector: 'app-edit-inspect-info',
7
   selector: 'app-edit-inspect-info',
@@ -13,7 +13,10 @@ export class EditInspectInfoComponent implements OnInit {
13
   @Input() date:any;
13
   @Input() date:any;
14
   @Input() execDeptId:any;
14
   @Input() execDeptId:any;
15
   @Input() remarkText:any;
15
   @Input() remarkText:any;
16
-  @Input() execDeptList:any[] = [];
16
+  @Input() execDeptList:any;
17
+	@Input() extra1:any;
18
+	@Input() inspectAndPatientTransportConfig:any = {};
19
+	@Input() endCheckTime:any = null;
17
   @Output() submitFormHand = new EventEmitter();
20
   @Output() submitFormHand = new EventEmitter();
18
   @Output() cancelFlagHand = new EventEmitter();
21
   @Output() cancelFlagHand = new EventEmitter();
19
   yyDate = null; //预约日期-患者其他服务
22
   yyDate = null; //预约日期-患者其他服务
@@ -25,11 +28,15 @@ export class EditInspectInfoComponent implements OnInit {
25
   constructor(
28
   constructor(
26
     private message: NzMessageService,
29
     private message: NzMessageService,
27
   ) { }
30
   ) { }
28
-
31
+	
29
   ngOnInit() {
32
   ngOnInit() {
30
     if(this.date){
33
     if(this.date){
31
       this.yyDate = new Date(this.date);
34
       this.yyDate = new Date(this.date);
32
       this.yyTime = new Date(this.date);
35
       this.yyTime = new Date(this.date);
36
+			this.mdData = format(this.yyDate, 'yyyy-MM-dd')
37
+			if(this.endCheckTime){
38
+				this.setTimeData();
39
+			}
33
     }
40
     }
34
 
41
 
35
     if(this.execDeptList){
42
     if(this.execDeptList){
@@ -53,7 +60,42 @@ export class EditInspectInfoComponent implements OnInit {
53
   nextDay() {
60
   nextDay() {
54
     this.yyDate = addDays(this.yyDate, 1);
61
     this.yyDate = addDays(this.yyDate, 1);
55
   }
62
   }
56
-
63
+	
64
+	// 选择日期
65
+	mdData:any;
66
+	dateChange(e){
67
+		if(e){
68
+			this.mdData = format(e, 'yyyy-MM-dd')
69
+			this.setTimeData();
70
+		}else{
71
+			this.endTime = null
72
+		}
73
+	}
74
+	
75
+	// 选择时间
76
+	endTime:any;
77
+	timeChange(e){
78
+		if(e){
79
+			this.mdData = format(this.yyDate, 'yyyy-MM-dd')
80
+			this.setTimeData();
81
+		}else{
82
+			this.endTime = null
83
+		}
84
+	}
85
+	
86
+	// 设置结束时间
87
+	formEndCheckTime:any;
88
+	setTimeData(){
89
+		if(this.mdData && this.yyTime){
90
+			let num = this.extra1 ? Number(this.extra1) : undefined
91
+			let time = addMinutes(this.yyTime, num ? num : this.inspectAndPatientTransportConfig.yytimeGapMinute)
92
+			let time2 = format(time, 'HH:mm')
93
+			this.endTime = this.mdData +' '+ time2
94
+			let date = new Date(this.endTime);
95
+			this.formEndCheckTime = date.getTime()
96
+		}
97
+	}
98
+	
57
   // 隐藏模态框
99
   // 隐藏模态框
58
   hideModal() {
100
   hideModal() {
59
     this.cancelFlagHand.emit(false)
101
     this.cancelFlagHand.emit(false)
@@ -73,7 +115,8 @@ export class EditInspectInfoComponent implements OnInit {
73
       deptId: this.deptId,
115
       deptId: this.deptId,
74
       remark: this.remark,
116
       remark: this.remark,
75
       date: format(this.yyDate, 'yyyy-MM-dd') + ' ' + format(startOfMinute(this.yyTime), 'HH:mm:ss'),
117
       date: format(this.yyDate, 'yyyy-MM-dd') + ' ' + format(startOfMinute(this.yyTime), 'HH:mm:ss'),
76
-    });
118
+			endCheckTime: this.formEndCheckTime
119
+		});
77
   }
120
   }
78
 }
121
 }
79
 
122
 

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

@@ -59,8 +59,8 @@
59
           <div class="formItem flex_1">
59
           <div class="formItem flex_1">
60
             <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
60
             <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
61
             <div class="value">
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
               </nz-time-picker>
64
               </nz-time-picker>
65
               <button [disabled]="!yyDate" nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">
65
               <button [disabled]="!yyDate" nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">
66
                 下一日
66
                 下一日
@@ -68,7 +68,16 @@
68
             </div>
68
             </div>
69
           </div>
69
           </div>
70
         </div>
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
         <div class="row">
81
         <div class="row">
73
           <div class="formItem flex_1">
82
           <div class="formItem flex_1">
74
             <div class="name"><i class="icon_transport transport-required red" style="visibility: hidden;"></i>医生备注:</div>
83
             <div class="name"><i class="icon_transport transport-required red" style="visibility: hidden;"></i>医生备注:</div>

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

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

+ 51 - 9
src/app/share/order-detail/order-detail.component.html

@@ -35,7 +35,7 @@
35
       #osComponentRef3
35
       #osComponentRef3
36
       style="height: 90%; flex: 1"
36
       style="height: 90%; flex: 1"
37
       *ngIf="
37
       *ngIf="
38
-        tabType == 1 && orderInfo.taskType.associationType.value == 'other'
38
+        tabType == 1 && orderInfo && orderInfo.taskType.associationType.value == 'other'
39
       "
39
       "
40
     >
40
     >
41
       <div class="content orders">
41
       <div class="content orders">
@@ -112,6 +112,13 @@
112
               特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
112
               特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
113
             </div>
113
             </div>
114
           </div>
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
         </div>
122
         </div>
116
         <div class="center" *ngIf="amplificationShow">
123
         <div class="center" *ngIf="amplificationShow">
117
           <div class="box">
124
           <div class="box">
@@ -163,7 +170,7 @@
163
       #osComponentRef4
170
       #osComponentRef4
164
       style="height: 90%; flex: 1"
171
       style="height: 90%; flex: 1"
165
       *ngIf="
172
       *ngIf="
166
-        tabType == 1 && orderInfo.taskType.associationType.value == 'specimen'
173
+        tabType == 1 && orderInfo && orderInfo.taskType.associationType.value == 'specimen'
167
       "
174
       "
168
     >
175
     >
169
       <div class="content orders">
176
       <div class="content orders">
@@ -240,6 +247,13 @@
240
               特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
247
               特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
241
             </div>
248
             </div>
242
           </div>
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
         </div>
257
         </div>
244
         <div class="center" *ngIf="amplificationShow">
258
         <div class="center" *ngIf="amplificationShow">
245
           <div class="box">
259
           <div class="box">
@@ -291,7 +305,7 @@
291
       #osComponentRef5
305
       #osComponentRef5
292
       style="height: 90%; flex: 1"
306
       style="height: 90%; flex: 1"
293
       *ngIf="
307
       *ngIf="
294
-        tabType == 1 &&
308
+        tabType == 1 && orderInfo && 
295
         orderInfo.taskType.associationType.value == 'specimenPlan'
309
         orderInfo.taskType.associationType.value == 'specimenPlan'
296
       "
310
       "
297
     >
311
     >
@@ -325,7 +339,7 @@
325
                 orderInfo.createDeptDTO ? orderInfo.createDeptDTO.dept : ""
339
                 orderInfo.createDeptDTO ? orderInfo.createDeptDTO.dept : ""
326
               }}
340
               }}
327
             </div>
341
             </div>
328
-            <div nz-col nzSpan="10">目标科室:{{ endDepts }}</div>
342
+            <div nz-col nzSpan="6">目标科室:{{ endDepts }}</div>
329
             <div nz-col nzSpan="4">
343
             <div nz-col nzSpan="4">
330
               预计接收:{{ orderInfo.expectReceiveNum }}
344
               预计接收:{{ orderInfo.expectReceiveNum }}
331
             </div>
345
             </div>
@@ -351,6 +365,13 @@
351
               特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
365
               特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
352
             </div>
366
             </div>
353
           </div>
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
         </div>
375
         </div>
355
         <div class="center" *ngIf="amplificationShow">
376
         <div class="center" *ngIf="amplificationShow">
356
           <div class="box">
377
           <div class="box">
@@ -402,7 +423,7 @@
402
       #osComponentRef6
423
       #osComponentRef6
403
       style="height: 90%; flex: 1"
424
       style="height: 90%; flex: 1"
404
       *ngIf="
425
       *ngIf="
405
-        tabType == 1 &&
426
+        tabType == 1 && orderInfo &&
406
         (orderInfo.taskType.associationType.value == 'drugsBag' ||
427
         (orderInfo.taskType.associationType.value == 'drugsBag' ||
407
           orderInfo.taskType.associationType.value == 'jPBag')
428
           orderInfo.taskType.associationType.value == 'jPBag')
408
       "
429
       "
@@ -462,6 +483,13 @@
462
               特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
483
               特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
463
             </div>
484
             </div>
464
           </div>
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
         </div>
493
         </div>
466
         <div class="center" *ngIf="amplificationShow">
494
         <div class="center" *ngIf="amplificationShow">
467
           <div class="box">
495
           <div class="box">
@@ -599,7 +627,7 @@
599
       #osComponentRef1
627
       #osComponentRef1
600
       style="height: 90%; flex: 1"
628
       style="height: 90%; flex: 1"
601
       *ngIf="
629
       *ngIf="
602
-        tabType == 1 &&
630
+        tabType == 1 && orderInfo && 
603
         (orderInfo.taskType.associationType.value == 'inspect' ||
631
         (orderInfo.taskType.associationType.value == 'inspect' ||
604
           orderInfo.taskType.associationType.value == 'patientTransport')
632
           orderInfo.taskType.associationType.value == 'patientTransport')
605
       "
633
       "
@@ -707,6 +735,13 @@
707
               特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
735
               特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
708
             </div>
736
             </div>
709
           </div>
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
         </div>
745
         </div>
711
         <div class="center" *ngIf="amplificationShow">
746
         <div class="center" *ngIf="amplificationShow">
712
           <div class="box">
747
           <div class="box">
@@ -822,7 +857,7 @@
822
                 <div nz-col nzSpan="8">
857
                 <div nz-col nzSpan="8">
823
                   <p>
858
                   <p>
824
                     <span class="label">预约时间:</span>
859
                     <span class="label">预约时间:</span>
825
-                    <span>{{ item.yyTime || "-" }}</span>
860
+                    <span>{{ item.yyEndTime || "-" }}</span>
826
                   </p>
861
                   </p>
827
                 </div>
862
                 </div>
828
                 <div nz-col nzSpan="8">
863
                 <div nz-col nzSpan="8">
@@ -866,7 +901,7 @@
866
     #osComponentRef9
901
     #osComponentRef9
867
     style="height: 90%; flex: 1"
902
     style="height: 90%; flex: 1"
868
     *ngIf="
903
     *ngIf="
869
-      tabType == 1 && orderInfo.taskType.associationType.value == 'ordinary'
904
+      tabType == 1 && orderInfo && orderInfo.taskType.associationType.value == 'ordinary'
870
     "
905
     "
871
   >
906
   >
872
     <div class="content orders">
907
     <div class="content orders">
@@ -943,6 +978,13 @@
943
             特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
978
             特殊情况关闭原因:{{ orderInfo.specialCloseReason || "-" }}
944
           </div>
979
           </div>
945
         </div>
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
       </div>
988
       </div>
947
       <div class="center" *ngIf="amplificationShow">
989
       <div class="center" *ngIf="amplificationShow">
948
         <div class="box">
990
         <div class="box">
@@ -1271,7 +1313,7 @@
1271
       </div>
1313
       </div>
1272
     </overlay-scrollbars>
1314
     </overlay-scrollbars>
1273
   </div>
1315
   </div>
1274
-  <div class="btns">
1316
+  <div class="btns" *ngIf="orderInfo">
1275
     <button *ngIf="orderInfo.taskType.associationType.value == 'ordinary' && orderInfo.taskType.ordinaryField.value == 'blood'" class="btn default" nz-button nzType="default" (click)="viewDetail(orderInfo, 'blood')">
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
     </button>
1319
     </button>

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

@@ -10,6 +10,8 @@ import { MainService } from "../../services/main.service";
10
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
10
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
11
 import { NzMessageService } from "ng-zorro-antd";
11
 import { NzMessageService } from "ng-zorro-antd";
12
 import { forkJoin } from "rxjs";
12
 import { forkJoin } from "rxjs";
13
+import { ToolService } from "../../services/tool.service";
14
+import { startOfDay, endOfDay, format, startOfMinute, addMinutes } from 'date-fns';
13
 @Component({
15
 @Component({
14
   selector: "app-order-detail",
16
   selector: "app-order-detail",
15
   templateUrl: "./order-detail.component.html",
17
   templateUrl: "./order-detail.component.html",
@@ -65,7 +67,8 @@ export class OrderDetailComponent implements OnInit {
65
     private message: NzMessageService,
67
     private message: NzMessageService,
66
     private fb: FormBuilder,
68
     private fb: FormBuilder,
67
     private route: ActivatedRoute,
69
     private route: ActivatedRoute,
68
-    private mainService: MainService
70
+    private mainService: MainService,
71
+		private tool: ToolService,
69
   ) {}
72
   ) {}
70
   maskFlag: any = false;
73
   maskFlag: any = false;
71
   id: number; //工单id
74
   id: number; //工单id
@@ -82,10 +85,11 @@ export class OrderDetailComponent implements OnInit {
82
   recLoading: boolean = false; //撤回并删除按钮loading状态
85
   recLoading: boolean = false; //撤回并删除按钮loading状态
83
   btnLoading: boolean = false; //确认按钮loading状态
86
   btnLoading: boolean = false; //确认按钮loading状态
84
   amplificationShow = true;
87
   amplificationShow = true;
85
-
88
+	hosId:any = this.tool.getCurrentHospital().id; //当前院区
89
+	
86
   ngOnInit() {
90
   ngOnInit() {
87
     this.tabType = this.route.snapshot.params.type || 1;
91
     this.tabType = this.route.snapshot.params.type || 1;
88
-    this.getInfo();
92
+		this.getInspectAndPatientTransportConfigTasktype()
89
     this.initForm();
93
     this.initForm();
90
   }
94
   }
91
   ngOnDestroy() {}
95
   ngOnDestroy() {}
@@ -94,7 +98,57 @@ export class OrderDetailComponent implements OnInit {
94
   amplification(){
98
   amplification(){
95
     this.amplificationShow = !this.amplificationShow;
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
   middleDept = []; //中间科室数组
153
   middleDept = []; //中间科室数组
100
   getInfo() {
154
   getInfo() {
@@ -105,7 +159,19 @@ export class OrderDetailComponent implements OnInit {
105
     this.mainService
159
     this.mainService
106
       .getFetchData("api", "workOrder", this.id)
160
       .getFetchData("api", "workOrder", this.id)
107
       .subscribe((data) => {
161
       .subscribe((data) => {
108
-        this.orderInfo = data.data;
162
+				let obj = data.data
163
+				if(obj.checkList){
164
+					obj.checkList.forEach(i =>{
165
+						i.newTime = format(new Date(i.yyTime), 'MM-dd HH:mm')
166
+						if(i.endCheckTime){
167
+							i.newTime2 = format(new Date(i.endCheckTime), 'HH:mm')
168
+							i.yyEndTime = i.newTime + '--' + i.newTime2
169
+						}else{
170
+							i.yyEndTime = i.newTime
171
+						}
172
+					})
173
+				}
174
+        this.orderInfo = obj;
109
         if (data.data.middleDept) {
175
         if (data.data.middleDept) {
110
           this.middleDept = data.data.middleDept.map((item) => item.dept);
176
           this.middleDept = data.data.middleDept.map((item) => item.dept);
111
         } else {
177
         } else {

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

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

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

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

+ 60 - 11
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -34,7 +34,9 @@ import {
34
   startOfDay,
34
   startOfDay,
35
   endOfDay,
35
   endOfDay,
36
   parse,
36
   parse,
37
-	subHours
37
+	subHours,
38
+	startOfMinute,
39
+	addMinutes
38
 } from "date-fns";
40
 } from "date-fns";
39
 import { SourceId } from "src/app/type/types";
41
 import { SourceId } from "src/app/type/types";
40
 import cloneDeep from 'lodash-es/cloneDeep'
42
 import cloneDeep from 'lodash-es/cloneDeep'
@@ -943,7 +945,7 @@ export class HushijiandanComponent implements OnInit {
943
         if (result.status == 200) {
945
         if (result.status == 200) {
944
           let inspectAndPatientTransportConfig = result.list[0] || {};
946
           let inspectAndPatientTransportConfig = result.list[0] || {};
945
           this.inspectAndPatientTransportConfig = {...this.inspectAndPatientTransportConfig, ...inspectAndPatientTransportConfig};
947
           this.inspectAndPatientTransportConfig = {...this.inspectAndPatientTransportConfig, ...inspectAndPatientTransportConfig};
946
-
948
+					
947
           // 是否显示排队信息
949
           // 是否显示排队信息
948
           if(this.inspectAndPatientTransportConfig.queuingInformation == 1){
950
           if(this.inspectAndPatientTransportConfig.queuingInformation == 1){
949
             this.getQueuingInformation();
951
             this.getQueuingInformation();
@@ -3510,19 +3512,28 @@ export class HushijiandanComponent implements OnInit {
3510
         if (data.status == 200 && data.data && data.data.length) {
3512
         if (data.status == 200 && data.data && data.data.length) {
3511
           let arr = [];
3513
           let arr = [];
3512
           data.data.forEach((e) => {
3514
           data.data.forEach((e) => {
3513
-            arr.push({
3514
-              execDeptId: e.execDept.id,
3515
-              yyTime: e.yyTime,
3515
+						e.yyEndTime = e.yyTime
3516
+						e.newTime = format(new Date(e.yyTime), 'MM-dd HH:mm')
3517
+						if(e.endCheckTime){
3518
+							e.newTime2 = format(new Date(e.endCheckTime), 'HH:mm')
3519
+							e.yyEndTime = e.newTime + '--' + e.newTime2
3520
+						}else{
3521
+							e.yyEndTime = e.newTime
3522
+							// e.newTime2 = format(addMinutes(new Date(e.yyTime), this.inspectAndPatientTransportConfig.yytimeGapMinute), 'HH:mm')
3523
+						}
3524
+						arr.push({
3525
+						  execDeptId: e.execDept.id,
3526
+						  yyTime: e.yyTime,
3516
               priority: e.priority,
3527
               priority: e.priority,
3517
               manualCreate: e.manualCreate,
3528
               manualCreate: e.manualCreate,
3518
               label:
3529
               label:
3519
-                (e.yyTime || "") +
3530
+                (e.yyEndTime || "") +
3520
                 " " +
3531
                 " " +
3521
                 (this.deptDisplay == 2
3532
                 (this.deptDisplay == 2
3522
                   ? e.execDept.deptalias
3533
                   ? e.execDept.deptalias
3523
                   : e.execDept.dept) +
3534
                   : e.execDept.dept) +
3524
                 " 进行 " +
3535
                 " 进行 " +
3525
-                (e.inspectName + '-' + e.inspectCode || "检查"),
3536
+                (e.inspectName?e.inspectName:'' + '-' + e.inspectCode || "检查"),
3526
               value: e["id"],
3537
               value: e["id"],
3527
               checked: false,
3538
               checked: false,
3528
               remark: e.remark,
3539
               remark: e.remark,
@@ -5696,19 +5707,27 @@ export class HushijiandanComponent implements OnInit {
5696
         if (data.status == 200 && data.data && data.data.length) {
5707
         if (data.status == 200 && data.data && data.data.length) {
5697
           let arr = [];
5708
           let arr = [];
5698
           data.data.forEach((e) => {
5709
           data.data.forEach((e) => {
5710
+						e.newTime = format(new Date(e.yyTime), 'MM-dd HH:mm')
5711
+						if(e.endCheckTime){
5712
+							e.newTime2 = format(new Date(e.endCheckTime), 'HH:mm')
5713
+							e.yyEndTime = e.newTime + '--' + e.newTime2
5714
+						}else{
5715
+							// e.newTime2 = format(addMinutes(new Date(e.yyTime), this.inspectAndPatientTransportConfig.yytimeGapMinute), 'HH:mm')
5716
+							e.yyEndTime = e.newTime
5717
+						}
5699
             arr.push({
5718
             arr.push({
5700
               execDeptId: e.execDept.id,
5719
               execDeptId: e.execDept.id,
5701
               yyTime: e.yyTime,
5720
               yyTime: e.yyTime,
5702
               priority: e.priority,
5721
               priority: e.priority,
5703
               manualCreate: e.manualCreate,
5722
               manualCreate: e.manualCreate,
5704
               label:
5723
               label:
5705
-                (e.yyTime || "") +
5724
+                (e.yyEndTime|| "") +
5706
                 " " +
5725
                 " " +
5707
                 (this.deptDisplay == 2
5726
                 (this.deptDisplay == 2
5708
                   ? e.execDept.deptalias
5727
                   ? e.execDept.deptalias
5709
                   : e.execDept.dept) +
5728
                   : e.execDept.dept) +
5710
                 " 进行 " +
5729
                 " 进行 " +
5711
-                (e.inspectName + '-' + e.inspectCode || "检查"),
5730
+                (e.inspectName?e.inspectName:'' + '-' + e.inspectCode || "检查"),
5712
               value: e["id"],
5731
               value: e["id"],
5713
               checked: false,
5732
               checked: false,
5714
               remark: e.remark,
5733
               remark: e.remark,
@@ -5745,8 +5764,8 @@ export class HushijiandanComponent implements OnInit {
5745
     console.log(e);
5764
     console.log(e);
5746
     let obj = JSON.parse(e);
5765
     let obj = JSON.parse(e);
5747
     this.isShowAddInspect = obj.show;
5766
     this.isShowAddInspect = obj.show;
5767
+		let user = JSON.parse(localStorage.getItem("user"));
5748
     if(obj.type == 2){
5768
     if(obj.type == 2){
5749
-      let user = JSON.parse(localStorage.getItem("user"));
5750
       // 手动添加
5769
       // 手动添加
5751
       let postData:any = {
5770
       let postData:any = {
5752
         inspectList: obj.list.map(v => ({
5771
         inspectList: obj.list.map(v => ({
@@ -5774,7 +5793,37 @@ export class HushijiandanComponent implements OnInit {
5774
             this.message.error(data.msg || '追加检查失败!')
5793
             this.message.error(data.msg || '追加检查失败!')
5775
           }
5794
           }
5776
         });
5795
         });
5777
-    }
5796
+    }else{
5797
+			let postData:any = {
5798
+			  inspectList: [{
5799
+			    patientCode: this.patientMsg.patientCode,
5800
+			    patientName: this.patientMsg.patientName,
5801
+			    barCode: this.patientMsg.barCode,
5802
+			    inspectCheckType: { id: obj.inspectData.id },
5803
+			    applyDeptId: user.user.dept.id,
5804
+			    execDeptId: obj.inspectData.execDeptId,
5805
+			    bedNum: this.patientMsg.bedNum,
5806
+			    hosId: this.patientMsg.hosId,
5807
+			    yyTime: format(new Date(obj.inspectData.date), 'yyyy-MM-dd ') + format(startOfMinute(new Date(obj.inspectData.time)), 'HH:mm:ss'),
5808
+					endCheckTime: obj.inspectData.endCheckTime
5809
+				}] || undefined,
5810
+			};
5811
+			this.maskFlag = this.message.loading("正在加载中..", {
5812
+			  nzDuration: 0,
5813
+			}).messageId;
5814
+			this.mainService
5815
+			  .simplePost("addData", "inspect", postData)
5816
+			  .subscribe((data:any) => {
5817
+			    this.message.remove(this.maskFlag);
5818
+			    this.maskFlag = false;
5819
+			    if (data.status == 200) {
5820
+			      this.message.success('追加检查成功!')
5821
+			      this.refreshInspectList();
5822
+			    } else {
5823
+			      this.message.error(data.msg || '追加检查失败!')
5824
+			    }
5825
+			  });
5826
+		}
5778
   }
5827
   }
5779
 
5828
 
5780
   // 统计
5829
   // 统计

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

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

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 4 - 4
src/app/views/inspect-info-config/inspect-info-config.component.html


+ 20 - 3
src/app/views/inspect-info-config/inspect-info-config.component.ts

@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
2
 import { ToolService } from 'src/app/services/tool.service';
2
 import { ToolService } from 'src/app/services/tool.service';
3
 import { MainService } from 'src/app/services/main.service';
3
 import { MainService } from 'src/app/services/main.service';
4
 import { NzMessageService } from 'ng-zorro-antd';
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
 import { Subject } from 'rxjs';
6
 import { Subject } from 'rxjs';
7
 import { debounceTime } from 'rxjs/operators';
7
 import { debounceTime } from 'rxjs/operators';
8
 import { Location } from '@angular/common';
8
 import { Location } from '@angular/common';
@@ -218,10 +218,11 @@ export class InspectInfoConfigComponent implements OnInit {
218
   }
218
   }
219
 
219
 
220
   // 修改检查项目-确定
220
   // 修改检查项目-确定
221
-  submitSelectDate({date, deptId, remark}){
221
+  submitSelectDate({date, endCheckTime, deptId, remark}){
222
     let postData = {
222
     let postData = {
223
       id: this.coopData.inspect.id,
223
       id: this.coopData.inspect.id,
224
       yyTime: date || undefined,
224
       yyTime: date || undefined,
225
+			endCheckTime: endCheckTime,
225
       execDeptId: deptId,
226
       execDeptId: deptId,
226
       remark,
227
       remark,
227
     }
228
     }
@@ -329,6 +330,21 @@ export class InspectInfoConfigComponent implements OnInit {
329
         if (data.status == 200) {
330
         if (data.status == 200) {
330
           let listOfData = data.list || [];
331
           let listOfData = data.list || [];
331
           listOfData.forEach(v => {
332
           listOfData.forEach(v => {
333
+						for(let i of v.inspects){
334
+							if(i.yyTime){
335
+								i.newTime = format(new Date(i.yyTime), 'MM-dd HH:mm')
336
+								if(i.endCheckTime){
337
+									i.newTime2 = format(new Date(i.endCheckTime), 'HH:mm')
338
+									i.yyEndTime = i.newTime + '--' + i.newTime2
339
+								}else{
340
+									// i.newTime = format(new Date(i.yyTime), 'yyyy-MM-dd HH:mm')
341
+									i.yyEndTime = i.newTime
342
+								}
343
+							}else{
344
+								i.newTime = null
345
+								i.newTime2 = null
346
+							}
347
+						}
332
             if(v.illnessState){
348
             if(v.illnessState){
333
               v.illnessStateCopy = v.illnessState.id;
349
               v.illnessStateCopy = v.illnessState.id;
334
             }
350
             }
@@ -403,7 +419,8 @@ export class InspectInfoConfigComponent implements OnInit {
403
         bedNum: this.patientDTO.bedNum,
419
         bedNum: this.patientDTO.bedNum,
404
         hosId: this.hosId,
420
         hosId: this.hosId,
405
         yyTime: format(new Date(obj.inspectData.date), 'yyyy-MM-dd ') + format(startOfMinute(new Date(obj.inspectData.time)), 'HH:mm:ss'),
421
         yyTime: format(new Date(obj.inspectData.date), 'yyyy-MM-dd ') + format(startOfMinute(new Date(obj.inspectData.time)), 'HH:mm:ss'),
406
-      }] || undefined,
422
+				endCheckTime: obj.inspectData.endCheckTime
423
+			}] || undefined,
407
     };
424
     };
408
     this.maskFlag = this.message.loading("正在加载中..", {
425
     this.maskFlag = this.message.loading("正在加载中..", {
409
       nzDuration: 0,
426
       nzDuration: 0,

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 4 - 4
src/app/views/inspect-search/inspect-search.component.html


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

@@ -4,7 +4,7 @@ import { Subject } from "rxjs";
4
 import { debounceTime } from "rxjs/operators";
4
 import { debounceTime } from "rxjs/operators";
5
 import { MainService } from "src/app/services/main.service";
5
 import { MainService } from "src/app/services/main.service";
6
 import { ToolService } from "src/app/services/tool.service";
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
 import { NzMessageService } from 'ng-zorro-antd';
8
 import { NzMessageService } from 'ng-zorro-antd';
9
 
9
 
10
 @Component({
10
 @Component({
@@ -45,8 +45,10 @@ export class InspectSearchComponent implements OnInit {
45
   pageSize: number = 10; //表格每页展示条数
45
   pageSize: number = 10; //表格每页展示条数
46
   listLength: number = 10; //表格总数据量
46
   listLength: number = 10; //表格总数据量
47
   changeInpSubject = new Subject();
47
   changeInpSubject = new Subject();
48
-
48
+	hosId:any = this.tool.getCurrentHospital().id; //当前院区
49
+	
49
   ngOnInit() {
50
   ngOnInit() {
51
+		this.getTaskType();
50
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
52
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
51
       this.searchWorker(v);
53
       this.searchWorker(v);
52
     });
54
     });
@@ -100,8 +102,60 @@ export class InspectSearchComponent implements OnInit {
100
   getAllHospital() {
102
   getAllHospital() {
101
     this.allHospital = [this.tool.getCurrentHospital()];
103
     this.allHospital = [this.tool.getCurrentHospital()];
102
     this.searchCriteria.hospital = this.tool.getCurrentHospital().id;
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
   historyPromptModalShow = false; //标本历史记录弹窗开关
160
   historyPromptModalShow = false; //标本历史记录弹窗开关
107
   scode = ""; //查看历史记录携带
161
   scode = ""; //查看历史记录携带
@@ -178,6 +232,19 @@ export class InspectSearchComponent implements OnInit {
178
       .subscribe((data) => {
232
       .subscribe((data) => {
179
         this.loading1 = false;
233
         this.loading1 = false;
180
         if (data["status"] == 200) {
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
+								i.yyEndTime = i.newTime + '--' + i.newTime2
241
+							}else{
242
+								i.yyEndTime = i.newTime
243
+							}
244
+						}else{
245
+							i.yyEndTime = null
246
+						}
247
+					})
181
           this.listOfData = data["list"];
248
           this.listOfData = data["list"];
182
           this.listLength = data["totalNum"];
249
           this.listLength = data["totalNum"];
183
         }
250
         }
@@ -222,7 +289,8 @@ export class InspectSearchComponent implements OnInit {
222
         bedNum: obj.patientDTO.bedNum,
289
         bedNum: obj.patientDTO.bedNum,
223
         hosId: this.searchCriteria.hospital,
290
         hosId: this.searchCriteria.hospital,
224
         yyTime: format(new Date(obj.inspectData.date), 'yyyy-MM-dd ') + format(startOfMinute(new Date(obj.inspectData.time)), 'HH:mm:ss'),
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
     this.maskFlag = this.message.loading("正在加载中..", {
295
     this.maskFlag = this.message.loading("正在加载中..", {
228
       nzDuration: 0,
296
       nzDuration: 0,
@@ -252,10 +320,11 @@ export class InspectSearchComponent implements OnInit {
252
 
320
 
253
   // 修改检查项目-确定
321
   // 修改检查项目-确定
254
   maskFlag: any = false;
322
   maskFlag: any = false;
255
-  submitSelectDate({date, deptId, remark, applyDeptId, patientDTO}){
323
+  submitSelectDate({date, endCheckTime, deptId, remark, applyDeptId, patientDTO}){
256
     let postData = {
324
     let postData = {
257
       id: this.coopData.id,
325
       id: this.coopData.id,
258
       yyTime: date || undefined,
326
       yyTime: date || undefined,
327
+			endCheckTime: endCheckTime,
259
       execDeptId: deptId,
328
       execDeptId: deptId,
260
       remark,
329
       remark,
261
       applyDeptId,
330
       applyDeptId,