edit
This commit is contained in:
@ -25,7 +25,7 @@ import format from 'date-fns/format';
|
||||
styleUrls: ['./bulk-detail.component.less']
|
||||
})
|
||||
export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
MapList: any[]=[];
|
||||
MapList: any[] = [];
|
||||
id = this.route.snapshot.params.id;
|
||||
billExpenses: any[] = []; //运费信息表格信息
|
||||
pois: any[] = [];
|
||||
@ -35,11 +35,11 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
totalObj: any;
|
||||
attObj: any;
|
||||
modalcontent: any;
|
||||
modalTitle:string = '';
|
||||
modalTitle: string = '';
|
||||
isVisible = false;
|
||||
logColumns2: STColumn[] = [
|
||||
{ title: '时间', index: 'vinOutTime' },
|
||||
{ title: '地点', index: 'cityName' },
|
||||
{ title: '地点', index: 'cityName' }
|
||||
];
|
||||
logColumns: STColumn[] = [
|
||||
{ title: '款项', index: 'expenseCodeLabel' },
|
||||
@ -62,20 +62,19 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
}
|
||||
];
|
||||
trajectory = 'car';
|
||||
mapList:any[] = []; //地图点位数据组
|
||||
addressItems:any[] = []; //打点地址数据组
|
||||
mapList: any[] = []; //地图点位数据组
|
||||
addressItems: any[] = []; //打点地址数据组
|
||||
constructor(
|
||||
public route: ActivatedRoute,
|
||||
private msgSrv: NzMessageService,
|
||||
private service: OrderManagementService,
|
||||
private router: Router,
|
||||
private modal: NzModalService
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
console.log(this.route?.snapshot?.queryParams?.sts);
|
||||
|
||||
|
||||
this.initData();
|
||||
this.getTrajectory();
|
||||
}
|
||||
@ -85,34 +84,36 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
if (res) {
|
||||
this.i = res;
|
||||
this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA');
|
||||
this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data:any)=>data.displayStatus !=="HIDE");
|
||||
this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data: any) => data.displayStatus !== 'HIDE');
|
||||
this.pois = [
|
||||
{
|
||||
markerLabel: '起',
|
||||
markerLabel: '装',
|
||||
color: 'blue',
|
||||
position: [res.startingPoint.longitude, res.startingPoint.latitude],
|
||||
title: res.startingPoint.detailedAddress
|
||||
title: '发货地:' + res.startingPoint.detailedAddress,
|
||||
time: '计划出发时间:' + res.loadPlanTime
|
||||
},
|
||||
{
|
||||
markerLabel: '卸',
|
||||
color: 'red',
|
||||
position: [res.endPoint.longitude, res.endPoint.latitude],
|
||||
title: res.endPoint.detailedAddress
|
||||
title: '卸货地地:' + res.endPoint.detailedAddress,
|
||||
time: '计划卸货时间:' + res.unloadPlanTime
|
||||
}
|
||||
];
|
||||
}
|
||||
});
|
||||
this.service.request(this.service.$api_listBillComplianceAbnormalByBillId, { id: this.id }).subscribe(res => {
|
||||
if (res) {
|
||||
console.log('风险详情')
|
||||
console.log(res)
|
||||
this.abnormalList = res
|
||||
console.log('风险详情');
|
||||
console.log(res);
|
||||
this.abnormalList = res;
|
||||
}
|
||||
});
|
||||
this.service.request(this.service.$api_getAbnormalWarningByBillId, { id: this.id }).subscribe(res => {
|
||||
if (res) {
|
||||
console.log('异常预警')
|
||||
console.log(res)
|
||||
console.log('异常预警');
|
||||
console.log(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -125,12 +126,12 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
this.router.navigate(['order-management/bulk-detailChange', this.id]);
|
||||
}
|
||||
agreement(value: any) {
|
||||
if(value ==='1'){
|
||||
if (value === '1') {
|
||||
this.modalTitle = '附件信息';
|
||||
// this.modalcontent = this.i?.contractContent?.contractContent;
|
||||
// this.service.reviewPDF(this.i?.contractContent?.contractFilePath)
|
||||
this.service.openURL(this.i?.contractContent?.contractFilePath);
|
||||
}else if(value === '2'){
|
||||
} else if (value === '2') {
|
||||
this.modalTitle = '补充协议';
|
||||
this.modalcontent = this.i?.supplementContent?.contractContent;
|
||||
this.isVisible = true;
|
||||
@ -164,20 +165,21 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
}
|
||||
|
||||
// 获取车辆轨迹
|
||||
getTrajectory(){
|
||||
getTrajectory() {
|
||||
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
||||
if (res) {
|
||||
const points = res.trackArray;
|
||||
let list :any[] = [];
|
||||
let list: any[] = [];
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
name: item.hgt,
|
||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
|
||||
time: item.gtm
|
||||
});
|
||||
});
|
||||
this.mapList = list;
|
||||
this.addressItems = res.cityArray;
|
||||
if(this.addressItems && this.addressItems.length > 0){
|
||||
if (this.addressItems && this.addressItems.length > 0) {
|
||||
this.addressItems.forEach(item => {
|
||||
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
||||
});
|
||||
@ -186,21 +188,22 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
// 获取司机轨迹
|
||||
getDriverTrajectory(){
|
||||
// 获取司机轨迹
|
||||
getDriverTrajectory() {
|
||||
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => {
|
||||
if (res) {
|
||||
const points = res.tracks;
|
||||
let list :any[] = [];
|
||||
let list: any[] = [];
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
name: item.hgt,
|
||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
|
||||
time: item.gtm
|
||||
});
|
||||
});
|
||||
this.mapList = list;
|
||||
this.addressItems = [...res.enclosureDataAppTrack];
|
||||
if(this.addressItems && this.addressItems.length > 0){
|
||||
if (this.addressItems && this.addressItems.length > 0) {
|
||||
this.addressItems.forEach(item => {
|
||||
item.vinOutTime = this.getLocalTime(item.gtm);
|
||||
item.cityName = item.appAdress;
|
||||
@ -208,14 +211,14 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
trajectoryChange(event:any){
|
||||
if(event ==='car'){
|
||||
this.getTrajectory()
|
||||
}else if(event ==='driver'){
|
||||
}
|
||||
trajectoryChange(event: any) {
|
||||
if (event === 'car') {
|
||||
this.getTrajectory();
|
||||
} else if (event === 'driver') {
|
||||
this.getDriverTrajectory();
|
||||
}
|
||||
}
|
||||
}
|
||||
getLocalTime(time: any) {
|
||||
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user