This commit is contained in:
heqinghang
2022-03-21 10:31:06 +08:00
parent 6ac6f01fce
commit 74968d658c
4 changed files with 34 additions and 26 deletions

View File

@ -38,19 +38,15 @@ export class ParterLevelConfigEditComponent implements OnInit {
title: '',
ui: { hidden: true }
},
name: {
title: '合伙人等级',
gradeName: {
title: '等级名称',
type: 'string',
enum: [
{ label: '管理员', value: '1'},
],
ui: {
widget: 'select',
placeholder:'请选择',
visibleIf: { name2: (value: string) => value === '1' }
} as SFSelectWidgetSchema,
},
name3: {
sortId: {
title: '排序',
type: 'string',
},
remark: {
type: 'string',
title: '备注',
maxLength: 50,
@ -61,7 +57,7 @@ export class ParterLevelConfigEditComponent implements OnInit {
} as SFTextareaWidgetSchema,
},
},
required: ['name1', 'name2']
required: ['gradeName', 'sortId', 'remark']
};
this.ui = {
'*': {
@ -77,12 +73,12 @@ export class ParterLevelConfigEditComponent implements OnInit {
save() {
this.sf.validator({ emitError: true });
if(!this.sf.valid) return;
// this.service.request('', { ...this.sf.value }).subscribe(res => {
// if (res) {
// this.modalRef.destroy(true);
// } else {
// this.service.msgSrv.error(res.msg);
// }
// });
this.service.request(this.service.$api_save, { ...this.sf.value }).subscribe(res => {
if (res) {
this.modalRef.destroy(true);
} else {
this.service.msgSrv.error(res.msg);
}
});
}
}