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