This commit is contained in:
wangshiming
2022-02-28 15:55:57 +08:00
parent 03b1d6da82
commit 394aba4ba1
10 changed files with 689 additions and 361 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-02-22 13:53:29
* @LastEditors : Shiming
* @LastEditTime : 2022-02-22 15:51:53
* @LastEditTime : 2022-02-28 15:12:10
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\cancel-confirm\\cancel-confirm.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -75,6 +75,7 @@ export class OneCarOrderCancelConfirmComponent implements OnInit {
initData() {
let indexId = 0
let index = 0
let indexSurcharge = 0
this.i?.mybidDetailInfo.forEach((ele: any) => {
if(this.sts == 1) {
// 大宗
@ -83,25 +84,21 @@ export class OneCarOrderCancelConfirmComponent implements OnInit {
}
if (ele?.paymentStatusLabel == '已支付') {
indexId += 1;
indexSurcharge += ele?.surcharge;
}
} else {
// 整车
if (ele?.paymentStatusLabel == '已支付') {
indexId += 1;
index += ele?.price;
indexSurcharge += ele?.surcharge;
}
console.log(ele.expenseCode)
}
if (ele.expenseCode == '"ATT"' || ele.expenseCode == 'ATT'){
if(ele?.paymentStatusLabel == '已支付') {
this.ATTPrice = ele.price;
} else {
this.ATTPrice = 0;
}
}
});
this.index = indexId
this.List = index
this.ATTPrice = indexSurcharge
console.log(this.index)
console.log(this.List)
}

View File

@ -0,0 +1,34 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-02-22 13:53:29
* @LastEditors : Shiming
* @LastEditTime : 2022-02-28 14:35:50
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<div nz-row>
<nz-card nzTitle="轨迹信息" style="width: 100%" id="distannce5" [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>
</div>
<div nz-col [nzSpan]="12" class="mapBox">
<amap-path-simplifier style="width: 400px !important;" [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>
<div class="modal-footer">
<button nz-button type="button" (click)="close(false)">取消</button>
<button nz-button type="submit" nzType="primary" (click)="close(true)">确认</button>
</div>

View File

@ -0,0 +1,11 @@
:host {
::ng-deep {
.mapBox {
iframe, canvas {
width: 400px !important;
}
}
}
}

View File

@ -0,0 +1,98 @@
/*
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-02-22 13:53:29
* @LastEditors : Shiming
* @LastEditTime : 2022-02-28 14:37:42
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn } from '@delon/abc/st';
import {
SFComponent,
SFCustomWidgetSchema,
SFNumberWidgetSchema,
SFRadioWidgetSchema,
SFSchema,
SFTextareaWidgetSchema,
SFUISchema
} from '@delon/form';
import format from 'date-fns/format';
import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
import { OrderManagementService } from '../../../services/order-management.service';
@Component({
selector: 'app-order-management-view-track',
styleUrls: ['./view-track.component.less'],
templateUrl: './view-track.component.html'
})
export class OneCarOrderViewtrackComponent implements OnInit {
i: any; // 单行数据
MapList: any; // 地图数据
trajectory = 'car';
addressItems: any[] = []; //打点地址数据组
logColumns: STColumn[] = [
{ title: '款项', index: 'expenseCodeLabel' },
{ title: '小计(元)', render: 'price' },
{ title: '运输费(元)', render: 'price' },
{ title: '附加费(元)', render: 'surcharge' },
{ title: '支付时间', index: 'paymentTime' },
{
title: '支付状态',
className: 'text-center',
index: 'paymentStatus',
type: 'badge',
width: '120px',
badge: {
'1': { text: '待申请', color: 'warning' },
'2': { text: '已支付', color: 'success' },
'3': { text: '已拒绝', color: 'warning' },
'4': { text: '申请中', color: 'warning' }
}
}
];
constructor(
private modalRef: NzModalRef,
private modal: NzModalService,
private msgSrv: NzMessageService,
public service: OrderManagementService
) {}
ngOnInit(): void {
console.log(this.i);
this.MapInit();
}
// 获取轨迹
MapInit() {
this.service.request(this.service.$api_get_getTrajectory, { id: this.i.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);
});
}
}
});
}
close(value: boolean): void {
this.modalRef.close(false);
}
getLocalTime(time: any) {
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
}
}