selectedShowTable.vue
2.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
<!-- 被选中门店展示 -->
<template>
<div>
<el-table :data="tableData" style="width: 690px" border class="store-table">
<el-table-column label="序号" align="center" type="index" width="64px" />
<el-table-column prop="yqMerchantName" label="园区店名称" align="center" />
<el-table-column prop="merchantName" label="4S店名称" align="center" />
<el-table-column prop="merchantId" label="商户编号" align="center" />
<el-table-column prop="userType" label="商户类型" align="center">
<template slot-scope="scope">
<span>{{ baseData[scope.row.channelType === 2 ? 'ghUserTypeList' : 'userTypeList'][scope.row.userType] }}</span>
</template>
</el-table-column>
<el-table-column label="删除" align="center">
<template slot-scope="scope">
<el-button class="el-icon-delete" @click="handleDelete(scope.row)" type="text" />
</template>
</el-table-column>
<el-table-column label="券码数量(张)" align="center" width="160px">
<template slot-scope="scope">
<slot name="num" :scope="{ row: scope.row, index: scope.$index }" />
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { userType, ghUserType } from '@/common/constants.js'
export default {
name: 'SelectedShowTable',
data() {
return {
// 基本数据
baseData: {
userTypeList: userType,
ghUserTypeList: ghUserType
}
}
},
props: {
tableData: {
type: Array,
default: () => []
}
},
components: {},
computed: {},
mounted() { },
methods: {
handleDelete(row) {
this.$confirm('是否确认删除该门店?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$emit('handleTableStoreDelete', row)
}).catch(err => {
console.log(err)
})
}
}
}
</script>
<style scoped></style>