edit
This commit is contained in:
@ -19,7 +19,7 @@ import { OrderManagementService } from '../../services/order-management.service'
|
||||
@Component({
|
||||
selector: 'app-supply-management-vehicle-detail',
|
||||
templateUrl: './vehicle-detail.component.html',
|
||||
styleUrls: ['./vehicle-detail.component.less']
|
||||
styleUrls: ['./vehicle-detail.component.less', '../../../commom/less/trajectory.less']
|
||||
})
|
||||
export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
id = this.route.snapshot.params.id;
|
||||
@ -46,7 +46,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
approvalLsit: any;
|
||||
isVisible = false;
|
||||
logColumns2: STColumn[] = [
|
||||
{ title: '时间', index: 'parkBte' },
|
||||
{ title: '时间', index: 'parkBte', width: 120, className: 'text-center' },
|
||||
{ title: '地点', index: 'parkAdr' }
|
||||
];
|
||||
logColumns3: STColumn[] = [
|
||||
@ -56,7 +56,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
operateLogColums: STColumn[] = [
|
||||
{ title: '内容', index: 'operationContent' },
|
||||
{ title: '操作人', render: 'operator' },
|
||||
{ title: '操作时间', index: 'operatorTimestamp' },
|
||||
{ title: '操作时间', index: 'operatorTimestamp' }
|
||||
];
|
||||
logColumns: STColumn[] = [
|
||||
{ title: '款项', index: 'expenseCodeLabel' },
|
||||
@ -84,7 +84,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
this.getTrajectory();
|
||||
}
|
||||
get logParams() {
|
||||
return { operateObject: this.i?.billCode, operateTypeList: ['3','8'] }
|
||||
return { operateObject: this.i?.billCode, operateTypeList: ['3', '8'] };
|
||||
}
|
||||
initData() {
|
||||
this.service.request(this.service.$api_get_getWholeBillDetail, { id: this.id }).subscribe(res => {
|
||||
@ -108,22 +108,24 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
time: '计划卸货时间:' + res.unloadPlanTime
|
||||
}
|
||||
];
|
||||
this.service.request(this.service.$api_get_log_list,{operateObject: this.i?.billCode, operateTypeList: ['3','8']}).subscribe(res => {
|
||||
if (res) {
|
||||
console.log('操作日志');
|
||||
console.log(res);
|
||||
let a :any= []
|
||||
res.records.forEach((item: any) => {
|
||||
a.push({
|
||||
value: `操作人: ${item.operator} <br /> 操作内容: ${ item.operationContent}`,
|
||||
time: item.operatorTimestamp,
|
||||
color: 'green'
|
||||
})
|
||||
})
|
||||
console.log(a);
|
||||
this.operationList = a;
|
||||
}
|
||||
});
|
||||
this.service
|
||||
.request(this.service.$api_get_log_list, { operateObject: this.i?.billCode, operateTypeList: ['3', '8'] })
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
console.log('操作日志');
|
||||
console.log(res);
|
||||
let a: any = [];
|
||||
res.records.forEach((item: any) => {
|
||||
a.push({
|
||||
value: `操作人: ${item.operator} <br /> 操作内容: ${item.operationContent}`,
|
||||
time: item.operatorTimestamp,
|
||||
color: 'green'
|
||||
});
|
||||
});
|
||||
console.log(a);
|
||||
this.operationList = a;
|
||||
}
|
||||
});
|
||||
this.billExpenses = this.i?.billExpenseDetails?.filter(
|
||||
(data: any) => data.expenseCode === 'PRE' || data.expenseCode === 'RECE' || data.expenseCode === 'BACK'
|
||||
);
|
||||
@ -140,10 +142,9 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
if (res) {
|
||||
console.log('异常预警');
|
||||
console.log(res);
|
||||
this.warringList = res
|
||||
this.warringList = res;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
// 取消订单
|
||||
cancellation() {
|
||||
@ -185,7 +186,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
this.isVisible = false;
|
||||
}
|
||||
|
||||
goDistance(elf: NzCardComponent) {
|
||||
goDistance(elf: any) {
|
||||
if (elf) {
|
||||
elf['elementRef'].nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'start' });
|
||||
// elf['elementRef'].nativeElement.className = 'target-fix'
|
||||
@ -205,11 +206,14 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
});
|
||||
});
|
||||
this.mapList = list;
|
||||
this.addressItems = res.parkArray;
|
||||
if (this.addressItems && this.addressItems.length > 0) {
|
||||
this.addressItems.forEach(item => {
|
||||
const addressItems: any[] = res.parkArray;
|
||||
if (addressItems?.length > 0) {
|
||||
addressItems.forEach(item => {
|
||||
item.parkBte = this.getLocalTime(item.parkBte);
|
||||
});
|
||||
this.addressItems = [...addressItems];
|
||||
} else {
|
||||
this.addressItems = [];
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -228,13 +232,17 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
time: item.gtm
|
||||
});
|
||||
});
|
||||
this.mapList = list;
|
||||
this.addressItems = [...res.enclosureDataAppTrack];
|
||||
if (this.addressItems && this.addressItems.length > 0) {
|
||||
this.addressItems.forEach(item => {
|
||||
item.vinOutTime = this.getLocalTime(item.gtm);
|
||||
item.cityName = item.appAdress;
|
||||
this.mapList = list || [];
|
||||
const addressItems = [...res.tracks];
|
||||
if (addressItems) {
|
||||
addressItems.forEach(item => {
|
||||
// item.parkBte = item.gtm;
|
||||
item.parkBte = this.getLocalTime(item.gtm);
|
||||
item.parkAdr = item.appAdress;
|
||||
});
|
||||
this.addressItems = [...addressItems];
|
||||
} else {
|
||||
this.addressItems = [];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user