edit
This commit is contained in:
@ -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