hetong.vue
4.92 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
<template>
<a-modal
title="担保详情"
:width="1000"
:centered="true"
:visible="visible"
:confirmLoading="confirmLoading"
:okButtonProps="{ props: { disabled: disableSubmit } }"
@cancel="handleCancel"
cancelText="关闭"
style="top: 20px"
:maskClosable="false"
>
<a-spin :spinning="confirmLoading">
<a-table
ref="table"
size="middle"
bordered
:columns="bankData"
:dataSource="model"
:pagination="false"
:loading="loading"
:rowKey="(record, index) => index"
>
<!-- 字符串超长截取省略号显示-->
<span slot="esContent" slot-scope="text">
<j-ellipsis :value="text" :length="10" />
</span>
</a-table>
</a-spin>
<hetong-modal
ref="commonBankAccountModal"
:recordOrderNo.sync="recordOrderNo"
:customerType.sync="customerType"
:orderNo.sync="orderNo"
:modelList.sync="modelList"
@ok="load"
></hetong-modal>
<template slot="footer">
<a-button @click="handleCancel">关闭</a-button>
</template>
</a-modal>
</template>
<script>
import { changPassword } from '@/api/api'
import { deleteContractManagement, listIContractManagement } from '@/api/insys'
// import hetongModal from './hetongModal.vue';
export default {
name: 'hetong',
// components: { hetongModal },
data() {
return {
visible: false,
confirmLoading: false,
confirmDirty: false,
loading: false,
bankData: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
align: 'center',
width: 60,
customRender: function (t, r, index) {
return parseInt(index) + 1
},
},
{
title: '担保签约日期',
align: 'center',
dataIndex: 'guaranteeTimeContract',
},
{
title: '借款订单编号',
align: 'center',
dataIndex: 'orderNo',
},
{
title: '借款人名称',
align: 'center',
dataIndex: 'orderName',
},
{
title: '担保额度(元)',
align: 'center',
dataIndex: 'guarantorAmount',
customRender: (t, r, index) => {
return this.$numMoney(t)
}
},
{
title: '本次担保金额(元)',
align: 'center',
dataIndex: 'guaranteeAmount',
customRender: (t, r, index) => {
return this.$numMoney(t)
}
},
{
title: '释放日期',
align: 'center',
dataIndex: 'releaseDate',
},
],
disableMixinCreated: true,
title: '',
type: 'add',
dbList: [],
onlyread: false,
disableSubmit: true,
model: [],
modelList: [],
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
form: this.$form.createForm(this),
id: '',
bao: '1',
recordOrderNo: '',
customerType: '',
orderNo: '',
}
},
created() {
console.log('created')
},
methods: {
edit(username) {
console.log(username)
this.type = 'edit'
this.form.resetFields()
this.visible = true
this.modelList = username
this.model = username
this.$nextTick(() => {
this.form.setFieldsValue(username)
})
},
onChange() {
this.close()
},
close() {
this.$emit('close')
this.visible = false
this.disableSubmit = false
this.selectedRole = []
},
handleAddModal(title) {
this.$refs.commonBankAccountModal.add(this.applyNo)
this.$refs.commonBankAccountModal.title = title ? title : '新增'
this.$refs.commonBankAccountModal.disableSubmit = false
this.$emit('success')
// alert(this.addList)
},
handleAddModalEdit(title, record) {
this.$refs.commonBankAccountModal.edit(record)
this.$refs.commonBankAccountModal.title = title ? title : '修改'
this.$refs.commonBankAccountModal.disableSubmit = false
this.$emit('success')
},
load() {
let _p = {
params: {
customerNo: this.recordOrderNo,
},
}
listIContractManagement(_p).then((res) => {
if (res.status.statusCode == 0) {
this.model = res.result.records
} else {
this.$message.warning(res.status.statusReason)
}
})
},
handleDelete(record) {
console.log(record)
let _p = { id: record.id }
deleteContractManagement(_p).then((res) => {
if (res.status.statusCode == 0) {
this.load()
this.$message.success(res.status.statusReason)
} else {
this.$message.warning(res.status.statusReason)
}
})
},
handleCancel() {
this.close()
},
},
}
</script>