edit
This commit is contained in:
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user