seimin 3 ay önce
ebeveyn
işleme
6aa6f88d34

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "/service": {
3
-		"target": "http://192.168.3.108",
3
+		"target": "http://192.168.4.175",
4 4
     "logLevel": "debug",
5 5
     "changeOrigin": true,
6 6
     "pathRewrite": {

Dosya farkı çok büyük olduğundan ihmal edildi
+ 4 - 4
src/app/components/configurationCenter/configuration-category/configuration-category.component.html


+ 22 - 0
src/app/components/configurationCenter/configuration-category/configuration-category.component.ts

@@ -462,6 +462,13 @@ export class ConfigurationCategoryComponent implements OnInit {
462 462
     }
463 463
   }
464 464
 
465
+  // 删除
466
+  deleteType; //删除类型
467
+  removeCategory(type, data) {
468
+    this.deleteType = type;
469
+    this.showDelModal(data,'您确认要删除吗?','删除','delCategory');
470
+  }
471
+
465 472
   // 新增/编辑表单提交
466 473
   btnLoading: boolean = false; //提交按钮loading状态
467 474
   submitCategoryForm(): void {
@@ -567,6 +574,21 @@ export class ConfigurationCategoryComponent implements OnInit {
567 574
             this.showPromptModal(this.tipsMsg2, false, data.msg);
568 575
           }
569 576
         });
577
+    } else if (this.confirmDelType === "delCategory") {
578
+      //删除-故障现象
579
+      this.mainService
580
+        .deleteIncidentCategory({categoryId: this.coopData.id})
581
+        .subscribe((data:any) => {
582
+          this.btnLoading = false;
583
+          this.delModal = false;
584
+          if (data.status == 200) {
585
+            this['activeCategory' + this.deleteType] = {};
586
+            this.categoryConfigList = [];
587
+            this.showPromptModal(this.tipsMsg2, true, "");
588
+          } else {
589
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
590
+          }
591
+        });
570 592
     } else if (this.confirmDelType === "copy") {
571 593
       //向下复制-关联
572 594
       let postData:any = {

+ 17 - 2
src/app/components/configurationCenter/configuration-manHour/configuration-manHour.component.html

@@ -5,6 +5,7 @@
5 5
       <div class="contentHead">工时大类
6 6
 				<div>
7 7
 					<button nz-button class="mar-rig-10 btn cancel" nzType="default" nzSize="small" *ngIf="activeCategory1.id && categoryList1.length" (click)="delCategoryModal(1)">删除</button>
8
+          <button nz-button class="mar-rig-10 btn" nzType="primary" nzSize="small" *ngIf="activeCategory1.id && categoryList1.length" (click)="editCategoryModal(1)">修改</button>
8 9
 					<button nz-button nzType="primary" nzSize="small" (click)="addCategoryModal(1)">新增</button>
9 10
 				</div>
10 11
 			</div>
@@ -17,6 +18,7 @@
17 18
       <div class="contentHead">工时小类
18 19
 				<div>
19 20
 					<button nz-button class="mar-rig-10 btn cancel" *ngIf="activeCategory2.id && activeCategory1.id" nzType="default" nzSize="small" (click)="delCategoryModal(2)">删除</button>
21
+          <button nz-button class="mar-rig-10 btn" *ngIf="activeCategory2.id && activeCategory1.id" nzType="primary" nzSize="small" (click)="editCategoryModal(2)">修改</button>
20 22
 					<button nz-button nzType="primary" nzSize="small" *ngIf="activeCategory1.id" (click)="addCategoryModal(2)">新增</button>
21 23
 				</div>
22 24
 			</div>
@@ -35,8 +37,8 @@
35 37
     <div class="title">新增<i class="icon_transport transport-guanbi" (click)="hideCategoryModal()"></i></div>
36 38
     <div class="content">
37 39
       <form nz-form [formGroup]="validateCategoryForm" class="addForm">
38
-				<nz-form-item *ngIf="coopType === 2">
39
-				  <nz-form-label [nzSpan]="6" nzFor="workName">大类工时名称</nz-form-label>
40
+				<nz-form-item *ngIf="coopType === 2 && add">
41
+				  <nz-form-label [nzSpan]="6" nzFor="workName">工时大类名称</nz-form-label>
40 42
 				  <nz-form-control [nzSpan]="18">
41 43
 				    <nz-input-group>
42 44
 							<div>
@@ -45,6 +47,19 @@
45 47
 						</nz-input-group>
46 48
 				  </nz-form-control>
47 49
 				</nz-form-item>
50
+        <nz-form-item *ngIf="coopType === 2 && !add">
51
+          <nz-form-label [nzSpan]="5" nzRequired nzFor="parent">工时大类</nz-form-label>
52
+          <nz-form-control [nzSpan]="19" nzErrorTip="请选择工时大类!">
53
+            <nz-select [nzDropdownMatchSelectWidth]="false" nzShowSearch nzAllowClear formControlName="parent" nzPlaceHolder="请选择工时大类">
54
+              <ng-container *ngFor="let option of categoryList1">
55
+                <nz-option *ngIf="!isLoading" [nzLabel]="option.workName" [nzValue]="option.id"></nz-option>
56
+              </ng-container>
57
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
58
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
59
+              </nz-option>
60
+            </nz-select>
61
+          </nz-form-control>
62
+        </nz-form-item>
48 63
 
49 64
 				<nz-form-item>
50 65
 				  <nz-form-label [nzSpan]="5" nzRequired nzFor="workName">工时名称</nz-form-label>

+ 69 - 22
src/app/components/configurationCenter/configuration-manHour/configuration-manHour.component.ts

@@ -62,7 +62,7 @@ export class ConfigurationManHourComponent implements OnInit {
62 62
     this.getScores();
63 63
   }
64 64
 
65
-	
65
+
66 66
 	// 监听单位输入
67 67
 	workUnitshow:boolean = false;
68 68
 	handleInput(event: KeyboardEvent){
@@ -73,7 +73,7 @@ export class ConfigurationManHourComponent implements OnInit {
73 73
 			this.workUnitshow = false
74 74
 		}
75 75
 	}
76
-	
76
+
77 77
   // 获取积分
78 78
   scoreList: any = [];
79 79
   getScores() {
@@ -124,12 +124,12 @@ export class ConfigurationManHourComponent implements OnInit {
124 124
         break;
125 125
     }
126 126
   }
127
-	
127
+
128 128
 	// 取消删除弹框
129 129
 	cancelDel(){
130 130
 		this.hideDelModal();
131 131
 	}
132
-	
132
+
133 133
 	// 确认删除
134 134
 	confirmDel() {
135 135
 	  let that = this;
@@ -156,7 +156,7 @@ export class ConfigurationManHourComponent implements OnInit {
156 156
 	      }
157 157
 	    });
158 158
 	}
