maotao il y a 1 semaine
Parent
commit
d0e289ce43

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

@@ -135,6 +135,7 @@ export class AddInspectThreeModalComponent implements OnInit {
135 135
   execDeptList:any[] = [];
136 136
   changeInspect(id){
137 137
     this.inspectDTO = this.inspectList.find(v => v.id == id);
138
+		console.log(4545, this.inspectDTO)
138 139
     if(this.inspectDTO){
139 140
 			this.setTimeData();
140 141
       this.inspectData.id = this.inspectDTO.id;

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

@@ -139,7 +139,7 @@
139 139
               <div nz-col nzSpan="8">
140 140
                 <p>
141 141
                   <span class="label">预约时间:</span>
142
-                  <span>{{item.yyTime||'-'}}</span>
142
+                  <span>{{item.yyEndTime||'-'}}</span>
143 143
                 </p>
144 144
               </div>
145 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 5
 import { NzMessageService } from "ng-zorro-antd";
6 6
 import { forkJoin } from "rxjs";
7 7
 import { ToolService } from "src/app/services/tool.service";
8
+import { startOfDay, endOfDay, format, startOfMinute, addMinutes } from 'date-fns';
8 9
 
9 10
 @Component({
10 11
   selector: "app-detail-patients",
@@ -63,23 +64,32 @@ export class DetailPatientsComponent implements OnInit {
63 64
       // getDetail
64 65
       this.orderInfo = res[1]["data"];
65 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 93
       if (res[1]["data"].middleDept) {
84 94
         this.middleDept = res[1]["data"].middleDept.map((item) =>
85 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 25
           <div class="formItem flex_1">
26 26
             <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
27 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 30
               </nz-time-picker>
31 31
               <button [disabled]="!yyDate" nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">
32 32
                 下一日
@@ -34,7 +34,16 @@
34 34
             </div>
35 35
           </div>
36 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 47
         <div class="row">
39 48
           <div class="formItem flex_1">
40 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 1
 import { Component, OnInit, Output, Input } from '@angular/core';
2 2
 import { EventEmitter } from '@angular/core';
3 3
 import { NzMessageService } from 'ng-zorro-antd';
4
-import { addDays, startOfMinute, format } from 'date-fns';
4
+import { addDays, startOfMinute, format, addMinutes } from 'date-fns';
5 5
 
6 6
 @Component({
7 7
   selector: 'app-edit-inspect-info',
@@ -13,7 +13,10 @@ export class EditInspectInfoComponent implements OnInit {
13 13
   @Input() date:any;
14 14
   @Input() execDeptId:any;
15 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 20
   @Output() submitFormHand = new EventEmitter();
18 21
   @Output() cancelFlagHand = new EventEmitter();
19 22
   yyDate = null; //预约日期-患者其他服务
@@ -25,11 +28,15 @@ export class EditInspectInfoComponent implements OnInit {
25 28
   constructor(
26 29
     private message: NzMessageService,
27 30
   ) { }
28
-
31
+	
29 32
   ngOnInit() {
30 33
     if(this.date){
31 34
       this.yyDate = new Date(this.date);
32 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 42
     if(this.execDeptList){
@@ -53,7 +60,42 @@ export class EditInspectInfoComponent implements OnInit {
53 60
   nextDay() {
54 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 100
   hideModal() {
59 101
     this.cancelFlagHand.emit(false)
@@ -73,7 +115,8 @@ export class EditInspectInfoComponent implements OnInit {
73 115
       deptId: this.deptId,
74 116
       remark: this.remark,
75 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
 

+ 6 - 2
src/app/share/edit-inspect-info2/edit-inspect-info2.component.ts

@@ -20,7 +20,9 @@ export class EditInspectInfo2Component implements OnInit {
20 20
   @Input() applyDept:any = {};
21 21
   @Input() patient:any = {};
22 22
   @Input() execDeptList:any;
23
+	@Input() extra1:any;
23 24
 	@Input() inspectAndPatientTransportConfig:any = {};
25
+	@Input() endCheckTime:any = null;
24 26
   @Output() submitFormHand = new EventEmitter();
25 27
   @Output() cancelFlagHand = new EventEmitter();
26 28
   yyDate = null; //预约日期-患者其他服务
@@ -65,7 +67,9 @@ export class EditInspectInfo2Component implements OnInit {
65 67
       this.yyDate = new Date(this.date);
66 68
       this.yyTime = new Date(this.date);
67 69
 			this.mdData = format(this.yyDate, 'yyyy-MM-dd')
68
-			this.setTimeData();
70
+			if(this.endCheckTime){
71
+				this.setTimeData();
72
+			}
69 73
     }
70 74
 
71 75
     if(this.execDeptList){
@@ -120,7 +124,7 @@ export class EditInspectInfo2Component implements OnInit {
120 124
 	// 设置结束时间
121 125
 	setTimeData(){
122 126
 		if(this.mdData && this.yyTime){
123
-			let num = this.execDeptList.extra1 ? Number(this.execDeptList.extra1) : undefined
127
+			let num = this.extra1 ? Number(this.extra1) : undefined
124 128
 			let time = addMinutes(this.yyTime, num ? num : this.inspectAndPatientTransportConfig.yytimeGapMinute)
125 129
 			let time2 = format(time, 'HH:mm')
126 130
 			this.endTime = this.mdData +' '+ time2

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

@@ -857,7 +857,7 @@
857 857
                 <div nz-col nzSpan="8">
858 858
                   <p>
859 859
                     <span class="label">预约时间:</span>
860
-                    <span>{{ item.yyTime || "-" }}</span>
860
+                    <span>{{ item.yyEndTime || "-" }}</span>
861 861
                   </p>
862 862
                 </div>
863 863
                 <div nz-col nzSpan="8">

+ 10 - 10
src/app/share/order-detail/order-detail.component.ts

@@ -160,16 +160,16 @@ export class OrderDetailComponent implements OnInit {
160 160
       .getFetchData("api", "workOrder", this.id)
161 161
       .subscribe((data) => {
162 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
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 173
 				}
174 174
         this.orderInfo = obj;
175 175
         if (data.data.middleDept) {

+ 16 - 12
src/app/views/fuwutai/fuwutai.component.ts

@@ -5635,16 +5635,17 @@ export class FuwutaiComponent implements OnInit {
5635 5635
           let arr = [];
5636 5636
           data.data.data.forEach((e) => {
5637 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')
5638
+						if(e.endCheckTime){
5639
+							e.newTime2 = format(new Date(e.endCheckTime), 'HH:mm')
5640
+							e.yyEndTime = e.newTime + '--' + e.newTime2
5640 5641
 						}else{
5641
-							e.newTime2 = format(addMinutes(new Date(e.yyTime), this.inspectAndPatientTransportConfig.yytimeGapMinute), 'HH:mm')
5642
+							e.yyEndTime = e.newTime
5642 5643
 						}
5643 5644
             arr.push({
5644 5645
               execDeptId: e.execDept.id,
5645 5646
               yyTime: e.yyTime,
5646 5647
               priority: e.priority,
5647
-              label: (e.newTime + '--' + e.newTime2 || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName + '-' + e.inspectCode || "检查"),
5648
+              label: (e.yyEndTime || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName?e.inspectName:'' + '-' + e.inspectCode || "检查"),
5648 5649
               value: e["id"],
5649 5650
               checked: false,
5650 5651
               remark: e.remark,
@@ -7281,16 +7282,18 @@ export class FuwutaiComponent implements OnInit {
7281 7282
           let arr = [];
7282 7283
           data.data.data.forEach((e) => {
7283 7284
 						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')
7285
+						if(e.endCheckTime){
7286
+							e.newTime2 = format(new Date(e.endCheckTime), 'HH:mm')
7287
+							e.yyEndTime = e.newTime + '--' + e.newTime2
7286 7288
 						}else{
7287
-							e.newTime2 = format(addMinutes(new Date(e.yyTime), this.inspectAndPatientTransportConfig.yytimeGapMinute), 'HH:mm')
7289
+							e.yyEndTime = e.newTime
7288 7290
 						}
7291
+
7289 7292
             arr.push({
7290 7293
               execDeptId: e.execDept.id,
7291 7294
               yyTime: e.yyTime,
7292 7295
               priority: e.priority,
7293
-              label: (e.newTime + '--' + e.newTime2 || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName + '-' + e.inspectCode || "检查"),
7296
+              label: (e.yyEndTime || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName?e.inspectName:'' + '-' + e.inspectCode || "检查"),
7294 7297
               value: e["id"],
7295 7298
               checked: false,
7296 7299
             });
@@ -7352,16 +7355,17 @@ export class FuwutaiComponent implements OnInit {
7352 7355
         let arr = [];
7353 7356
         data.data.data.forEach((e) => {
7354 7357
 					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')
7358
+					if(e.endCheckTime){
7359
+						e.newTime2 = format(new Date(e.endCheckTime), 'HH:mm')
7360
+						e.yyEndTime = e.newTime + '--' + e.newTime2
7357 7361
 					}else{
7358
-						e.newTime2 = format(addMinutes(new Date(e.yyTime), this.inspectAndPatientTransportConfig.yytimeGapMinute), 'HH:mm')
7362
+						e.yyEndTime = e.newTime
7359 7363
 					}
7360 7364
           arr.push({
7361 7365
             execDeptId: e.execDept.id,
7362 7366
             yyTime: e.yyTime,
7363 7367
             priority: e.priority,
7364
-            label: (e.newTime + '--' + e.newTime2 || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName + '-' + e.inspectCode || "检查"),
7368
+            label: (e.yyEndTime || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName?e.inspectName:'' + '-' + e.inspectCode || "检查"),
7365 7369
             value: e["id"],
7366 7370
             checked: false,
7367 7371
           });

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

@@ -3503,11 +3503,14 @@ export class HushijiandanComponent implements OnInit {
3503 3503
         if (data.status == 200 && data.data && data.data.length) {
3504 3504
           let arr = [];
3505 3505
           data.data.forEach((e) => {
3506
+						e.yyEndTime = e.yyTime
3506 3507
 						e.newTime = format(new Date(e.yyTime), 'MM-dd HH:mm')
3507 3508
 						if(e.endCheckTime){
3508 3509
 							e.newTime2 = format(new Date(e.endCheckTime), 'HH:mm')
3510
+							e.yyEndTime = e.newTime + '--' + e.newTime2
3509 3511
 						}else{
3510
-							e.newTime2 = format(addMinutes(new Date(e.yyTime), this.inspectAndPatientTransportConfig.yytimeGapMinute), 'HH:mm')
3512
+							e.yyEndTime = e.newTime
3513
+							// e.newTime2 = format(addMinutes(new Date(e.yyTime), this.inspectAndPatientTransportConfig.yytimeGapMinute), 'HH:mm')
3511 3514
 						}
3512 3515
 						arr.push({
3513 3516
 						  execDeptId: e.execDept.id,
@@ -3515,13 +3518,13 @@ export class HushijiandanComponent implements OnInit {
3515 3518
               priority: e.priority,
3516 3519
               manualCreate: e.manualCreate,
3517 3520
               label:
3518
-                (e.newTime + '--' + e.newTime2 || "") +
3521
+                (e.yyEndTime || "") +
3519 3522
                 " " +
3520 3523
                 (this.deptDisplay == 2
3521 3524
                   ? e.execDept.deptalias
3522 3525
                   : e.execDept.dept) +
3523 3526
                 " 进行 " +
3524
-                (e.inspectName + '-' + e.inspectCode || "检查"),
3527
+                (e.inspectName?e.inspectName:'' + '-' + e.inspectCode || "检查"),
3525 3528
               value: e["id"],
3526 3529
               checked: false,
3527 3530
               remark: e.remark,
@@ -5698,8 +5701,10 @@ export class HushijiandanComponent implements OnInit {
5698 5701
 						e.newTime = format(new Date(e.yyTime), 'MM-dd HH:mm')
5699 5702
 						if(e.endCheckTime){
5700 5703
 							e.newTime2 = format(new Date(e.endCheckTime), 'HH:mm')
5704
+							e.yyEndTime = e.newTime + '--' + e.newTime2
5701 5705
 						}else{
5702
-							e.newTime2 = format(addMinutes(new Date(e.yyTime), this.inspectAndPatientTransportConfig.yytimeGapMinute), 'HH:mm')
5706
+							// e.newTime2 = format(addMinutes(new Date(e.yyTime), this.inspectAndPatientTransportConfig.yytimeGapMinute), 'HH:mm')
5707
+							e.yyEndTime = e.newTime
5703 5708
 						}
5704 5709
             arr.push({
5705 5710
               execDeptId: e.execDept.id,
@@ -5707,13 +5712,13 @@ export class HushijiandanComponent implements OnInit {
5707 5712
               priority: e.priority,
5708 5713
               manualCreate: e.manualCreate,
5709 5714
               label:
5710
-                (e.newTime + '--' + e.newTime2 || "") +
5715
+                (e.yyEndTime|| "") +
5711 5716
                 " " +
5712 5717
                 (this.deptDisplay == 2
5713 5718
                   ? e.execDept.deptalias
5714 5719
                   : e.execDept.dept) +
5715 5720
                 " 进行 " +
5716
-                (e.inspectName + '-' + e.inspectCode || "检查"),
5721
+                (e.inspectName?e.inspectName:'' + '-' + e.inspectCode || "检查"),
5717 5722
               value: e["id"],
5718 5723
               checked: false,
5719 5724
               remark: e.remark,

Fichier diff supprimé car celui-ci est trop grand
+ 3 - 3
src/app/views/inspect-info-config/inspect-info-config.component.html


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

@@ -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 222
     let postData = {
223 223
       id: this.coopData.inspect.id,
224 224
       yyTime: date || undefined,
225
+			endCheckTime: endCheckTime,
225 226
       execDeptId: deptId,
226 227
       remark,
227 228
     }
@@ -334,10 +335,11 @@ export class InspectInfoConfigComponent implements OnInit {
334 335
 								i.newTime = format(new Date(i.yyTime), 'MM-dd HH:mm')
335 336
 								if(i.endCheckTime){
336 337
 									i.newTime2 = format(new Date(i.endCheckTime), 'HH:mm')
338
+									i.yyEndTime = i.newTime + '--' + i.newTime2
337 339
 								}else{
338
-									i.newTime2 = format(addMinutes(new Date(i.yyTime), this.configs.yytimeGapMinute), 'HH:mm')
340
+									// i.newTime = format(new Date(i.yyTime), 'yyyy-MM-dd HH:mm')
341
+									i.yyEndTime = i.newTime
339 342
 								}
340
-								i.yyEndTime = i.newTime + '--' + i.newTime2
341 343
 							}else{
342 344
 								i.newTime = null
343 345
 								i.newTime2 = null

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
src/app/views/inspect-search/inspect-search.component.html


+ 2 - 2
src/app/views/inspect-search/inspect-search.component.ts

@@ -237,10 +237,10 @@ export class InspectSearchComponent implements OnInit {
237 237
 							i.newTime = format(new Date(i.yyTime), 'MM-dd HH:mm')
238 238
 							if(i.endCheckTime){
239 239
 								i.newTime2 = format(new Date(i.endCheckTime), 'HH:mm')
240
+								i.yyEndTime = i.newTime + '--' + i.newTime2
240 241
 							}else{
241
-								i.newTime2 = format(addMinutes(new Date(i.yyTime), this.configs.yytimeGapMinute), 'HH:mm')
242
+								i.yyEndTime = i.newTime
242 243
 							}
243
-							i.yyEndTime = i.newTime + '--' + i.newTime2
244 244
 						}else{
245 245
 							i.yyEndTime = null
246 246
 						}