constants.js
10.9 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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
/*
* @Author: limin
* @Date: 2019-09-01 19:06:01
* @Last Modified by: chenwq
* @Last Modified time: 2021-07-12 16:33:07
*/
export const TYPE_NAME = "confType"
/**
* 前端基础数据管理对应的接口名称的key
*/
export const BaseData = {
channelType: "channelType",
productType: "productType",
productServiceItemList: "productServiceItemList"
}
/**
* 超级管理员类型
*/
export const SUPPER_ADMIN = true //
// 商户类型 - 除广汇外
export const userType = {
// 1: '员工',
// 2: '门店',
// 3: '市级经销商',
// 4: '省级经销商',
// 5: '工厂',
1: "工厂",
2: "省代",
3: "市代",
4: "门店"
}
// 商户类型 - 广汇
export const ghUserType = {
1: "员工",
2: "门店",
3: "片区",
4: "大区",
5: "总部",
6: "供应商"
}
// 商户类型 - 除广汇外
export const userTypeList = [
{
confId: 1,
confLabel: "员工"
},
{
confId: 2,
confLabel: "门店"
},
{
confId: 3,
confLabel: "市级经销商"
},
{
confId: 4,
confLabel: "省级经销商"
},
{
confId: 5,
confLabel: "工厂"
}
]
// 商户类型 - 广汇
export const ghUserTypeList = [
{
confId: 1,
confLabel: "员工"
},
{
confId: 2,
confLabel: "门店"
},
{
confId: 3,
confLabel: "片区"
},
{
confId: 4,
confLabel: "大区"
},
{
confId: 5,
confLabel: "总部"
},
{
confId: 6,
confLabel: "供应商"
}
]
// 商户分类
export const merchantClassifyList = [
{
confId: 1,
confLabel: "批发/零售商"
},
{
confId: 2,
confLabel: "4S店"
},
{
confId: 3,
confLabel: "综合汽贸店"
},
{
confId: 4,
confLabel: "综合后服务门店 "
},
{
confId: 5,
confLabel: "厂家"
},
{
confId: 6,
confLabel: "园区店"
},
{
confId: 7,
confLabel: "服务商"
},
{
confId: 8,
confLabel: "虚拟园区店"
}
]
// 商户分类 - 4S店(2)和服务商(7)- 查全部(2和7,排除园区店{id:6})
export const merchantStoreServiceList = [
{
confId: 2,
confLabel: "4S店"
},
{
confId: 7,
confLabel: "服务商"
},
{
confId: -1,
confLabel: "园区店"
}
]
// 手续费
export const deductChargeFlagObj = {
Y: "扣除手续费(按0.6%的标准)",
N: "不扣除手续费"
}
// 导流方分润手续费
export const shop4sDeductChargeFlagObj = {
Y: "导流方分润扣除手续费",
N: "导流方分润不扣除手续费"
}
// 服务商分润手续费
export const partnerDeductChargeFlagObj = {
Y: "服务商分润扣除手续费",
N: "服务商分润不扣除手续费"
}
// 品牌商
export const brandMerchantList = [
{
confId: "1",
confValue: "3M/福膜"
},
{
confId: "2",
confValue: "强生/福膜"
},
{
confId: "3",
confValue: "强生/斯帝飞"
},
{
confId: "4",
confValue: "3M/斯帝飞"
},
{
confId: "5",
confValue: "3M/今蓝"
},
{
confId: "6",
confValue: "量子/今蓝"
},
{
confId: "7",
confValue: "强生"
},
{
confId: "8",
confValue: "今蓝"
},
{
confId: "9",
confValue: "琥珀"
},
{
confId: "10",
confValue: "嘀嘀虎"
},
{
confId: "11",
confValue: "康得新"
}
]
// 分账方式
export const divisionTypeList = [
{
confId: "1",
confLabel: "线下对账"
},
{
confId: "2",
confLabel: "线上分账"
}
]
// 支付方式
export const payTypeList = [
{
confId: "1",
confLabel: "微信支付"
},
{
confId: "2",
confLabel: "4S店支付"
},
{
confId: "3",
confLabel: "POS机收款"
},
{
confId: "4",
confLabel: "支付宝支付"
}
]
export const payType = {
1: "微信支付",
2: "4S店支付",
3: "POS机收款",
4: "支付宝支付"
}
// 订单类型
export const orderTypeList = [
{
confId: "1",
confLabel: "正常"
},
{
confId: "2",
confLabel: "异常"
},
{
confId: "3",
confLabel: "正常测试"
},
{
confId: "4",
confLabel: "异常测试"
},
{
confId: "5",
confLabel: "未收款"
},
{
confId: "-1",
confLabel: "无"
}
]
// 分账状态
export const divisionStatusList = [
{
confId: "1",
confLabel: "待分账"
},
{
confId: "2",
confLabel: "分账中"
},
{
confId: "3",
confLabel: "分账成功"
},
{
confId: "4",
confLabel: "分账失败"
},
{
confId: "5",
confLabel: "异常"
}
]
// 提现状态
export const withdrawStatusList = [
{
confId: 1,
confLabel: "提现中"
},
{
confId: 2,
confLabel: "提现成功"
},
{
confId: 3,
confLabel: "提现失败"
}
]
// 提现渠道
export const withdrawChannelList = [
{
confId: 1,
confLabel: "小程序"
},
{
confId: 2,
confLabel: "PC后台"
}
]
// 出库状态
export const warehouseStatusList = [
{
confId: 1,
confLabel: "待出库"
},
{
confId: 3,
confLabel: "出库中"
},
{
confId: 4,
confLabel: "出库成功"
},
{
confId: 5,
confLabel: "出库失败"
}
]
// 获取最近n个月,默认6个月
export function getCurrentSixMonth(n = 5) {
return [new Date(new Date().setMonth(new Date().getMonth() - n)), new Date()]
}
// 新值,旧值,整数部分位数,小数部分位数,最小值,最大值,规则
export function limitPrice(
newValue,
oldValue,
intergerDigit,
pointDigit,
minValue,
maxValue,
regRule
) {
var reg = {
priceReg: /^\d[\d\.]*$/, // eslint-disable-line
numReg: /^[1-9]\d*$/
}
regRule = regRule || "priceReg"
if (
newValue &&
((minValue && newValue < minValue) || (maxValue && newValue > maxValue))
) {
return oldValue || ""
}
if (newValue && reg[regRule].test(newValue + "")) {
if (/\./.test(newValue)) {
newValue = newValue + ""
var interger = newValue.split(".")[0]
var point = newValue.split(".")[1]
var intergerNum =
interger.length > intergerDigit ? oldValue.split(".")[0] : interger
var pointNum =
point.length > pointDigit ? point.slice(0, pointDigit) : point
newValue = pointDigit
? intergerNum + "." + pointNum
: newValue.split(".")[0]
} else {
newValue =
newValue.length > intergerDigit
? oldValue.slice(0, intergerDigit)
: newValue
}
return newValue
} else {
return newValue ? oldValue : ""
}
}
/**
* 时间控件-限制月份
*/
export const rangePickerOptions = {
disabledDate(date) {
console.log(date)
console.log(new Date())
if (date > new Date()) {
return true
}
return false
}
}
/**
* 时间控件-(0-30天内的日期)
*/
export const appointDays = 35
export const afterTodayOptions = {
disabledDate(date) {
if (
date < new Date(new Date().toLocaleDateString()) ||
date >
new Date(new Date().setDate(new Date().getDate() + (appointDays - 1)))
) {
return true
}
return false
}
}
// 园区店模式/经营模式
export const manageTypeList = [
{ confId: 0, confLabel: "园区店" },
{ confId: 1, confLabel: "驻店" }
]
// 导流方渠道
export const sourceChannelTypeList = [
{ confId: 1, confLabel: "嘀加渠道" },
{ confId: 2, confLabel: "广汇渠道" }
]
export const warrantyProList = [1, 4, 6, 12, 14]
// 所属场景
export const sceneCodeList = [
{ confId: 1, confValue: "1.1精品升级" },
{ confId: 2, confValue: "1.2次新车转化" },
{ confId: 3, confValue: "1.3售后众筹" },
{ confId: 0, confValue: "2.0会员权益/升级" }
]
// 所属场景
export const sceneList = {
1: "1.1精品升级",
2: "1.2次新车转化",
3: "1.3售后众筹",
0: "2.0会员权益/升级"
}
// 导流方下拉选项对应
export const attrToVal = [
{
confId: 3,
confLabel: "city"
},
{
// confId: 4,
confId: 2,
confLabel: "province"
},
{
// confId: 5,
confId: 1,
confLabel: "factory"
}
]
export const sceneType = {
1: "1.1精品升级",
2: "1.2次新车转化",
3: "1.3售后众筹",
0: "2.0会员权益/升级"
}
export const proportionType = {
1: "(毛利)",
2: "(收入)",
3: "(固定金额)",
4: "(产值-流量成本)",
5: "(产值-流量成本-其他费用不包含产品成本)",
6: "(产值-流量成本-其他费用包含产品成本)"
}
export const targetType = {
1: "流量方",
2: "服务商",
3: "平台方"
}
// 太阳膜部位
export const positionTypeList = [
{
position: 1,
confName: "前档玻璃",
deductionStandard: 1
},
{
position: 2,
confName: "侧后档玻璃",
deductionStandard: 2
},
{
position: 3,
confName: "单帖侧窗一个",
deductionStandard: 0.4
},
{
position: 4,
confName: "单帖后档一个",
deductionStandard: 0.8
},
{
position: 5,
confName: "单帖小天窗",
deductionStandard: 0.4
},
{
position: 6,
confName: "单帖中天窗",
deductionStandard: 0.8
},
{
position: 7,
confName: "单帖全景天窗",
deductionStandard: 1
}
]
// 太阳膜适用车型
export const applicableModelTypeList = [
{
confId: 1,
confName: "小轿车"
},
{
confId: 2,
confName: "SUV"
},
{
confId: 3,
confName: "MPV"
},
{
confId: 4,
confName: "货车"
}
]
/**
1-太阳膜
4-车衣(众筹)
6-改色膜(众筹)
12-车衣
14-改色膜
*/
export const membraneTypeList = [1, 4, 6, 12, 14]
export const businessType = [
{
optionId: 1,
optionLabel: '1.2'
},
{
optionId: 2,
optionLabel: '1.3'
},
{
optionId: 3,
optionLabel: '2.0'
}
]
export const orderManageStatusList = [
{ confId: '1', confName: '待付款' },
{ confId: '2', confName: '已支付' },
{ confId: '3', confName: '已失效' },
// { confId: '21', confName: '待收货(待核销)' },
{ confId: '21', confName: '待核销' },
{ confId: '22', confName: '已核销' },
// { confId: '22', confName: '已收货(已核销)' },
{ confId: '6', confName: '待发货' },
// { confId: '7', confName: '待核销' },
// { confId: '8', confName: '已核销' },
{ confId: '9', confName: '售后中' },
{ confId: '10', confName: '售后完成' },
{ confId: '11', confName: '待审批' }
]
export const orderSourceList = [
{ confId: '1', confName: '商城订单' },
{ confId: '2', confName: '直播订单' },
{ confId: '3', confName: '活动订单' },
{ confId: '4', confName: '众筹订单' }
]
export const deliveryTypeList = [
{ confId: '1', confName: '到店核销' },
{ confId: '2', confName: '快递到家' }
]
export const afterSaleStatusList = [
{ confId: '1', confName: '待审核' },
{ confId: '2', confName: '审核成功' },
{ confId: '3', confName: '审核失败' },
{ confId: '4', confName: '待确认' },
{ confId: '5', confName: '退款中' },
{ confId: '6', confName: '已退款' },
{ confId: '7', confName: '退款失败' }
]