This commit is contained in:
1107302052
2022-03-18 15:42:50 +08:00
parent 68ab611223
commit f298ead5bb
12 changed files with 59 additions and 95 deletions

View File

@ -281,7 +281,7 @@
<sv label="协议附件">
<!-- {{i?.supplementaryInformationVO?.stateReceipt?'是':'否'}} -->
<a href="javascript:;" (click)="agreement('1')">查看附件</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="javascript:;" (click)="agreement('2')">补充协议</a>
<a target="_blank" [routerLink]="['/agreement']" [queryParams]="{ type: 8 }">补充协议</a>
</sv>
</sv-container>
<sv-container col="2" class="mt-md">
@ -360,6 +360,7 @@
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="附件信息" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
<ng-container *nzModalContent>
<div *ngIf="!imges">暂无附件信息</div>
<app-imagelist [imgList]="imges"></app-imagelist>
</ng-container>
<ng-template #nzModalFooter>

View File

@ -908,11 +908,7 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit {
});
};
agreement(value: any) {
if (value === '1') {
this.imges = this.i?.supplementAgreement;
} else if (value === '2') {
this.imges = this.i?.supplementAgreement;
}
this.imges = this.i?.agreementFilePath;
this.isVisible = true;
}
handleCancel() {

View File

@ -162,7 +162,7 @@
<sv label="协议附件">
<!-- {{i?.supplementaryInformationVO?.stateReceipt?'是':'否'}} -->
<a href="javascript:;" (click)="agreement('1')">查看附件</a> &nbsp;&nbsp;&nbsp;&nbsp;
<a href="javascript:;" (click)="agreement('2')">补充协议</a>
<a target="_blank" [routerLink]="['/agreement']" [queryParams]="{ type: 8 }">补充协议</a>
</sv>
</sv-container>
<sv-container col="2" class="mt-md">
@ -248,6 +248,7 @@
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="附件信息" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
<ng-container *nzModalContent>
<div *ngIf="!imges">暂无附件信息</div>
<app-imagelist [imgList]="imges"></app-imagelist>
</ng-container>
<ng-template #nzModalFooter>

View File

@ -112,11 +112,7 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
this.router.navigate(['order-management/bulk-detailChange', this.id]);
}
agreement(value: any) {
if (value === '1') {
this.imges = this.i?.supplementAgreement;
} else if (value === '2') {
this.imges = this.i?.supplementAgreement;
}
this.imges = this.i?.agreementFilePath;
this.isVisible = true;
}
handleCancel() {

View File

@ -256,7 +256,7 @@
<sv label="协议附件">
<!-- {{i?.supplementaryInformationVO?.stateReceipt?'是':'否'}} -->
<a href="javascript:;" (click)="agreement('1')">查看附件</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="javascript:;" (click)="agreement('2')">补充协议</a>
<a target="_blank" [routerLink]="['/agreement']" [queryParams]="{ type: 8 }">补充协议</a>
</sv>
</sv-container>
<sv-container col="2" class="mt-md">
@ -333,6 +333,7 @@
</nz-card>
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="附件信息" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
<ng-container *nzModalContent>
<div *ngIf="!imges">暂无附件信息</div>
<app-imagelist [imgList]="imges"></app-imagelist>
</ng-container>
<ng-template #nzModalFooter>

View File

@ -855,11 +855,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
});
};
agreement(value: any) {
if (value === '1') {
this.imges = this.i?.supplementAgreement;
} else if (value === '2') {
this.imges = this.i?.supplementAgreement;
}
this.imges = this.i?.agreementFilePath;
this.isVisible = true;
}
handleCancel() {

View File

@ -168,7 +168,7 @@
<sv label="协议附件">
<!-- {{i?.supplementaryInformationVO?.stateReceipt?'是':'否'}} -->
<a href="javascript:;" (click)="agreement('1')">查看附件</a> &nbsp;&nbsp;&nbsp;&nbsp;
<a href="javascript:;" (click)="agreement('2')">补充协议</a>
<a target="_blank" [routerLink]="['/agreement']" [queryParams]="{ type: 8 }">补充协议</a>
</sv>
</sv-container>
<sv-container col="2" class="mt-md">
@ -230,6 +230,7 @@
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="附件信息" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
<ng-container *nzModalContent>
<div *ngIf="!imges">暂无附件信息</div>
<app-imagelist [imgList]="imges"></app-imagelist>
</ng-container>
<ng-template #nzModalFooter>

View File

@ -124,11 +124,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
this.router.navigate(['order-management/vehicle-detailChange', this.id]);
}
agreement(value: any) {
if (value === '1') {
this.imges = this.i?.agreementFilePath;
} else if (value === '2') {
this.imges = this.i?.agreementFilePath;
}
this.imges = this.i?.agreementFilePath;
this.isVisible = true;
}
handleCancel() {

View File

@ -182,7 +182,7 @@
<sv label="协议附件">
<!-- {{i?.supplementaryInformationVO?.stateReceipt?'是':'否'}} -->
<a href="javascript:;" (click)="agreement('1')">查看附件</a> &nbsp;&nbsp;&nbsp;&nbsp;
<a href="javascript:;" (click)="agreement('2')">补充协议</a>
<a target="_blank" [routerLink]="['/agreement']" [queryParams]="{ type: 8 }">补充协议</a>
</sv>
</sv-container>
<sv-container col="2" class="mt-md">
@ -248,6 +248,7 @@
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="附件信息" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
<ng-container *nzModalContent>
<div *ngIf="!imges">暂无附件信息</div>
<app-imagelist [imgList]="imges"></app-imagelist>
</ng-container>
<ng-template #nzModalFooter>

View File

@ -102,17 +102,7 @@ export class WaybillManagementBulkeDetailComponent implements OnInit {
window.history.go(-1);
}
agreement(value: any) {
console.log('123')
console.log(value)
if(value === '1') {
this.imges = this.i?.supplementAgreement
} else if (value === '2') {
this.imges = this.i?.loadingCertificate
} else if (value === '3') {
this.imges = this.i?.unLoadingCertificate
} else if (value === '4') {
this.imges = this.i?.receiptCertificate
}
this.imges = this.i?.agreementFilePath
this.isVisible = true;
}
handleCancel() {

View File

@ -164,7 +164,7 @@
<sv label="协议附件">
<!-- {{i?.supplementaryInformationVO?.stateReceipt?'是':'否'}} -->
<a href="javascript:;" (click)="agreement('1')">查看附件</a> &nbsp;&nbsp;&nbsp;&nbsp;
<a href="javascript:;" (click)="agreement('2')">补充协议</a>
<a target="_blank" [routerLink]="['/agreement']" [queryParams]="{ type: 8 }">补充协议</a>
</sv>
</sv-container>
<sv-container col="2" class="mt-md">
@ -228,6 +228,7 @@
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="附件信息" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
<ng-container *nzModalContent>
<div *ngIf="!imges">暂无附件信息</div>
<app-imagelist [imgList]="imges"></app-imagelist>
</ng-container>
<ng-template #nzModalFooter>

View File

@ -24,12 +24,11 @@ import { WaybillManagementServe } from '../../services/waybill-management.servic
styleUrls: ['./vehicle-detail.component.less']
})
export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestroy {
id = this.route.snapshot.params.id;
MapList: any[]=[];
MapList: any[] = [];
trajectory = 'car';
mapList:any[] = []; //地图点位数据组
addressItems:any[] = []; //打点地址数据组
mapList: any[] = []; //地图点位数据组
addressItems: any[] = []; //打点地址数据组
i: any;
totalObj: any;
attObj: any;
@ -50,7 +49,7 @@ export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestro
{
title: '支付状态',
className: 'text-center',
index: 'paymentStatusLabel',
index: 'paymentStatusLabel'
}
];
@ -60,19 +59,16 @@ export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestro
private route: ActivatedRoute,
private msgSrv: NzMessageService,
private service: WaybillManagementServe,
private modal: NzModalService,
) {
}
private modal: NzModalService
) {}
ngOnDestroy(): void {
this.subscribeScoll.unsubscribe();
}
ngOnInit(): void {
this.initData()
this.getTrajectory()
this.initData();
this.getTrajectory();
this.subscribeScoll = fromEvent(window, 'scroll').subscribe(event => {
this.scrollTop = document.documentElement.scrollTop;
});
@ -80,48 +76,38 @@ export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestro
initData() {
const params = {
id: this.id
}
this.service.request(this.service.$api_get_getWholeDetail, params).subscribe((res) => {
console.log(res)
this.unLoadingPlaceVOList.push(...res.loadingPlace)
this.unLoadingPlaceVOList.push(...res.dischargePlace)
console.log(this.unLoadingPlaceVOList)
};
this.service.request(this.service.$api_get_getWholeDetail, params).subscribe(res => {
console.log(res);
this.unLoadingPlaceVOList.push(...res.loadingPlace);
this.unLoadingPlaceVOList.push(...res.dischargePlace);
console.log(this.unLoadingPlaceVOList);
this.i = res;
this.billExpenses = this.i?.billExpenseDetailVOList?.filter(
(data: any) => data.costCode === 'PRE' || data.costCode === 'RECE' || data.costCode === 'BACK'
);
this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data: any) => data.displayStatus !== 'HIDE');
})
});
}
goBack() {
window.history.go(-1);
}
agreement(value: any) {
console.log('123')
console.log(value)
if(value === '1') {
this.imges = this.i?.supplementAgreement
} else if (value === '2') {
this.imges = this.i?.loadingCertificate
} else if (value === '3') {
this.imges = this.i?.unLoadingCertificate
} else if (value === '4') {
this.imges = this.i?.receiptCertificate
}
this.imges = this.i?.agreementFilePath;
this.isVisible = true;
}
handleCancel() {
this.isVisible = false
}
handleOK() {
this.isVisible = false
}
goDistance(elf: NzCardComponent) {
if (elf) {
elf['elementRef'].nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'start' });
this.isVisible = false;
}
handleOK() {
this.isVisible = false;
}
goDistance(elf: NzCardComponent) {
if (elf) {
elf['elementRef'].nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'start' });
}
}
}
// *确认发车
sureDepart(item: any) {
@ -136,9 +122,8 @@ goDistance(elf: NzCardComponent) {
nzFooter: null
});
modalRef.afterClose.subscribe((result: any) => {
this.initData()
});
this.initData();
});
}
// 确认到车
sureArrive(item: any) {
@ -153,17 +138,16 @@ goDistance(elf: NzCardComponent) {
nzFooter: null
});
modalRef.afterClose.subscribe((result: any) => {
this.initData()
});
this.initData();
});
}
// 获取车辆轨迹
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,
@ -172,7 +156,7 @@ goDistance(elf: NzCardComponent) {
});
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);
});
@ -181,12 +165,12 @@ goDistance(elf: NzCardComponent) {
});
}
// 获取司机轨迹
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,
@ -195,7 +179,7 @@ goDistance(elf: NzCardComponent) {
});
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;
@ -203,14 +187,14 @@ goDistance(elf: NzCardComponent) {
}
}
});
}
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');
}