residentDetailDialog.vue
3.76 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
<!-- 驻店绩效-查看明细弹窗 -->
<template>
<GLDialog class="apply-store"
bigTitle="查看明细"
mode="big"
:visible.sync="isVisible"
:before-close="handleClose"
v-loading="loading"
:hasFooter="false">
<div>
<slot name="search"></slot>
<GLTable ref="storeRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<div class="tb-ellipsis"
slot="customerName"
slot-scope="scope">
<el-popover placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.scope.customerName">
<span slot="reference">
{{ scope.scope.customerName }}
</span>
</el-popover>
</div>
</GLTable>
</div>
</GLDialog>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'ResidentDetailDialog',
data() {
return {
// 表格组件
userInfo: {},
tableSearchForm: {},
url: url,
getListApi: this.$apis.performanceManage.getDetailApi,
// 表格参数
tableParams: {
listName: 'list',
tableColumns: [
{
label: '订单编码',
prop: 'orderCode',
width: 180
},
{
label: '支付时间',
prop: 'orderTime',
width: '180px',
formatter: cellValue => {
return cellValue.orderTime ? dayjs(cellValue.orderTime).format('YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName',
minWidth: 120
},
{
label: '客户手机号',
prop: 'customerPhone',
width: 130
},
{
label: '订单产值',
prop: 'orderMoney',
width: 100,
formatter: cellValue => {
return cellValue.orderMoney || cellValue.orderMoney == 0 ? cellValue.orderMoney.toFixed(2) : '-'
}
},
{
label: '提成奖励',
prop: 'commissionBonus',
width: 100,
formatter: cellValue => {
return cellValue.commissionBonus || cellValue.commissionBonus == 0 ? cellValue.commissionBonus.toFixed(2) : '-'
}
},
{
label: '高客单奖励',
prop: 'highCustomerUnitBonus',
width: 120,
formatter: cellValue => {
return cellValue.highCustomerUnitBonus || cellValue.highCustomerUnitBonus == 0 ? cellValue.highCustomerUnitBonus.toFixed(2) : '-'
}
},
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
searchForm: {
type: Object,
default: () => { }
},
recordInfo: {
type: Object,
default: () => { }
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
// this.tableSearchForm.staffUuid = this.recordInfo.staffUuid
// this.tableSearchForm.performanceMonth = this.recordInfo.performanceMonth
this.tableSearchForm.id = this.recordInfo.id
resolve()
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style scoped>
</style>