|
@@ -16,8 +16,18 @@ export class ConfigurationSpecimenComponent implements OnInit {
|
16
|
16
|
tabModalName:string = 'characteristics'; //当前选中的tab
|
17
|
17
|
hosId = this.tool.getCurrentHospital().id; //当前院区
|
18
|
18
|
|
19
|
|
- // 是否允许追加服务
|
20
|
|
- addService:any[] = [
|
|
19
|
+ // 扫描时指定科室不提醒勾选项
|
|
20
|
+ deptNotAlert:any[] = [
|
|
21
|
+ {label:'是否开启',value: 0}
|
|
22
|
+ ];
|
|
23
|
+
|
|
24
|
+ // 收取时需扫描二维码
|
|
25
|
+ arriveScanCode:any[] = [
|
|
26
|
+ {label:'是否开启',value: 0}
|
|
27
|
+ ];
|
|
28
|
+
|
|
29
|
+ // 必须扫描动态二维码
|
|
30
|
+ arriveScanDynamicCode:any[] = [
|
21
|
31
|
{label:'是否开启',value: 0}
|
22
|
32
|
];
|
23
|
33
|
|
|
@@ -34,52 +44,58 @@ export class ConfigurationSpecimenComponent implements OnInit {
|
34
|
44
|
let fun = v[0];
|
35
|
45
|
fun.call(this, v[1]);
|
36
|
46
|
});
|
37
|
|
- this.getTaskTypes();
|
|
47
|
+ this.getDeptList();
|
38
|
48
|
this.getTaskType();
|
39
|
49
|
}
|
40
|
50
|
|
41
|
|
- // 修改是否允许追加服务
|
42
|
|
- changeAddService(e){
|
|
51
|
+ // 扫描时指定科室不提醒勾选项
|
|
52
|
+ changeDeptNotAlert(e){
|
|
53
|
+ console.log(e);
|
|
54
|
+ if(!e[0].checked){
|
|
55
|
+ this.deptNotAlertIds = [];
|
|
56
|
+ }
|
|
57
|
+ }
|
|
58
|
+ // 收取时需扫描二维码
|
|
59
|
+ changeArriveScanCode(e){
|
43
|
60
|
console.log(e);
|
44
|
61
|
if(!e[0].checked){
|
45
|
|
- this.addServiceTaskIds = [];
|
|
62
|
+ this.arriveScanDynamicCode[0].checked = false;
|
46
|
63
|
}
|
47
|
64
|
}
|
48
|
65
|
// 用户输入搜索
|
49
|
66
|
isLoading: boolean = false;
|
50
|
|
- addServiceTaskIds:any[] = [];
|
51
|
|
- taskTypes:any[] = [];
|
52
|
|
- changeTasktype(e) {
|
53
|
|
- this.searchTimer(this.getTaskTypes, e);
|
|
67
|
+ deptNotAlertIds:any[] = [];
|
|
68
|
+ deptList:any[] = [];
|
|
69
|
+ changeDept(e) {
|
|
70
|
+ this.searchTimer(this.getDeptList, e);
|
54
|
71
|
}
|
55
|
72
|
// 边输入边搜索节流阀
|
56
|
73
|
searchTimer(fun, e) {
|
57
|
74
|
this.isLoading = true;
|
58
|
75
|
this.searchTimerSubject.next([fun, e]);
|
59
|
76
|
}
|
60
|
|
- //获取患者其他服务任务类型
|
61
|
|
- getTaskTypes(e:string = '') {
|
|
77
|
+ openDeptList(flag){
|
|
78
|
+ if(flag){
|
|
79
|
+ this.getDeptList();
|
|
80
|
+ }
|
|
81
|
+ }
|
|
82
|
+ //获取科室列表
|
|
83
|
+ getDeptList(e:string = '') {
|
62
|
84
|
let postData:any = {
|
63
|
85
|
idx: 0,
|
64
|
|
- sum: 9999,
|
65
|
|
- taskType: {
|
66
|
|
- taskName: e,
|
67
|
|
- simpleQuery: true,
|
68
|
|
- hosId: {
|
69
|
|
- id: this.hosId
|
70
|
|
- },
|
71
|
|
- associationType: {
|
72
|
|
- key: 'association_types',
|
73
|
|
- value: 'patientTransport'
|
74
|
|
- }
|
|
86
|
+ sum: 20,
|
|
87
|
+ department: {
|
|
88
|
+ searchType: 1,// 简单查询
|
|
89
|
+ hospital: { id: this.hosId },
|
|
90
|
+ dept: e,
|
75
|
91
|
}
|
76
|
92
|
};
|
77
|
93
|
this.isLoading = true;
|
78
|
|
- this.mainService.getFetchDataList("simple/data", "taskType", postData)
|
|
94
|
+ this.mainService.getFetchDataList("simple/data", "department", postData)
|
79
|
95
|
.subscribe((result) => {
|
80
|
96
|
this.isLoading = false;
|
81
|
97
|
if (result.status == 200) {
|
82
|
|
- this.taskTypes = result.list || [];
|
|
98
|
+ this.deptList = result.list || [];
|
83
|
99
|
}
|
84
|
100
|
});
|
85
|
101
|
}
|
|
@@ -94,16 +110,18 @@ export class ConfigurationSpecimenComponent implements OnInit {
|
94
|
110
|
this.msg.create("warning", "请先配置患者陪检任务类型!");
|
95
|
111
|
return;
|
96
|
112
|
}
|
97
|
|
- if(this.addService[0].checked && !this.addServiceTaskIds.length){
|
98
|
|
- this.msg.create("warning", "请选择追加服务任务类型!");
|
|
113
|
+ if(this.deptNotAlert[0].checked && !this.deptNotAlertIds.length){
|
|
114
|
+ this.msg.create("warning", "请选择科室!");
|
99
|
115
|
return;
|
100
|
116
|
}
|
101
|
117
|
let postData:any = {
|
102
|
118
|
id: this.configs.id,
|
103
|
119
|
taskType: this.tasktype.id,
|
104
|
120
|
hosId: this.hosId,
|
105
|
|
- addService: this.addService[0].checked ? 1 : 0,
|
106
|
|
- addServiceTaskIds: this.addServiceTaskIds.length ? this.addServiceTaskIds.toString() : undefined,
|
|
121
|
+ deptNotAlert: this.deptNotAlert[0].checked ? 1 : 0,
|
|
122
|
+ arriveScanCode: this.arriveScanCode[0].checked ? 1 : 0,
|
|
123
|
+ arriveScanDynamicCode: this.arriveScanDynamicCode[0].checked ? 1 : 0,
|
|
124
|
+ deptNotAlertIds: this.deptNotAlertIds.length ? this.deptNotAlertIds.toString() : undefined,
|
107
|
125
|
};
|
108
|
126
|
this.btnLoading = true;
|
109
|
127
|
this.mainService
|
|
@@ -128,7 +146,7 @@ export class ConfigurationSpecimenComponent implements OnInit {
|
128
|
146
|
},
|
129
|
147
|
associationType: {
|
130
|
148
|
key:"association_types",
|
131
|
|
- value: 'inspect'
|
|
149
|
+ value: 'specimen'
|
132
|
150
|
}
|
133
|
151
|
}
|
134
|
152
|
};
|
|
@@ -163,8 +181,11 @@ export class ConfigurationSpecimenComponent implements OnInit {
|
163
|
181
|
this.loading = false;
|
164
|
182
|
if (result.status == 200) {
|
165
|
183
|
this.configs = result.list[0] || {};
|
166
|
|
- this.addService[0].checked = this.configs.addService == 1;
|
167
|
|
- this.addServiceTaskIds = this.configs.addServiceTaskIds ? this.configs.addServiceTaskIds.split(',').map(v => +v) : [];
|
|
184
|
+ this.deptNotAlert[0].checked = this.configs.deptNotAlert == 1;
|
|
185
|
+ this.arriveScanCode[0].checked = this.configs.arriveScanCode == 1;
|
|
186
|
+ this.arriveScanDynamicCode[0].checked = this.configs.arriveScanDynamicCode == 1;
|
|
187
|
+ this.deptNotAlertIds = this.configs.deptNotAlertIds ? this.configs.deptNotAlertIds.split(',').map(v => +v) : [];
|
|
188
|
+ this.deptList = this.configs.deptNotAlertList || [];
|
168
|
189
|
}
|
169
|
190
|
});
|
170
|
191
|
}
|