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 18:43:42
* @LastEditors : Shiming
* @LastEditTime : 2022-01-25 15:38:21
* @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\receipt-order\\receipt-order.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="'收款单'"> </page-header-wrapper>
<!-- <page-header-wrapper [title]="'收款单'"> </page-header-wrapper>
<nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8">
@ -19,28 +9,41 @@
<div nz-col [nzXl]="_$expand ? 24 : 7" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right" [class.expend-options]="_$expand">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<!-- <button nz-button nzType="primary"> 导出</button>
<button nz-button nzType="primary"> 导出核销</button> -->
<button nz-button nzType="primary"> 导出</button>
<button nz-button nzType="primary"> 导出核销</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 class="content-box" nzBordered>
<div class="d-flex align-items-center mb-md mt-md">
<!-- <button nz-button (click)="this.addInvoice()" nzType="primary">添加收款</button>
<button nz-button (click)="this.addInvoice()" nzType="primary">导入收款</button> -->
<nz-card class="table-box">
<div class="header_box">
<div>
<label class="page_title"> <label class="driver">|</label> 收款单</label>
<label class="ml-md">
已选择
<strong class="text-primary">{{ selectedRows.length }}</strong> 张单
<a *ngIf="selectedRows.length > 0" (click)="st.clearCheck()" class="ml-lg">清空</a>
</label>
</div>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()">筛选</button>
</div>
</div>
<!-- <div class="d-flex align-items-center mb-md mt-md">
<button nz-button (click)="this.addInvoice()" nzType="primary">添加收款</button>
<button nz-button (click)="this.addInvoice()" nzType="primary">导入收款</button>
<div class="ml-md">
已选择
<strong class="text-primary">{{ selectedRows.length }}</strong> 张单
<a *ngIf="selectedRows.length > 0" (click)="st.clearCheck()" class="ml-lg">清空</a>
</div>
</div>
</div> -->
<st #st [data]="service.$api_get_receipt_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

@ -2,30 +2,38 @@ 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 { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component';
import { BasicTableComponent } from 'src/app/routes/commom';
import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-receipt-order',
templateUrl: './receipt-order.component.html',
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class ReceiptOrderComponent implements OnInit {
export class ReceiptOrderComponent 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) {}
constructor(
public service: FreightAccountService,
private nzModalService: NzModalService,
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, {
@ -48,6 +56,7 @@ export class ReceiptOrderComponent implements OnInit {
});
}
}
this.selectedRows = [];
return requestOptions;
};
@ -72,22 +81,6 @@ export class ReceiptOrderComponent 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 +121,7 @@ export class ReceiptOrderComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'driverrecord:receive:type' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
brmmode: {
@ -140,10 +130,7 @@ export class ReceiptOrderComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'receive:mode' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
arto: {
@ -155,10 +142,7 @@ export class ReceiptOrderComponent implements OnInit {
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
allowClear: true,
onSearch: (q: any) => this.service.getEnterpriceList({ enterpriseName: q }),
visibleIf: {
expand: (value: boolean) => value
}
onSearch: (q: any) => this.service.getEnterpriceList({ enterpriseName: q })
}
},
sts: {
@ -167,10 +151,7 @@ export class ReceiptOrderComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'write:off:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
brmdate: {
@ -178,10 +159,7 @@ export class ReceiptOrderComponent 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
},
createTime: {
@ -189,10 +167,7 @@ export class ReceiptOrderComponent 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
},
// billHCode: {
@ -219,10 +194,7 @@ export class ReceiptOrderComponent implements OnInit {
type: 'string',
title: '收款备注',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
}
}