This commit is contained in:
Taric Xin
2021-12-29 16:15:38 +08:00
parent 128e785a41
commit a82a0ba1ae
21 changed files with 471 additions and 252 deletions

View File

@ -10,40 +10,37 @@
<nz-alert nzType="info" nzMessage="提现信息" class="mb-md"></nz-alert>
<div se-container [labelWidth]="100">
<se label="网络货运人">
天津怡亚通物流科技有限公司
{{formData?.ltdname}}
</se>
<se label="银行类型">
平安银行
{{formData?.bankType==='1'?'平安银行':'浦发银行'}}
</se>
<se label="提现单号">
EA202110012313
{{formData?.refundApplyCode}}
</se>
<se label="账户名称">
茅台集团
{{formData?.bankAccountName}}
</se>
<se label="提现时间">
2021-10-11 08:50:08
{{formData?.createTime}}
</se>
<se label="虚拟账户">
6202110111234
{{formData?.virtualAccount}}
</se>
<se label="提现状态">
已完成
{{refundStatus[formData?.virtualAccount]}}
</se>
<se label="提现金额">
10000.00
{{formData?.amount}}
</se>
<se label="银行流水号">
10.00
{{formData?.bankSerialNumber}}
</se>
<se label="提现至银行卡">
P20181230123012385756
</se>
<se label="提现至银行卡">
招商银行(8889)
{{formData?.bankId}}
</se>
<se label="银行回" col="1">
<img src="" alt="" style="width: 200px;height: 160px;">
<img [src]="formData?.bankRecallBill" alt="" style="width: 200px;height: 160px;">
</se>
</div>

View File

@ -1,4 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { FreightAccountService } from '../../../services/freight-account.service';
@Component({
selector: 'app-withdrawals-detail',
@ -6,11 +8,32 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./withdrawals-detail.component.less']
})
export class WithdrawalsDetailComponent implements OnInit {
formDate: any = {};
constructor() {}
formData: any = {};
refundStatus: any = {
'1': '待审核',
'2': '提现中',
'3': '提现成功',
'4': '拒绝提现',
'5': '提现失败'
};
constructor(public service: FreightAccountService, private route: ActivatedRoute) {
const id = route.snapshot.params.id;
this.loadRefundDetail(id);
}
ngOnInit(): void {}
loadRefundDetail(id: string) {
this.service.request(this.service.$api_get_refund_detail, { id }).subscribe(res => {
console.log(res);
if (res) {
this.formData = res;
}
});
}
goBack() {
history.go(-1);
}

View File

@ -26,7 +26,7 @@
<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"
[ui]="{ '*': { spanLabelFixed: 90,grid: { lg: 8, md: 12, sm: 12, xs: 24,gutter:15 } }}" [compact]="true"
[button]="'none'"></sf>
</div>
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
@ -44,12 +44,12 @@
<nz-card class="content-box" nzBordered>
<nz-tabset [nzTabBarExtraContent]="extraTemplate">
<nz-tab nzTitle="全部"></nz-tab>
<nz-tab nzTitle="待审核"></nz-tab>
<nz-tab nzTitle="处理中"></nz-tab>
<nz-tab nzTitle="提现成功"></nz-tab>
<nz-tab nzTitle="提现失败"></nz-tab>
<nz-tab nzTitle="已拒绝"></nz-tab>
<nz-tab nzTitle="全部" (nzClick)="changeRefundStatus()"></nz-tab>
<nz-tab nzTitle="待审核" (nzClick)="changeRefundStatus('1')"></nz-tab>
<nz-tab nzTitle="处理中" (nzClick)="changeRefundStatus('2')"></nz-tab>
<nz-tab nzTitle="提现成功" (nzClick)="changeRefundStatus('3')"></nz-tab>
<nz-tab nzTitle="提现失败" (nzClick)="changeRefundStatus('5')"></nz-tab>
<nz-tab nzTitle="已拒绝" (nzClick)="changeRefundStatus('4')"></nz-tab>
</nz-tabset>
<ng-template #extraTemplate>
@ -65,11 +65,15 @@
</div>
</ng-template>
<st #st [data]="service.$mock_url" [columns]="columns"
<st #st [data]="service.$api_get_refund_page" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, 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' }" (change)="stChange($event)"></st>
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '370px' }" (change)="stChange($event)">
<ng-template st-row="bankCardNumber" let-item let-index="index" let-column="column">
{{ item.bankName }} <br> {{ item.bankCardNumber }}
</ng-template>
</st>
</nz-card>
<ng-template #auditModal>

View File

