seimin 2 weeks ago
parent
commit
0adda59b9b

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

@@ -137,25 +137,13 @@
137 137
 									  <nz-form-label class="label">是否开启紧急配送建单</nz-form-label>
138 138
 									  <nz-checkbox-group [(ngModel)]="item.postData.urgentCreateOrder"></nz-checkbox-group>
139 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 140
                 </div>
153 141
                 <!-- 自动建单配置 -->
154 142
                 <div *ngIf="tabModalName=='automaticOrderCreation'">
155 143
                   <!-- 自动建单 -->
156 144
 									<div class="display_flex align-items_center mb8">
157 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 147
 									</div>
160 148
 									<!-- 药品自动建单状态 -->
161 149
 									<div class="display_flex align-items_center mb8" *ngIf="item.postData.autoCreate[0].checked">
@@ -164,6 +152,18 @@
164 152
 										  <nz-option *ngFor="let item of drugStateData" [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
165 153
 										</nz-select>
166 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 167
                 </div>
168 168
                 <div class="bottom">
169 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 78
 				drugsResidueCreateOrder: [{ label:'是否开启', value: 0 }],//交接后,剩余药包是否建单
79 79
 				urgentCreateOrder: [{ label:'是否开启', value: 0 }],//是否开启紧急配送建单
80 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 107
         drugsResidueCreateOrder: [{ label:'是否开启', value: 0 }],//交接后,剩余药包是否建单
107 108
         urgentCreateOrder: [{ label:'是否开启', value: 0 }],//是否开启紧急配送建单
108 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 136
         drugsResidueCreateOrder: [{ label:'是否开启', value: 0 }],//交接后,剩余药包是否建单
135 137
         urgentCreateOrder: [{ label:'是否开启', value: 0 }],//是否开启紧急配送建单
136 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 165
         drugsResidueCreateOrder: [{ label:'是否开启', value: 0 }],//交接后,剩余药包是否建单
163 166
         urgentCreateOrder: [{ label:'是否开启', value: 0 }],//是否开启紧急配送建单
164 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 194
         drugsResidueCreateOrder: [{ label:'是否开启', value: 0 }],//交接后,剩余药包是否建单
191 195
         urgentCreateOrder: [{ label:'是否开启', value: 0 }],//是否开启紧急配送建单
192 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 213
 	markTypeList:any = []
210 214
 	getMarkTypeList(){
211 215
 		this.mainService.getDictionary("list", "drugsbag_mark_type").subscribe((data) => {
@@ -305,7 +309,7 @@ export class ConfigurationDrugComponent implements OnInit {
305 309
 			autoCreateState:{
306 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 314
     this.btnLoading = true;
311 315
     this.mainService
@@ -410,8 +414,14 @@ export class ConfigurationDrugComponent implements OnInit {
410 414
 					this.activeDictionary.postData.urgentCreateOrder[0].checked = this.configs.urgentCreateOrder == 1;
411 415
 					this.activeDictionary.postData.autoCreate[0].checked = this.configs.autoCreate == 1;
412 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 511
   logPromptModalShow = false; //弹窗开关
512
-  paientId = ""; //查看记录携带id
512
+  patientId = ""; //查看记录携带id
513 513
   showLogs(data) {
514
-    this.paientId = data.id;
514
+    this.patientId = data.id;
515 515
     this.logPromptModalShow = true;
516 516
   }
517 517
   // 关闭日志弹窗