recordLending.vue
4.63 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
<template>
<div>
<a-card title="放款记录" :bordered="false">
<a-table ref="table" size="middle" bordered :columns="columns" :rowKey="record => record.id" :dataSource="dataList" :pagination="false" :loading="loading" :scroll="{x:1400}" style="padding-bottom:30px;">
<!-- 字符串超长截取省略号显示-->
<span slot="esContent" slot-scope="text">
<j-ellipsis :value="text" :length="10" />
</span>
<span slot="action" slot-scope="text, record">
<a-button
type="link"
size="small"
@click="handleDetailLook(record)"
icon="search"
style="font-size: 12px"
>查看</a-button
>
</span>
</a-table>
</a-card>
<record-lending-detail-modal ref="recordLendingDetailModal"></record-lending-detail-modal>
</div>
</template>
<script>
import { queryRemitRecordList, personalQueryApplyInfo, enterpriseQueryApplyInfo, legalQueryApplyInfo, remitRecord } from '@/api/makeLoan'
import recordLendingDetailModal from './recordLendingDetailModal';
export default {
name: 'recordLending',
props: {
orderNo: {
type: String,
default: null
},
userType: {
type: Number,
default: null
}
},
components: {
recordLendingDetailModal
},
data () {
return {
dataList: [],
loading: false,
dbPaymentWay: JSON.parse(sessionStorage.getItem('DB_PAYMENT_WAY')), // 放款方式
dbRemitApplyStatus: JSON.parse(sessionStorage.getItem('DB_REMIT_APPLY_STATUS')), // 放款状态
dbFund: JSON.parse(sessionStorage.getItem('DBFUND')), // 资金方
columns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{
title: '借款订单号',
align: 'center',
dataIndex: 'orderNo'
},
{
title: '放款时间',
align: 'center',
dataIndex: 'paymentSuccessTime'
},
{
title: '放款方式',
align: 'center',
dataIndex: 'paymentWay',
customRender: (t, r, index) => {
for (var i = 0; i < this.dbPaymentWay.length; i++) {
if (t === Number(this.dbPaymentWay[i].name)) {
return this.dbPaymentWay[i].title
}
}
}
},
{
title: '放款金额(元)',
align: 'center',
dataIndex: 'remitPrincipal'
},
{
title: '放款编号(流水号)',
align: 'center',
dataIndex: 'remitNo'
},
{
title: '放款状态',
align: 'center',
dataIndex: 'status',
customRender: (t, r, index) => {
for (var i = 0; i < this.dbRemitApplyStatus.length; i++) {
if (t === Number(this.dbRemitApplyStatus[i].name)) {
return this.dbRemitApplyStatus[i].title
}
}
}
},
{
title: '资金方',
align: 'center',
dataIndex: 'fundNo',
customRender: (t, r, index) => {
for (var i = 0; i < this.dbFund.length; i++) {
if (t === this.dbFund[i].name) {
return this.dbFund[i].title
}
}
}
},
{
title: '操作人',
align: 'center',
dataIndex: 'updateUser'
},
{
title: '账单编号',
align: 'center',
dataIndex: 'billNo'
},
{
title: '操作',
dataIndex: 'action',
scopedSlots: { customRender: 'action' },
align: 'center',
width: 120,
fixed: 'right'
}
],
}
},
created () {
console.log(this.userType)
},
methods: {
loadData () {
let _p = { "orderNo": this.orderNo }
queryRemitRecordList(_p).then(res => {
if (res.status.statusCode == 0) {
this.dataList = res.result
} else {
this.$message.warning(res.status.statusReason)
}
})
},
handleDetailLook (record) {
let _p = { "remitNo": record.remitNo }
remitRecord(_p).then(res => {
if (res.status.statusCode == 0) {
this.$refs.recordLendingDetailModal.edit(res.result)
this.$refs.recordLendingDetailModal.disableSubmit = true
} else {
this.$message.warning(res.status.statusReason)
}
})
}
}
}
</script>
<style>
</style>