159
-	
159
+
160 160
 	// 关闭删除模态框
161 161
 	hideDelModal() {
162 162
 	  this.delModal = false;
@@ -181,6 +181,7 @@ export class ConfigurationManHourComponent implements OnInit {
181 181
 			workHourManagement: {
182 182
 				hosId: this.hosId,
183 183
 				treeLevel: type,
184
+        quoteOther: 0,
184 185
 				parent: type === 1 ? null : { id: parentId }
185 186
 			}
186 187
     };
@@ -204,7 +205,38 @@ export class ConfigurationManHourComponent implements OnInit {
204 205
     this.modalCategory = true;
205 206
     this.initCategoryForm();
206 207
   }
207
-	
208
+  isLoading:boolean = false;
209
+  // 修改
210
+  editCategoryModal(type:number) {
211
+    this.coopType = type;
212
+    this.modelName = "修改";
213
+    this.add = false; //修改
214
+    this.modalCategory = true;
215
+    this.initCategoryForm();
216
+    if(type == 1){
217
+      this.('parent', false);
218
+    }else if(type == 2){
219
+      this.('parent', true);
220
+    }
221
+    console.log(this['activeCategory' + type])
222
+    this.validateCategoryForm.controls.parent.setValue(this['activeCategory' + type].parent ? this['activeCategory' + type].parent.id : null);
223
+    this.validateCategoryForm.controls.workName.setValue(this['activeCategory' + type].workName);
224
+    this.validateCategoryForm.controls.workUnit.setValue(this['activeCategory' + type].workUnit);
225
+    this.validateCategoryForm.controls.wage.setValue(this['activeCategory' + type].wage);
226
+    this.validateCategoryForm.controls.integral.setValue(this['activeCategory' + type].integral ? this['activeCategory' + type].integral.id : null);
227
+  }
228
+
229
+  requiredChange(field: string, required: boolean): void {
230
+    if (!required) {
231
+      this.validateCategoryForm.get(field)!.clearValidators();
232
+      this.validateCategoryForm.get(field)!.markAsPristine();
233
+    } else {
234
+      this.validateCategoryForm.get(field)!.setValidators(Validators.required);
235
+      this.validateCategoryForm.get(field)!.markAsDirty();
236
+    }
237
+    this.validateCategoryForm.get(field)!.updateValueAndValidity();
238
+  }
239
+
208 240
 	// 删除工时
209 241
 	delModal: boolean = false; //删除模态框
210 242
 	delContent: string = null; //删除模态框
@@ -217,7 +249,7 @@ export class ConfigurationManHourComponent implements OnInit {
217 249
 		this.coopType = type;
218 250
 		this.delModal = true
219 251
 	}
220
-	
252
+
221 253
   //关闭新增/编辑弹框
222 254
   hideCategoryModal() {
223 255
     this.modalCategory = false;
@@ -227,6 +259,7 @@ export class ConfigurationManHourComponent implements OnInit {
227 259
   validateCategoryForm: FormGroup; //新增/编辑表单
228 260
   initCategoryForm() {
229 261
     this.validateCategoryForm = this.fb.group({
262
+      parent: [null],//工时大类
230 263
       workName: [null, [Validators.required]],//名称
231 264
 			workUnit: [null, [Validators.required]],//单位
232 265
 			wage: [null, [Validators.required]],//工价
@@ -252,25 +285,39 @@ export class ConfigurationManHourComponent implements OnInit {
252 285
     console.log(this.validateCategoryForm.value);
253 286
     this.btnLoading = true;
254 287
     // -----------------------------------
255
-    let postData:any = {
256
-			...this.validateCategoryForm.value,
257
-			integral:{
258
-				id:this.validateCategoryForm.value.integral
259
-			},
260
-			hosId: this.hosId,
261
-			treeLevel: this.coopType,
262
-			parent: this.coopType === 1 ? undefined : this['activeCategory' + (this.coopType - 1)],
263
-    };
264
-			
288
+    let postData:any;
289
+    if(this.add){
290
+      postData = {
291
+        ...this.validateCategoryForm.value,
292
+        integral:{
293
+          id:this.validateCategoryForm.value.integral
294
+        },
295
+        hosId: this.hosId,
296
+        treeLevel: this.coopType,
297
+        parent: this.coopType === 1 ? undefined : this['activeCategory' + (this.coopType - 1)],
298
+      }
299
+    }else{
300
+      postData = {
301
+        ...this['activeCategory' + this.coopType],
302
+        ...this.validateCategoryForm.value,
303
+        integral:{
304
+          id:this.validateCategoryForm.value.integral
305
+        },
306
+        hosId: this.hosId,
307
+        treeLevel: this.coopType,
308
+        parent: this.coopType === 1 ? undefined : this['activeCategory' + (this.coopType - 1)],
309
+      }
310
+    }
311
+
265 312
 		this.mainService
266
-			.simplePost("addData", "workHourManagement", postData)
313
+			.simplePost(this.add ? "addData" : "updData", "workHourManagement", postData)
267 314
 			.subscribe((data) => {
268 315
 				this.btnLoading = false;
269 316
 				if (data.status == 200) {
270 317
 					this.modalCategory = false
271
-					this.showPromptModal("新增", true, "");
318
+					this.showPromptModal(this.add ? "新增" : "修改", true, "");
272 319
 				} else {
273
-					this.showPromptModal("新增", false, data.msg);
320
+					this.showPromptModal(this.add ? "新增" : "修改", false, data.msg);
274 321
 				}
275 322
 			});
276 323
     // -----------------------------------
@@ -290,7 +337,7 @@ export class ConfigurationManHourComponent implements OnInit {
290 337
     });
291 338
     console.log(this.validateConfigForm.controls)
292 339
   }
293
-	
340
+
294 341
 	// 获取当前选中的故障现象索引
295 342
 	get currentCategoryIndex(){
296 343
 	  if(this.activeCategory3.id){
@@ -303,7 +350,7 @@ export class ConfigurationManHourComponent implements OnInit {
303 350
 	    return 1;
304 351
 	  }
305 352
 	}
306
-	
353
+
307 354
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
308 355
   promptContent: string; //操作提示框提示信息
309 356
   ifSuccess: boolean; //操作成功/失败

+ 9 - 1
src/app/services/main.service.ts

@@ -1043,11 +1043,19 @@ export class MainService {
1043 1043
 	  return this.http.post(host.host + `/user/data/findPhoneDept`, data, {
1044 1044
 	    headers: this.headers,
1045 1045
 	  });
1046
-	}	// 获取细胞学标本
1046
+	}
1047
+  // 获取细胞学标本
1047 1048
 	getCellDictionary(data) {
1048 1049
 	  return this.http.post(host.host + `/common/common/getDictionary`,data, {
1049 1050
 	    headers: this.headers,
1050 1051
 	  });
1051 1052
 	}
1052 1053
 
1054
+  // 删除故障现象
1055
+	deleteIncidentCategory(data) {
1056
+	  return this.http.post(host.host + `/incident/deleteIncidentCategory`, data, {
1057
+	    headers: this.headers,
1058
+	  });
1059
+	}
1060
+
1053 1061
 }

+ 1 - 0
src/app/views/assets-consumable/assets-consumable.component.ts

@@ -84,6 +84,7 @@ export class AssetsConsumableComponent implements OnInit {
84 84
       sum: this.pageSize,
85 85
       consumable: {
86 86
         hosId: this.currentHospital.id,
87
+        quoteOther: 0,
87 88
         ...this.searchDto,
88 89
       },
89 90
     };