This commit is contained in:
Taric Xin
2022-04-02 14:49:06 +08:00
parent 0cb20131b4
commit 407a7b624b
2 changed files with 23 additions and 20 deletions

View File

@ -30,6 +30,9 @@
<se label="税额">
{{ headerInfo?.vattax | currency }}
</se>
<se label="票面备注">
{{ headerInfo?.remarks }}
</se>
</div>
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
<se label="购买方">
@ -50,27 +53,24 @@
<se label="银行账户">
{{ headerInfo?.artoacc }}
</se>
<se label="票面备注">
{{ headerInfo?.remarks }}
<se label="其他要求">
{{headerInfo?.otherremarks || '-'}}
</se>
<!-- <se label="其他要求">
{{headerInfo?.otherremarks}}
</se> -->
</div>
<div *ngIf="isCanEdit" nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" class="text-right">
<div *ngIf="isCanEdit && selectedIndex===2" nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" class="text-right">
<ng-container *ngIf="isEdit; else elseTemplate">
<button nz-button (click)="isEdit = false; invoiceST?.load(1)">取消</button>
<button nz-button nzType="primary" (click)="saveInvoices()">保 存</button>
</ng-container>
<ng-template #elseTemplate>
<!-- <button nz-button nzType="primary" (click)="isEdit = true">修改</button> -->
<button nz-button nzType="primary" (click)="isEdit = true">修改</button>
</ng-template>
</div>
</div>
</nz-card>
<nz-card class="search-box" nzBordered>
<nz-tabset>
<nz-tabset [(nzSelectedIndex)]="selectedIndex">
<nz-tab nzTitle="订单明细">
<div nz-row nzGutter="8" class="mb-md">
<div nz-col [nzXl]="18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
@ -85,8 +85,8 @@
</div>
</div>
<st #orderST [scroll]="{ x: '1200px' }" [data]="service.$api_get_invoice_order_detail" [columns]="orderColumns" [page]="{}"
size="small" bordered="true" [req]="{ process: beforeReq }" [loading]="false"
<st #orderST [scroll]="{ x: '1200px' }" [data]="service.$api_get_invoice_order_detail" [columns]="orderColumns"
[page]="{}" size="small" bordered="true" [req]="{ process: beforeReq }" [loading]="false"
[scroll]="{ x: '1200px', y: '250px' }"></st>
</nz-tab>
<nz-tab nzTitle="费用明细">
@ -103,12 +103,16 @@
</div>
</div>
<st #costST [data]="service.$api_get_invoice_cost_detail" [columns]="costColumns" size="small" bordered="true" [page]="{}"
[req]="{ process: beforeReq }" [loading]="false" [scroll]="{ x: '1200px', y: '250px' }"></st>
<st #costST [data]="service.$api_get_invoice_cost_detail" [columns]="costColumns" size="small" bordered="true"
[page]="{}" [req]="{ process: beforeReq }" [loading]="false" [scroll]="{ x: '1200px', y: '250px' }">
<ng-template st-row="vatmoney" let-item let-index="index">
{{ item.billLType }}: {{ item.vatmoney |currency }}
</ng-template>
</st>
</nz-tab>
<nz-tab nzTitle="发票明细">
<st #invoiceST [data]="service.$api_get_invoice_details" [columns]="invoiceColumns" size="small" bordered="true" [page]="{}"
[req]="{ process: beforeReq }" [loading]="false" [scroll]="{ x: '1200px', y: '250px' }">
<st #invoiceST [data]="service.$api_get_invoice_details" [columns]="invoiceColumns" size="small" bordered="true"
[page]="{}" [req]="{ process: beforeReq }" [loading]="false" [scroll]="{ x: '1200px', y: '250px' }">
<ng-template st-row="vatname" let-item let-index="index">
<nz-select *ngIf="isEdit" [ngModel]="item.owner"
(ngModelChange)="invoiceST.setRow(index, { vatname: $event })" style="width: 100%">
@ -126,7 +130,7 @@
<ng-container *ngIf="!isEdit">{{ item.vatunit }}</ng-container>
</ng-template>
<ng-template st-row="vatqty" let-item let-index="index">
<input *ngIf="isEdit" nz-input [ngModel]="item.vatqty"
<input *ngIf="isEdit" nz-input [ngModel]="item.vatqty" type="number"
(ngModelChange)="invoiceST.setRow(index, { vatqty: $event })" />
<ng-container *ngIf="!isEdit">{{ item.vatqty }}</ng-container>
</ng-template>

View File

@ -40,8 +40,10 @@ export class InvoiceDetailComponent implements OnInit {
id: any = null;
ltdId: any = null;
type: any = 1;
selectedIndex = 0;
constructor(public service: TicketService, private route: ActivatedRoute) {
this.isCanEdit = !!route.snapshot.queryParams.type;
this.isCanEdit = route.snapshot.queryParams.type === '1';
const expressno = route.snapshot.queryParams.expressno;
this.type = route.snapshot.queryParams.type;
this.id = route.snapshot.params.id;
@ -226,10 +228,7 @@ export class InvoiceDetailComponent implements OnInit {
{ title: '税率', index: 'vatrate', format: item => `${item.vatrate ? ((item.vatrate as number) * 100).toFixed(2) : 0}%` },
{
title: '申请金额',
index: 'vatmoney',
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatmoney }) }
render: 'vatmoney'
},
{
title: '开票金额',