Merge branch 'feature/partner' of https://gitlab.eascs.com/tms-ui/tms-obc-web into feature/partner
This commit is contained in:
		| @ -81,16 +81,26 @@ export class ParterChannelSalesEditComponent implements OnInit { | ||||
|           default: '0', | ||||
|         }, | ||||
|         roleIds: { | ||||
|           title: '', | ||||
|           title: '角色', | ||||
|           type: 'string', | ||||
|           enum: [ | ||||
|             { label: '管理员', value: '1'}, | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder:'授权角色', | ||||
|             placeholder: '授权角色', | ||||
|             mode: 'multiple', | ||||
|             maxMultipleCount: 5, | ||||
|             asyncData: () => { | ||||
|               return this.service.request(this.service.$api_getAppRoleList).pipe( | ||||
|                 map((res: any) => { | ||||
|                   return res | ||||
|                     .filter((role: any) => role.roleCode !== 'Administrator') | ||||
|                     .map((item: any) => { | ||||
|                       return { label: item.roleName, value: item.id }; | ||||
|                     }); | ||||
|                 }) | ||||
|               ); | ||||
|             }, | ||||
|             visibleIf: { isAuthorization: (value: string) => value === '1' } | ||||
|           } as SFSelectWidgetSchema, | ||||
|           }, | ||||
|         }, | ||||
|         remark: { | ||||
|           type: 'string', | ||||
|  | ||||
| @ -13,7 +13,8 @@ export class ChannelSalesService extends BaseService { | ||||
|   $api_getPage = '/api/mdc/channelSalesManagement/list/page'; | ||||
|   // OA员工模糊查询 | ||||
|   $api_fuzzyQuery = '/api/mdc/channelSalesManagement/fuzzyQuery'; | ||||
|  | ||||
|   // 获取角色列表 | ||||
|   $api_getAppRoleList = '/api/mdc/cuc/roleInfo/getRoleList'; | ||||
|    | ||||
|  | ||||
|   constructor(public injector: Injector) { | ||||
|  | ||||
| @ -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); | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -15,7 +15,7 @@ | ||||
|   <!-- 数据列表 --> | ||||
|   <st | ||||
|     #st | ||||
|     [data]="data" | ||||
|     [data]="service.$api_getList" | ||||
|     [columns]="columns" | ||||
|     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" | ||||
|     [res]="{ reName: { list: 'data.records', total: 'data.total' } }" | ||||
|  | ||||
| @ -43,13 +43,17 @@ export class ParterLevelConfigListComponent implements OnInit { | ||||
|   initSF() { | ||||
|     this.schema = { | ||||
|       properties: { | ||||
|         name: { | ||||
|         gradeName: { | ||||
|           type: 'string', | ||||
|           title: '等级姓名' | ||||
|         }, | ||||
|         phone: { | ||||
|         stateLocked: { | ||||
|           type: 'string', | ||||
|           title: '状态' | ||||
|           title: '状态', | ||||
|           enum:[{label:'是',value:'1'},{label:'否',value:'2'}], | ||||
|           ui:{ | ||||
|             widget:'select' | ||||
|           } | ||||
|         }, | ||||
|       } | ||||
|     }; | ||||
| @ -64,11 +68,11 @@ export class ParterLevelConfigListComponent implements OnInit { | ||||
|     this.columns = [ | ||||
|       { | ||||
|         title: '等级姓名', | ||||
|         index: 'name1' | ||||
|         index: 'gradeName' | ||||
|       }, | ||||
|       { | ||||
|         title: '备注', | ||||
|         index: 'name1' | ||||
|         index: 'remark' | ||||
|       }, | ||||
|       { | ||||
|         title: '创建时间', | ||||
| @ -76,7 +80,7 @@ export class ParterLevelConfigListComponent implements OnInit { | ||||
|       }, | ||||
|       { | ||||
|         title: '启用时间', | ||||
|         index: 'name1' | ||||
|         index: 'enableTime' | ||||
|       }, | ||||
|       { | ||||
|         title: '状态', | ||||
|  | ||||
| @ -5,6 +5,14 @@ import { BaseService } from '@shared'; | ||||
|   providedIn: 'root', | ||||
| }) | ||||
| export class ChannelSalesService extends BaseService { | ||||
|   // 查询合伙人等级配置表 | ||||
|   $api_getList = '/api/mdc/partnerGradeConfig/list/page'; | ||||
|   // 获取合伙人等级配置表 | ||||
|   $api_getPartnerGradeConfig = '/api/mdc/partnerGradeConfig/get'; | ||||
|   // 保存合伙人等级配置表 | ||||
|   $api_save = '/api/mdc/partnerGradeConfig/save'; | ||||
|   // 删除合伙人等级配置表 | ||||
|   $api_del = '/api/mdc/partnerGradeConfig/deletebatch'; | ||||
|  | ||||
|   constructor(public injector: Injector) { | ||||
|     super(injector); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user