This commit is contained in:
Taric Xin
2022-01-18 15:49:09 +08:00
parent 7775b39bc6
commit 9d1ba35333
28 changed files with 699 additions and 179 deletions

View File

@ -12,37 +12,41 @@
<button nz-button nzType="primary" [nzLoading]="service.http.loading" style="float: right;">打印</button>
</se-title>
<se label="帐套" required>
天津怡亚通物流科技有限公司
{{info?.vcltdcode}}
</se>
<se label="凭证类型" required>
WL
{{info?.vctype}}
</se>
<se label="凭证日期" required>
2021-12-12
{{info?.vctime}}
</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>
<st #st [data]="info?.faShowVOList" [columns]="columns" [footer]="footerTpl" bordered
[scroll]="{ x:'1200px',y: '420px' }" [page]="{ show: false }" [loading]="service.http.loading">
<ng-template #footerTpl 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 style="flex: 1;" class="text-right font-weight-bold text-md">合计:</div>
<div style="width: 150px;" class="text-right">{{info?.drmoney | currency}}</div>
<div style="width: 150px;" class="text-right">{{info?.crmoney | currency}}</div>
</div>
</ng-container>
</ng-template>
<ng-template st-row="auxVOList" let-item let-index="index" let-column="column">
<ng-container *ngFor="let auxVO of item.auxVOList">
{{ auxVO.auxLabel }}: {{ auxVO.auxValue }} <br>
</ng-container>
</ng-template>
</st>
<sv-container labelWidth="150" gutter="32" col="2" class="mt-md">
<sv label="摘要">
收取服务费XXXX
{{info?.remarks}}
</sv>
<sv label="凭证流水号">
VC202112120001
{{info?.createUserId}}
</sv>
</sv-container>

View File

