edit
This commit is contained in:
@ -1,43 +1,36 @@
|
||||
/*
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-18 15:57:44
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-04-09 16:36:42
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\voucher-management\\voucher-management.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
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';
|
||||
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
||||
import { SearchDrawerService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { BasicTableComponent } from 'src/app/routes/commom';
|
||||
import { FreightAccountService } from '../../services/freight-account.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-voucher-management',
|
||||
templateUrl: './voucher-management.component.html',
|
||||
styleUrls: ['../../../commom/less/box.less']
|
||||
styleUrls: ['../../../commom/less/commom-table.less']
|
||||
})
|
||||
export class VoucherManagementComponent implements OnInit {
|
||||
export class VoucherManagementComponent extends BasicTableComponent 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;
|
||||
schema: SFSchema = this.initSF();
|
||||
|
||||
selectedRows: any[] = [];
|
||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
|
||||
constructor(public service: FreightAccountService, private router: Router, public searchDrawerService: SearchDrawerService) {
|
||||
super(searchDrawerService);
|
||||
}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
search() {
|
||||
this.st?.load(1);
|
||||
}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
@ -71,22 +64,6 @@ export class VoucherManagementComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
this._$expand = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle() {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/expand', this._$expand);
|
||||
}
|
||||
|
||||
private initSF(): SFSchema {
|
||||
return {
|
||||
properties: {
|
||||
@ -128,10 +105,7 @@ export class VoucherManagementComponent implements OnInit {
|
||||
title: '原始单号',
|
||||
ui: {
|
||||
autocomplete: 'off',
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
sourceType: {
|
||||
@ -155,10 +129,7 @@ export class VoucherManagementComponent implements OnInit {
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
createTime: {
|
||||
@ -166,20 +137,14 @@ export class VoucherManagementComponent 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: {
|
||||
@ -188,10 +153,7 @@ export class VoucherManagementComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'credential:type' },
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
placeholder: '请选择'
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
@ -211,20 +173,14 @@ export class VoucherManagementComponent implements OnInit {
|
||||
type: 'string',
|
||||
title: '借方金额',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
crmoney: {
|
||||
type: 'string',
|
||||
title: '贷方金额',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
vcltdid: {
|
||||
@ -233,10 +189,7 @@ export class VoucherManagementComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'refund:apply:status' },
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
sts: {
|
||||
@ -245,10 +198,7 @@ export class VoucherManagementComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'credential:status' },
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
placeholder: '请选择'
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
@ -256,20 +206,14 @@ export class VoucherManagementComponent implements OnInit {
|
||||
type: 'string',
|
||||
title: 'NC凭证',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
vc2code: {
|
||||
type: 'string',
|
||||
title: '汇总凭证号',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
importnc: {
|
||||
@ -278,10 +222,7 @@ export class VoucherManagementComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'refund:apply:status' },
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
isvc2: {
|
||||
@ -294,10 +235,7 @@ export class VoucherManagementComponent implements OnInit {
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
placeholder: '请选择'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user