seimin 2 weeks ago
parent
commit
0adda59b9b

+ 13 - 13
src/app/components/configurationCenter/configuration-drug/configuration-drug.component.html

@@ -137,25 +137,13 @@
137
 									  <nz-form-label class="label">是否开启紧急配送建单</nz-form-label>
137
 									  <nz-form-label class="label">是否开启紧急配送建单</nz-form-label>
138
 									  <nz-checkbox-group [(ngModel)]="item.postData.urgentCreateOrder"></nz-checkbox-group>
138
 									  <nz-checkbox-group [(ngModel)]="item.postData.urgentCreateOrder"></nz-checkbox-group>
139
 									</div>
139
 									</div>
140
-                  <!-- 限制药单类型建单 -->
141
-                  <div class="display_flex align-items_center mb8">
142
-                    <nz-form-label class="label">限制药单类型建单</nz-form-label>
143
-                    <nz-select nzMode="multiple" class="w320px" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择限制药单类型建单" [(ngModel)]="drugsCreateLimitMarkType">
144
-                      <ng-container *ngFor="let option of markTypeList">
145
-                        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
146
-                      </ng-container>
147
-                      <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
148
-                        <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
149
-                      </nz-option>
150
-                    </nz-select>
151
-                  </div>
152
                 </div>
140
                 </div>
153
                 <!-- 自动建单配置 -->
141
                 <!-- 自动建单配置 -->
154
                 <div *ngIf="tabModalName=='automaticOrderCreation'">
142
                 <div *ngIf="tabModalName=='automaticOrderCreation'">
155
                   <!-- 自动建单 -->
143
                   <!-- 自动建单 -->
156
 									<div class="display_flex align-items_center mb8">
144
 									<div class="display_flex align-items_center mb8">
157
 									  <nz-form-label class="label">是否自动建单</nz-form-label>
145
 									  <nz-form-label class="label">是否自动建单</nz-form-label>
158
-									  <nz-checkbox-group [(ngModel)]="item.postData.autoCreate"></nz-checkbox-group>
146
+									  <nz-checkbox-group [(ngModel)]="item.postData.autoCreate" (ngModelChange)="changeAutoCreate($event, item)"></nz-checkbox-group>
159
 									</div>
147
 									</div>
160
 									<!-- 药品自动建单状态 -->
148
 									<!-- 药品自动建单状态 -->
161
 									<div class="display_flex align-items_center mb8" *ngIf="item.postData.autoCreate[0].checked">
149
 									<div class="display_flex align-items_center mb8" *ngIf="item.postData.autoCreate[0].checked">
@@ -164,6 +152,18 @@
164
 										  <nz-option *ngFor="let item of drugStateData" [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
152
 										  <nz-option *ngFor="let item of drugStateData" [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
165
 										</nz-select>
153
 										</nz-select>
166
 									</div>
154
 									</div>
155
+                  <!-- 限制药单类型建单 -->
156
+                  <div class="display_flex align-items_center mb8" *ngIf="item.postData.autoCreate[0].checked">
157
+                    <nz-form-label class="label">限制药单类型建单</nz-form-label>
158
+                    <nz-select nzMode="multiple" class="w320px" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择限制药单类型建单" [(ngModel)]="item.postData.drugsCreateLimitMarkType">
159
+                      <ng-container *ngFor="let option of markTypeList">
160
+                        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
161
+                      </ng-container>
162
+                      <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
163
+                        <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
164
+                      </nz-option>
165
+                    </nz-select>
166
+                  </div>
167
                 </div>
167
                 </div>
168
                 <div class="bottom">
168
                 <div class="bottom">
169
                   <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>
169
                   <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>

+ 18 - 8
src/app/components/configurationCenter/configuration-drug/configuration-drug.component.ts

@@ -78,7 +78,8 @@ export class ConfigurationDrugComponent implements OnInit {
78
 				drugsResidueCreateOrder: [{ label:'是否开启', value: 0 }],//交接后,剩余药包是否建单
78
 				drugsResidueCreateOrder: [{ label:'是否开启', value: 0 }],//交接后,剩余药包是否建单
79
 				urgentCreateOrder: [{ label:'是否开启', value: 0 }],//是否开启紧急配送建单
79
 				urgentCreateOrder: [{ label:'是否开启', value: 0 }],//是否开启紧急配送建单
80
 				autoCreate: [{ label:'是否开启', value: 0 }], // 是否自动建单
80
 				autoCreate: [{ label:'是否开启', value: 0 }], // 是否自动建单
81
-				autoCreateState: undefined // 药品自动建单状态
81
+				autoCreateState: undefined, // 药品自动建单状态
82
+				drugsCreateLimitMarkType: [], // 限制药单类型建单
82
 			}
83
 			}
83
     },
