edit
This commit is contained in:
@ -0,0 +1,28 @@
|
||||
<page-header-wrapper title="预收款余额">
|
||||
</page-header-wrapper>
|
||||
|
||||
<nz-card class="search-box">
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||
<sf #sf [schema]="searchSchema"
|
||||
[ui]="{ '*': { spanLabelFixed: 110,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
|
||||
[button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
|
||||
class="text-right">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<button nz-button (click)="exportList()"> 导出</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box">
|
||||
<st #st [data]="service.$api_get_advance_collection_page" [columns]="columns" [req]="{ process: beforeReq }"
|
||||
[loading]="service.http.loading" [scroll]="{ x: '1200px' }">
|
||||
</st>
|
||||
</nz-card>
|
||||
@ -0,0 +1,156 @@
|
||||
import { Component, OnInit, 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 { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
|
||||
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']
|
||||
})
|
||||
export class AdvanceCollectionComponent implements OnInit {
|
||||
@ViewChild('st', { static: true })
|
||||
st!: STComponent;
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
|
||||
searchSchema: SFSchema = this.initSF();
|
||||
columns: STColumn[] = this.initST();
|
||||
_$expand = false;
|
||||
|
||||
constructor(public service: FreightAccountService, private router: Router, private modal: NzModalService) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, { ...this.sf.value });
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
this._$expand = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle() {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/expand', this._$expand);
|
||||
}
|
||||
|
||||
exportList() {
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps });
|
||||
}
|
||||
|
||||
private initSF(): SFSchema {
|
||||
return {
|
||||
properties: {
|
||||
expand: {
|
||||
type: 'boolean',
|
||||
ui: {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
ltdId: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
asyncData: () => this.service.getNetworkFreightForwarder()
|
||||
}
|
||||
},
|
||||
cno: {
|
||||
type: 'string',
|
||||
title: '结算客户',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
arto: {
|
||||
type: 'string',
|
||||
title: '付款人',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
brmtype: {
|
||||
type: 'string',
|
||||
title: '收款类型',
|
||||
enum: [{ label: '全部', value: null }],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
},
|
||||
default: null
|
||||
},
|
||||
bankType: {
|
||||
type: 'string',
|
||||
title: '银行类型',
|
||||
enum: [
|
||||
{ label: '全部', value: null },
|
||||
{ label: '平安银行', value: '1' },
|
||||
{ label: '浦发银行', value: '2' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
},
|
||||
default: null
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '网络货运人', width: 160, index: 'ltdName' },
|
||||
{ title: '银行类型', width: 120, index: 'bankTypeLabel' },
|
||||
{ title: '银行类型', width: 120, index: 'banktype' },
|
||||
{ title: '收款类型', width: 120, index: 'brmtype' },
|
||||
{
|
||||
title: '预收余额',
|
||||
index: 'yskmoney',
|
||||
width: 140,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.yskmoney }) }
|
||||
},
|
||||
{ title: '付款人', index: 'arto', width: 180 },
|
||||
{ title: '结算客户', index: 'cno', width: 150 },
|
||||
{
|
||||
title: '操作',
|
||||
width: 120,
|
||||
className: 'text-center',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
text: '浏览',
|
||||
click: item => this.router.navigate(['/financial-management/driver-account/detail/' + item.id])
|
||||
},
|
||||
{
|
||||
text: '核销',
|
||||
click: item => this.router.navigate(['/financial-management/driver-account/detail/' + item.id])
|
||||
},
|
||||
{
|
||||
text: '退款',
|
||||
click: item => this.router.navigate(['/financial-management/driver-account/detail/' + item.id])
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -29,6 +29,7 @@ import { ReceiptOrderDetailComponent } from './components/receipt-order/receipt-
|
||||
import { PaymentOrderDetailComponent } from './components/payment-order/payment-order-detail/payment-order-detail.component';
|
||||
import { PlatformAccountComponent } from './components/platform-account/platform-account.component';
|
||||
import { PlatformAccountDetailComponent } from './components/platform-account/platform-account-detail/platform-account-detail.component';
|
||||
import { AdvanceCollectionComponent } from './components/advance-collection/advance-collection.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: 'freight-account', component: FreightAccountComponent, data: { guard: { ability: ['FINANCIAL-FREIGHT-ACOUNT-list'] } } },
|
||||
@ -37,6 +38,7 @@ const routes: Routes = [
|
||||
{ path: 'driver-account/detail/:id', component: DriverAccountDetailComponent },
|
||||
{ path: 'platform-account', component: PlatformAccountComponent },
|
||||
{ path: 'platform-account/detail/:id', component: PlatformAccountDetailComponent },
|
||||
{ path: 'advance-collection', component: AdvanceCollectionComponent },
|
||||
{ path: 'recharge-record', component: RechargeRecordComponent },
|
||||
{ path: 'withdrawals-record', component: WithdrawalsRecordComponent },
|
||||
{ path: 'withdrawals-record/detail/:id', component: WithdrawalsDetailComponent },
|
||||
|
||||
@ -32,6 +32,7 @@ import { VoucherListComponent } from './components/voucher-summary/voucher-list/
|
||||
import { ReceiptOrderDetailComponent } from './components/receipt-order/receipt-order-detail/receipt-order-detail.component';
|
||||
import { PlatformAccountComponent } from './components/platform-account/platform-account.component';
|
||||
import { PlatformAccountDetailComponent } from './components/platform-account/platform-account-detail/platform-account-detail.component';
|
||||
import { AdvanceCollectionComponent } from './components/advance-collection/advance-collection.component';
|
||||
|
||||
const ROUTESCOMPONENTS = [
|
||||
FreightAccountComponent,
|
||||
@ -60,7 +61,8 @@ const ROUTESCOMPONENTS = [
|
||||
PlatformAccountDetailComponent,
|
||||
PaymentOrderDetailComponent,
|
||||
VoucherListComponent,
|
||||
ReceiptOrderDetailComponent
|
||||
ReceiptOrderDetailComponent,
|
||||
AdvanceCollectionComponent
|
||||
];
|
||||
|
||||
const NOTROUTECOMPONENTS = [DriverAccountDetailComponent, FreightAccountDetailComponent, ClearingModalComponent];
|
||||
|
||||
@ -101,6 +101,9 @@ export class FreightAccountService extends ShipperBaseService {
|
||||
// 下载银行回单请求
|
||||
$api_download_receipt_apply = '/api/fcc/spd/callback/receiptApply';
|
||||
|
||||
// 查询预收款余额
|
||||
$api_get_advance_collection_page = '/api/fcc/ficoYskBla/list/page';
|
||||
|
||||
constructor(public injector: Injector, public eaCacheSrv: EACacheService) {
|
||||
super(injector, eaCacheSrv);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user