This commit is contained in:
Taric Xin
2022-02-22 17:39:43 +08:00
parent 2d185ebd19
commit a33112d166
3 changed files with 28 additions and 14 deletions

View File

@ -22,7 +22,7 @@
{{headerInfo?.vatinvHAmount}} / {{headerInfo?.vatinvHAmount}}
</se>
<se label="已开发票张数">
2
{{headerInfo?.vatinvHNum}}
</se>
</div>
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
@ -50,7 +50,7 @@
{{headerInfo?.vatname}}
</se>
<se label="销货清单">
{{headerInfo?.isdetail}}
{{headerInfo?.isdetail?'是':'否'}}
</se>
<se label="其他要求">
{{headerInfo?.otherremarks}}
@ -96,15 +96,13 @@
<strong class="text-red">{{ selectedRows.length }}</strong> 条数据&nbsp;&nbsp; 开票金额总计 <strong
class="text-red">{{
totalCallNo }}</strong>
<a *ngIf="totalCallNo > 0" (click)="st.clearCheck()" class="ml-lg">清空</a>
<a *ngIf="selectedRows.length > 0" (click)="st.clearCheck()" class="ml-lg">清空</a>
</div>
</div>
<st #st [data]="service.$api_get_invoice_requested_order_detail" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '200px' }" (change)="stChange($event)">
<st #st [data]="service.$api_get_invoice_requested_order_detail" [columns]="columns" [req]="{ process: beforeReq }"
[res]="{ process: afterRes }" [loading]="service.http.loading" [scroll]="{ x:'1200px',y: '200px' }"
(change)="stChange($event)">
<ng-template st-row="billHCode" let-item let-index="index" let-column="column">
<a class="text-primary" (click)="routeToOrder(item)"> {{ item.billHCode }}</a>
</ng-template>

View File

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

View File

@ -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: {