WithdrawalTable.vue
3.06 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
<template>
<d2-table
class="my-row-height"
ref="withdrawalTable"
:hasNum="true"
:tableParams="withdrawalTableParams"
:searchForm="searchForm"
:getListApi="getListApi"
:pageConf="pageConf"
@sendAlldata="getAmountCollection"
>
<div slot="status" slot-scope="scope">
<span v-if="scope.scope.status == '1'">待审核</span>
<span v-if="scope.scope.status == '2'">到账中</span>
<span v-if="scope.scope.status == '3'">已到账</span>
<span v-if="scope.scope.status == '4'">到账失败</span>
</div>
</d2-table>
</template>
<script>
import { withdrawalApi } from '@/api/withdrawalManagement'
export default {
name: 'WithdrawalTable',
props: {
searchForm: {
type: Object,
default: {},
},
},
data() {
return {
pageConf: {
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'data.count',
},
withdrawalTableParams: {
mutiSelectUniqueKey: 'id',
mutiSelectName: 'list',
listName: 'data.data',
tableColumns: [
{
label: '员工名称',
prop: 'staffName',
},
{
label: '员工手机号',
prop: 'staffPhone',
},
{
label: '门店名称',
prop: 'merchantName',
},
{
label: '积分值',
prop: 'withdrawalScore',
},
{
label: '提现金额(元)',
prop: 'withdrawalAmount',
},
{
label: '实际到账金额',
prop: 'arrivedAmount',
},
{
label: '提现费率',
prop: 'withdrawalRate',
},
{
label: '提现时间',
prop: 'withdrawalTime',
},
{
label: '微信昵称',
prop: 'wechatNickName',
},
{
label: '微信手机号',
prop: 'wechatPhone',
},
{
label: '微信openid',
prop: 'wechatOpenId',
},
{
label: '状态',
prop: 'status',
addHtml: 'status',
},
{
label: '审核人',
prop: 'reviewer',
},
{
label: '审核时间',
prop: 'reviewTime',
},
{
label: '到账时间',
prop: 'successTime',
},
],
},
getListApi: withdrawalApi.withdrawalListApi,
}
},
methods: {
getAmountCollection(val) {
let {
receivedAmount,
receivingAmount,
reviewingAmount,
totalAmount,
failureAmount,
} = val
let amountCollection = {
receivedAmount,
receivingAmount,
reviewingAmount,
totalAmount,
failureAmount,
}
this.$emit('sendCollection', amountCollection)
},
},
}
</script>
<style scoped>
.my-row-height >>> .el-table__body-wrapper .el-table__row {
height: 48px;
}
</style>