This commit is contained in:
Taric Xin
2021-12-23 20:05:25 +08:00
parent 37daa23ae1
commit dc28444d16
24 changed files with 1052 additions and 2 deletions

View File

@ -0,0 +1,38 @@
<page-header-wrapper [title]="'异常入金'">
</page-header-wrapper>
<nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8">
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema"
[ui]="{ '*': { spanLabelFixed: 90,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> 导出</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" nzBordered>
<nz-tabset>
<nz-tab nzTitle="待处理"></nz-tab>
<nz-tab nzTitle="已清分"></nz-tab>
<nz-tab nzTitle="已退款"></nz-tab>
<nz-tab nzTitle="全部"></nz-tab>
</nz-tabset>
<st #st [data]="service.$mock_url" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '370px' }"></st>
</nz-card>

View File

@ -0,0 +1,37 @@
:host::ng-deep {
.search-box {
.ant-card-body {
padding-bottom: 18px;
}
}
.content-box {
.ant-card-body {
padding-top: 0;
}
}
nz-range-picker {
width: 100%;
}
.ant-tabs-tab-btn {
padding-left : 16px;
padding-right: 16px;
}
}
.expend-options {
margin-top: 0px;
}
@media (min-width: 1200px) {
.expend-options {
max-width: 400px;
position : absolute;
right : 0;
bottom : 25px;
}
}

View File

@ -0,0 +1,187 @@
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 { NzModalService } from 'ng-zorro-antd/modal';
import { FreightAccountService } from '../../services/freight-account.service';
import { ClearingModalComponent } from './clearing-modal/clearing-modal.component';
@Component({
selector: 'app-abnormal-gold',
templateUrl: './abnormal-gold.component.html',
styleUrls: ['./abnormal-gold.component.less']
})
export class AbnormalGoldComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
reqParams = {};
_$expand = false;
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
ngOnInit(): void {}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
this.reqParams = { ...this.sf.value };
}
return requestOptions;
};
refund(item: any) {
this.nzModalService.warning({
nzTitle: '确定要将该笔款项原路退回?',
nzOnOk: () => {}
});
}
clearingAction(item: any) {
const modal = this.nzModalService.create({
nzTitle: '清分',
nzContent: ClearingModalComponent,
nzOnOk: com => {
console.log(com.sf.value);
return false;
}
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
private initSF(): SFSchema {
return {
properties: {
expand: {
type: 'boolean',
ui: {
hidden: true
}
},
orderSn: {
type: 'string',
title: '银行流水号',
ui: {
placeholder: '请输入'
}
},
receiveName: {
type: 'string',
title: '网络货运人',
enum: [{ label: '全部', value: '全部' }],
ui: {
widget: 'select',
placeholder: '请选择'
}
},
orderSn22: {
type: 'string',
title: '银行类型',
ui: {
placeholder: '请输入'
}
},
orderSn2: {
type: 'string',
title: '付款账户',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
orderSn221: {
type: 'string',
title: '付款账号',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
orderS2n221: {
type: 'string',
title: '付款银行',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
createTime: {
title: '转账时间',
type: 'string',
ui: {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
} as SFDateWidgetSchema
}
}
};
}
private initST(): STColumn[] {
return [
{ title: '银行流水号', index: 'no', width: 150 },
{ title: '网络货运人', index: 'callNo', width: 120 },
{ title: '银行类型', index: 'callNo', width: 100 },
{ title: '资金总账号', index: 'callNo', width: 120 },
{ title: '充值金额', index: 'callNo', width: 100 },
{ title: '付款账户', index: 'callNo', width: 100 },
{ title: '付款账号', index: 'callNo', width: 100 },
{ title: '付款银行', index: 'callNo', width: 100 },
{ title: '转账时间', index: 'callNo', type: 'date', width: 150 },
{ title: '转账备注', index: 'callNo', width: 100 },
{ title: '操作人', index: 'callNo', width: 90 },
{ title: '操作时间', index: 'callNo', type: 'date', width: 150 },
{ title: '状态', index: 'callNo', width: 90 },
{
title: '操作',
fixed: 'right',
className: 'text-center',
width: 120,
buttons: [
{
text: '清分',
click: item => this.clearingAction(item)
},
{
text: '退款',
click: item => this.refund(item)
},
{
text: '查看',
click: item => this.router.navigate(['/financial-management/withdrawals-record/detail/1'])
}
]
}
];
}
}

View File

@ -0,0 +1,2 @@
<sf #sf [compact]="true" [ui]="ui" [schema]="schema" [button]="'none'">
</sf>

View File

@ -0,0 +1,96 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { apiConf } from '@conf/api.conf';
import { SFComponent, SFSchema, SFTextWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { FreightAccountService } from '../../../services/freight-account.service';
const IMAGECONFIG = {
action: apiConf.waterFileUpload,
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
fileSize: 5120,
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
widget: 'upload',
name: 'multipartFile',
multiple: false,
listType: 'picture-card'
};
@Component({
selector: 'app-clearing-modal',
templateUrl: './clearing-modal.component.html',
styleUrls: ['./clearing-modal.component.less']
})
export class ClearingModalComponent implements OnInit {
@ViewChild('sf', { static: false })
sf!: SFComponent;
i: any;
schema!: SFSchema;
ui: SFUISchema = {
'*': {
spanLabelFixed: 120,
grid: { span: 18 }
}
};
constructor(private modal: NzModalRef, public service: FreightAccountService) {}
ngOnInit(): void {
this.initSF(this.i);
}
initSF(staff: any) {
this.schema = {
properties: {
name: {
title: '入账金额',
type: 'string',
ui: {
widget: 'text'
} as SFTextWidgetSchema,
default: '10000.00'
},
name2: {
title: '网络货运人',
type: 'string',
ui: {
widget: 'text'
} as SFTextWidgetSchema,
default: '天津怡亚通物流科技有限公司'
},
name3: {
title: '银行类型',
type: 'string',
ui: {
widget: 'text'
} as SFTextWidgetSchema,
default: '平安银行'
},
receiveName: {
type: 'string',
title: '分配对象',
enum: [{ label: '全部', value: '全部' }],
ui: {
widget: 'select',
placeholder: '请选择'
},
default: ''
},
licensePhotoWatermark: {
type: 'string',
title: '上传凭证',
ui: {
...IMAGECONFIG,
change: args => {
if (args.type === 'success') {
this.sf.setValue('/licensePhoto', args.fileList[0].response.data.fullFilePath);
}
}
} as SFUploadWidgetSchema
}
},
required: ['name', 'name2', 'name3', 'receiveName']
};
}
}