detailsBody.vue
2.39 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
<template>
<!-- 表体 -->
<Table
class="fedexDetialTable"
:data="tableData"
:headerData="headerData"
@rowClick="rowClick"
maxHeight="300px"
:order="false"
:border="false"
:pagination="false"
:pageSizes="[20, 30, 50, 100]"
:highlightCurrentRow="false"
>
<template v-slot:skuCode="scope">
<el-tooltip
class="item"
effect="dark"
:content="scope.row.model"
placement="right"
>
<span>{{ scope.row.skuCode }}</span>
</el-tooltip>
</template>
<template v-slot:knockdownNumber="scope">
<span
>{{ scope.row.knockdownNumber | clearNull }}
{{ scope.row.knockdownUnit | clearNull }}</span
>
</template>
<template v-slot:qtyLegalFirst="scope">
<span
>{{ scope.row.qtyLegalFirst | clearNull }}
{{ scope.row.unitLegalFirst | clearNull }}</span
>
</template>
<template v-slot:qtyLegalSecond="scope">
<span
>{{ scope.row.qtyLegalSecond | clearNull }}
{{ scope.row.unitLegalSecond | clearNull }}</span
>
</template>
<template v-slot:amount="scope">
<span
>{{ scope.row.amount | clearNull }}
{{ scope.row.currency | clearNull }}</span
>
</template>
</Table>
</template>
<script>
export default {
props: {
tableData: {
type: Array,
default: null,
},
headerData: {
type: Array,
default: null,
},
activeDetial: {
type: Object,
default: null,
},
dictData: {
type: Object,
default: null,
},
},
data() {
return {
formData: this.activeDetial,
expandRowKeys: [],
unit: [],
levyType: [],
currency: [],
country: [],
};
},
watch: {
activeDetial(val) {
if (val == null) {
this.expandRowKeys = [];
}
this.formData = val;
},
detialsData(val) {
this.tableData = val;
},
},
methods: {
rowClick(val) {
this.$emit("rowClick", val);
},
},
filters: {
clearNull(value) {
if (value == null) {
return "";
} else {
return value;
}
},
},
};
</script>
<style lang="scss" scoped>
::v-deep .el-table tr {
background-color: #f2f2f2 !important;
border: 0;
}
::v-deep .el-table--enable-row-hover .el-table__body tr:hover > td {
background-color: #f2f2f2 !important;
}
</style>