This commit is contained in:
Taric Xin
2021-12-07 19:39:28 +08:00
parent 647b288042
commit b5262f5a26
32 changed files with 1752 additions and 18 deletions

View File

@ -0,0 +1,78 @@
<page-header-wrapper [title]="'提现记录'">
</page-header-wrapper>
<nz-card>
<nz-row [nzGutter]="16">
<nz-col [nzXl]="6" [nzLg]="6" [nzSm]="12">
<nz-statistic nzValue="100 笔" [nzTitle]="'待审核订单数'" [nzValueStyle]="{'font-size':'21px'}">
</nz-statistic>
</nz-col>
<nz-col [nzXl]="6" [nzLg]="6" [nzSm]="12">
<nz-statistic nzValue="80000.00 元" [nzTitle]="'待审核提现金额'" [nzValueStyle]="{'font-size':'21px'}">
</nz-statistic>
</nz-col>
<nz-col [nzXl]="6" [nzLg]="6" [nzSm]="12">
<nz-statistic nzValue="100 笔" [nzTitle]="'已提现订单数'" [nzValueStyle]="{'font-size':'21px'}">
</nz-statistic>
</nz-col>
<nz-col [nzXl]="6" [nzLg]="6" [nzSm]="12">
<nz-statistic nzValue="80000.00 元" [nzTitle]="'已提现金额'" [nzValueStyle]="{'font-size':'21px'}">
</nz-statistic>
</nz-col>
</nz-row>
</nz-card>
<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="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>
<div class="d-flex align-items-center mb-md">
<button nz-button (click)="this.auditAction(null)">审核</button>
<div class="ml-md">
已选择
<strong class="text-primary">{{ selectedRows.length }}</strong> 条数据&nbsp;&nbsp; 累计提现 <strong>{{
totalCallNo }}</strong>
<a *ngIf="totalCallNo > 0" (click)="st.clearCheck()" class="ml-lg">清空</a>
</div>
</div>
<st #st [data]="url" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[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' }" (change)="stChange($event)"></st>
</nz-card>
<ng-template #auditModal>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="80">
<se [col]="1" label="备注">
<textarea nz-input rows="3" placeholder="同意可以不用填写原因 ,拒绝必须说明原因"
style="width: 325px;margin-left: 14px;"></textarea>
</se>
</div>
</div>
</ng-template>

View File

@ -0,0 +1,22 @@
: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;
}
}

View File

@ -0,0 +1,227 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STChange } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { TicketService } from 'src/app/routes/ticket-management/services/system.service';
@Component({
selector: 'app-withdrawals-record',
templateUrl: './withdrawals-record.component.html',
styleUrls: ['./withdrawals-record.component.less']
})
export class WithdrawalsRecordComponent implements OnInit {
url = `/rule?_allow_anonymous=true`;
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
@ViewChild('auditModal', { static: false })
auditModal!: any;
columns: STColumn[] = [
{ title: '', index: 'key', type: 'checkbox' },
{ title: '提现时间', index: 'no' },
{ title: '提现单号', index: 'callNo' },
{ title: '账户主体', index: 'callNo' },
{ title: '账户名称', index: 'callNo' },
{ title: '虚拟账户', index: 'callNo' },
{ title: '账户类型', index: 'callNo' },
{ title: '提现金额', index: 'callNo' },
{ title: '提现手续费', index: 'callNo' },
{ title: '银行账户', index: 'callNo' },
{ title: '提现状态', index: 'callNo' },
{
title: '操作',
buttons: [
{
text: '审核',
click: item => this.auditAction(item)
},
{
text: '详情',
click: item => this.routeTo(item)
}
]
}
];
searchSchema: SFSchema = {
properties: {
expand: {
type: 'boolean',
ui: {
hidden: true
}
},
orderSn: {
type: 'string',
title: '提现单号',
ui: {
autocomplete: 'off'
}
},
receiveName: {
type: 'string',
title: '提现状态',
enum: [
{ label: '全部', value: '全部' },
{ label: '待审核', value: '待审核' },
{ label: '处理中', value: '处理中' },
{ label: '已完成', value: '已完成' },
{ label: '已拒绝', value: '已拒绝' }
],
ui: {
widget: 'select',
placeholder: '请选择',
change: (i: any) => {
this.sf.value.receiveName = i;
this.sf?.setValue('/receiveName', i);
}
}
},
createTime: {
title: '提现时间',
type: 'string',
ui: {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
},
orderSn2: {
type: 'string',
title: '账户名称',
ui: {
placeholder: '请输入',
autocomplete: 'off',
visibleIf: {
expand: (value: boolean) => value
}
}
},
receiveName2: {
type: 'string',
title: '账户类型',
enum: [
{ label: '全部', value: '全部' },
{ label: '个人', value: '个人' },
{ label: '企业', value: '企业' }
],
ui: {
widget: 'select',
placeholder: '请选择',
change: (i: any) => {
this.sf.value.receiveName2 = i;
this.sf?.setValue('/receiveName2', i);
},
visibleIf: {
expand: (value: boolean) => value
}
}
},
receiveName3: {
type: 'string',
title: '账户主体',
enum: [{ label: '全部', value: '全部' }],
ui: {
widget: 'select',
placeholder: '请选择',
change: (i: any) => {
this.sf.value.receiveName3 = i;
this.sf?.setValue('/receiveName3', i);
},
visibleIf: {
expand: (value: boolean) => value
}
}
}
}
};
reqParams = {};
_$expand = false;
selectedRows: any[] = [];
totalCallNo = 0;
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
ngOnInit(): void {}
stChange(e: STChange): void {
switch (e.type) {
case 'checkbox':
this.selectedRows = e.checkbox!;
this.totalCallNo = this.selectedRows.reduce((total, cv) => total + cv.callNo, 0);
break;
case 'filter':
this.st.load();
break;
}
}
approval(): void {}
add(): void {}
routeTo(item: any) {
this.router.navigate(['/ticket/invoice-requested-detail/1']);
}
auditAction(item: any) {
const modal = this.nzModalService.create({
nzTitle: '审核',
nzContent: this.auditModal,
nzFooter: [
{
label: '拒绝',
type: 'default',
onClick: () => {
modal.destroy();
}
},
{
label: '通过',
type: 'primary',
onClick: () => {
modal.destroy();
}
}
]
});
modal.afterClose.subscribe(res => {
this.st.load();
});
}
showReason(item: any) {
const modal = this.nzModalService.create({
nzTitle: '查看原因',
nzContent: '运单数据异常暂时无法开票请联系客服400-xxxx-xxxx',
nzFooter: [
{
label: '关闭',
type: 'primary',
onClick: () => {
modal.destroy();
}
}
]
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
}