666
This commit is contained in:
		| @ -60,7 +60,7 @@ export class ParterChannelSalesEditComponent implements OnInit { | ||||
|           ui: { | ||||
|             widget: 'autocomplete', | ||||
|             placeholder:'请选择', | ||||
|             asyncData: () => this.service.request(this.service.$api_fuzzyQuery).pipe( | ||||
|             asyncData: (input:string) => this.service.request(this.service.$api_fuzzyQuery,{name:input}).pipe( | ||||
|               map((res: any) => { | ||||
|                 console.log('111',res) | ||||
|                 return []; | ||||
| @ -81,7 +81,7 @@ export class ParterChannelSalesEditComponent implements OnInit { | ||||
|           default: '0', | ||||
|         }, | ||||
|         roleIds: { | ||||
|           title: '角色', | ||||
|           title: '', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
| @ -89,6 +89,7 @@ export class ParterChannelSalesEditComponent implements OnInit { | ||||
|             mode: 'multiple', | ||||
|             maxMultipleCount: 5, | ||||
|             asyncData: () => { | ||||
|          | ||||
|               return this.service.request(this.service.$api_getAppRoleList).pipe( | ||||
|                 map((res: any) => { | ||||
|                   return res | ||||
|  | ||||
| @ -64,27 +64,27 @@ export class ParterChannelSalesListComponent implements OnInit { | ||||
|     this.columns = [ | ||||
|       { | ||||
|         title: '销售渠道姓名', | ||||
|         index: 'name1' | ||||
|         index: 'name' | ||||
|       }, | ||||
|       { | ||||
|         title: '手机号', | ||||
|         index: 'name1' | ||||
|         index: 'telephone' | ||||
|       }, | ||||
|       { | ||||
|         title: '所属组织', | ||||
|         index: 'name1' | ||||
|         index: 'organLable' | ||||
|       }, | ||||
|       { | ||||
|         title: '职级', | ||||
|         index: 'name1' | ||||
|         index: 'station' | ||||
|       }, | ||||
|       { | ||||
|         title: '等级', | ||||
|         index: 'name1' | ||||
|         index: 'postLevel' | ||||
|       }, | ||||
|       { | ||||
|         title: '省市', | ||||
|         index: 'name1' | ||||
|         index: 'residencePlace' | ||||
|       }, | ||||
|       { | ||||
|         title: '邀请码', | ||||
|  | ||||
| @ -75,6 +75,7 @@ export class ParterLevelConfigEditComponent implements OnInit { | ||||
|     if(!this.sf.valid) return; | ||||
|     this.service.request(this.service.$api_save, { ...this.sf.value }).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.service.msgSrv.success('保存成功!') | ||||
|         this.modalRef.destroy(true); | ||||
|       } else { | ||||
|         this.service.msgSrv.error(res.msg); | ||||
|  | ||||
| @ -45,21 +45,22 @@ export class ParterLevelConfigListComponent implements OnInit { | ||||
|       properties: { | ||||
|         gradeName: { | ||||
|           type: 'string', | ||||
|           title: '等级姓名' | ||||
|           title: '等级姓名', | ||||
|         }, | ||||
|         stateLocked: { | ||||
|           type: 'string', | ||||
|           title: '状态', | ||||
|           enum:[{label:'是',value:'1'},{label:'否',value:'2'}], | ||||
|           enum:[{label:'启用',value:'1'},{label:'禁用',value:'0'}], | ||||
|           ui:{ | ||||
|             widget:'select' | ||||
|             widget:'select', | ||||
|           } | ||||
|         }, | ||||
|       } | ||||
|     }; | ||||
|     this.ui = { | ||||
|       '*': { | ||||
|         grid: { span: 8, gutter: 4 } | ||||
|         width:300, | ||||
|         grid: { span: 12, gutter: 4 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
| @ -76,7 +77,7 @@ export class ParterLevelConfigListComponent implements OnInit { | ||||
|       }, | ||||
|       { | ||||
|         title: '创建时间', | ||||
|         index: 'name1' | ||||
|         index: 'createTime' | ||||
|       }, | ||||
|       { | ||||
|         title: '启用时间', | ||||
| @ -84,7 +85,10 @@ export class ParterLevelConfigListComponent implements OnInit { | ||||
|       }, | ||||
|       { | ||||
|         title: '状态', | ||||
|         index: 'name1' | ||||
|         index: 'stateLocked', | ||||
|         format: (item: any) => { | ||||
|           return item.stateLocked ? '禁用':'启用' | ||||
|         } | ||||
|       }, | ||||
|       { | ||||
|         title: '操作', | ||||
| @ -97,10 +101,12 @@ export class ParterLevelConfigListComponent implements OnInit { | ||||
|           { | ||||
|             text: '禁用', | ||||
|             click: (_record, _modal, _instance) => this.stop(_record), | ||||
|             iif:(item)=>!item.stateLocked | ||||
|           }, | ||||
|           { | ||||
|             text: '启用', | ||||
|             click: (_record, _modal, _instance) => this.restart(_record), | ||||
|             iif:(item)=>item.stateLocked | ||||
|           } | ||||
|         ] | ||||
|       } | ||||
| @ -145,30 +151,30 @@ export class ParterLevelConfigListComponent implements OnInit { | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   restart(id: any) { | ||||
|   restart(item: any) { | ||||
|     this.modalService.confirm({ | ||||
|       nzTitle: '<i>冻结确认</i>', | ||||
|       nzContent: `<b>确定启用该账号吗?</br>`, | ||||
|       // nzOnOk: () => | ||||
|       //   this.service.request('', '').subscribe(res => { | ||||
|       //     if (res) { | ||||
|       //       this.service.msgSrv.success('冻结成功!'); | ||||
|       //       this.st.reload(); | ||||
|       //     } | ||||
|       //   }) | ||||
|       nzOnOk: () => | ||||
|         this.service.request(this.service.$api_updatePartnerGradeConfig, {id:item.id}).subscribe(res => { | ||||
|           if (res) { | ||||
|             this.service.msgSrv.success('启用成功!'); | ||||
|             this.st.reload(); | ||||
|           } | ||||
|         }) | ||||
|     }); | ||||
|   } | ||||
|   stop(id: any) { | ||||
|   stop(item: any) { | ||||
|     this.modalService.confirm({ | ||||
|       nzTitle: '<i>冻结确认</i>', | ||||
|       nzContent: `<b>确定禁用该账号吗?</br>`, | ||||
|       // nzOnOk: () => | ||||
|       //   this.service.request('', '').subscribe(res => { | ||||
|       //     if (res) { | ||||
|       //       this.service.msgSrv.success('冻结成功!'); | ||||
|       //       this.st.reload(); | ||||
|       //     } | ||||
|       //   }) | ||||
|       nzOnOk: () => | ||||
|         this.service.request(this.service.$api_updatePartnerGradeConfig, {id:item.id}).subscribe(res => { | ||||
|           if (res) { | ||||
|             this.service.msgSrv.success('冻结成功!'); | ||||
|             this.st.reload(); | ||||
|           } | ||||
|         }) | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|  | ||||
| @ -13,6 +13,8 @@ export class ChannelSalesService extends BaseService { | ||||
|   $api_save = '/api/mdc/partnerGradeConfig/save'; | ||||
|   // 删除合伙人等级配置表 | ||||
|   $api_del = '/api/mdc/partnerGradeConfig/deletebatch'; | ||||
|   // 启用/禁用等级配置 | ||||
|   $api_updatePartnerGradeConfig = '/api/mdc/partnerGradeConfig/updatePartnerGradeConfig'; | ||||
|  | ||||
|   constructor(public injector: Injector) { | ||||
|     super(injector); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user