companyShareholderTable.vue
2.54 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
<template>
<div>
<a-card title="企业股东信息" :bordered="false">
<a-table ref="table" size="middle" bordered :columns="shareholderInfoData" :dataSource="stockholderList" :pagination="false" :loading="loading" :rowKey="record => record.id" @change="handleTableChange">
</a-table>
</a-card>
</div>
</template>
<script>
import { JeecgListMixin } from '@/mixins/CoreListMixin'
import { deleteStockholders } from '@/api/configApi'
export default {
name: 'companyShareholderTable',
mixins: [JeecgListMixin],
props: {
userType: {
type: Number,
default: null,
},
stockholderList:{
type:Array,
default:()=>{
return [];
}
},
customerNo:{
type:String,
default:''
}
},
data () {
return {
shareholderInfoData: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
align: 'center',
width: 60,
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{
title: '股东名称',
align: 'center',
width: '100px',
dataIndex: 'stockholderName'
},
{
title: '持股比例',
align: 'center',
dataIndex: 'shareholdingRatio'
},
{
title: '认缴出资额(万元)',
align: 'center',
dataIndex: 'capitalContributions'
},
{
title: '认缴日期',
align: 'center',
dataIndex: 'subscriptionDate'
},
],
disableMixinCreated:true,
}
},
methods: {
handleAddModal (title) {
this.$refs.companyShareholderModal.add(this.customerNo)
this.$refs.companyShareholderModal.title = title ? title : '新增'
this.$refs.companyShareholderModal.disableSubmit = false
},
handleEditModal (title,record) {
this.$refs.companyShareholderModal.edit(record)
this.$refs.companyShareholderModal.title = title ? title : '修改'
this.$refs.companyShareholderModal.disableSubmit = false
},
companyShareholderModalOk () {
this.$emit('editReload');
},
handleDelete(record){
console.log(record)
let _p = {'id':record.id}
deleteStockholders(_p).then(res=>{
if (res.status.statusCode == 0) {
this.$emit('editReload');
this.$message.success(res.status.statusReason)
} else {
this.$message.warning(res.status.statusReason)
}
})
},
}
}
</script>
<style>
</style>