approveDetail.vue
5.81 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<!-- 到账明细 -->
<template>
<div class="points">
<div class="header">
<div class="title">到账明细</div>
</div>
<div class="container gl-form-page">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="withdrawRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background: colors[scope.scope.status] }"></div>
<span>{{ tableStatus[scope.scope.status] }}</span>
<el-button v-if="scope.scope.status == 6" type="primary" plain size="mini" class="btn" round @click="makePayment(scope.scope)">再次打款</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
import { modeTypeList } from '@/utils/constants.js'
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回', '受理失败']
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E', '#2CCA74']
export default {
data() {
return {
id: this.$route.query.id,
size: 'small',
url: url,
tableStatus,
colors,
searchForm: {
customerName: '',
customerPhone: ''
},
tableSearchForm: {},
showFormData: [
{
label: '客户名称',
name: 'customerName',
type: 'input',
isClear: true,
maxlength: 20
},
{
label: '手机号',
name: 'customerPhone',
type: 'input',
isClear: true,
maxlength: 11
}
],
// 表格
getListApi: this.$apis.withdraw.getList,
tableParams: {
listName: 'list',
tableColumns: [
{
label: '提现单号',
prop: 'outSettleOrderId',
width: 200
},
{
label: '客户名称',
prop: 'customerName',
width: 150
},
{
label: '提现方式',
prop: 'mode',
width: '200px',
formatter: cellValue => {
let arr = this.baseData.modeTypeList.filter(item => item.confId == cellValue.mode)
return arr.length > 0 ? arr[0].confLabel : '--'
}
},
{
label: '手机号',
prop: 'customerPhone',
width: '140px'
},
{
label: '所属门店',
prop: 'merchantName',
line: 1,
width: 150
},
{
label: '提现积分',
prop: 'integralAmount',
width: 100
},
{
label: '提现金额/元',
prop: 'payAmount',
width: 110,
formatter: cellValue => {
return cellValue.payAmount ? (cellValue.payAmount / 100).toFixed(2) : '--'
}
},
{
label: '提现时间',
prop: 'createdDate',
width: 180
},
{
label: '收款人姓名',
prop: 'name',
width: '110px'
},
{
label: '收款人身份证',
prop: 'idCardNo',
width: '180px'
},
{
label: '收款银行卡号',
prop: 'recvBankCardNo',
width: 230
},
{
label: '收款银行',
prop: 'recvBank',
line: 1,
width: 150
},
{
label: '收款手机号',
prop: 'mobile',
width: '130px'
},
{
label: '到账情况',
prop: 'status',
width: '200px',
addHtml: 'colorStatus'
},
{
label: '到账时间',
prop: 'receiptDate',
width: 180
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// 基本数据
baseData: {
modeTypeList
}
}
},
mounted() {},
methods: {
makePayment(row) {
let params = {
id: row.id
}
this.$apis.withdraw.payApprovalAgain(params)
.then(res => {
this.$message({
message: res.code == '0' ? '再次打款成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
})
.finally(() => {
this.handleReset()
})
},
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
params.approvalId = this.id
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
resolve()
})
},
handleSearch() {
this.$refs.withdrawRef.refreshTable()
},
handleReset() {
this.searchForm = {
customerName: '',
customerPhone: ''
}
this.handleSearch()
}
}
}
</script>
<style scoped lang='scss'>
.points {
.header {
padding: 14px 20px;
background: #fff;
color: #333333;
font-size: 20px;
font-weight: 600;
border-bottom: 1px solid #e5e5e5;
}
.table-header {
align-items: center;
h2 {
color: #333333;
font-size: 16px;
}
}
.table_point {
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 8px;
}
.btn {
margin-left: 8px;
}
}
</style>