This commit is contained in:
Taric Xin
2022-04-25 19:09:33 +08:00
parent c9c1f8108f
commit c5ca59239f
29 changed files with 481 additions and 897 deletions

View File

@ -1,14 +1,4 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-18 15:57:44
* @LastEditors : Shiming
* @LastEditTime : 2022-01-20 15:23:44
* @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\voucher-summary\\voucher-summary.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="'凭证汇总'">
<!-- <page-header-wrapper [title]="'凭证汇总'">
</page-header-wrapper>
<nz-card class="search-box" nzBordered>
@ -23,18 +13,26 @@
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button [disabled]="false" (click)="resetSF()">重置</button>
<button nz-button nzType="primary" [disabled]="false" (click)='exportList()'> 导出</button>
<!-- <button nz-button nzType="primary" [disabled]="false"> 导出明细</button>
<button nz-button nzType="primary" [disabled]="false"> 导出凭证</button> -->
<button nz-button nzType="primary" [disabled]="false"> 导出明细</button>
<button nz-button nzType="primary" [disabled]="false"> 导出凭证</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card nzBordered>
<nz-card class="table-box">
<div class="header_box">
<label class="page_title"> <label class="driver">|</label> 凭证汇总</label>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
[acl-ability]="['FINANCIAL-VOUCHER-list']">筛选</button>
<button nz-button nzDanger (click)='exportList()'> 导出</button>
</div>
</div>
<st #st [data]="service.$api_get_fico_vch_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x:'1200px' }" (change)="stChange($event)">
[loading]="false" [scroll]="{ x:'1200px',y:scrollY }" (change)="stChange($event)">
</st>
</nz-card>

View File

@ -3,36 +3,41 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { SearchDrawerService } from '@shared';
import { DateHelperByDatePipe } from 'ng-zorro-antd/i18n';
import { NzModalService } from 'ng-zorro-antd/modal';
import { BasicTableComponent } from 'src/app/routes/commom';
import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component';
import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-voucher-summary',
templateUrl: './voucher-summary.component.html',
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class VoucherSummaryComponent implements OnInit {
export class VoucherSummaryComponent extends BasicTableComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
_$expand = false;
schema: SFSchema = this.initSF();
selectedRows: any[] = [];
constructor(
public service: FreightAccountService,
private nzModalService: NzModalService,
private router: Router,
private dateHelperByDatePipe: DateHelperByDatePipe
) {}
private dateHelperByDatePipe: DateHelperByDatePipe,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { isvc2: 1 });
if (this.sf) {
@ -72,22 +77,6 @@ export class VoucherSummaryComponent implements OnInit {
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
exportList() {
this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_export_fico_vch_page);
}
@ -133,10 +122,7 @@ export class VoucherSummaryComponent implements OnInit {
title: '原始单号',
ui: {
autocomplete: 'off',
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
sourceType: {
@ -144,10 +130,7 @@ export class VoucherSummaryComponent implements OnInit {
title: '原始单类型',
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
createTime: {
@ -155,20 +138,14 @@ export class VoucherSummaryComponent implements OnInit {
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
},
remarks: {
type: 'string',
title: '凭证摘要',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
vctype: {
@ -177,10 +154,7 @@ export class VoucherSummaryComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'credential:type' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
},
default: ''
},
@ -190,30 +164,21 @@ export class VoucherSummaryComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
drmoney: {
type: 'string',
title: '借方金额',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
crmoney: {
type: 'string',
title: '贷方金额',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
vcltdid: {
@ -222,10 +187,7 @@ export class VoucherSummaryComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
sts: {
@ -234,30 +196,21 @@ export class VoucherSummaryComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'credential:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
feecode: {
type: 'string',
title: 'NC凭证',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
vccode: {
type: 'string',
title: '凭证号',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
s22t2ss: {
@ -266,10 +219,7 @@ export class VoucherSummaryComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
createt1im2e: {
@ -277,10 +227,7 @@ export class VoucherSummaryComponent implements OnInit {
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
}
}