From 1b42d9347eaa5ae2d88062db58c3d98a2db2ce71 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 13 May 2022 10:42:27 +0800 Subject: [PATCH] fix bug --- .../etc-invoiced-list.component.html | 45 +++++++++++-------- .../etc-invoiced-list.component.ts | 26 ++++++++++- .../services/ticket.service.ts | 4 +- 3 files changed, 55 insertions(+), 20 deletions(-) diff --git a/src/app/routes/ticket-management/components/etc-invoiced-list/etc-invoiced-list.component.html b/src/app/routes/ticket-management/components/etc-invoiced-list/etc-invoiced-list.component.html index ddc2932f..51392472 100644 --- a/src/app/routes/ticket-management/components/etc-invoiced-list/etc-invoiced-list.component.html +++ b/src/app/routes/ticket-management/components/etc-invoiced-list/etc-invoiced-list.component.html @@ -21,23 +21,32 @@ --> -
- -
- - -
+
+ +
+ + +
+
- - - {{item.driverName}}
{{item.driverTelephone}} -
- - {{item.licenseCarNo}}
{{item.licenseBelonging}} -
-
- \ No newline at end of file + + + {{ item.driverName }}
{{ item.driverTelephone }} +
+ + {{ item.licenseCarNo }}
{{ item.licenseBelonging }} +
+
+ diff --git a/src/app/routes/ticket-management/components/etc-invoiced-list/etc-invoiced-list.component.ts b/src/app/routes/ticket-management/components/etc-invoiced-list/etc-invoiced-list.component.ts index 1984c232..afe3793f 100644 --- a/src/app/routes/ticket-management/components/etc-invoiced-list/etc-invoiced-list.component.ts +++ b/src/app/routes/ticket-management/components/etc-invoiced-list/etc-invoiced-list.component.ts @@ -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); + } + }); + } } diff --git a/src/app/routes/ticket-management/services/ticket.service.ts b/src/app/routes/ticket-management/services/ticket.service.ts index 4e09936a..a0dc3c7a 100644 --- a/src/app/routes/ticket-management/services/ticket.service.ts +++ b/src/app/routes/ticket-management/services/ticket.service.ts @@ -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);