This commit is contained in:
wangshiming
2022-05-13 10:42:27 +08:00
parent b4dfcd43ef
commit 1b42d9347e
3 changed files with 55 additions and 20 deletions

View File

@ -24,20 +24,29 @@
<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()" acl
[acl-ability]="['FINANCIAL-VOUCHER-list']">筛选</button>
<button nz-button nzDanger (click)="exprot()" acl
[acl-ability]="['TICKET-ETC-INVOICE-LIST-export']">导出</button>
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl [acl-ability]="['FINANCIAL-VOUCHER-list']"
>筛选</button
>
<button nz-button nzDanger (click)="exprot()" acl [acl-ability]="['TICKET-ETC-INVOICE-LIST-export']">导出</button>
<button nz-button nzDanger (click)="sureInvoice()" acl [acl-ability]="['TICKET-ETC-INVOICE-LIST-export']">确认开票</button>
</div>
</div>
<st #st [data]="service.$api_get_invoice_record_page" [columns]="columns" [req]="{ process: beforeReq }"
[page]="{}" [loading]="false" [scroll]="{ x:'1200px' }">
<st
#st
[data]="service.$api_get_invoice_record_page"
[columns]="columns"
[req]="{ process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: afterRes }"
[page]="{}"
[loading]="false"
[scroll]="{ x: '1200px' }"
>
<ng-template st-row="call1No" let-item let-index="index" let-column="column">
{{item.driverName}}<br>{{item.driverTelephone}}
{{ item.driverName }}<br />{{ item.driverTelephone }}
</ng-template>
<ng-template st-row="call12No" let-item let-index="index" let-column="column">
{{item.licenseCarNo}}<br>{{item.licenseBelonging}}
{{ item.licenseCarNo }}<br />{{ item.licenseBelonging }}
</ng-template>
</st>
</nz-card>

View File

@ -38,7 +38,15 @@ export class ETCInvoicedListComponent extends BasicTableComponent implements OnI
}
return requestOptions;
};
afterRes = (data: any[], rawData?: any) => {
return data.map(item => ({
...item,
disabled: item.invoicingStatus !== '1' || item.invoicingStatus !== '9'
}));
};
get selectedRows() {
return this.st?.list.filter(item => item.checked) || [];
}
showDetail(item: any) {
const modal = this.nzModalService.create({
nzTitle: '运单交易明细',
@ -129,6 +137,7 @@ export class ETCInvoicedListComponent extends BasicTableComponent implements OnI
private initST(): STColumn[] {
return [
{ title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' },
{ title: '运单号', index: 'wayBillCode', width: 200 },
{ title: '订单号', index: 'billCode', width: 200 },
{
@ -177,4 +186,19 @@ export class ETCInvoicedListComponent extends BasicTableComponent implements OnI
exprot() {
this.service.exportStart({ ...this.sf?.value, pageSize: -1 }, this.service.$api_get_asyncExportEtcApplyRecordList);
}
sureInvoice() {
if (this.selectedRows.length <= 0) {
this.service.msgSrv.error('请选择订单!');
return;
}
let params: any[] = [];
this.selectedRows.forEach(item => {
params.push(item.id);
});
this.service.request(this.service.$api_updateEtcRecordStatus, params).subscribe(res => {
if (res) {
this.st.load(1);
}
});
}
}

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-12-29 13:12:35
* @LastEditTime : 2022-05-10 09:51:30
* @LastEditTime : 2022-05-13 10:38:32
* @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
@ -152,6 +152,8 @@ export class TicketService extends ShipperBaseService {
$api_export_InvoicedBillInfoPage = '/api/fcc/invoicedBillInfo/exportInvoicedBillInfoPage'
// 批量生成进项发票
$api_createFicoInpinv = '/api/fcc/ficoEtcInvoiceL/createFicoInpinv'
// 开票记录-确认开票
$api_updateEtcRecordStatus = '/api/fcc/ficoEtcRecord/updateEtcRecordStatus'
constructor(public injector: Injector) {
super(injector);