@ -1,33 +1,54 @@
import { CurrencyPipe } from '@angular/common';
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
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]
templateUrl: './summary-detail.component.html'
})
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)}` }
{ title: '摘要', index: 'remarks' },
{ title: '会计科目', index: 'subname' },
{ title: '辅助核算', render: 'auxVOList' },
{ title: '币种', index: 'currency', className: 'text-center' },
{
title: '方金额',
index: 'drlocalmoney',
width: 150,
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.drlocalmoney }) }
},
{
title: '贷方金额',
index: 'crlocalmoney',
width: 150,
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.crlocalmoney }) }
}
];
id!: string;
constructor(public service: FreightAccountService, private currencyPipe: CurrencyPipe) {}
info: any = { faShowVOList: [] };
constructor(public service: FreightAccountService, private route: ActivatedRoute) {
this.id = route.snapshot.params.id;
}
ngOnInit(): void {}
ngOnInit(): void {
this.loadDetail(this.id);
}
loadDetail(id: string) {
this.service.request(this.service.$api_get_fico_vch__detail, { id }).subscribe(res => {
if (res) {
this.info = res;
}
});
}
beforeReq = (requestOptions: STRequestOptions) => {
return requestOptions;

View File

@ -23,7 +23,7 @@
</nz-card>
<nz-card nzBordered>
<st #st [data]="service.$mock_url" [columns]="columns"
<st #st [data]="service.$api_get_fico_vch_page" [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] }"

View File

@ -10,8 +10,7 @@ import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-voucher-summary',
templateUrl: './voucher-summary.component.html',
styleUrls: ['../../../commom/less/box.less'],
providers: [CurrencyPipe]
styleUrls: ['../../../commom/less/box.less']
})
export class VoucherSummaryComponent implements OnInit {
@ViewChild('st', { static: true })
@ -24,16 +23,12 @@ export class VoucherSummaryComponent implements OnInit {
_$expand = false;
selectedRows: any[] = [];
constructor(
public service: FreightAccountService,
private nzModalService: NzModalService,
private router: Router,
private currencyPipe: CurrencyPipe
) {}
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
ngOnInit(): void {}
beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { isvc2: 1 });
if (this.sf) {
Object.assign(requestOptions.body, {
...this.sf.value,
@ -41,9 +36,9 @@ export class VoucherSummaryComponent implements OnInit {
start: this.sf.value.createtime?.[0] || null,
end: this.sf.value.createtime?.[1] || null
},
invdate: {
start: this.sf.value.invdate?.[0] || null,
end: this.sf.value.invdate?.[1] || null
vctime: {
start: this.sf.value.vctime?.[0] || null,
end: this.sf.value.vctime?.[1] || null
}
});
}
@ -96,7 +91,7 @@ export class VoucherSummaryComponent implements OnInit {
hidden: true
}
},
inpinvcode: {
vc2code: {
type: 'string',
title: '汇总凭证号',
ui: {
@ -104,7 +99,7 @@ export class VoucherSummaryComponent implements OnInit {
placeholder: '请输入'
}
},
ltdid: {
cno: {
type: 'string',
title: '客户',
ui: {
@ -115,7 +110,7 @@ export class VoucherSummaryComponent implements OnInit {
},
default: ''
},
createtime: {
vctime: {
title: '凭证时间',
type: 'string',
ui: {
@ -123,7 +118,7 @@ export class VoucherSummaryComponent implements OnInit {
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
},
inpinvc2ode: {
sourceCode: {
type: 'string',
title: '原始单号',
ui: {
@ -134,7 +129,7 @@ export class VoucherSummaryComponent implements OnInit {
}
}
},
invtype: {
sourceType: {
type: 'string',
title: '原始单类型',
ui: {
@ -145,7 +140,7 @@ export class VoucherSummaryComponent implements OnInit {
}
}
},
createtim2e: {
createTime: {
title: '创建时间',
type: 'string',
ui: {
@ -156,7 +151,7 @@ export class VoucherSummaryComponent implements OnInit {
}
} as SFDateWidgetSchema
},
inpinvcosde: {
remarks: {
type: 'string',
title: '凭证摘要',
ui: {
@ -166,17 +161,18 @@ export class VoucherSummaryComponent implements OnInit {
}
}
},
sts: {
vctype: {
type: 'string',
title: '凭证类型',
ui: {
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
params: { dictKey: 'credential:type' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
}
},
default: ''
},
s2ts: {
type: 'string',
@ -190,7 +186,7 @@ export class VoucherSummaryComponent implements OnInit {
}
}
},
remarks: {
drmoney: {
type: 'string',
title: '借方金额',
ui: {
@ -200,7 +196,7 @@ export class VoucherSummaryComponent implements OnInit {
}
}
},
billCode: {
crmoney: {
type: 'string',
title: '贷方金额',
ui: {
@ -210,7 +206,7 @@ export class VoucherSummaryComponent implements OnInit {
}
}
},
s2t2s: {
vcltdid: {
type: 'string',
title: '帐套',
ui: {
@ -222,12 +218,12 @@ export class VoucherSummaryComponent implements OnInit {
}
}
},
s22t2s: {
sts: {
type: 'string',
title: '凭证状态',
ui: {
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
params: { dictKey: 'credential:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
@ -244,7 +240,7 @@ export class VoucherSummaryComponent implements OnInit {
}
}
},
feecsode: {
vccode: {
type: 'string',
title: '凭证号',
ui: {
@ -284,33 +280,34 @@ export class VoucherSummaryComponent implements OnInit {
private initST(): STColumn[] {
return [
{ 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: 'vc2code', type: 'link', width: 140 },
{ title: '帐套', index: 'vcltdcode', width: 120 },
{ title: '凭证时间', index: 'vctime', 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: 'vctypeLabel', width: 120 },
{ title: '序号', index: 'invmoney', width: 100, format: _ => '1' },
{ title: '摘要', index: 'remarks', width: 120 },
{ title: '币种', index: 'currency', width: 100 },
{
title: '借方金额',
index: 'hrto',
index: 'drmoney',
width: 120,
type: 'widget',
className: 'text-right',
format: item => `${this.currencyPipe.transform(item.armoney || 0)}`
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.drmoney }) }
},
{
title: '贷方金额',
index: 'createtime',
type: 'date',
index: 'crmoney',
width: 120,
type: 'widget',
className: 'text-right',
format: item => `${this.currencyPipe.transform(item.armoney || 0)}`
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.crmoney }) }
},
{ title: 'NC凭证', index: 'createbyname', width: 120 },
{ title: '凭证状态', index: 'sts', width: 120 },
{ title: '创建时间', index: 'sts', width: 150 },
{ title: '创建人', index: 'sts', width: 120 },
{ title: 'NC凭证', index: 'importncnotes', width: 120 },
{ title: '凭证状态', index: 'stsLabel', width: 120 },
{ title: '创建时间', index: 'createTime', width: 150 },
{ title: '创建人', index: 'createUserId', width: 120 },
{
title: '操作',
width: '130px',