edit
This commit is contained in:
@ -136,7 +136,7 @@ export class StaffManagementComponent implements OnInit {
|
||||
staffAction(item?: any) {
|
||||
const modal = this.nzModalService.create({
|
||||
nzContent: SystemStaffStaffModalComponent,
|
||||
nzComponentParams: item ? { i: { ...item, roleId: (item.roleId as string)?.split(',') || [] } } : { i: { userId: 0 } },
|
||||
nzComponentParams: item ? { i: { ...item, roleId: item.roleId ? (item.roleId as string)?.split(',') : null } } : { i: { userId: 0 } },
|
||||
nzFooter: null
|
||||
});
|
||||
modal.afterClose.subscribe(res => {
|
||||
|
||||
@ -29,6 +29,8 @@ export class SystemStaffStaffModalComponent implements OnInit {
|
||||
this.initSF(this.i);
|
||||
}
|
||||
initSF(staff: any) {
|
||||
console.log(staff);
|
||||
|
||||
this.schema = {
|
||||
properties: {
|
||||
staffName: {
|
||||
@ -61,17 +63,11 @@ export class SystemStaffStaffModalComponent implements OnInit {
|
||||
return res.map((item: any) => {
|
||||
return { label: item.roleName, value: item.id };
|
||||
});
|
||||
}),
|
||||
})
|
||||
);
|
||||
},
|
||||
change: (i: any) => {
|
||||
console.log(i);
|
||||
|
||||
// this.sf.value.roleIds = i;
|
||||
// this.sf?.setValue('/roleIds', i);
|
||||
}
|
||||
},
|
||||
default: staff?.roleId
|
||||
default: staff?.roleId || null
|
||||
}
|
||||
},
|
||||
required: ['staffName', 'telephone']
|
||||
@ -92,7 +88,7 @@ export class SystemStaffStaffModalComponent implements OnInit {
|
||||
if (this.i.userId === 0) {
|
||||
const params: any = {
|
||||
...this.sf.value,
|
||||
enterpriseId: 0,
|
||||
enterpriseId: 0
|
||||
};
|
||||
this.service.request(this.service.$api_add_staff, params).subscribe(res => {
|
||||
if (res) {
|
||||
@ -103,7 +99,7 @@ export class SystemStaffStaffModalComponent implements OnInit {
|
||||
} else {
|
||||
const params: any = {
|
||||
appUserId: this.i.appUserId,
|
||||
...this.sf.value,
|
||||
...this.sf.value
|
||||
};
|
||||
this.service.request(this.service.$api_edit_staff, params).subscribe(res => {
|
||||
if (res) {
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
{{headerInfo?.disvattax}}
|
||||
</se>
|
||||
<se label="票面备注">
|
||||
{{headerInfo?.remarks}}
|
||||
{{headerInfo?.vatremarks}}
|
||||
</se>
|
||||
</div>
|
||||
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
|
||||
@ -54,7 +54,7 @@
|
||||
{{headerInfo?.artoacc}}
|
||||
</se>
|
||||
<se label="其他要求">
|
||||
{{headerInfo?.remarks}}
|
||||
{{headerInfo?.otherremarks}}
|
||||
</se>
|
||||
</div>
|
||||
<div *ngIf="isCanEdit" nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" class="text-right">
|
||||
|
||||
Reference in New Issue
Block a user