fix bug
This commit is contained in:
@ -1,3 +1,13 @@
|
||||
<!--
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-05-06 15:31:19
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-05-10 09:47:38
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\ticket-management\\components\\etc-invoiced-logs\\etc-invoiced-logs.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
<!-- <page-header-wrapper [title]="'已开发票'">
|
||||
</page-header-wrapper>
|
||||
<nz-card class="search-box" nzBordered>
|
||||
@ -21,18 +31,26 @@
|
||||
</nz-card> -->
|
||||
|
||||
<nz-card class="table-box">
|
||||
<div class="header_box">
|
||||
<label class="page_title"> <label class="driver">|</label> 已开发票</label>
|
||||
<div class="mr-sm">
|
||||
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()">筛选</button>
|
||||
<button nz-button nzDanger (click)="exportList()" acl
|
||||
[acl-ability]="['TICKET-ETC-INVOICE-LOGS-export']">导出</button>
|
||||
</div>
|
||||
<div class="header_box">
|
||||
<label class="page_title"> <label class="driver">|</label> 已开发票</label>
|
||||
<div class="mr-sm">
|
||||
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()">筛选</button>
|
||||
<button nz-button nzDanger (click)="exportList()" acl [acl-ability]="['TICKET-ETC-INVOICE-LOGS-export']">导出</button>
|
||||
<button nz-button nzDanger (click)="batchInvoice()" acl [acl-ability]="['TICKET-ETC-INVOICE-LOGS-export']">批量开票</button>
|
||||
</div>
|
||||
<st #st [data]="service.$api_get_invoice_logs_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
|
||||
[loading]="false" [scroll]="{ x:'1200px',y:scrollY }">
|
||||
<ng-template st-row="call3No" let-item let-index="index" let-column="column">
|
||||
{{item.driverName}}<br>{{item.driverCellphone}}
|
||||
</ng-template>
|
||||
</st>
|
||||
</nz-card>
|
||||
</div>
|
||||
<st
|
||||
#st
|
||||
[data]="service.$api_get_invoice_logs_page"
|
||||
[columns]="columns"
|
||||
[req]="{ process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: afterRes }"
|
||||
[page]="{}"
|
||||
[loading]="false"
|
||||
[scroll]="{ x: '1200px', y: scrollY }"
|
||||
>
|
||||
<ng-template st-row="call3No" let-item let-index="index" let-column="column">
|
||||
{{ item.driverName }}<br />{{ item.driverCellphone }}
|
||||
</ng-template>
|
||||
</st>
|
||||
</nz-card>
|
||||
|
||||
@ -41,7 +41,12 @@ export class ETCInvoicedLogsComponent extends BasicTableComponent {
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
afterRes = (data: any[], rawData?: any) => {
|
||||
return data.map(item => ({
|
||||
...item,
|
||||
disabled: item.isCreationInpinv == '1'
|
||||
}));
|
||||
};
|
||||
routeTo(item: any) {
|
||||
return;
|
||||
this.router.navigate(['/ticket/invoice-requested-detail/1']);
|
||||
@ -135,6 +140,7 @@ export class ETCInvoicedLogsComponent extends BasicTableComponent {
|
||||
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' },
|
||||
{ title: '发票号码', index: 'invoiceNum', width: 100, type: 'link', click: item => this.routeTo(item) },
|
||||
{ title: '发票代码', index: 'invoiceCode', width: 130 },
|
||||
{ title: '订单号', index: 'billCode', width: 180 },
|
||||
@ -183,7 +189,46 @@ export class ETCInvoicedLogsComponent extends BasicTableComponent {
|
||||
{ title: '交易时间', index: 'exTime', type: 'date', width: 150 },
|
||||
{ title: '开票日期', index: 'invoiceMakeTime', type: 'date', width: 150 },
|
||||
{ title: '销售方', index: 'sellerName', width: 150 },
|
||||
{ title: '网络货运人', index: 'enterpriseInfoName', width: 220 }
|
||||
{ title: '网络货运人', index: 'enterpriseInfoName', width: 220 },
|
||||
{
|
||||
title: '操作',
|
||||
width: '120px',
|
||||
fixed: 'right',
|
||||
className: 'text-center',
|
||||
buttons: [
|
||||
{
|
||||
text: '开票',
|
||||
acl: { ability: ['TICKET-CANCELLATION-view'] },
|
||||
click: item => {
|
||||
this.batchInvoice(item)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
get selectedRows() {
|
||||
return this.st?.list.filter(item => item.checked) || [];
|
||||
}
|
||||
batchInvoice(item?: { id: any; }) {
|
||||
let params: any[] = [];
|
||||
if(item) {
|
||||
params.push(item.id);
|
||||
} else {
|
||||
if (this.selectedRows.length <= 0) {
|
||||
this.service.msgSrv.error('请选择订单!');
|
||||
return;
|
||||
}
|
||||
this.selectedRows.forEach(item => {
|
||||
params.push(item.id);
|
||||
});
|
||||
}
|
||||
|
||||
this.service.request(this.service.$api_createFicoInpinv, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('开票成功!')
|
||||
this.st.load(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-29 13:12:35
|
||||
* @LastEditTime : 2022-04-11 16:41:43
|
||||
* @LastEditTime : 2022-05-10 09:51:30
|
||||
* @LastEditors : Shiming
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\ticket-management\\services\\ticket.service.ts
|
||||
@ -150,6 +150,8 @@ export class TicketService extends ShipperBaseService {
|
||||
$api_invoicedBillInfo_page = '/api/fcc/invoicedBillInfo/getInvoicedBillInfoPage';
|
||||
// 可开票订单导出
|
||||
$api_export_InvoicedBillInfoPage = '/api/fcc/invoicedBillInfo/exportInvoicedBillInfoPage'
|
||||
// 批量生成进项发票
|
||||
$api_createFicoInpinv = '/api/fcc/ficoEtcInvoiceL/createFicoInpinv'
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
|
||||
Reference in New Issue
Block a user