浏览代码

当前人需要选择组

seimin 1 月之前
父节点
当前提交
7ab30eb261

+ 1 - 1
src/app/views/inspection-configuration/inspection-configuration.component.html

@@ -131,7 +131,7 @@
131
               </nz-radio-group>
131
               </nz-radio-group>
132
             </nz-form-control>
132
             </nz-form-control>
133
           </nz-form-item>
133
           </nz-form-item>
134
-          <nz-form-item *ngIf="validateForm.value.userGroup == 2 || validateForm.value.userGroup == 3">
134
+          <nz-form-item>
135
             <nz-form-label [nzSpan]="5" nzRequired nzFor="groupId">维&nbsp;&nbsp;修&nbsp;&nbsp;组</nz-form-label>
135
             <nz-form-label [nzSpan]="5" nzRequired nzFor="groupId">维&nbsp;&nbsp;修&nbsp;&nbsp;组</nz-form-label>
136
             <nz-form-control [nzSpan]="19" nzErrorTip="请选择维修组!">
136
             <nz-form-control [nzSpan]="19" nzErrorTip="请选择维修组!">
137
               <nz-select (nzOnSearch)="changeInp('group', $event)" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear formControlName="groupId" nzPlaceHolder="请选择维修组" (nzOpenChange)="changeInp('group', '')">
137
               <nz-select (nzOnSearch)="changeInp('group', $event)" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear formControlName="groupId" nzPlaceHolder="请选择维修组" (nzOpenChange)="changeInp('group', '')">

+ 2 - 4
src/app/views/inspection-configuration/inspection-configuration.component.ts

@@ -335,7 +335,7 @@ export class InspectionConfigurationComponent implements OnInit {
335
 
335
 
336
         data.groupDTO && (this.groupList = [data.groupDTO]);
336
         data.groupDTO && (this.groupList = [data.groupDTO]);
337
         this.validateForm.controls.groupId.setValue(data.groupId);
337
         this.validateForm.controls.groupId.setValue(data.groupId);
338
-        this.requiredChange('groupId', data.userGroup == 2 || data.userGroup == 3);
338
+        this.requiredChange('groupId', true);
339
 
339
 
340
         data.userDTO && (this.userList = [data.userDTO]);
340
         data.userDTO && (this.userList = [data.userDTO]);
341
         this.validateForm.controls.userId.setValue(data.userId);
341
         this.validateForm.controls.userId.setValue(data.userId);
@@ -379,11 +379,9 @@ export class InspectionConfigurationComponent implements OnInit {
379
     this.requiredChange('createOrder', value == 1);
379
     this.requiredChange('createOrder', value == 1);
380
     this.validateForm.controls.createOrder.setValue(0);
380
     this.validateForm.controls.createOrder.setValue(0);
381
 
381
 
382
-    this.requiredChange('repairDeptId', value == 1);
383
     this.validateForm.controls.repairDeptId.setValue(null);
382
     this.validateForm.controls.repairDeptId.setValue(null);
384
     this.repairDeptList = [];
383
     this.repairDeptList = [];
385
 
384
 
386
-    this.requiredChange('categoryId', value == 1);
387
     this.validateForm.controls.categoryId.setValue(null);
385
     this.validateForm.controls.categoryId.setValue(null);
388
     this.categoryList = [];
386
     this.categoryList = [];
389
 
387
 
@@ -420,7 +418,7 @@ export class InspectionConfigurationComponent implements OnInit {
420
   }
418
   }
421
 
419
 
422
   changeUserGroup(value){
420
   changeUserGroup(value){
423
-    this.requiredChange('groupId', value == 2 || value == 3);
421
+    this.requiredChange('groupId', true);
424
     this.validateForm.controls.groupId.setValue(null);
422
     this.validateForm.controls.groupId.setValue(null);
425
     this.groupList = [];
423
     this.groupList = [];
426
 
424