|
@@ -26,6 +26,18 @@ export class BloodProductsConfigComponent implements OnInit {
|
26
|
26
|
autoCreateOrders:any[] = [
|
27
|
27
|
{label:'是否开启',value: 0}
|
28
|
28
|
];
|
|
29
|
+ // 是否支持领取证
|
|
30
|
+ certificates:any[] = [
|
|
31
|
+ {label:'是否开启',value: 0}
|
|
32
|
+ ];
|
|
33
|
+ // 是否支持取消发血
|
|
34
|
+ cancelBloods:any[] = [
|
|
35
|
+ {label:'是否开启',value: 0}
|
|
36
|
+ ];
|
|
37
|
+ // 是否必填交接人
|
|
38
|
+ cancelBloodHandovers:any[] = [
|
|
39
|
+ {label:'是否必填交接人',value: 0}
|
|
40
|
+ ];
|
29
|
41
|
// 是否指定人派单
|
30
|
42
|
autoSendUsers:any[] = [
|
31
|
43
|
{label:'是否指定人派单',value: 0}
|
|
@@ -52,6 +64,7 @@ export class BloodProductsConfigComponent implements OnInit {
|
52
|
64
|
|
53
|
65
|
ngOnInit():void {
|
54
|
66
|
// todo
|
|
67
|
+ this.getCertificate();
|
55
|
68
|
this.getHandoverModes();
|
56
|
69
|
this.getCheckModes();
|
57
|
70
|
this.getCheckInModes();
|
|
@@ -106,6 +119,20 @@ export class BloodProductsConfigComponent implements OnInit {
|
106
|
119
|
this.limitDeptIds = [];
|
107
|
120
|
}
|
108
|
121
|
}
|
|
122
|
+ // 修改是否支持领取证
|
|
123
|
+ changeCertificates(e){
|
|
124
|
+ console.log(e);
|
|
125
|
+ if(!e[0].checked){
|
|
126
|
+ this.certificate = null;
|
|
127
|
+ }
|
|
128
|
+ }
|
|
129
|
+ // 修改是否支持取消发血
|
|
130
|
+ changeCancelBloods(e){
|
|
131
|
+ console.log(e);
|
|
132
|
+ if(!e[0].checked){
|
|
133
|
+ this.cancelBloodHandovers[0].checked = false;
|
|
134
|
+ }
|
|
135
|
+ }
|
109
|
136
|
// 修改changeAutoDeptLimits
|
110
|
137
|
changeAutoDeptLimits(e){
|
111
|
138
|
console.log(e);
|
|
@@ -132,6 +159,10 @@ export class BloodProductsConfigComponent implements OnInit {
|
132
|
159
|
this.msg.create("warning", "请选择起点科室!");
|
133
|
160
|
return;
|
134
|
161
|
}
|
|
162
|
+ if(this.certificates[0].checked && !this.certificate){
|
|
163
|
+ this.msg.create("warning", "请选择领取证号类型!");
|
|
164
|
+ return;
|
|
165
|
+ }
|
135
|
166
|
let signTypeIds = this.checkInModes.filter(v => v.checked).map(v => v.value).toString();
|
136
|
167
|
let closeTypeIds = this.automaticCustomsOrders.filter(v => v.checked).map(v => v.value).toString();
|
137
|
168
|
let postData:any = {
|
|
@@ -148,6 +179,10 @@ export class BloodProductsConfigComponent implements OnInit {
|
148
|
179
|
checkType: {id: this.radioCheckModesValue},
|
149
|
180
|
signTypeIds: signTypeIds || undefined,
|
150
|
181
|
closeTypeIds: closeTypeIds || undefined,
|
|
182
|
+ useTakeCode: this.certificates[0].checked ? 1 : 0,
|
|
183
|
+ takeCodeType: {id: this.certificate},
|
|
184
|
+ cancelBlood: this.cancelBloods[0].checked ? 1 : 0,
|
|
185
|
+ cancelBloodHandover: this.cancelBloodHandovers[0].checked ? 1 : 0,
|
151
|
186
|
};
|
152
|
187
|
console.log(postData);
|
153
|
188
|
this.btnLoading = true;
|
|
@@ -161,6 +196,15 @@ export class BloodProductsConfigComponent implements OnInit {
|
161
|
196
|
});
|
162
|
197
|
}
|
163
|
198
|
|
|
199
|
+ //获取是否支持领取证-数据字典
|
|
200
|
+ certificateList:any[] = [];
|
|
201
|
+ certificate:any = null;
|
|
202
|
+ getCertificate() {
|
|
203
|
+ this.mainService.getDictionary("list", "blood_config_take_code_type").subscribe((data) => {
|
|
204
|
+ this.certificateList = data || [];
|
|
205
|
+ });
|
|
206
|
+ }
|
|
207
|
+
|
164
|
208
|
//获取交接方式
|
165
|
209
|
getHandoverModes() {
|
166
|
210
|
this.mainService.getDictionary("list", "ttconfig_handover_type").subscribe((data) => {
|
|
@@ -246,6 +290,12 @@ export class BloodProductsConfigComponent implements OnInit {
|
246
|
290
|
this.autoSendUsers[0].checked = this.configs.autoSendUser == 1;
|
247
|
291
|
this.autoDepts[0].checked = this.configs.autoDept == 1;
|
248
|
292
|
this.autoDeptLimits[0].checked = this.configs.autoDeptLimit == 1;
|
|
293
|
+
|
|
294
|
+ this.certificates[0].checked = this.configs.useTakeCode == 1;
|
|
295
|
+ this.certificate = this.configs.takeCodeType?this.configs.takeCodeType.id:undefined;
|
|
296
|
+ this.cancelBloods[0].checked = this.configs.cancelBlood == 1;
|
|
297
|
+ this.cancelBloodHandovers[0].checked = this.configs.cancelBloodHandover == 1;
|
|
298
|
+
|
249
|
299
|
this.getDeptList(true, '', true);
|
250
|
300
|
|
251
|
301
|
if(this.configs.signTypeIds){
|