performanceDetailDialog.vue
2.96 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
<!-- 业绩详情弹窗 -->
<template>
<d2-dialog
title="查看明细"
:is-visible.sync="perDetailVisible"
width="75%"
btn-ok-label="关闭"
@confirmDialog="handleConfirm"
@closeDialog="handleConfirm"
:no-cancel="true"
class="performance-detail">
<span slot="sub-title">
<span class="title-staff-name">{{ detailInfoData.updatedBy }}</span><span>{{ detailInfoData.merchantName }}</span>
</span>
<el-row class="tableCon">
<div class="tableBox">
<d2-table ref="perDetailTable"
:has-num="false"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
</d2-table>
</div>
</el-row>
</d2-dialog>
</template>
<script>
import { getPerDetailListApi } from '@api/businessSchool'
import { Util } from '@/common/util'
export default {
name: 'PerformanceDetailDialog',
data() {
return {
getListApi: getPerDetailListApi,
// 表格参数
tableParams: {
needUnique: true,
mutiSelectUniqueKey: 'uniqueVal',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableColumns: [{
label: '序号',
prop: 'ownSerialNum',
type: 'ownSerialNum',
width: '60'
}, {
label: '订单编号',
prop: 'orderCode',
width: '160'
}, {
label: '支付时间',
prop: 'paySuccessTime',
width: '160',
formatter: (cellValue) => {
return Util.dateFormate(cellValue?.paySuccessTime, 'YYYY-MM-DD HH:mm:ss')
}
}, {
label: '客户名称',
prop: 'customerName'
}, {
label: '客户手机号',
prop: 'customerPhone',
width: '120'
}, {
label: '订单产值/元',
prop: 'orderMoney'
}, {
label: '产值比例',
prop: 'averagePriceBonus'
}, {
label: '成交率系数',
prop: 'customerUnitBonus'
}, {
label: '均客单系数',
prop: 'outputBonus'
}, {
label: '导师激励提成',
prop: 'mentorBonus'
}, {
label: '订单总提成',
prop: 'orderBonus'
}]
},
searchForm: {}
}
},
props: {
perDetailVisible: {
type: Boolean,
default: false
},
detailInfoData: {
type: Object
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm = {
mentorOrStudentStaffUuid: this.detailInfoData?.staffUuid
}
resolve()
})
},
handleConfirm() {
this.$emit('handleConfirm')
}
}
}
</script>
<style lang="scss">
.performance-detail .table {
margin: 0 auto 20px !important;
width: 98%;
}
.title-staff-name{
margin: 0 8px;
}
</style>