This commit is contained in:
wangshiming
2022-03-23 19:46:34 +08:00
parent 2023fd2b75
commit 3aea263ba1
4 changed files with 66 additions and 16 deletions

View File

@ -1,7 +1,7 @@
import { registerLocaleData } from '@angular/common';
import { Router } from '@angular/router';
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 { ShipperBaseService } from '@shared';
@ -21,6 +21,7 @@ export class OrderManagementRiskComponent implements OnInit {
schema: SFSchema = {};
schemaView: SFSchema = {};
auditMany = false;
loading: boolean = true;
auditId: any;
auditIdR: any;
isVisibleRE = false;
@ -47,14 +48,6 @@ export class OrderManagementRiskComponent implements OnInit {
* 查询参数
*/
get reqParams() {
// const a:any = {};
// if(this.resourceStatus) {
// a.representationsStatus = this.resourceStatus
// }
// return {
// ...a,
// ...this.sf?.value,
// };
const a: any = {};
if (this.resourceStatus) {
a.representationsStatus = this.resourceStatus
@ -70,6 +63,34 @@ export class OrderManagementRiskComponent implements OnInit {
},
};
}
beforeReq = (requestOptions: STRequestOptions) => {
const a: any = {};
if (this.resourceStatus) {
a.representationsStatus = 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.auditStatus !== '1'
}));
};
search() {
this.st?.load(1);
this.getGoodsSourceStatistical()