withdraw.js
3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
import moment from 'moment';
const withdrawStatus = {
0: '提现中',
1: '提现成功',
2: '提现失败',
};
export default function() {
return {
filters: {
createTime: {
label: '创建时间',
model: '',
},
beginTime: {
model: '',
},
endTime: {
model: '',
},
timeFlag: {
label: '时间标志',
model: '',
},
withdrawStatus: {
label: '提现状态',
model: '',
options: [
{
value: 0,
label: '提现中',
},
{
value: 1,
label: '提现成功',
},
{
value: 2,
label: '提现失败',
},
],
},
statementSn: {
label: '业务单据号',
model: '',
},
targetAccount: {
label: '提现账户',
model: '',
},
pageNo: 1,
pageSize: 10,
},
tableCols: [
{
title: 'ID',
key: 'id',
align: 'center',
},
{
title: '申请时间',
key: 'createTime',
align: 'center',
render(h, params) {
const time = moment.unix(params.row.createTime);
return (
<div>
<div>{time.format('YYYY/MM/DD')}</div>
<div>{time.format('HH:mm:ss')}</div>
</div>
);
},
},
{
title: '商家收款账户',
key: 'targetAccount',
align: 'center',
},
{
title: '申请金额(元)',
key: 'applyAmount',
align: 'center',
},
{
title: '服务费(元)',
key: 'serviceAmount',
align: 'center',
},
{
title: '成功金额(元)',
},
{
title: '提现状态',
key: 'status',
align: 'center',
render: (h, params) => {
const row = params.row;
const as = row.status;
const asText = as === 2 ? `${withdrawStatus[row.status]}(${row.rejectReason})` : withdrawStatus[as];
row.lineIndex = params.index;
return <p class={{ 'high-light': as === 2 }}>{asText}</p>;
},
className: 'status-column',
},
// {
// title: '业务单据号',
// key: 'statementSn',
// align: 'center',
// },
{
title: '说明',
key: 'remarks',
},
{
title: '操作人',
key: 'applyPid',
align: 'center',
},
{
title: '操作',
key: 'action',
width: 180,
align: 'center',
render: (h, params) => {
const row = params.row;
return (
<div>
<div class="cell-action-row">
<i-button type="primary" size="small" onClick={() => this.getDetailById(row.id)}>
提现明细
</i-button>
</div>
</div>
);
},
className: 'action-column',
},
],
tableData: [],
pageData: {
total: 0,
current: 1,
pageSize: 10,
},
};
}