fix bug
This commit is contained in:
		| @ -1,5 +1,5 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { STColumn, STComponent } from '@delon/abc/st'; | ||||
| import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st'; | ||||
| import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; | ||||
| import { ModalHelper, _HttpClient } from '@delon/theme'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| @ -30,6 +30,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { | ||||
|   @ViewChild('st') private readonly st!: STComponent; | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   columns: STColumn[] = []; | ||||
|   loading: boolean = true; | ||||
|   resourceStatus: any; | ||||
|   tabs = { | ||||
|     receivedQuantity: 0, | ||||
| @ -62,6 +63,34 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|   beforeReq = (requestOptions: STRequestOptions) => { | ||||
|     const a: any = {}; | ||||
|     if (this.resourceStatus) { | ||||
|       a.auditStatus = this.resourceStatus; | ||||
|     } | ||||
|     const params: any = Object.assign({}, this.sf?.value || {}); | ||||
|     delete params._$expand; | ||||
|     if (this.sf) { | ||||
|       Object.assign(requestOptions.body, { | ||||
|         ...a, | ||||
|       ...params, | ||||
|       createTime: { | ||||
|         start: this.sf?.value?.createTime?.[0] || '', | ||||
|         end: this.sf?.value?.createTime?.[1] || '' | ||||
|       } | ||||
|       }); | ||||
|     } | ||||
|     this.loading = true; | ||||
|     return requestOptions; | ||||
|   }; | ||||
|   afterRes = (data: any[], rawData?: any) => { | ||||
|     console.log(data) | ||||
|     this.loading = false | ||||
|     return data.map(item => ({ | ||||
|       ...item, | ||||
|       // disabled: item.billStatus !== '4'  | ||||
|     })); | ||||
|   }; | ||||
|   get selectedRows() { | ||||
|     return this.st?.list.filter(item => item.checked) || []; | ||||
|   } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user