84
     },
84
     {
85
     {
@@ -106,7 +107,8 @@ export class ConfigurationDrugComponent implements OnInit {
106
         drugsResidueCreateOrder: [{ label:'是否开启', value: 0 }],//交接后,剩余药包是否建单
107
         drugsResidueCreateOrder: [{ label:'是否开启', value: 0 }],//交接后,剩余药包是否建单
107
         urgentCreateOrder: [{ label:'是否开启', value: 0 }],//是否开启紧急配送建单
108
         urgentCreateOrder: [{ label:'是否开启', value: 0 }],//是否开启紧急配送建单
108
 				autoCreate: [{ label:'是否开启', value: 0 }], // 是否自动建单
109
 				autoCreate: [{ label:'是否开启', value: 0 }], // 是否自动建单
109
-				autoCreateState: undefined // 药品自动建单状态
110
+				autoCreateState: undefined, // 药品自动建单状态
111
+        drugsCreateLimitMarkType: [], // 限制药单类型建单
110
 			}
112
 			}
111
     },
113
     },
112
     {
114
     {
@@ -134,7 +136,8 @@ export class ConfigurationDrugComponent implements OnInit {
134
         drugsResidueCreateOrder: [{ label:'是否开启', value: 0 }],//交接后,剩余药包是否建单
136
         drugsResidueCreateOrder: [{ label:'是否开启', value: 0 }],//交接后,剩余药包是否建单
135
         urgentCreateOrder: [{ label:'是否开启', value: 0 }],//是否开启紧急配送建单
137
         urgentCreateOrder: [{ label:'是否开启', value: 0 }],//是否开启紧急配送建单
136
 				autoCreate: [{ label:'是否开启', value: 0 }], // 是否自动建单
138
 				autoCreate: [{ label:'是否开启', value: 0 }], // 是否自动建单
137
-				autoCreateState: undefined // 药品自动建单状态
139
+				autoCreateState: undefined, // 药品自动建单状态
140
+        drugsCreateLimitMarkType: [], // 限制药单类型建单
138
 			}
141
 			}
139
     },
142
     },
140
     {
143
     {
@@ -162,7 +165,8 @@ export class ConfigurationDrugComponent implements OnInit {
162
         drugsResidueCreateOrder: [{ label:'是否开启', value: 0 }],//交接后,剩余药包是否建单
165
         drugsResidueCreateOrder: [{ label:'是否开启', value: 0 }],//交接后,剩余药包是否建单
163
         urgentCreateOrder: [{ label:'是否开启', value: 0 }],//是否开启紧急配送建单
166
         urgentCreateOrder: [{ label:'是否开启', value: 0 }],//是否开启紧急配送建单
164
 				autoCreate: [{ label:'是否开启', value: 0 }], // 是否自动建单
167
 				autoCreate: [{ label:'是否开启', value: 0 }], // 是否自动建单
165
-				autoCreateState: undefined // 药品自动建单状态
168
+				autoCreateState: undefined, // 药品自动建单状态
169
+        drugsCreateLimitMarkType: [], // 限制药单类型建单
166
 			}
170
 			}
167
     },
171
     },
168
     {
172
     {
@@ -190,7 +194,8 @@ export class ConfigurationDrugComponent implements OnInit {
190
         drugsResidueCreateOrder: [{ label:'是否开启', value: 0 }],//交接后,剩余药包是否建单
194
         drugsResidueCreateOrder: [{ label:'是否开启', value: 0 }],//交接后,剩余药包是否建单
191
         urgentCreateOrder: [{ label:'是否开启', value: 0 }],//是否开启紧急配送建单
195
         urgentCreateOrder: [{ label:'是否开启', value: 0 }],//是否开启紧急配送建单
192
 				autoCreate: [{ label:'是否开启', value: 0 }], // 是否自动建单
196
 				autoCreate: [{ label:'是否开启', value: 0 }], // 是否自动建单
193
-				autoCreateState: undefined // 药品自动建单状态
197
+				autoCreateState: undefined, // 药品自动建单状态
198
+        drugsCreateLimitMarkType: [], // 限制药单类型建单
194
 			}
199
 			}
195
     },
