fix bug
This commit is contained in:
		| @ -3,7 +3,6 @@ import { ActivatedRoute } from '@angular/router'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { RecordedService } from '../../services/recorded.service'; | ||||
|  | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-partner-recored-detail', | ||||
|   templateUrl: './detail.component.html', | ||||
| @ -21,7 +20,7 @@ export class PartnerRecordedDetailComponent implements OnInit { | ||||
|     this.getRecordedDetail(this.id); | ||||
|   } | ||||
|  | ||||
|   ngOnInit(): void { } | ||||
|   ngOnInit(): void {} | ||||
|  | ||||
|   getRecordedDetail(id: string) { | ||||
|     this.service.request(this.service.$api_get_recorded_record_detail, { id }).subscribe(res => { | ||||
| @ -87,18 +86,28 @@ export class PartnerRecordedDetailComponent implements OnInit { | ||||
|               this.service.msgSrv.warning('请填写拒绝原因 '); | ||||
|               return; | ||||
|             } | ||||
|             this.audit({ ids: params, rejectReason: this.msg, sts: '3' }, () => { | ||||
|               modal.destroy(true); | ||||
|             }, '审核拒绝成功'); | ||||
|             this.audit( | ||||
|               { ids: params, rejectReason: this.msg, sts: '3' }, | ||||
|               () => { | ||||
|                 modal.destroy(true); | ||||
|               }, | ||||
|               '审核拒绝成功' | ||||
|             ); | ||||
|           } | ||||
|         }, | ||||
|         { | ||||
|           label: '通过', | ||||
|           type: 'primary', | ||||
|           onClick: () => { | ||||
|             this.audit({ ids: params, rejectReason: this.msg, sts: this.formData?.sts === '0' ? 1 : 2 }, () => { | ||||
|               modal.destroy(true); | ||||
|             }, `${this.formData?.sts === '1' ? '审核' : '复审'}通过成功`); | ||||
|             console.log(this.formData?.sts); | ||||
|  | ||||
|             this.audit( | ||||
|               { ids: params, rejectReason: this.msg, sts: this.formData?.sts === '0' ? 1 : 2 }, | ||||
|               () => { | ||||
|                 modal.destroy(true); | ||||
|               }, | ||||
|               `${this.formData?.sts === '1' ? '审核' : '复审'}通过成功` | ||||
|             ); | ||||
|           } | ||||
|         } | ||||
|       ] | ||||
| @ -117,13 +126,11 @@ export class PartnerRecordedDetailComponent implements OnInit { | ||||
|    * 审核 | ||||
|    */ | ||||
|   audit(params: any, callback: Function, msg = '成功') { | ||||
|     this.service | ||||
|       .request(this.service.$api_audit_recored, ...params) | ||||
|       .subscribe(res => { | ||||
|         if (res) { | ||||
|           this.service.msgSrv.success(msg); | ||||
|           callback(); | ||||
|         } | ||||
|       }); | ||||
|     this.service.request(this.service.$api_audit_recored, {...params}).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.service.msgSrv.success(msg); | ||||
|         callback(); | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user