Browse Source

[完善]组织机构增加level字段

beijing
邵佳豪 2 years ago
parent
commit
68ceccd606
  1. 12
      src/app/system-management/organization/addor/addor.component.html
  2. 5
      src/app/system-management/organization/addor/addor.component.ts
  3. 12
      src/app/system-management/organization/editor/editor.component.html
  4. 4
      src/app/system-management/organization/editor/editor.component.ts
  5. 6
      src/app/system-management/organization/organization.component.ts

12
src/app/system-management/organization/addor/addor.component.html

@ -8,13 +8,15 @@
</nz-input-group>
</nz-form-control>
</nz-form-item>
<!-- <nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="级别">级别</nz-form-label>
<nz-form-control>
<nz-input-group>
<input nz-input type="text" formControlName="code" placeholder="请输入编码" />
</nz-input-group>
<nz-select formControlName="OrgnizationLevel" nzPlaceHolder="请选择级别">
<nz-option *ngFor="let item of OrgnizationLevel;let key = index" [nzValue]="key" [nzLabel]="item">
</nz-option>
</nz-select>
</nz-form-control>
</nz-form-item> -->
</nz-form-item>
<nz-form-item>
<nz-form-control>
<label nz-checkbox formControlName="isGasStation">是否为加油站</label>

5
src/app/system-management/organization/addor/addor.component.ts

@ -15,11 +15,14 @@ export class AddorComponent implements OnInit {
ngOnInit(): void {
this.validateForm = this.fb.group({
name: [null, [Validators.required]],
// code: [null, [Validators.required]],
OrgnizationLevel: [null, [Validators.required]],
isGasStation: [false],
isParticipationAudit: [true]
});
}
OrgnizationLevel = ['无', '总公司', '省公司', '区域', '油站']
destroyModal(): void {
this.modal.destroy({ data: 'this the result data' });
}

12
src/app/system-management/organization/editor/editor.component.html

@ -8,13 +8,15 @@
</nz-input-group>
</nz-form-control>
</nz-form-item>
<!-- <nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="级别">级别</nz-form-label>
<nz-form-control>
<nz-input-group>
<input [(ngModel)]="datacopy.code" nz-input type="text" formControlName="code" placeholder="请输入编码" />
</nz-input-group>
<nz-select [(ngModel)]="datacopy.level" formControlName="OrgnizationLevel" nzPlaceHolder="请选择级别">
<nz-option *ngFor="let item of OrgnizationLevel;let key = index" [nzValue]="key" [nzLabel]="item">
</nz-option>
</nz-select>
</nz-form-control>
</nz-form-item> -->
</nz-form-item>
<nz-form-item>
<nz-form-control>
<label [(ngModel)]="datacopy.isGasStation" nz-checkbox formControlName="isGasStation">是否为加油站</label>

4
src/app/system-management/organization/editor/editor.component.ts

@ -15,13 +15,17 @@ export class EditorComponent implements OnInit {
datacopy: any
isParticipationAudit
OrgnizationLevel = ['无', '总公司', '省公司', '区域', '油站']
ngOnInit(): void {
this.validateForm = this.fb.group({
name: [null, [Validators.required]],
OrgnizationLevel: [null, [Validators.required]],
isGasStation: [],
isParticipationAudit: []
});
this.datacopy = JSON.parse(JSON.stringify(this.data))
// console.log(this.datacopy)
this.isParticipationAudit = !this.datacopy.isSkipAudit
}
destroyModal(): void {

6
src/app/system-management/organization/organization.component.ts

@ -111,7 +111,8 @@ export class OrganizationComponent implements OnInit {
parentId: node ? Number(node.key) : null,
displayName: instance.validateForm.value.name,
isGasStation: instance.validateForm.value.isGasStation,
isSkipAudit: !instance.validateForm.value.isParticipationAudit
isSkipAudit: !instance.validateForm.value.isParticipationAudit,
level: instance.validateForm.value.OrgnizationLevel,
}
this.http.post('/api/services/app/Organization/Create', body).subscribe(data => {
resolve(data)
@ -154,7 +155,8 @@ export class OrganizationComponent implements OnInit {
parentId: node.origin.parentId,
displayName: instance.validateForm.value.name,
isGasStation: instance.validateForm.value.isGasStation,
isSkipAudit: !instance.validateForm.value.isParticipationAudit
isSkipAudit: !instance.validateForm.value.isParticipationAudit,
level: instance.validateForm.value.OrgnizationLevel
}
this.http.put('/api/services/app/Organization/Update', body).subscribe(data => {
resolve(data)

Loading…
Cancel
Save