This commit is contained in:
Taric Xin
2022-01-18 17:00:48 +08:00
parent 7d0d2fb7da
commit 09e1dd38f1
13 changed files with 369 additions and 64 deletions

View File

@ -12,8 +12,7 @@ import { PushInvoiceComponent } from './push-invoice/push-invoice.component';
@Component({
selector: 'app-cancellation-invoice',
templateUrl: './cancellation-invoice.component.html',
styleUrls: ['./cancellation-invoice.component.less'],
providers: [CurrencyPipe]
styleUrls: ['./cancellation-invoice.component.less']
})
export class CancellationInvoiceComponent implements OnInit {
@ViewChild('st', { static: true })
@ -31,12 +30,7 @@ export class CancellationInvoiceComponent implements OnInit {
totalCallNo = 0;
openInfo: any = { invoicedate: null, invoiceno: null };
constructor(
public service: TicketService,
private nzModalService: NzModalService,
private router: Router,
private currencyPipe: CurrencyPipe
) {}
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
ngOnInit(): void {}
@ -282,9 +276,10 @@ export class CancellationInvoiceComponent implements OnInit {
{
title: '价税合计',
index: 'vatmoney',
width: 90,
type: 'currency',
format: item => `${this.currencyPipe.transform(item.vatmoney)}`
width: 120,
type: 'widget',
className: 'text-right font-weight-bold',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatmoney }) }
},
{
title: '金额',
@ -314,7 +309,10 @@ export class CancellationInvoiceComponent implements OnInit {
buttons: [
{
text: '查看明细',
click: item => this.router.navigate(['ticket/cancellation-invoice/detail/' + item.id], { queryParams: { type: 1 } })
click: item =>
this.router.navigate(['ticket/cancellation-invoice/detail/' + item.id], {
queryParams: { type: 1, expressno: item.expressno }
})
},
{
text: '手工开票',

View File

@ -144,9 +144,9 @@
</st>
</nz-tab>
<nz-tab nzTitle="快递轨迹">
<p style="font-weight: 600;">顺丰快递: SF123456789 <nz-tag [nzColor]="'#2db7f5'" class="ml-md">已签收</nz-tag>
<p style="font-weight: 600;">顺丰快递: {{routesInfo?.mailNo}} <nz-tag [nzColor]="'#2db7f5'" class="ml-md">已签收</nz-tag>
</p>
<app-logistics-time-line></app-logistics-time-line>
<app-logistics-time-line [data]="routesInfo?.routes"></app-logistics-time-line>
</nz-tab>
</nz-tabset>

View File

@ -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);
}

View File

@ -52,8 +52,8 @@
<ng-template #logosticsLogsModal>
<p class="mb-xl">
顺丰快递: SF123456789
顺丰快递: {{routesInfo?.mailNo}}
<nz-tag [nzColor]="'#2db7f5'" class="ml-md">已签收</nz-tag>
</p>
<app-logistics-time-line></app-logistics-time-line>
<app-logistics-time-line [data]="routesInfo?.routes"></app-logistics-time-line>
</ng-template>

View File

@ -9,7 +9,7 @@ import { TicketService } from '../../services/ticket.service';
@Component({
selector: 'app-invoiced-list',
templateUrl: './invoiced-list.component.html',
styleUrls: ['./invoiced-list.component.less'],
styleUrls: ['./invoiced-list.component.less']
})
export class InvoicedListComponent implements OnInit {
@ViewChild('st', { static: true })
@ -25,11 +25,12 @@ export class InvoicedListComponent implements OnInit {
selectedRows: any[] = [];
totalCallNo = 0;
constructor(
public service: TicketService,
private nzModalService: NzModalService,
private router: Router,
) {}
routesInfo: any = {
mailNo: '',
routes: []
};
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
ngOnInit(): void {}
@ -80,11 +81,18 @@ export class InvoicedListComponent implements OnInit {
}
showlogosticsLogs(item: any) {
this.nzModalService.create({
nzTitle: '查看物流',
nzWidth: 600,
nzContent: this.logosticsLogsModal,
nzFooter: []
this.service.request(this.service.$api_get_express_routes, item.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;
this.nzModalService.create({
nzTitle: '查看物流',
nzWidth: 600,
nzContent: this.logosticsLogsModal,
nzFooter: []
});
}
});
}
@ -217,7 +225,10 @@ export class InvoicedListComponent implements OnInit {
buttons: [
{
text: '查看明细',
click: item => this.router.navigate(['/ticket/invoice-list/detail/' + item.id])
click: item =>
this.router.navigate(['/ticket/invoice-list/detail/' + item.id], {
queryParams: { expressno: item.expressno }
})
},
{
text: '查看物流',

View File

@ -96,6 +96,9 @@ export class TicketService extends ShipperBaseService {
// 查询进项发票明细
$api_get_input_invoice_detail_page = '/api/fcc/ficoInpinvL/list/page';
// 查询快递轨迹
$api_get_express_routes = '/api/fcc/ficoExpressH/searchRoutes';
constructor(public injector: Injector, public eaCacheSrv: EACacheService) {
super(injector, eaCacheSrv);
}