fix bug
This commit is contained in:
@ -202,17 +202,23 @@
|
||||
|
||||
<nz-card>
|
||||
<div nz-row>
|
||||
<nz-card nzTitle="轨迹信息" style="width: 100%" #distannce5>
|
||||
<nz-card nzTitle="轨迹信息" style="width: 100%" [nzExtra]="extraTemplate" #distannce5>
|
||||
<div nz-row>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<!-- <st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
</st> -->
|
||||
<st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
</st>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<amap-path-simplifier></amap-path-simplifier>
|
||||
<amap-path-simplifier [MapList]="MapList"></amap-path-simplifier>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
<ng-template #extraTemplate>
|
||||
<nz-radio-group [(ngModel)]="trajectory">
|
||||
<label nz-radio-button nzValue="car">车辆轨迹</label>
|
||||
<label nz-radio-button nzValue="driver">司机轨迹</label>
|
||||
</nz-radio-group>
|
||||
</ng-template>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
/*
|
||||
* @Description :
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-06 20:20:26
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:18:24
|
||||
* @LastEditTime : 2022-02-22 10:16:11
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -17,14 +17,15 @@ import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { OrderManagementService } from '../../services/order-management.service';
|
||||
import { NzCardComponent } from 'ng-zorro-antd/card';
|
||||
import format from 'date-fns/format';
|
||||
|
||||
@Component({
|
||||
selector: 'app-supply-management-bulk-detail',
|
||||
templateUrl: './bulk-detail.component.html',
|
||||
styleUrls: ['./bulk-detail.component.less']
|
||||
})
|
||||
export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
|
||||
|
||||
MapList: any;
|
||||
id = this.route.snapshot.params.id;
|
||||
i: any;
|
||||
imges: any;
|
||||
@ -46,75 +47,99 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
'1': { text: '待申请', color: 'warning' },
|
||||
'2': { text: '已支付', color: 'success' },
|
||||
'3': { text: '已拒绝', color: 'warning' },
|
||||
'4': { text: '申请中', color: 'warning' },
|
||||
},
|
||||
},
|
||||
'4': { text: '申请中', color: 'warning' }
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
trajectory = 'car';
|
||||
addressItems: any[] = []; //打点地址数据组
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private msgSrv: NzMessageService,
|
||||
private service: OrderManagementService,
|
||||
private router: Router,
|
||||
private modal: NzModalService,
|
||||
) {
|
||||
|
||||
}
|
||||
private modal: NzModalService
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initData()
|
||||
this.initData();
|
||||
this.MapInit();
|
||||
}
|
||||
|
||||
initData() {
|
||||
this.service.request(this.service.$api_getBulkBillDetail, {id: this.id}).subscribe(res => {
|
||||
this.service.request(this.service.$api_getBulkBillDetail, { id: this.id }).subscribe(res => {
|
||||
if (res) {
|
||||
this.i =res;
|
||||
this.i = res;
|
||||
this.attObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'ATT')[0];
|
||||
this.totalObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TOTAL')[0];
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
// 修改订单
|
||||
// 修改订单
|
||||
changeOrder() {
|
||||
this.router.navigate(['order-management/bulk-detailChange', this.id])
|
||||
this.router.navigate(['order-management/bulk-detailChange', this.id]);
|
||||
}
|
||||
agreement(value: any) {
|
||||
if(value === '1') {
|
||||
this.imges = this.i?.supplementAgreement
|
||||
if (value === '1') {
|
||||
this.imges = this.i?.supplementAgreement;
|
||||
} else if (value === '2') {
|
||||
this.imges = this.i?.supplementAgreement
|
||||
}
|
||||
this.imges = this.i?.supplementAgreement;
|
||||
}
|
||||
this.isVisible = true;
|
||||
}
|
||||
handleCancel() {
|
||||
this.isVisible = false
|
||||
this.isVisible = false;
|
||||
}
|
||||
handleOK() {
|
||||
this.isVisible = false
|
||||
this.isVisible = false;
|
||||
}
|
||||
goDistance(elf: NzCardComponent) {
|
||||
if (elf) {
|
||||
elf['elementRef'].nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'start' });
|
||||
}
|
||||
}
|
||||
// 取消订单
|
||||
// 取消订单
|
||||
cancellation() {
|
||||
// api_get_cancelAnOrder
|
||||
this.modal.confirm({
|
||||
nzTitle: '<b>确定取消该订单吗?</b>',
|
||||
nzContent: `<b>取消后无法恢复,请确认</b>`,
|
||||
nzOnOk: () =>
|
||||
this.service.request(this.service.$api_get_cancelAnOrder, {id: this.id}).subscribe((res) => {
|
||||
if (res === true) {
|
||||
this.service.msgSrv.success('操作成功!');
|
||||
this.initData();
|
||||
}
|
||||
}),
|
||||
// api_get_cancelAnOrder
|
||||
this.modal.confirm({
|
||||
nzTitle: '<b>确定取消该订单吗?</b>',
|
||||
nzContent: `<b>取消后无法恢复,请确认</b>`,
|
||||
nzOnOk: () =>
|
||||
this.service.request(this.service.$api_get_cancelAnOrder, { id: this.id }).subscribe(res => {
|
||||
if (res === true) {
|
||||
this.service.msgSrv.success('操作成功!');
|
||||
this.initData();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
// 获取轨迹
|
||||
MapInit() {
|
||||
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
||||
if (res) {
|
||||
const points = res.trackArray;
|
||||
points?.forEach((item: any) => {
|
||||
this.MapList.push({
|
||||
name: item.hgt,
|
||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
||||
});
|
||||
});
|
||||
this.addressItems = res.parkArray;
|
||||
if (this.addressItems && this.addressItems.length > 0) {
|
||||
this.addressItems.forEach(item => {
|
||||
item.parkBte = this.getLocalTime(item.parkBte);
|
||||
item.parkEte = this.getLocalTime(item.parkEte);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getLocalTime(time: any) {
|
||||
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,8 +55,8 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
];
|
||||
trajectory = "car"
|
||||
addressItems:any[] = []; //打点地址数据组
|
||||
trajectory = 'car';
|
||||
addressItems: any[] = []; //打点地址数据组
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
@ -145,9 +145,9 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
// 获取轨迹
|
||||
MapInit(){
|
||||
MapInit() {
|
||||
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
||||
if (res) {
|
||||
const points = res.trackArray;
|
||||
@ -158,7 +158,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
});
|
||||
});
|
||||
this.addressItems = res.parkArray;
|
||||
if(this.addressItems && this.addressItems.length > 0){
|
||||
if (this.addressItems && this.addressItems.length > 0) {
|
||||
this.addressItems.forEach(item => {
|
||||
item.parkBte = this.getLocalTime(item.parkBte);
|
||||
item.parkEte = this.getLocalTime(item.parkEte);
|
||||
@ -167,9 +167,8 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getLocalTime(time:any) {
|
||||
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
|
||||
getLocalTime(time: any) {
|
||||
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user