@ -19,6 +19,10 @@
padding-left : 16px;
padding-right: 16px;
}
.text-truncate {
white-space: normal;
}
}
.expend-options {

View File

@ -24,13 +24,21 @@ export class WithdrawalsRecordComponent implements OnInit {
selectedRows: any[] = [];
totalCallNo = 0;
refundStatus: any = '';
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
ngOnInit(): void {}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
Object.assign(requestOptions.body, { ...this.sf.value });
Object.assign(requestOptions.body, {
...this.sf.value,
createTime: {
start: this.sf.value.createTime?.[0] || '',
end: this.sf.value.createTime?.[1] || ''
},
refundStatus: this.refundStatus || null
});
}
return requestOptions;
};
@ -39,14 +47,15 @@ export class WithdrawalsRecordComponent implements OnInit {
switch (e.type) {
case 'checkbox':
this.selectedRows = e.checkbox!;
this.totalCallNo = this.selectedRows.reduce((total, cv) => total + cv.callNo, 0);
this.totalCallNo = this.selectedRows.reduce((total, cv) => total + cv.amount, 0);
break;
}
}
approval(): void {}
add(): void {}
changeRefundStatus(status?: string) {
this.refundStatus = status || null;
this.st.load(1);
}
auditAction(item: any) {
const modal = this.nzModalService.create({
@ -115,25 +124,19 @@ export class WithdrawalsRecordComponent implements OnInit {
hidden: true
}
},
orderSn: {
refundApplyCode: {
type: 'string',
title: '提现单号',
ui: {
placeholder: '请输入'
}
},
receiveName: {
refundStatus: {
type: 'string',
title: '提现状态',
enum: [
{ label: '全部', value: '全部' },
{ label: '待审核', value: '待审核' },
{ label: '处理中', value: '处理中' },
{ label: '已完成', value: '已完成' },
{ label: '已拒绝', value: '已拒绝' }
],
ui: {
widget: 'select',
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择'
}
},
@ -141,12 +144,13 @@ export class WithdrawalsRecordComponent implements OnInit {
title: '提现时间',
type: 'string',
ui: {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd'
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
placeholder: '请选择',
nzShowTime: true
} as SFDateWidgetSchema
},
orderSn2: {
bankAccountName: {
type: 'string',
title: '账户名称',
ui: {
@ -156,38 +160,37 @@ export class WithdrawalsRecordComponent implements OnInit {
}
}
},
receiveName2: {
accountType: {
type: 'string',
title: '账户类型',
enum: [
{ label: '全部', value: '全部' },
{ label: '货主账户', value: '货主账户' },
{ label: '司机账户', value: '司机账户' }
],
ui: {
widget: 'select',
widget: 'dict-select',
params: { dictKey: 'bank:type' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
}
},
receiveName3: {
ltdid: {
type: 'string',
title: '网络货运人',
enum: [{ label: '全部', value: '全部' }],
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder(),
visibleIf: {
expand: (value: boolean) => value
}
}
},
orderSn23: {
bankType: {
type: 'string',
title: '银行类型',
ui: {
widget: 'dict-select',
params: { dictKey: 'bankname:type' },
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
@ -201,32 +204,40 @@ export class WithdrawalsRecordComponent implements OnInit {
private initST(): STColumn[] {
return [
{ 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: '银行流水号', index: 'callNo' },
{ title: '失败原因', index: 'callNo' },
{ title: '提现时间', index: 'createTime', width: 180 },
{ title: '提现单号', index: 'refundApplyCode', width: 120 },
{ title: '网络货运人', index: 'ltdname', width: 120 },
{ title: '银行类型', index: 'bankType', type: 'enum', enum: { 1: '平安银行', 2: '浦发银行' }, width: 100 },
{ title: '账户类型', index: 'callNo', width: 100 },
{ title: '账户名称', index: 'callNo', width: 100 },
{ title: '虚拟账户', index: 'virtualAccount', width: 100 },
{ title: '提现金额', index: 'amount', width: 100 },
{ title: '提现银行账户', render: 'bankCardNumber', width: 120 },
{
title: '提现状态',
index: 'refundStatus',
type: 'enum',
enum: { '1': '待审核', '2': '提现中', '3': '提现成功', '4': '拒绝提现', '5': '提现失败' },
width: 100
},
{ title: '银行流水号', index: 'bankSerialNumber', width: 120 },
{ title: '失败原因', index: 'failCause', width: 150 },
{
title: '操作',
buttons: [
{
text: '审核',
iif: item => item.refundStatus === '1',
click: item => this.auditAction(item)
},
{
text: '查看回单'
text: '查看回单',
iif: item => item.refundStatus === '3'
// click: item => this.auditAction(item)
},
{
text: '详情',
click: item => this.router.navigate(['/financial-management/withdrawals-record/detail/1'])
click: item => this.router.navigate(['/financial-management/withdrawals-record/detail/' + item.id])
}
]
}