edit
This commit is contained in:
@ -1,12 +1,13 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
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';
|
||||
import { fromEvent, of } from 'rxjs';
|
||||
import { fromEvent, of, Subscription } from 'rxjs';
|
||||
import { debounceTime, map } from 'rxjs/operators';
|
||||
import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component';
|
||||
import { SearchDrawerService } from 'src/app/shared/components/search-drawer/search-drawer.service';
|
||||
import { OneCarOrderCancelConfirmComponent } from '../../modal/vehicle/cancel-confirm/cancel-confirm.component';
|
||||
import { VehicleConfirReceiptComponent } from '../../modal/vehicle/confir-receipt/confir-receipt.component';
|
||||
import { VehicleFreightPeopleComponent } from '../../modal/vehicle/freight-people/freight-people.component';
|
||||
@ -22,8 +23,6 @@ import { OrderManagementService } from '../../services/order-management.service'
|
||||
styleUrls: ['../../../commom/less/commom-table.less', './vehicle.component.less']
|
||||
})
|
||||
export class OrderManagementVehicleComponent extends BasicTableComponent implements OnInit {
|
||||
ui: SFUISchema = {};
|
||||
schema: SFSchema = {};
|
||||
auditMany = false;
|
||||
isVisibleView = false;
|
||||
isVisibleEvaluate = false;
|
||||
@ -39,7 +38,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('stFloat') private readonly stFloat!: STComponent;
|
||||
@ViewChild('stFloatView') private readonly stFloatView!: STComponent;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
|
||||
columns: STColumn[] = [];
|
||||
columnsFloat: STColumn[] = [];
|
||||
@ -56,7 +54,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
two: '2',
|
||||
three: '2',
|
||||
id: 2
|
||||
},
|
||||
}
|
||||
];
|
||||
tabs = {
|
||||
cancelQuantity: 0,
|
||||
@ -69,15 +67,15 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
};
|
||||
resourceStatus: any;
|
||||
|
||||
visible = false;
|
||||
constructor(
|
||||
public service: OrderManagementService,
|
||||
private modal: NzModalService,
|
||||
public shipperservice: ShipperBaseService,
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute
|
||||
public ar: ActivatedRoute,
|
||||
public searchDrawerService: SearchDrawerService
|
||||
) {
|
||||
super();
|
||||
super(searchDrawerService);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -98,11 +96,11 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
if (this.resourceStatus) {
|
||||
a.billStatus = this.resourceStatus;
|
||||
}
|
||||
const params: any = Object.assign({}, this.sf?.value || this.paramsList);
|
||||
const params: any = Object.assign({}, this.sfValue || this.paramsList);
|
||||
delete params._$expand;
|
||||
return {
|
||||
...a,
|
||||
...params,
|
||||
...params
|
||||
};
|
||||
}
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
@ -110,12 +108,12 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
if (this.resourceStatus) {
|
||||
a.billStatus = this.resourceStatus;
|
||||
}
|
||||
const params: any = Object.assign({}, this.sf?.value || this.paramsList);
|
||||
const params: any = Object.assign({}, this.sfValue || this.paramsList);
|
||||
delete params._$expand;
|
||||
this.paramsList = params
|
||||
this.paramsList = params;
|
||||
Object.assign(requestOptions.body, {
|
||||
...a,
|
||||
...this.paramsList,
|
||||
...this.paramsList
|
||||
});
|
||||
this.loading = true;
|
||||
return requestOptions;
|
||||
@ -197,7 +195,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
type: 'string',
|
||||
title: '运单号',
|
||||
ui: {
|
||||
placeholder: '最多100个单号,空号隔开',
|
||||
placeholder: '最多100个单号,空号隔开'
|
||||
}
|
||||
},
|
||||
resourceCode: {
|
||||
@ -234,7 +232,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
title: '所属项目',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请先选择货主',
|
||||
placeholder: '请先选择货主'
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
loadingPlace: {
|
||||
@ -284,7 +282,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
createTime: {
|
||||
type: 'string',
|
||||
title: '创建时间',
|
||||
ui: { widget: 'sl-from-to', type: 'date', format: 'yyyy-MM-dd' } as SFDateWidgetSchema,
|
||||
ui: { widget: 'sl-from-to', type: 'date', format: 'yyyy-MM-dd' } as SFDateWidgetSchema
|
||||
},
|
||||
riskStatus: {
|
||||
type: 'string',
|
||||
@ -342,7 +340,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
},
|
||||
type: 'object'
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 95, grid: { span: 24, gutter: 4 } } };
|
||||
}
|
||||
|
||||
/**
|
||||
@ -416,13 +413,12 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
text: '运费变更记录',
|
||||
click: _record => this.OpenPrice(_record),
|
||||
iif: item =>
|
||||
item.billType !== '3' && (
|
||||
item.billStatus == '4' ||
|
||||
item.billType !== '3' &&
|
||||
(item.billStatus == '4' ||
|
||||
item.billStatus == '5' ||
|
||||
item.billStatus == '2' ||
|
||||
item.billStatus == '3' ||
|
||||
item.billStatus == '6'
|
||||
),
|
||||
item.billStatus == '6'),
|
||||
acl: { ability: ['ORDER-VEHICLE-ChangeApplyList'] }
|
||||
},
|
||||
// {
|
||||
@ -560,23 +556,9 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
get queryFieldCount(): number {
|
||||
return Object.keys(this.schema?.properties || {}).length;
|
||||
}
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle(): void {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
tabChange(item: any) {
|
||||
console.log(item);
|
||||
}
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF(): void {
|
||||
this.sf.reset();
|
||||
this._$expand = false;
|
||||
}
|
||||
selectChange(e: number) {
|
||||
this.resourceStatus = e;
|
||||
this.initST();
|
||||
@ -587,8 +569,8 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
/**
|
||||
* 导入货源
|
||||
*/
|
||||
importGoodsSource() { }
|
||||
audit(item: any) { }
|
||||
importGoodsSource() {}
|
||||
audit(item: any) {}
|
||||
|
||||
/*
|
||||
* 审核关闭弹窗
|
||||
@ -771,7 +753,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
});
|
||||
modalRef.afterClose.subscribe((res: boolean) => {
|
||||
if (res) {
|
||||
this.resetSF;
|
||||
this.st.load();
|
||||
this.getGoodsSourceStatistical();
|
||||
}
|
||||
@ -849,7 +830,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
});
|
||||
modalRef.afterClose.subscribe((res: boolean) => {
|
||||
if (res) {
|
||||
this.resetSF;
|
||||
this.st.load();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user