666
This commit is contained in:
		| @ -17,7 +17,8 @@ export class ParterChannelSalesEditComponent implements OnInit { | ||||
|   ui!: SFUISchema; | ||||
|   i: any; | ||||
|   type: any; | ||||
|  | ||||
|   record:any; | ||||
|   currentOAItem:any; | ||||
|   constructor( | ||||
|     public http: _HttpClient, | ||||
|     private cdr: ChangeDetectorRef, | ||||
| @ -28,7 +29,14 @@ export class ParterChannelSalesEditComponent implements OnInit { | ||||
|   ) {} | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|     this.initSF(); | ||||
|      | ||||
|     this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => { | ||||
|       if(res){ | ||||
|         this.record = res; | ||||
|       } | ||||
|       this.initSF(); | ||||
|     }); | ||||
|      | ||||
|   } | ||||
|   initSF() { | ||||
|     this.schema = { | ||||
| @ -62,10 +70,14 @@ export class ParterChannelSalesEditComponent implements OnInit { | ||||
|             placeholder:'请选择', | ||||
|             asyncData: (input:string) => this.service.request(this.service.$api_fuzzyQuery,{name:input}).pipe( | ||||
|               map((res: any) => { | ||||
|                 console.log('111',res) | ||||
|                 return []; | ||||
|                 return res.map((item:any)=>{ | ||||
|                   return {label: item.empName+"/"+item.empNo, value: item.empNo, obj: item} | ||||
|                 }) | ||||
|               }) | ||||
|             ) | ||||
|             ), | ||||
|             change:(item:any, org:any)=>{ | ||||
|               this.currentOAItem = org.obj; | ||||
|             } | ||||
|           } as SFAutoCompleteWidgetSchema, | ||||
|         }, | ||||
|         isAuthorization: { | ||||
| @ -89,7 +101,6 @@ export class ParterChannelSalesEditComponent implements OnInit { | ||||
|             mode: 'multiple', | ||||
|             maxMultipleCount: 5, | ||||
|             asyncData: () => { | ||||
|          | ||||
|               return this.service.request(this.service.$api_getAppRoleList).pipe( | ||||
|                 map((res: any) => { | ||||
|                   return res | ||||
| @ -134,7 +145,7 @@ export class ParterChannelSalesEditComponent implements OnInit { | ||||
|   save() { | ||||
|     this.sf.validator({ emitError: true }); | ||||
|     if(!this.sf.valid) return; | ||||
|     this.service.request(this.service.$api_save, { ...this.sf.value }).subscribe(res => { | ||||
|     this.service.request(this.service.$api_save, { ...this.sf.value, employeeVO: this.currentOAItem}).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.modalRef.destroy(true); | ||||
|       } else { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user