Browse Source

拉取代码

maotao 2 weeks ago
parent
commit
e8d0676a33
23 changed files with 519 additions and 70 deletions
  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
               <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">

+ 32 - 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
   // 获取检查项目
@@ -108,6 +136,7 @@ export class AddInspectThreeModalComponent implements OnInit {
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);
110
     if(this.inspectDTO){
138
     if(this.inspectDTO){
139
+			this.setTimeData();
111
       this.inspectData.id = this.inspectDTO.id;
140
       this.inspectData.id = this.inspectDTO.id;
112
       this.execDeptList = this.inspectDTO.deptList || [];
141
       this.execDeptList = this.inspectDTO.deptList || [];
113
       this.inspectData.execDeptId = this.execDeptList.length === 1 ? this.execDeptList[0].id : undefined;
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
           <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>

+ 42 - 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,8 @@ 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() inspectAndPatientTransportConfig:any = {};
23
   @Output() submitFormHand = new EventEmitter();
24
   @Output() submitFormHand = new EventEmitter();
24
   @Output() cancelFlagHand = new EventEmitter();
25
   @Output() cancelFlagHand = new EventEmitter();
25
   yyDate = null; //预约日期-患者其他服务
26
   yyDate = null; //预约日期-患者其他服务
@@ -63,6 +64,8 @@ export class EditInspectInfo2Component implements OnInit {
63
     if(this.date){
64
     if(this.date){
64
       this.yyDate = new Date(this.date);
65
       this.yyDate = new Date(this.date);
65
       this.yyTime = new Date(this.date);
66
       this.yyTime = new Date(this.date);
67
+			this.mdData = format(this.yyDate, 'yyyy-MM-dd')
68
+			this.setTimeData();
66
     }
69
     }
67
 
70
 
68
     if(this.execDeptList){
71
     if(this.execDeptList){
@@ -91,7 +94,41 @@ export class EditInspectInfo2Component implements OnInit {
91
   changeApplyDept(e){
94
   changeApplyDept(e){
92
     this.inspectData.patientId = undefined;
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
   applyDeptList: Array<any>; //申请科室列表
133
   applyDeptList: Array<any>; //申请科室列表
97
   // 获取申请科室
134
   // 获取申请科室
@@ -198,7 +235,8 @@ export class EditInspectInfo2Component implements OnInit {
198
       deptId: this.deptId,
235
       deptId: this.deptId,
199
       remark: this.remark,
236
       remark: this.remark,
200
       date: format(this.yyDate, 'yyyy-MM-dd') + ' ' + format(startOfMinute(this.yyTime), 'HH:mm:ss'),
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
       #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">
@@ -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.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
         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 {

+ 25 - 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,20 @@ 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.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
             arr.push({
5643
             arr.push({
5638
               execDeptId: e.execDept.id,
5644
               execDeptId: e.execDept.id,
5639
               yyTime: e.yyTime,
5645
               yyTime: e.yyTime,
5640
               priority: e.priority,
5646
               priority: e.priority,
5641
-              label: (e.yyTime || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName || "检查"),
5647
+              label: (e.newTime + '--' + e.newTime2 || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName || "检查"),
5642
               value: e["id"],
5648
               value: e["id"],
5643
               checked: false,
5649
               checked: false,
5644
               remark: e.remark,
5650
               remark: e.remark,
@@ -7271,14 +7277,20 @@ export class FuwutaiComponent implements OnInit {
7271
 
7277
 
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) => {
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
         this.linkCheckLis = [];
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
           let arr = [];
7281
           let arr = [];
7276
           data.data.data.forEach((e) => {
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
             arr.push({
7289
             arr.push({
7278
               execDeptId: e.execDept.id,
7290
               execDeptId: e.execDept.id,
7279
               yyTime: e.yyTime,
7291
               yyTime: e.yyTime,
7280
               priority: e.priority,
7292
               priority: e.priority,
7281
-              label: (e.yyTime || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName || "检查"),
7293
+              label: (e.newTime + '--' + e.newTime2 || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName || "检查"),
7282
               value: e["id"],
7294
               value: e["id"],
7283
               checked: false,
7295
               checked: false,
7284
             });
7296
             });
@@ -7336,14 +7348,20 @@ export class FuwutaiComponent implements OnInit {
7336
   refreshInspectList(){
7348
   refreshInspectList(){
7337
     this.linkCheckLis = [];
7349
     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) => {
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
         let arr = [];
7352
         let arr = [];
7341
         data.data.data.forEach((e) => {
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
           arr.push({
7360
           arr.push({
7343
             execDeptId: e.execDept.id,
7361
             execDeptId: e.execDept.id,
7344
             yyTime: e.yyTime,
7362
             yyTime: e.yyTime,
7345
             priority: e.priority,
7363
             priority: e.priority,
7346
-            label: (e.yyTime || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName || "检查"),
7364
+            label: (e.newTime + '--' + e.newTime2 || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName || "检查"),
7347
             value: e["id"],
7365
             value: e["id"],
7348
             checked: false,
7366
             checked: false,
7349
           });
7367
           });

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

@@ -2808,4 +2808,7 @@
2808
 <app-specimen-package-list-modal *ngIf="isShowSpecimenPackageList" (closeModelHs)="closeSpecimenPackageList($event)" [specimenPackageStateValue]="specimenPackageStateValue"></app-specimen-package-list-modal>
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
   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'
@@ -934,7 +936,7 @@ export class HushijiandanComponent implements OnInit {
934
         if (result.status == 200) {
936
         if (result.status == 200) {
935
           let inspectAndPatientTransportConfig = result.list[0] || {};
937
           let inspectAndPatientTransportConfig = result.list[0] || {};
936
           this.inspectAndPatientTransportConfig = {...this.inspectAndPatientTransportConfig, ...inspectAndPatientTransportConfig};
938
           this.inspectAndPatientTransportConfig = {...this.inspectAndPatientTransportConfig, ...inspectAndPatientTransportConfig};
937
-
939
+					
938
           // 是否显示排队信息
940
           // 是否显示排队信息
939
           if(this.inspectAndPatientTransportConfig.queuingInformation == 1){
941
           if(this.inspectAndPatientTransportConfig.queuingInformation == 1){
940
             this.getQueuingInformation();
942
             this.getQueuingInformation();
@@ -3501,13 +3503,19 @@ export class HushijiandanComponent implements OnInit {
3501
         if (data.status == 200 && data.data && data.data.length) {
3503
         if (data.status == 200 && data.data && data.data.length) {
3502
           let arr = [];
3504
           let arr = [];
3503
           data.data.forEach((e) => {
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
               priority: e.priority,
3515
               priority: e.priority,
3508
               manualCreate: e.manualCreate,
3516
               manualCreate: e.manualCreate,
3509
               label:
3517
               label:
3510
-                (e.yyTime || "") +
3518
+                (e.newTime + '--' + e.newTime2 || "") +
3511
                 " " +
3519
                 " " +
3512
                 (this.deptDisplay == 2
3520
                 (this.deptDisplay == 2
3513
                   ? e.execDept.deptalias
3521
                   ? e.execDept.deptalias
@@ -5687,13 +5695,19 @@ export class HushijiandanComponent implements OnInit {
5687
         if (data.status == 200 && data.data && data.data.length) {
5695
         if (data.status == 200 && data.data && data.data.length) {
5688
           let arr = [];
5696
           let arr = [];
5689
           data.data.forEach((e) => {
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
             arr.push({
5704
             arr.push({
5691
               execDeptId: e.execDept.id,
5705
               execDeptId: e.execDept.id,
5692
               yyTime: e.yyTime,
5706
               yyTime: e.yyTime,
5693
               priority: e.priority,
5707
               priority: e.priority,
5694
               manualCreate: e.manualCreate,
5708
               manualCreate: e.manualCreate,
5695
               label:
5709
               label:
5696
-                (e.yyTime || "") +
5710
+                (e.newTime + '--' + e.newTime2 || "") +
5697
                 " " +
5711
                 " " +
5698
                 (this.deptDisplay == 2
5712
                 (this.deptDisplay == 2
5699
                   ? e.execDept.deptalias
5713
                   ? e.execDept.deptalias
@@ -5736,8 +5750,8 @@ export class HushijiandanComponent implements OnInit {
5736
     console.log(e);
5750
     console.log(e);
5737
     let obj = JSON.parse(e);
5751
     let obj = JSON.parse(e);
5738
     this.isShowAddInspect = obj.show;
5752
     this.isShowAddInspect = obj.show;
5753
+		let user = JSON.parse(localStorage.getItem("user"));
5739
     if(obj.type == 2){
5754
     if(obj.type == 2){
5740
-      let user = JSON.parse(localStorage.getItem("user"));
5741
       // 手动添加
5755
       // 手动添加
5742
       let postData:any = {
5756
       let postData:any = {
5743
         inspectList: obj.list.map(v => ({
5757
         inspectList: obj.list.map(v => ({
@@ -5765,6 +5779,36 @@ export class HushijiandanComponent implements OnInit {
5765
             this.message.error(data.msg || '追加检查失败!')
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
           <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(',');

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

@@ -106,8 +106,8 @@
106
                   <span class="circle red" title="无预约时间检查"></span>
106
                   <span class="circle red" title="无预约时间检查"></span>
107
                 </ng-container>
107
                 </ng-container>
108
               </ng-template>
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 || "检查")}} <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 || "检查")}} <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 || "检查")}} <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 || "检查")}} <span class="inspectState" *ngIf="inspect.gdId" (click)="detail($event, inspect.gdId)">{{inspect.inspectState?.name}}</span></span>
111
             </span>
111
             </span>
112
             <span *ngIf="!inspect.gdId" class="icon_transport transport-weibiaoti2010104" (click)="editInspect({data: data, inspect: inspect})"></span>
112
             <span *ngIf="!inspect.gdId" class="icon_transport transport-weibiaoti2010104" (click)="editInspect({data: data, inspect: inspect})"></span>
113
             <span *ngIf="!inspect.gdId" class="icon_transport transport-shanchu1" (click)="showDelModal({data: data, inspect: inspect}, '您确认要删除吗?','删除','delInspect')"></span>
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
 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';
@@ -326,6 +326,20 @@ export class InspectInfoConfigComponent implements OnInit {
326
         if (data.status == 200) {
326
         if (data.status == 200) {
327
           let listOfData = data.list || [];
327
           let listOfData = data.list || [];
328
           listOfData.forEach(v => {
328
           listOfData.forEach(v => {
329
+						for(let i of v.inspects){
330
+							if(i.yyTime){
331
+								i.newTime = format(new Date(i.yyTime), 'MM-dd HH:mm')
332
+								if(i.endCheckTime){
333
+									i.newTime2 = format(new Date(i.endCheckTime), 'HH:mm')
334
+								}else{
335
+									i.newTime2 = format(addMinutes(new Date(i.yyTime), this.configs.yytimeGapMinute), 'HH:mm')
336
+								}
337
+								i.yyEndTime = i.newTime + '--' + i.newTime2
338
+							}else{
339
+								i.newTime = null
340
+								i.newTime2 = null
341
+							}
342
+						}
329
             if(v.illnessState){
343
             if(v.illnessState){
330
               v.illnessStateCopy = v.illnessState.id;
344
               v.illnessStateCopy = v.illnessState.id;
331
             }
345
             }
@@ -400,7 +414,8 @@ export class InspectInfoConfigComponent implements OnInit {
400
         bedNum: this.patientDTO.bedNum,
414
         bedNum: this.patientDTO.bedNum,
401
         hosId: this.hosId,
415
         hosId: this.hosId,
402
         yyTime: format(new Date(obj.inspectData.date), 'yyyy-MM-dd ') + format(startOfMinute(new Date(obj.inspectData.time)), 'HH:mm:ss'),
416
         yyTime: format(new Date(obj.inspectData.date), 'yyyy-MM-dd ') + format(startOfMinute(new Date(obj.inspectData.time)), 'HH:mm:ss'),
403
-      }] || undefined,
417
+				endCheckTime: obj.inspectData.endCheckTime
418
+			}] || undefined,
404
     };
419
     };
405
     this.maskFlag = this.message.loading("正在加载中..", {
420
     this.maskFlag = this.message.loading("正在加载中..", {
406
       nzDuration: 0,
421
       nzDuration: 0,

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

@@ -60,7 +60,7 @@
60
             <th nzWidth="14%">检查单号|检查项目</th>
60
             <th nzWidth="14%">检查单号|检查项目</th>
61
             <th nzWidth="14%">预约时间|入库时间</th>
61
             <th nzWidth="14%">预约时间|入库时间</th>
62
             <th nzWidth="8%">检查状态</th>
62
             <th nzWidth="8%">检查状态</th>
63
-            <th nzWidth="8%">陪检人员</th>
63
+            <th nzWidth="10%">陪检人员</th>
64
             <th nzWidth="14%">陪检方式|注意事项</th>
64
             <th nzWidth="14%">陪检方式|注意事项</th>
65
             <th nzWidth="10%">操作</th>
65
             <th nzWidth="10%">操作</th>
66
           </tr>
66
           </tr>
@@ -72,7 +72,7 @@
72
             <td>{{ data.applyDept?.dept }}<br>{{ data.remark }}</td>
72
             <td>{{ data.applyDept?.dept }}<br>{{ data.remark }}</td>
73
             <td>{{ data.execDept?.dept }}</td>
73
             <td>{{ data.execDept?.dept }}</td>
74
             <td>{{ data.inspectCode }}<br>{{data.inspectName}}</td>
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
             <td>{{ data.inspectState?.name}}</td>
76
             <td>{{ data.inspectState?.name}}</td>
77
             <td>{{ data.workerName }}</td>
77
             <td>{{ data.workerName }}</td>
78
             <td>{{ data.patientDTO?.tripTypeDTO?.inspectMode }}<br>{{ data.patientDTO?.remark }}</td>
78
             <td>{{ data.patientDTO?.tripTypeDTO?.inspectMode }}<br>{{ data.patientDTO?.remark }}</td>
@@ -100,10 +100,10 @@
100
 </app-prompt-modal>
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
 <app-inspect-log-prompt-modal *ngIf="logPromptModalShow" [show]="logPromptModalShow" [id]="inspectId" (closeModelHs)="closeModelLog($event)"></app-inspect-log-prompt-modal>
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
 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
+							}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
           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,