point.js
8.99 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
import dayjs from 'dayjs'
export default {
data() {
return {
IncomeList: [
{
label: '基本工资',
icon: 'jbgz-icon',
content: '实发底薪=应发底薪÷应出勤天数x实际出勤天数',
value: 'actualBasicSalary',
recordKey: 'refundOffsetRecords',
showNext: true,
sort: 1,
base: true,
customize: true,
basicList: [
{
label: '应发底薪',
tips: '',
prop: 'basicSalary',
actualProp: 'actualBasicSalary',
value: 3000
},
{
label: '应出勤天数',
value: 27,
prop: 'shouldWorkDay',
unit: '天'
},
{
label: '实际出勤天数',
value: 22,
prop: 'actualWorkDay',
unit: '天'
}
],
performance: {
label: '绩效工资',
prop: 'performanceSalary',
actualProp: 'actualPerformanceSalary',
},
},
{
label: '退单冲减',
icon: 'tdcj-icon',
content: '历史已发放提成订单客户本月退单,当月冲减该月提成',
value: 'refundOffset',
recordKey: 'refundOffsetRecords',
sort: 4,
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '退单记录描述'
},
{
title: '提成',
width: 20
}
],
tabelTr: [
'remark',
{
key: 'deduction',
format: val => {
return '-' + val
}
}
],
showUnit: '-'
},
{
label: '会员权益/升级',
icon: 'qytc-icon',
content: '权益提成 = 权益产值 × 提成系数 × 提成比例',
subContent: '延保提成 = 售前延保产值×提成系数×安心包Max考核系数×提成比例 +售后延保产值×提成比例 +安心包Max产值×提成系数×提成比例',
warnList: [
{ style: 'font-size: 28rpx;color: #808291;line-height: 48rpx;', message: '当安心包Max渗透率<15%,安心包Max考核系数为 0.8' },
{
style: 'font-size: 28rpx;color: #808291;line-height: 48rpx;',
message: '当安心包Max渗透率>15%,安心包Max考核系数为 1.0'
},
{
style: 'font-size: 28rpx;color: #F47F13;line-height: 48rpx;',
message: '问界安心包、安心包PRO、轮胎服务,三项合计交付渗透率>15% 的部分,可以计入安心包Max渗透率;如三项渗透率为20%,其中5%计入安心包Max考核。'
}
],
value: 'equityCommission',
recordKey: 'equityMerchantCommissions',
sort: 2,
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '门店名称'
},
{
title: '提成',
width: 20
}
],
tabelTr: [
{
name: val => {
const typeName = val.thirdLevelGoodsTypeName || val.secondaryGoodsTypeName || val.goodsTypeName
return `${val.merchantName}${typeName ? `-${typeName}` : ''}`
},
style: val => {
return val == 1 ? 'color: #3773F8;background-color:rgba(55, 115, 248, .2)' : 'color: #7C2CF5;background-color: rgba(124, 44, 245, .2);'
},
type: 'configCarType',
text: val => {
const typeMap = {
1: '问界',
2: '其他',
3: '鸿蒙'
}
return typeMap[val] || ''
}
},
'commission'
]
},
{
label: '日报扣款',
icon: 'rbkk-icon',
content: '日报填写错误或未在约定时间内填写日报',
value: 'dailyDeductMoney',
recordKey: 'dailyDeductionRecords',
sort: 5,
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '日期'
},
{
title: '扣款',
width: 20
}
],
tabelTr: [
'deductDate',
{
key: 'deductMoney',
format: val => {
return '-' + val
}
}
],
showUnit: '-'
},
{
label: '轻改提成',
icon: 'qgtc-icon',
content: '轻改产值x提成系数x提成比例',
value: 'lightCommission',
recordKey: 'lightMerchantCommissions',
sort: 3,
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '门店名称'
},
{
title: '提成',
width: 20
}
],
tabelTr: [
{
name: val => {
const typeName = val.thirdLevelGoodsTypeName || val.secondaryGoodsTypeName || val.goodsTypeName
return `${val.merchantName}${typeName ? `-${typeName}` : ''}`
}
},
'commission'
]
},
{
label: '平板接待扣款',
icon: 'pbjd-icon',
content: '无效或虚假平板接待以及未使用平板接待',
value: 'padDeductMoney',
recordKey: 'padDeductionRecords',
sort: 6,
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '日期'
},
{
title: '扣款',
width: 20
}
],
tabelTr: [
'deductDate',
{
key: 'deductMoney',
format: val => {
return '-' + val
}
}
],
showUnit: '-'
},
{
label: '本月递延金',
icon: 'bydyj-icon',
content: '本月递延金 = 本月提成 × 10%',
desc: '递延金将于6个月后提成发放时返还',
value: 'deferExpenses',
sort: 7,
showUnit: '-'
},
{
label: '返还递延金',
icon: 'ffdyj-icon',
content: '本月递延金 = 提成(M-6)× 10%',
desc: '6个月前提成递延金在本月返还',
value: 'deferIncome',
sort: 8
},
{
label: '其他',
icon: 'qt-icon',
content: '其他扣款、奖励事项',
recordKey: 'otherDeductionRecords',
sort: 9,
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '日期'
},
{
title: '备注'
},
{
title: '金额',
width: 20
}
],
tabelTr: [
{
key: 'createdDate',
format: val => {
return dayjs(val).format('YYYY-MM-DD')
}
},
'remark',
'deduction'
],
value: 'otherDeduction'
}
],
year: '',
month: '',
currentMonth: '',
date: ''
}
},
mounted() {
const year = new Date().getFullYear()
const month = new Date().getMonth() + 1
const day = new Date().getDate()
this.year = year
this.month = month
this.day = day
this.currentMonth = month
this.getDetail && this.getDetail(`${this.year}-${this.month}`, day)
this.date = `${this.year}-${this.month}-${day}`
},
methods: {
formatNumber(num, decimalPlaces = 2) {
// 保证小数部分精度
let [integer, decimal] = Number(num).toFixed(decimalPlaces).split('.')
// 格式化整数部分(千分位)
integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
// 如果有小数部分,则保留小数部分
return decimal ? `${integer}.${decimal}` : integer
},
back() {
console.log(88)
this.$emit('backHome')
},
prevTab() {
this.month = this.month - 1
if (this.month < 1) {
this.month = 12
this.year = this.year - 1
}
this.updateDetail && this.updateDetail(`${this.year}-${this.month}`)
},
nextTab() {
this.month = this.month + 1
// if (this.month < 1) {
// this.month = 12
// this.year = this.year - 1
// }
this.updateDetail && this.updateDetail(`${this.year}-${this.month}`)
}
}
}