解决冲突

This commit is contained in:
wangshiming
2022-03-01 13:27:56 +08:00
parent 317efcdb2a
commit bbd4daa4f6
6 changed files with 78 additions and 35 deletions

View File

@ -1,6 +1,6 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
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 { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
@ -28,6 +28,7 @@ export class OrderManagementVehicleComponent implements OnInit {
isVisibleView = false;
isVisibleEvaluate = false;
isVisible = false;
loading: boolean = true;
changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录
changeViewId: any; // 查看运费变更记录id - 用于查看
ViewCause: any; // 变更运费查看数据
@ -103,6 +104,33 @@ resourceStatus: any;
},
};
}
beforeReq = (requestOptions: STRequestOptions) => {
const a:any = {};
if(this.resourceStatus) {
a.billStatus = 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,
}));
};
get selectedRows() {
return this.st?.list.filter((item) => item.checked) || [];
}