edit
This commit is contained in:
@ -0,0 +1,49 @@
|
||||
<page-header-wrapper title="浏览" [logo]="logo">
|
||||
<ng-template #logo>
|
||||
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
|
||||
<i nz-icon nzType="left" nzTheme="outline"></i>
|
||||
</button>
|
||||
</ng-template>
|
||||
</page-header-wrapper>
|
||||
|
||||
<nz-card>
|
||||
<div se-container labelWidth="150" gutter="32" col="3">
|
||||
<se-title class="text-center font-weight-bold text-xl">记账凭证
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" style="float: right;">打印</button>
|
||||
</se-title>
|
||||
<se label="帐套" required>
|
||||
天津怡亚通物流科技有限公司
|
||||
</se>
|
||||
<se label="凭证类型" required>
|
||||
WL
|
||||
</se>
|
||||
<se label="凭证日期" required>
|
||||
2021-12-12
|
||||
</se>
|
||||
</div>
|
||||
|
||||
<st #st [data]="data" [columns]="columns" [footer]="bodyTpl" bordered [scroll]="{ x:'1200px',y: '420px' }"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [page]="{ show: false }"
|
||||
[loading]="service.http.loading">
|
||||
<ng-template #bodyTpl let-s>
|
||||
<ng-container *ngIf="st.count > 0">
|
||||
<div style="display: flex;justify-content: flex-end;">
|
||||
<div style="flex: 1;" class="text-left">合计:</div>
|
||||
<div style="width: 150px;" class="text-right">{{111 | currency}}</div>
|
||||
<div style="width: 150px;" class="text-right">{{111 | currency}}</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
</st>
|
||||
|
||||
<div se-container labelWidth="150" gutter="32" col="2" class="mt-md">
|
||||
<se label="摘要">
|
||||
收取服务费XXXX
|
||||
</se>
|
||||
<se label="汇总凭证号">
|
||||
VC202112120001
|
||||
</se>
|
||||
</div>
|
||||
|
||||
</nz-card>
|
||||
@ -0,0 +1,39 @@
|
||||
import { CurrencyPipe } from '@angular/common';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { STData, STColumn, STRequestOptions } from '@delon/abc/st';
|
||||
import { FreightAccountService } from '../../../services/freight-account.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-summary-detail',
|
||||
templateUrl: './summary-detail.component.html',
|
||||
providers: [CurrencyPipe]
|
||||
})
|
||||
export class SummaryDetailComponent implements OnInit {
|
||||
data: STData[] = Array(100)
|
||||
.fill({})
|
||||
.map((_, idx) => ({
|
||||
id: idx + 1,
|
||||
price: ~~(Math.random() * 100),
|
||||
age: ~~(Math.random() * 100) > 50 ? '女' : '男'
|
||||
}));
|
||||
columns: STColumn[] = [
|
||||
{ title: '摘要', type: 'no' },
|
||||
{ title: '会计科目', index: 'id' },
|
||||
{ title: '辅助核算', index: 'age' },
|
||||
{ title: '币种', index: 'price', className: 'text-center' },
|
||||
{ title: '借方金额', index: 'price', width: 150, type: 'currency', format: item => `${this.currencyPipe.transform(item.price)}` },
|
||||
{ title: '贷方金额', index: 'price', width: 150, type: 'currency', format: item => `${this.currencyPipe.transform(item.price)}` }
|
||||
];
|
||||
|
||||
constructor(public service: FreightAccountService, private currencyPipe: CurrencyPipe) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
goBack() {
|
||||
history.go(-1);
|
||||
}
|
||||
}
|
||||
@ -3,16 +3,17 @@
|
||||
|
||||
<nz-card class="search-box" nzBordered>
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 16" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||
<sf #sf [schema]="searchSchema"
|
||||
[ui]="{ '*': { spanLabelFixed: 100,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
|
||||
[button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"
|
||||
[class.expend-options]="_$expand">
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<button nz-button> 导出</button>
|
||||
<button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="primary" [disabled]="service.http.loading"> 导出</button>
|
||||
<button nz-button nzType="primary" [disabled]="service.http.loading"> 导出明细</button>
|
||||
<button nz-button nzType="primary" [disabled]="service.http.loading"> 导出凭证</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
@ -21,17 +22,7 @@
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box" nzBordered>
|
||||
|
||||
<div class="d-flex align-items-center mb-md mt-md">
|
||||
<button nz-button (click)="this.addInvoice()" nzType="primary">添加发票</button>
|
||||
<div class="ml-md">
|
||||
已选择
|
||||
<strong class="text-primary">{{ selectedRows.length }}</strong> 张发票
|
||||
<a *ngIf="selectedRows.length > 0" (click)="st.clearCheck()" class="ml-lg">清空</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nz-card nzBordered>
|
||||
<st #st [data]="service.$mock_url" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { CurrencyPipe } from '@angular/common';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st';
|
||||
@ -9,22 +10,26 @@ import { FreightAccountService } from '../../services/freight-account.service';
|
||||
@Component({
|
||||
selector: 'app-voucher-summary',
|
||||
templateUrl: './voucher-summary.component.html',
|
||||
styleUrls: ['../../../commom/less/box.less']
|
||||
styleUrls: ['../../../commom/less/box.less'],
|
||||
providers: [CurrencyPipe]
|
||||
})
|
||||
export class VoucherSummaryComponent implements OnInit {
|
||||
@ViewChild('st', { static: true })
|
||||
st!: STComponent;
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
@ViewChild('auditModal', { static: false })
|
||||
auditModal!: any;
|
||||
columns: STColumn[] = this.initST();
|
||||
searchSchema: SFSchema = this.initSF();
|
||||
|
||||
_$expand = false;
|
||||
|
||||
selectedRows: any[] = [];
|
||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
|
||||
constructor(
|
||||
public service: FreightAccountService,
|
||||
private nzModalService: NzModalService,
|
||||
private router: Router,
|
||||
private currencyPipe: CurrencyPipe
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
@ -93,7 +98,7 @@ export class VoucherSummaryComponent implements OnInit {
|
||||
},
|
||||
inpinvcode: {
|
||||
type: 'string',
|
||||
title: '收票单号',
|
||||
title: '汇总凭证号',
|
||||
ui: {
|
||||
autocomplete: 'off',
|
||||
placeholder: '请输入'
|
||||
@ -101,7 +106,7 @@ export class VoucherSummaryComponent implements OnInit {
|
||||
},
|
||||
ltdid: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
title: '客户',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
@ -110,37 +115,37 @@ export class VoucherSummaryComponent implements OnInit {
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
invoiceno: {
|
||||
createtime: {
|
||||
title: '凭证时间',
|
||||
type: 'string',
|
||||
title: '发票号码',
|
||||
ui: {
|
||||
widget: 'sl-from-to-search',
|
||||
format: 'yyyy-MM-dd'
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
inpinvc2ode: {
|
||||
type: 'string',
|
||||
title: '原始单号',
|
||||
ui: {
|
||||
autocomplete: 'off',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
invtype: {
|
||||
type: 'string',
|
||||
title: '发票类型',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'refund:apply:status' },
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
hrto: {
|
||||
type: 'string',
|
||||
title: '销售方',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
createtime: {
|
||||
invtype: {
|
||||
type: 'string',
|
||||
title: '原始单类型',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
createtim2e: {
|
||||
title: '创建时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
@ -151,9 +156,19 @@ export class VoucherSummaryComponent implements OnInit {
|
||||
}
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
inpinvcosde: {
|
||||
type: 'string',
|
||||
title: '凭证摘要',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
sts: {
|
||||
type: 'string',
|
||||
title: '收票状态',
|
||||
title: '凭证类型',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'refund:apply:status' },
|
||||
@ -163,12 +178,13 @@ export class VoucherSummaryComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
invdate: {
|
||||
s2ts: {
|
||||
type: 'string',
|
||||
title: '发票日期',
|
||||
title: '科目',
|
||||
ui: {
|
||||
widget: 'sl-from-to-search',
|
||||
format: 'yyyy-MM-dd',
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'refund:apply:status' },
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
@ -176,7 +192,7 @@ export class VoucherSummaryComponent implements OnInit {
|
||||
},
|
||||
remarks: {
|
||||
type: 'string',
|
||||
title: '收票备注',
|
||||
title: '借方金额',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
@ -186,7 +202,7 @@ export class VoucherSummaryComponent implements OnInit {
|
||||
},
|
||||
billCode: {
|
||||
type: 'string',
|
||||
title: '订单号',
|
||||
title: '贷方金额',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
@ -194,15 +210,72 @@ export class VoucherSummaryComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
s2t2s: {
|
||||
type: 'string',
|
||||
title: '帐套',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'refund:apply:status' },
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
s22t2s: {
|
||||
type: 'string',
|
||||
title: '凭证状态',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'refund:apply:status' },
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
feecode: {
|
||||
type: 'string',
|
||||
title: '费用号',
|
||||
title: 'NC凭证',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
feecsode: {
|
||||
type: 'string',
|
||||
title: '凭证号',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
s22t2ss: {
|
||||
type: 'string',
|
||||
title: '导入NC',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'refund:apply:status' },
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
createt1im2e: {
|
||||
title: '统计时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'sl-from-to-search',
|
||||
format: 'yyyy-MM-dd',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
} as SFDateWidgetSchema
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -210,28 +283,47 @@ export class VoucherSummaryComponent implements OnInit {
|
||||
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '', index: 'key', type: 'checkbox' },
|
||||
{ title: '收票单号', index: 'inpinvcode', type: 'link' },
|
||||
{ title: '网络货运人', index: 'ltdid' },
|
||||
{ title: '发票日期', index: 'invdate', type: 'date' },
|
||||
{ title: '发票号', index: 'invoiceno' },
|
||||
{ title: '发票金额', index: 'invmoney' },
|
||||
{ title: '税额', index: 'invtax' },
|
||||
{ title: '发票类型', index: 'invtype' },
|
||||
{ title: '销售方', index: 'hrto' },
|
||||
{ title: '创建时间', index: 'createtime', type: 'date' },
|
||||
{ title: '创建人', index: 'createbyname' },
|
||||
{ title: '收票状态', index: 'sts' },
|
||||
{ title: '', index: 'key', type: 'checkbox', width: 60, className: 'text-center', fixed: 'left' },
|
||||
{ title: '汇总凭证号', index: 'inpinvcode', type: 'link', width: 140 },
|
||||
{ title: '帐套', index: 'ltdid', width: 120 },
|
||||
{ title: '凭证时间', index: 'invdate', type: 'date', width: 150 },
|
||||
{ title: '统计时间', index: 'invdate', type: 'date', width: 150 },
|
||||
{ title: '凭证类型', index: 'invoiceno', width: 120 },
|
||||
{ title: '序号', index: 'invmoney', width: 100 },
|
||||
{ title: '摘要', index: 'invtax', width: 120 },
|
||||
{ title: '币种', index: 'invtype', width: 100 },
|
||||
{
|
||||
title: '借方金额',
|
||||
index: 'hrto',
|
||||
width: 120,
|
||||
className: 'text-right',
|
||||
format: item => `${this.currencyPipe.transform(item.armoney || 0)}`
|
||||
},
|
||||
{
|
||||
title: '贷方金额',
|
||||
index: 'createtime',
|
||||
type: 'date',
|
||||
width: 120,
|
||||
className: 'text-right',
|
||||
format: item => `${this.currencyPipe.transform(item.armoney || 0)}`
|
||||
},
|
||||
{ title: 'NC凭证', index: 'createbyname', width: 120 },
|
||||
{ title: '凭证状态', index: 'sts', width: 120 },
|
||||
{ title: '创建时间', index: 'sts', width: 150 },
|
||||
{ title: '创建人', index: 'sts', width: 120 },
|
||||
{
|
||||
title: '操作',
|
||||
width: '130px',
|
||||
fixed: 'right',
|
||||
className: 'text-center',
|
||||
buttons: [
|
||||
{
|
||||
text: '浏览',
|
||||
click: item => this.router.navigate(['/ticket/input-invoice/detail/' + item.id])
|
||||
click: (item: any) => this.router.navigate(['/financial-management/voucher-summary/detail/' + item.id])
|
||||
},
|
||||
{
|
||||
text: '修改',
|
||||
click: item => this.router.navigate(['/ticket/input-invoice/edit/1'])
|
||||
text: '列表',
|
||||
click: (item: any) => this.router.navigate(['/financial-management/voucher-summary/detail/' + item.id])
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user