解决冲突

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,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';
@ -27,6 +27,7 @@ export class OrderManagementBulkComponent implements OnInit {
isVisibleEvaluate = false;
isVisible = false;
_$expand = false;
loading: boolean = true;
changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录
changeViewId: any; // 查看运费变更记录id - 用于查看
ViewCause: any; // 变更运费查看数据
@ -44,20 +45,6 @@ export class OrderManagementBulkComponent implements OnInit {
columnsFloatView: STColumn[] = [];
demoValue: any;
resourceStatus: any;
datass: any = [
{
one: '1',
two: '1',
three: '1',
id: 1
},
{
one: '2',
two: '2',
three: '2',
id: 2
}
];
tabs = {
cancelQuantity: 0,
receivedQuantity: 0,
@ -94,6 +81,34 @@ export class OrderManagementBulkComponent implements OnInit {
}
};
}
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,
disabled: item.billStatus !== '4'
}));
};
get selectedRows() {
return this.st?.list.filter(item => item.checked) || [];
}