This commit is contained in:
Taric Xin
2022-04-25 19:33:20 +08:00
parent c5ca59239f
commit 3ffae048e2
4 changed files with 75 additions and 93 deletions

View File

@ -1,4 +1,4 @@
<page-header-wrapper title="预收款余额">
<!-- <page-header-wrapper title="预收款余额">
</page-header-wrapper>
<nz-card class="search-box">
@ -19,10 +19,17 @@
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card class="content-box">
<st #st [data]="service.$api_get_advance_collection_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x: '1200px' }">
<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()">筛选</button>
<button nz-button nzDanger (click)="exportList()"> 导出</button>
</div>
</div>
<st #st [data]="service.$api_get_advance_collection_page" [columns]="columns" [req]="{ process: beforeReq }"
[page]="{}" [loading]="false" [scroll]="{ x: '1200px',y:scrollY }">
</st>
</nz-card>

View File

@ -2,26 +2,37 @@ import { Component, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STRequestOptions } 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-advance-collection',
templateUrl: './advance-collection.component.html',
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class AdvanceCollectionComponent {
export class AdvanceCollectionComponent extends BasicTableComponent {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
searchSchema: SFSchema = this.initSF();
schema: SFSchema = this.initSF();
columns: STColumn[] = this.initST();
_$expand = false;
constructor(public service: FreightAccountService, private router: Router, private modal: NzModalService) {}
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) {
@ -30,24 +41,8 @@ export class AdvanceCollectionComponent {
return requestOptions;
};
/**
* 重置表单
*/
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_get_reportYskBla,);
this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_get_reportYskBla);
}
private initSF(): SFSchema {
@ -97,10 +92,7 @@ export class AdvanceCollectionComponent {
enum: [{ label: '全部', value: null }],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
},
default: null
},
@ -114,10 +106,7 @@ export class AdvanceCollectionComponent {
],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
},
default: null
}

View File

@ -1,4 +1,4 @@
<page-header-wrapper [title]="'退款记录'">
<!-- <page-header-wrapper [title]="'退款记录'">
</page-header-wrapper>
<nz-card class="search-box" nzBordered>
@ -19,19 +19,24 @@
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card class="content-box" nzBordered>
<nz-tabset>
<nz-tab nzTitle="全部" (nzClick)="changeRefundStatus()"></nz-tab>
<nz-card class="table-box">
<div class="tab_header">
<label class="page_title">
<label class="driver">|</label>
退款记录</label>
<nz-tabset [nzTabBarExtraContent]="extraTemplate">
<nz-tab nzTitle="全部" (nzClick)="changeRefundStatus()"> </nz-tab>
<nz-tab nzTitle="待审核" (nzClick)="changeRefundStatus('1')"></nz-tab>
<nz-tab nzTitle="退款中" (nzClick)="changeRefundStatus('4')"></nz-tab>
<nz-tab nzTitle="退款成功" (nzClick)="changeRefundStatus('2')"></nz-tab>
<nz-tab nzTitle="退款失败" (nzClick)="changeRefundStatus('5')"></nz-tab>
</nz-tabset>
</div>
<st #st [data]="service.$api_get_refund_record_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x:'1200px' }">
[loading]="false" [scroll]="{ x:'1200px',y:scrollY }">
<ng-template st-row="orderRefundCode" let-item let-index="index" let-column="column">
{{ item.orderRefundCode }} <br> {{ item.refundStatusLabel }}
</ng-template>
@ -54,6 +59,13 @@
</st>
</nz-card>
<ng-template #extraTemplate>
<div class="mr-sm">
<button nz-button nzDanger (click)="openDrawer()" class="mr-sm">筛选</button>
<button nz-button nzDanger [disabled]="service.http.loading" (click)="exprot()">导出</button>
</div>
</ng-template>
<ng-template #auditModal>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="80">

View File

@ -2,32 +2,40 @@ 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-refund-record',
templateUrl: './refund-record.component.html',
styleUrls: ['../../../commom/less/box.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class RefundRecordComponent implements OnInit {
export class RefundRecordComponent 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();
schema: SFSchema = this.initSF();
_$expand = false;
refundStatus: any = '';
msg = '';
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
constructor(
public service: FreightAccountService,
private nzModalService: NzModalService,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { refundStatus: this.refundStatus || null });
@ -120,22 +128,6 @@ export class RefundRecordComponent 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: {
@ -177,9 +169,6 @@ export class RefundRecordComponent implements OnInit {
type: 'string',
title: '订单号',
ui: {
visibleIf: {
expand: (value: boolean) => value
},
placeholder: '请输入'
}
},
@ -187,19 +176,13 @@ export class RefundRecordComponent implements OnInit {
type: 'string',
title: '所属项目',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
resourceCode: {
type: 'string',
title: '货源号',
ui: {
visibleIf: {
expand: (value: boolean) => value
},
placeholder: '请输入'
}
},
@ -210,9 +193,6 @@ export class RefundRecordComponent implements OnInit {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
},
nzShowTime: true
} as SFDateWidgetSchema
},
@ -223,10 +203,7 @@ export class RefundRecordComponent implements OnInit {
widget: 'select',
placeholder: '请选择',
allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder(),
visibleIf: {
expand: (value: boolean) => value
}
asyncData: () => this.service.getNetworkFreightForwarder()
}
},
bankType: {
@ -235,10 +212,7 @@ export class RefundRecordComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'bankname:type' },
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
}
}