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

@ -6,8 +6,7 @@ import { FreightAccountService } from '../../../services/freight-account.service
@Component({
selector: 'app-voucher-detail',
templateUrl: './voucher-detail.component.html',
providers: [CurrencyPipe]
templateUrl: './voucher-detail.component.html'
})
export class VoucherDetailComponent implements OnInit {
columns: STColumn[] = [
@ -19,22 +18,24 @@ export class VoucherDetailComponent implements OnInit {
title: '借方金额',
index: 'drlocalmoney',
width: 150,
type: 'currency',
format: item => `${this.currencyPipe.transform(item.drlocalmoney)}`
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.drlocalmoney }) }
},
{
title: '贷方金额',
index: 'crlocalmoney',
width: 150,
type: 'currency',
format: item => `${this.currencyPipe.transform(item.crlocalmoney)}`
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.crlocalmoney }) }
}
];
id!: string;
info: any = { faShowVOList: [] };
constructor(public service: FreightAccountService, private currencyPipe: CurrencyPipe, private route: ActivatedRoute) {
constructor(public service: FreightAccountService, private route: ActivatedRoute) {
this.id = route.snapshot.params.id;
}

View File

@ -11,8 +11,7 @@ import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-voucher-management',
templateUrl: './voucher-management.component.html',
styleUrls: ['../../../commom/less/box.less'],
providers: [CurrencyPipe]
styleUrls: ['../../../commom/less/box.less']
})
export class VoucherManagementComponent implements OnInit {
@ViewChild('st', { static: true })
@ -27,12 +26,7 @@ export class VoucherManagementComponent 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 {}
@ -292,7 +286,7 @@ export class VoucherManagementComponent implements OnInit {
{ title: '凭证号', index: 'id', type: 'link', width: 150 },
{ title: '帐套', index: 'vcltdid', width: 150 },
{ title: '凭证时间', index: 'vctime', type: 'date', width: 150 },
{ title: '凭证类型', index: 'vctype', enum: { WLW: 'WLW', CH: 'CH', YHY: 'YHY', KP: 'KP' }, width: 150 },
{ title: '凭证类型', index: 'vctypeLabel', width: 150 },
{ title: '序号', index: 'invmoney', width: 150, format: _ => '1' },
{ title: '摘要', index: 'remarks', width: 300 },
{ title: '币种', index: 'currency', width: 100 },
@ -300,19 +294,21 @@ export class VoucherManagementComponent implements OnInit {
title: '借方金额',
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: '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: 'importncnotes', width: 150 },
{ title: '汇总凭证号', index: 'vc2id', width: 150 },
{ title: '凭证状态', index: 'sts', enum: { 0: '新建', 1: '待审核', 2: '已通过' }, width: 120 },
{ title: '凭证状态', index: 'stsLabel', width: 120 },
{ title: '创建时间', index: 'createTime', width: 140 },
{ title: '创建人', index: 'createUserId', width: 150 },
{