edit
This commit is contained in:
@ -33,11 +33,18 @@ export class InvoiceDetailComponent implements OnInit {
|
||||
isEdit = false;
|
||||
|
||||
headerInfo: any = {};
|
||||
|
||||
routesInfo: any = {
|
||||
mailNo: '',
|
||||
routes: []
|
||||
};
|
||||
constructor(public service: TicketService, private route: ActivatedRoute) {
|
||||
this.isCanEdit = !!route.snapshot.queryParams.type;
|
||||
const expressno = route.snapshot.queryParams.expressno;
|
||||
const id = route.snapshot.params.id;
|
||||
this.loadInvoiceHeader(id);
|
||||
if (expressno) {
|
||||
this.loadRoutes(expressno);
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit(): void {}
|
||||
@ -60,7 +67,15 @@ export class InvoiceDetailComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
loadRoutes(expressno: string) {
|
||||
this.service.request(this.service.$api_get_express_routes, expressno).subscribe(res => {
|
||||
console.log(res);
|
||||
if (res) {
|
||||
res.routes = res.routes.map((route: any) => ({ time: route.acceptTime, value: route.remark + route.acceptAddress, color: 'gray' }));
|
||||
this.routesInfo = res;
|
||||
}
|
||||
});
|
||||
}
|
||||
goBack() {
|
||||
history.go(-1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user