edit
This commit is contained in:
@ -10,51 +10,51 @@
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
|
||||
<se label="销售方">
|
||||
天津怡亚通物流科技有限公司
|
||||
{{headerInfo?.ltdId}}
|
||||
</se>
|
||||
<se label="申请编号">
|
||||
VP2021012010
|
||||
{{headerInfo?.vatappHCode}}
|
||||
</se>
|
||||
<se label="发票号码">
|
||||
051010100
|
||||
{{headerInfo?.invoiceno}}
|
||||
</se>
|
||||
<se label="发票代码">
|
||||
54364653
|
||||
{{headerInfo?.invoiceno2}}
|
||||
</se>
|
||||
<se label="开票日期">
|
||||
2021-10-11
|
||||
{{headerInfo?.invoicedate}}
|
||||
</se>
|
||||
<se label="价税合计">
|
||||
2205.00
|
||||
{{headerInfo?.disvatnotax}}
|
||||
</se>
|
||||
<se label="税额">
|
||||
182.06
|
||||
{{headerInfo?.disvattax}}
|
||||
</se>
|
||||
<se label="票面备注">
|
||||
订单号11-12
|
||||
{{headerInfo?.remarks}}
|
||||
</se>
|
||||
</div>
|
||||
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
|
||||
<se label="购买方">
|
||||
茅台股份有限公司
|
||||
{{headerInfo?.artoname}}
|
||||
</se>
|
||||
<se label="纳税号">
|
||||
912301046656930913
|
||||
{{headerInfo?.artotaxno}}
|
||||
</se>
|
||||
<se label="地址">
|
||||
贵州省贵阳市
|
||||
{{headerInfo?.artoadd}}
|
||||
</se>
|
||||
<se label="电话">
|
||||
075588393198
|
||||
{{headerInfo?.artotel}}
|
||||
</se>
|
||||
<se label="开户行">
|
||||
中国工商银行股份有限公司哈贵阳支行
|
||||
{{headerInfo?.artobank}}
|
||||
</se>
|
||||
<se label="银行账户">
|
||||
3500044119068126788
|
||||
{{headerInfo?.artoacc}}
|
||||
</se>
|
||||
<se label="其他要求">
|
||||
开票单位要吨
|
||||
{{headerInfo?.remarks}}
|
||||
</se>
|
||||
</div>
|
||||
<div *ngIf="isCanEdit" nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" class="text-right">
|
||||
@ -87,7 +87,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<st #orderST [data]="service.$mock_url" [columns]="orderColumns" size="small" bordered="true"
|
||||
<st #orderST [data]="service.$api_get_invoice_order_detail" [columns]="orderColumns" size="small" bordered="true"
|
||||
[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] }"
|
||||
@ -108,40 +108,38 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<st #costST [data]="service.$mock_url" [columns]="costColumns" size="small" bordered="true"
|
||||
<st #costST [data]="service.$api_get_invoice_cost_detail" [columns]="costColumns" size="small" bordered="true"
|
||||
[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: '250px' }"></st>
|
||||
</nz-tab>
|
||||
<nz-tab nzTitle="发票明细">
|
||||
<st #invoiceST [data]="service.$mock_url" [columns]="invoiceColumns" size="small" bordered="true"
|
||||
<st #invoiceST [data]="service.$api_get_invoice_details" [columns]="invoiceColumns" size="small" bordered="true"
|
||||
[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: '250px' }">
|
||||
<ng-template st-row="owner" let-item let-index="index">
|
||||
<ng-template st-row="vatname" let-item let-index="index">
|
||||
<nz-select *ngIf="isEdit" [ngModel]="item.owner"
|
||||
(ngModelChange)="invoiceST.setRow(index, { owner: $event })" style="width: 100%;">
|
||||
<nz-option nzValue="曲丽丽" nzLabel="曲丽丽"></nz-option>
|
||||
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
|
||||
(ngModelChange)="invoiceST.setRow(index, { vatname: $event })" style="width: 100%;">
|
||||
</nz-select>
|
||||
<ng-container *ngIf="!isEdit">{{ item.owner }}</ng-container>
|
||||
<ng-container *ngIf="!isEdit">{{ item.vatname }}</ng-container>
|
||||
</ng-template>
|
||||
<ng-template st-row="callNo" let-item let-index="index">
|
||||
<input *ngIf="isEdit" nz-input [ngModel]="item.callNo"
|
||||
(ngModelChange)="invoiceST.setRow(index, { callNo: $event })" />
|
||||
<ng-container *ngIf="!isEdit">{{ item.callNo }}</ng-container>
|
||||
<ng-template st-row="vatmodel" let-item let-index="index">
|
||||
<input *ngIf="isEdit" nz-input [ngModel]="item.vatmodel"
|
||||
(ngModelChange)="invoiceST.setRow(index, { vatmodel: $event })" />
|
||||
<ng-container *ngIf="!isEdit">{{ item.vatmodel }}</ng-container>
|
||||
</ng-template>
|
||||
<ng-template st-row="progress" let-item let-index="index">
|
||||
<input *ngIf="isEdit" nz-input [ngModel]="item.progress"
|
||||
(ngModelChange)="invoiceST.setRow(index, { progress: $event })" />
|
||||
<ng-container *ngIf="!isEdit">{{ item.progress }}</ng-container>
|
||||
<ng-template st-row="vatunit" let-item let-index="index">
|
||||
<input *ngIf="isEdit" nz-input [ngModel]="item.vatunit"
|
||||
(ngModelChange)="invoiceST.setRow(index, { vatunit: $event })" />
|
||||
<ng-container *ngIf="!isEdit">{{ item.vatunit }}</ng-container>
|
||||
</ng-template>
|
||||
<ng-template st-row="status" let-item let-index="index">
|
||||
<input *ngIf="isEdit" nz-input [ngModel]="item.status"
|
||||
(ngModelChange)="invoiceST.setRow(index, { status: $event })" />
|
||||
<ng-container *ngIf="!isEdit">{{ item.status }}</ng-container>
|
||||
<ng-template st-row="vatqty" let-item let-index="index">
|
||||
<input *ngIf="isEdit" nz-input [ngModel]="item.vatqty"
|
||||
(ngModelChange)="invoiceST.setRow(index, { vatqty: $event })" />
|
||||
<ng-container *ngIf="!isEdit">{{ item.vatqty }}</ng-container>
|
||||
</ng-template>
|
||||
</st>
|
||||
</nz-tab>
|
||||
|
||||
@ -32,8 +32,12 @@ export class InvoiceDetailComponent implements OnInit {
|
||||
isCanEdit = false;
|
||||
isEdit = false;
|
||||
|
||||
headerInfo: any = {};
|
||||
|
||||
constructor(public service: TicketService, private route: ActivatedRoute) {
|
||||
this.isCanEdit = !!route.snapshot.queryParams.type;
|
||||
const id = route.snapshot.params.id;
|
||||
this.loadInvoiceHeader(id);
|
||||
}
|
||||
|
||||
ngOnInit(): void {}
|
||||
@ -48,6 +52,15 @@ export class InvoiceDetailComponent implements OnInit {
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
loadInvoiceHeader(id: string) {
|
||||
this.service.request(this.service.$api_get_invoice_header_detail, { id }).subscribe(res => {
|
||||
console.log(res);
|
||||
if (res) {
|
||||
this.headerInfo = res;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
goBack() {
|
||||
history.go(-1);
|
||||
}
|
||||
@ -78,30 +91,35 @@ export class InvoiceDetailComponent implements OnInit {
|
||||
private initOrderSF(): SFSchema {
|
||||
return {
|
||||
properties: {
|
||||
orderSn: {
|
||||
billHId: {
|
||||
type: 'string',
|
||||
title: '订单号',
|
||||
ui: {
|
||||
autocomplete: 'off'
|
||||
}
|
||||
},
|
||||
receiveName: {
|
||||
billType: {
|
||||
type: 'string',
|
||||
title: '订单类型',
|
||||
enum: [{ label: '全部', value: '' }],
|
||||
enum: [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '整车', value: 1 },
|
||||
{ label: '大宗', value: 2 }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
receiveNa22me: {
|
||||
projectId: {
|
||||
type: 'string',
|
||||
title: '所属项',
|
||||
enum: [{ label: '全部', value: '' }],
|
||||
title: '所属项目',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
asyncData: () => this.service.getEnterpriseProject()
|
||||
},
|
||||
default: ''
|
||||
}
|
||||
@ -111,32 +129,32 @@ export class InvoiceDetailComponent implements OnInit {
|
||||
|
||||
private initOrderST(): STColumn[] {
|
||||
return [
|
||||
{ title: '订单号', index: 'no' },
|
||||
{ title: '订单完成日期', index: 'callNo', type: 'date' },
|
||||
{ title: '所属项目', index: 'callNo' },
|
||||
{ title: '订单类型', index: 'callNo' },
|
||||
{ title: '装货地', index: 'callNo' },
|
||||
{ title: '卸货地', index: 'callNo' },
|
||||
{ title: '货物信息', index: 'callNo' },
|
||||
{ title: '承运司机', index: 'callNo', format: item => `特朗普 13789040523 粤GT8419` },
|
||||
{ title: '申请金额', index: 'callNo' },
|
||||
{ title: '运输费', index: 'callNo' },
|
||||
{ title: '附加费', index: 'callNo' },
|
||||
{ title: '开票金额', index: 'callNo' }
|
||||
{ title: '订单号', index: 'billHId' },
|
||||
{ title: '订单完成日期', index: 'billTime', type: 'date' },
|
||||
{ title: '所属项目', index: 'projectId' },
|
||||
{ title: '订单类型', index: 'billType' },
|
||||
{ title: '装货地', index: 'loadingfrom' },
|
||||
{ title: '卸货地', index: 'loadingto' },
|
||||
{ title: '货物信息', index: 'goodsinfo' },
|
||||
{ title: '承运司机', index: 'driverinfo' },
|
||||
{ title: '申请金额', index: 'billkpnotax' },
|
||||
{ title: '运输费', index: 'fjfmoney2' },
|
||||
{ title: '附加费', index: 'fjfmoney' },
|
||||
{ title: '开票金额', index: 'billkpmoney' }
|
||||
];
|
||||
}
|
||||
|
||||
private initCostSF(): SFSchema {
|
||||
return {
|
||||
properties: {
|
||||
orderSn: {
|
||||
billHId: {
|
||||
type: 'string',
|
||||
title: '订单号',
|
||||
ui: {
|
||||
autocomplete: 'off'
|
||||
}
|
||||
},
|
||||
orderS2n: {
|
||||
feeHId: {
|
||||
type: 'string',
|
||||
title: '费用号',
|
||||
ui: {
|
||||
@ -149,25 +167,25 @@ export class InvoiceDetailComponent implements OnInit {
|
||||
|
||||
private initCostST(): STColumn[] {
|
||||
return [
|
||||
{ title: '费用号', index: 'no' },
|
||||
{ title: '订单号', index: 'callNo' },
|
||||
{ title: '订单日期', index: 'callNo', type: 'date' },
|
||||
{ title: '费用号', index: 'feeHId' },
|
||||
{ title: '订单号', index: 'billHId' },
|
||||
{ title: '订单日期', index: 'createTime', type: 'date' },
|
||||
{ title: '计费日期', index: 'callNo', type: 'date' },
|
||||
{ title: '税率', index: 'callNo' },
|
||||
{ title: '申请金额', index: 'callNo' },
|
||||
{ title: '开票金额', index: 'callNo' }
|
||||
{ title: '税率', index: 'vatrate' },
|
||||
{ title: '申请金额', index: 'vatmoney' },
|
||||
{ title: '开票金额', index: 'vatnotax' }
|
||||
];
|
||||
}
|
||||
|
||||
private initInvoiceST(): STColumn[] {
|
||||
return [
|
||||
{ title: '服务名称', render: 'owner' },
|
||||
{ title: '规格型号', render: 'callNo' },
|
||||
{ title: '单位', render: 'progress' },
|
||||
{ title: '数量', render: 'status' },
|
||||
{ title: '金额', index: 'callNo' },
|
||||
{ title: '服务名称', render: 'vatname' },
|
||||
{ title: '规格型号', render: 'vatmodel' },
|
||||
{ title: '单位', render: 'vatunit' },
|
||||
{ title: '数量', render: 'vatqty' },
|
||||
{ title: '金额', index: 'vatnotax' },
|
||||
{ title: '税率', index: 'callNo' },
|
||||
{ title: '税额', index: 'callNo' }
|
||||
{ title: '税额', index: 'vattax' }
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user