This commit is contained in:
Taric Xin
2021-12-29 19:46:29 +08:00
parent f6f17a410d
commit a99a15e570
20 changed files with 425 additions and 131 deletions

View File

@ -67,7 +67,7 @@
<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' } }"
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: afterRes }"
[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)">
<ng-template st-row="bankCardNumber" let-item let-index="index" let-column="column">

View File

@ -45,6 +45,11 @@ export class WithdrawalsRecordComponent implements OnInit {
return requestOptions;
};
afterRes = (data: any[], rawData?: any) => {
data = data.map(node => ({ ...node, disabled: node.refundStatus !== '1' }));
return data;
};
stChange(e: STChange): void {
switch (e.type) {
case 'checkbox':
@ -61,8 +66,11 @@ export class WithdrawalsRecordComponent implements OnInit {
auditAction(item?: any) {
this.msg = '';
if(!item){
let params: Array<string> = [];
if (item) {
params = [item.id];
} else {
params = this.selectedRows.map(node => node.id);
}
const modal = this.nzModalService.create({
nzTitle: '审核',
@ -74,13 +82,14 @@ export class WithdrawalsRecordComponent implements OnInit {
onClick: () => {
this.service
.request(this.service.$api_disagree_refund, {
refundApplicationId: item.id,
refundApplicationId: params,
msg: this.msg
})
.subscribe(res => {
if (res) {
this.service.msgSrv.success('审核拒绝成功');
modal.destroy();
this.st.load(1);
}
});
}
@ -91,13 +100,14 @@ export class WithdrawalsRecordComponent implements OnInit {
onClick: () => {
this.service
.request(this.service.$api_agree_refund, {
refundApplicationId: item.id,
refundApplicationId: params,
msg: this.msg
})
.subscribe(res => {
if (res) {
this.service.msgSrv.success('审核通过成功');
modal.destroy();
this.st.load(1);
}
});
}
@ -198,7 +208,7 @@ export class WithdrawalsRecordComponent implements OnInit {
}
}
},
ltdid: {
ltdId: {
type: 'string',
title: '网络货运人',
ui: {
@ -233,23 +243,18 @@ export class WithdrawalsRecordComponent implements OnInit {
{ 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: 'bankTypeLabel', 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: 'refundStatusLabel', width: 100 },
{ title: '银行流水号', index: 'bankSerialNumber', width: 120 },
{ title: '失败原因', index: 'failCause', width: 150 },
{
title: '操作',
width: 120,
buttons: [
{
text: '审核',