|
@@ -33,7 +33,7 @@ import {
|
33
|
33
|
startOfDay,
|
34
|
34
|
endOfDay,
|
35
|
35
|
parse,
|
36
|
|
- subHours
|
|
36
|
+ subHours
|
37
|
37
|
} from "date-fns";
|
38
|
38
|
import { SourceId } from "src/app/type/types";
|
39
|
39
|
import cloneDeep from 'lodash-es/cloneDeep'
|
|
@@ -116,6 +116,7 @@ export class HushijiandanComponent implements OnInit {
|
116
|
116
|
searchAccountSubject = new Subject(); //查工号防抖
|
117
|
117
|
searchTabInpSubject = new Subject(); //左侧查患者信息和检查信息防抖
|
118
|
118
|
otherSearchChangeSubject = new Subject(); //其他建单搜索防抖
|
|
119
|
+ inspectSubject = new Subject();
|
119
|
120
|
isYyInspect = false; //需要预约检查
|
120
|
121
|
inspectAndPatientTransportConfig:any = {timeMod: 30};
|
121
|
122
|
constructor(
|
|
@@ -202,6 +203,9 @@ export class HushijiandanComponent implements OnInit {
|
202
|
203
|
this.otherSearchChangeSubject.pipe(debounceTime(500)).subscribe((v) => {
|
203
|
204
|
this.getDeptTaskType(v);
|
204
|
205
|
});
|
|
206
|
+ this.inspectSubject.pipe(debounceTime(500)).subscribe((v) => {
|
|
207
|
+ this.refreshInspectList();
|
|
208
|
+ });
|
205
|
209
|
|
206
|
210
|
this.getTodayNum();
|
207
|
211
|
this.initLogin();
|
|
@@ -336,7 +340,7 @@ export class HushijiandanComponent implements OnInit {
|
336
|
340
|
}
|
337
|
341
|
});
|
338
|
342
|
}
|
339
|
|
-
|
|
343
|
+
|
340
|
344
|
// 新增申请单自选类型
|
341
|
345
|
applicationType:any;
|
342
|
346
|
isPathologyVisible:any = false;
|
|
@@ -348,18 +352,18 @@ export class HushijiandanComponent implements OnInit {
|
348
|
352
|
this.submitPathlogyForm()
|
349
|
353
|
}
|
350
|
354
|
}
|
351
|
|
-
|
|
355
|
+
|
352
|
356
|
// 取消新增申请单自选类型
|
353
|
357
|
handlePathologyCancel(){
|
354
|
358
|
this.applicationType = null
|
355
|
359
|
this.isPathologyVisible = false
|
356
|
360
|
}
|
357
|
|
-
|
|
361
|
+
|
358
|
362
|
// 确定新增申请单自选类型
|
359
|
363
|
handlePathologyOk(){
|
360
|
364
|
this.submitPathlogyForm()
|
361
|
365
|
}
|
362
|
|
-
|
|
366
|
+
|
363
|
367
|
// 新增申请单自选类型
|
364
|
368
|
submitPathlogyForm(){
|
365
|
369
|
if(this.openType=='btn'){
|
|
@@ -387,7 +391,7 @@ export class HushijiandanComponent implements OnInit {
|
387
|
391
|
this.pathologyModal = true
|
388
|
392
|
});
|
389
|
393
|
}
|
390
|
|
-
|
|
394
|
+
|
391
|
395
|
// 手术排程-病理申请单
|
392
|
396
|
openType:any;
|
393
|
397
|
scheduleItem:any;
|
|
@@ -513,7 +517,7 @@ export class HushijiandanComponent implements OnInit {
|
513
|
517
|
}
|
514
|
518
|
});
|
515
|
519
|
}
|
516
|
|
-
|
|
520
|
+
|
517
|
521
|
// 获取病理申请单最新数据
|
518
|
522
|
getPathologyData(){
|
519
|
523
|
if(this.openType=='btn'){
|
|
@@ -549,7 +553,7 @@ export class HushijiandanComponent implements OnInit {
|
549
|
553
|
}
|
550
|
554
|
})
|
551
|
555
|
}
|
552
|
|
-
|
|
556
|
+
|
553
|
557
|
// 申请单号点击
|
554
|
558
|
itemClick(item){
|
555
|
559
|
this.detailId = item.id
|
|
@@ -567,7 +571,7 @@ export class HushijiandanComponent implements OnInit {
|
567
|
571
|
}
|
568
|
572
|
},200)
|
569
|
573
|
}
|
570
|
|
-
|
|
574
|
+
|
571
|
575
|
// 申请单作废
|
572
|
576
|
cancellationLoading:any = false;
|
573
|
577
|
cancellationModal:any = false;
|
|
@@ -575,7 +579,7 @@ export class HushijiandanComponent implements OnInit {
|
575
|
579
|
this.coopId = data.id
|
576
|
580
|
this.cancellationModal = true
|
577
|
581
|
}
|
578
|
|
-
|
|
582
|
+
|
579
|
583
|
// 确定作废
|
580
|
584
|
confirmCancellation(){
|
581
|
585
|
this.cancellationLoading = true;
|
|
@@ -591,12 +595,12 @@ export class HushijiandanComponent implements OnInit {
|
591
|
595
|
}
|
592
|
596
|
});
|
593
|
597
|
}
|
594
|
|
-
|
|
598
|
+
|
595
|
599
|
// 取消作废
|
596
|
600
|
cancelCancellation(){
|
597
|
601
|
this.cancellationModal = false
|
598
|
602
|
}
|
599
|
|
-
|
|
603
|
+
|
600
|
604
|
hideModal(){
|
601
|
605
|
this.multiDialog = false
|
602
|
606
|
}
|
|
@@ -1013,6 +1017,7 @@ export class HushijiandanComponent implements OnInit {
|
1013
|
1017
|
detailBx(data){
|
1014
|
1018
|
this.router.navigateByUrl("nurse/detailBx/" + data.id);
|
1015
|
1019
|
}
|
|
1020
|
+
|
1016
|
1021
|
// 查看报修信息弹窗
|
1017
|
1022
|
bxPromptModalShow = false; //弹窗开关
|
1018
|
1023
|
bData = ""; //查看详情携带所有数据
|
|
@@ -3037,11 +3042,7 @@ export class HushijiandanComponent implements OnInit {
|
3037
|
3042
|
}
|
3038
|
3043
|
}
|
3039
|
3044
|
// 获取患者其他服务,护士端是否预约建单
|
3040
|
|
- let appointmentZyBuildFlag = this.checkTypeLis.filter(
|
3041
|
|
- (item) =>
|
3042
|
|
- item.id == this.patientForm.controls.checkedType.value &&
|
3043
|
|
- item.associationType.value == "patientTransport"
|
3044
|
|
- );
|
|
3045
|
+ let appointmentZyBuildFlag = this.checkTypeLis.filter((item) => item.id == this.patientForm.controls.checkedType.value && item.associationType.value == "patientTransport");
|
3045
|
3046
|
if (appointmentZyBuildFlag.length) {
|
3046
|
3047
|
this.appointmentZyBuildFlag =
|
3047
|
3048
|
appointmentZyBuildFlag[0].appointmentOtherSwitch == 1 ? "1" : "0";
|
|
@@ -3068,9 +3069,12 @@ export class HushijiandanComponent implements OnInit {
|
3068
|
3069
|
// 判断这个任务类型是否允许加急 start
|
3069
|
3070
|
// 判断这个任务类型是否允许加急 end
|
3070
|
3071
|
let that = this;
|
|
3072
|
+ let isInpect = this.checkTypeLis.some((item) => item.id == this.patientForm.controls.checkedType.value && item.associationType.value == "inspect");
|
3071
|
3073
|
let postData = {
|
3072
|
3074
|
taskTypeId: that.patientForm.controls.checkedType.value,
|
3073
|
3075
|
patientCode: that.patientMsg.patientCode,
|
|
3076
|
+ startTime: isInpect ? format(startOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined,
|
|
3077
|
+ endTime: isInpect ? format(endOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined,
|
3074
|
3078
|
};
|
3075
|
3079
|
this.cLoading = true;
|
3076
|
3080
|
that.mainService
|
|
@@ -4002,7 +4006,7 @@ export class HushijiandanComponent implements OnInit {
|
4002
|
4006
|
that.adviceListLength = data.totalNum || 0;
|
4003
|
4007
|
});
|
4004
|
4008
|
}
|
4005
|
|
-
|
|
4009
|
+
|
4006
|
4010
|
startDate:any = format(startOfDay(new Date()), "yyyy-MM-dd HH:mm:ss");
|
4007
|
4011
|
endDate:any = format(endOfDay(new Date()), "yyyy-MM-dd HH:mm:ss");
|
4008
|
4012
|
scheduleTime: any = format(startOfDay(new Date()), "yyyy-MM-dd HH:mm:ss");
|
|
@@ -4015,7 +4019,7 @@ export class HushijiandanComponent implements OnInit {
|
4015
|
4019
|
this.endDate = null
|
4016
|
4020
|
}
|
4017
|
4021
|
}
|
4018
|
|
-
|
|
4022
|
+
|
4019
|
4023
|
// 手术排程信息表格数据
|
4020
|
4024
|
surgeryList: any = [];
|
4021
|
4025
|
surgeryPageIndex: number = 1; //表格当前页码
|
|
@@ -4382,6 +4386,31 @@ export class HushijiandanComponent implements OnInit {
|
4382
|
4386
|
hideDelAdviceModal() {
|
4383
|
4387
|
this.delAdviceModal = false;
|
4384
|
4388
|
}
|
|
4389
|
+ // 报修撤销模态框
|
|
4390
|
+ delBxModal: boolean = false;
|
|
4391
|
+ delBxData: any; //删除的data
|
|
4392
|
+ delBx(data) {
|
|
4393
|
+ this.delBxData = data;
|
|
4394
|
+ this.delBxModal = true;
|
|
4395
|
+ }
|
|
4396
|
+ confirmDelBx() {
|
|
4397
|
+ this.btnLoading = true;
|
|
4398
|
+ this.mainService
|
|
4399
|
+ .flowPost("incident/task/cancel", { incident: this.delBxData })
|
|
4400
|
+ .subscribe((result) => {
|
|
4401
|
+ if(result.state == 200){
|
|
4402
|
+ this.delBxModal = false;
|
|
4403
|
+ this.showPromptModal("撤销", true, "");
|
|
4404
|
+ this.getBxlb(true);
|
|
4405
|
+ }else{
|
|
4406
|
+ this.delBxModal = false;
|
|
4407
|
+ this.showPromptModal("撤销", false, result.msg);
|
|
4408
|
+ }
|
|
4409
|
+ });
|
|
4410
|
+ }
|
|
4411
|
+ hideDelBxModal() {
|
|
4412
|
+ this.delBxModal = false;
|
|
4413
|
+ }
|
4385
|
4414
|
// 报修提示框
|
4386
|
4415
|
reqModal: boolean = false;
|
4387
|
4416
|
extraData:any = {};
|
|
@@ -5146,4 +5175,60 @@ export class HushijiandanComponent implements OnInit {
|
5146
|
5175
|
this.noteList = result || [];
|
5147
|
5176
|
});
|
5148
|
5177
|
}
|
|
5178
|
+
|
|
5179
|
+ // 关联的检查-上一日,下一日,今天
|
|
5180
|
+ inspectToday:Date = new Date();
|
|
5181
|
+ // 上一日
|
|
5182
|
+ previousDayNew(){
|
|
5183
|
+ this.inspectToday = addDays(this.inspectToday, -1);
|
|
5184
|
+ this.inspectSubject.next();
|
|
5185
|
+ }
|
|
5186
|
+
|
|
5187
|
+ // 今天
|
|
5188
|
+ todayNew(){
|
|
5189
|
+ this.inspectToday = new Date();
|
|
5190
|
+ this.inspectSubject.next();
|
|
5191
|
+ }
|
|
5192
|
+
|
|
5193
|
+ // 下一日
|
|
5194
|
+ nextDayNew(){
|
|
5195
|
+ this.inspectToday = addDays(this.inspectToday, 1);
|
|
5196
|
+ this.inspectSubject.next();
|
|
5197
|
+ }
|
|
5198
|
+
|
|
5199
|
+ refreshInspectList(){
|
|
5200
|
+ let postData = {
|
|
5201
|
+ taskTypeId: this.patientForm.controls.checkedType.value,
|
|
5202
|
+ patientCode: this.patientMsg.patientCode,
|
|
5203
|
+ startTime: format(startOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss'),
|
|
5204
|
+ endTime: format(endOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss'),
|
|
5205
|
+ };
|
|
5206
|
+ this.linkCheckLis = [];
|
|
5207
|
+ this.mainService
|
|
5208
|
+ .postCustom("nurse", "workOrder/buildTrip", postData)
|
|
5209
|
+ .subscribe((data) => {
|
|
5210
|
+ // 工单备注配置 end
|
|
5211
|
+ if (data.status == 200 && data.data && data.data.length) {
|
|
5212
|
+ let arr = [];
|
|
5213
|
+ data.data.forEach((e) => {
|
|
5214
|
+ arr.push({
|
|
5215
|
+ execDeptId: e.execDept.id,
|
|
5216
|
+ yyTime: e.yyTime,
|
|
5217
|
+ priority: e.priority,
|
|
5218
|
+ label:
|
|
5219
|
+ (e.yyTime || "") +
|
|
5220
|
+ " " +
|
|
5221
|
+ (this.deptDisplay == 2
|
|
5222
|
+ ? e.execDept.deptalias
|
|
5223
|
+ : e.execDept.dept) +
|
|
5224
|
+ " 进行 " +
|
|
5225
|
+ (e.inspectName || "检查"),
|
|
5226
|
+ value: e["id"],
|
|
5227
|
+ checked: false,
|
|
5228
|
+ });
|
|
5229
|
+ });
|
|
5230
|
+ this.linkCheckLis = arr;
|
|
5231
|
+ }
|
|
5232
|
+ });
|
|
5233
|
+ }
|
5149
|
5234
|
}
|