200
     },
196
   ];
201
   ];
@@ -205,7 +210,6 @@ export class ConfigurationDrugComponent implements OnInit {
205
 	}
210
 	}
206
 
211
 
207
   // 获取药单类型
212
   // 获取药单类型
208
-  drugsCreateLimitMarkType:any[] = [];
209
 	markTypeList:any = []
213
 	markTypeList:any = []
210
 	getMarkTypeList(){
214
 	getMarkTypeList(){
211
 		this.mainService.getDictionary("list", "drugsbag_mark_type").subscribe((data) => {
215
 		this.mainService.getDictionary("list", "drugsbag_mark_type").subscribe((data) => {
@@ -305,7 +309,7 @@ export class ConfigurationDrugComponent implements OnInit {
305
 			autoCreateState:{
309
 			autoCreateState:{
306
 				id:this.activeDictionary.postData.autoCreateState || undefined
310
 				id:this.activeDictionary.postData.autoCreateState || undefined
307
 			},
311
 			},
308
-      drugsCreateLimitMarkType: this.drugsCreateLimitMarkType.length ? this.drugsCreateLimitMarkType.toString() : undefined,
312
+      drugsCreateLimitMarkType: this.activeDictionary.postData.drugsCreateLimitMarkType.length ? this.activeDictionary.postData.drugsCreateLimitMarkType.toString() : undefined,
309
 		};
313
 		};
310
     this.btnLoading = true;
314
     this.btnLoading = true;
311
     this.mainService
315
     this.mainService
@@ -410,8 +414,14 @@ export class ConfigurationDrugComponent implements OnInit {
410
 					this.activeDictionary.postData.urgentCreateOrder[0].checked = this.configs.urgentCreateOrder == 1;
414
 					this.activeDictionary.postData.urgentCreateOrder[0].checked = this.configs.urgentCreateOrder == 1;
411
 					this.activeDictionary.postData.autoCreate[0].checked = this.configs.autoCreate == 1;
415
 					this.activeDictionary.postData.autoCreate[0].checked = this.configs.autoCreate == 1;
412
 					this.activeDictionary.postData.autoCreateState = this.configs.autoCreateState && this.configs.autoCreateState.id || undefined;
416
 					this.activeDictionary.postData.autoCreateState = this.configs.autoCreateState && this.configs.autoCreateState.id || undefined;
413
-          this.drugsCreateLimitMarkType = this.configs.drugsCreateLimitMarkType ? this.configs.drugsCreateLimitMarkType.split(',').map(v => +v) : [];
417
+          this.activeDictionary.postData.drugsCreateLimitMarkType = this.configs.drugsCreateLimitMarkType ? this.configs.drugsCreateLimitMarkType.split(',').map(v => +v) : [];
414
 				}
418
 				}
415
       });
419
       });
416
   }
420
   }
421
+
422
+  // 是否自动建单
423
+  changeAutoCreate(e, item){
424
+    item.postData.autoCreateState = null;
425
+    item.postData.drugsCreateLimitMarkType = [];
426
+  }
417
 }
427
 }

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

@@ -509,9 +509,9 @@ export class PatientSearchComponent implements OnInit {
509
 
509
 
510
   // 查看日志弹窗
510
   // 查看日志弹窗
511
   logPromptModalShow = false; //弹窗开关
511
   logPromptModalShow = false; //弹窗开关
512
-  paientId = ""; //查看记录携带id
512
+  patientId = ""; //查看记录携带id
513
   showLogs(data) {
513
   showLogs(data) {
514
-    this.paientId = data.id;
514
+    this.patientId = data.id;
515
     this.logPromptModalShow = true;
515
     this.logPromptModalShow = true;
516
   }
516
   }
517
   // 关闭日志弹窗
517
   // 关闭日志弹窗