From a33112d16695a25fe8d486e7971ee2f76c94ac80 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 22 Feb 2022 17:39:43 +0800 Subject: [PATCH] edit --- .../invoice-requested-detail.component.html | 14 ++++++-------- .../invoice-requested-detail.component.ts | 16 +++++++++++++--- .../components/freight/list/list.component.ts | 12 +++++++++--- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html index 6b667590..40f0f9c6 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html @@ -22,7 +22,7 @@ {{headerInfo?.vatinvHAmount}} / {{headerInfo?.vatinvHAmount}} - 2 + {{headerInfo?.vatinvHNum}}
@@ -50,7 +50,7 @@ {{headerInfo?.vatname}} - {{headerInfo?.isdetail}} + {{headerInfo?.isdetail?'是':'否'}} {{headerInfo?.otherremarks}} @@ -96,15 +96,13 @@ {{ selectedRows.length }} 条数据   开票金额总计 {{ totalCallNo }} - 清空 + 清空
- + {{ item.billHCode }} diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts index a47e88c8..4c47b8a3 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts @@ -5,7 +5,6 @@ import { SFComponent, SFSchema, SFDateWidgetSchema, SFTextWidgetSchema } from '@ import { NzModalService } from 'ng-zorro-antd/modal'; import { TicketService } from '../../../services/ticket.service'; import { RequestedDetailComponent } from '../requested-detail/requested-detail.component'; -import { RequestedInvoiceModalComponent } from '../requested-invoice-modal/requested-invoice-modal.component'; @Component({ selector: 'app-invoice-requested-detail', @@ -23,7 +22,7 @@ export class InvoiceRequestedDetailComponent implements OnInit { detail: any = {}; selectedRows: any[] = []; - totalCallNo = 0; + totalCallNo = '0'; _$expand = false; id = null; @@ -56,11 +55,22 @@ export class InvoiceRequestedDetailComponent implements OnInit { return requestOptions; }; + afterRes = (data: any[], rawData?: any) => { + this.totalCallNo = data.reduce((total, cv) => total + cv.billkpmoney, 0).toFixed(2); + return data.map(item => ({ + ...item + })); + }; + stChange(e: STChange): void { switch (e.type) { case 'checkbox': this.selectedRows = e.checkbox!; - this.totalCallNo = (this.selectedRows.reduce((total, cv) => total + cv.billkpmoney, 0)).toFixed(2);; + if (this.selectedRows?.length > 0) { + this.totalCallNo = this.selectedRows.reduce((total, cv) => total + cv.billkpmoney, 0).toFixed(2); + } else { + this.totalCallNo = this.st._data.reduce((total, cv) => total + cv.billkpmoney, 0).toFixed(2); + } break; case 'filter': this.st.load(); diff --git a/src/app/routes/usercenter/components/freight/list/list.component.ts b/src/app/routes/usercenter/components/freight/list/list.component.ts index 8106b46d..b1ecc885 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -77,8 +77,14 @@ export class FreightComponentsListComponent implements OnInit { nzWidth: 600, nzComponentParams: { isCanCreate: true, - url: '/api/fcc/accountBalance/getShipperAccountBalanceDetailByOperator', - params: { accountType: 1, roleId: item.id, ctfId: item.unifiedSocialCreditCode, clientName: item.enterpriseName } + url: '/api/fcc/accountBalance/getShipperAccountDetailByOperator', + params: { + accountType: 1, + roleId: item.id, + ctfId: item.unifiedSocialCreditCode, + clientName: item.enterpriseName, + ltdId: item.networkTransporter + } }, nzFooter: null }); @@ -138,7 +144,7 @@ export class FreightComponentsListComponent implements OnInit { { label: '全部', value: '' }, { label: '用户注册', value: 1 }, { label: '货主添加', value: 2 }, - { label: '运营添加', value: 3}, + { label: '运营添加', value: 3 } ], default: '', ui: {