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
| /**
| * Created by iailab
| *
| * 枚举类
| */
|
| // ========== COMMON 模块 ==========
| // 全局通用状态枚举
| export const CommonStatusEnum = {
| ENABLE: 0, // 开启
| DISABLE: 1 // 禁用
| }
|
| // 全局用户类型枚举
| export const UserTypeEnum = {
| MEMBER: 1, // 会员
| ADMIN: 2 // 管理员
| }
|
| // ========== SYSTEM 模块 ==========
| /**
| * 菜单的类型枚举
| */
| export const SystemMenuTypeEnum = {
| DIR: 1, // 目录
| MENU: 2, // 菜单
| BUTTON: 3 // 按钮
| }
|
| /**
| * 应用菜单的类型枚举
| */
| export const SystemAppMenuTypeEnum = {
| DIR: 1, // 应用
| MENU: 2, // 菜单
| BUTTON: 3 // 按钮
| }
|
| /**
| * 角色的类型枚举
| */
| export const SystemRoleTypeEnum = {
| SYSTEM: 1, // 内置角色
| CUSTOM: 2 // 自定义角色
| }
|
| /**
| * 数据权限的范围枚举
| */
| export const SystemDataScopeEnum = {
| ALL: 1, // 全部数据权限
| DEPT_CUSTOM: 2, // 指定部门数据权限
| DEPT_ONLY: 3, // 部门数据权限
| DEPT_AND_CHILD: 4, // 部门及以下数据权限
| DEPT_SELF: 5 // 仅本人数据权限
| }
|
| /**
| * 用户的社交平台的类型枚举
| */
| export const SystemUserSocialTypeEnum = {
| DINGTALK: {
| title: '钉钉',
| type: 20,
| source: 'dingtalk',
| img: 'https://s1.ax1x.com/2022/05/22/OzMDRs.png'
| },
| WECHAT_ENTERPRISE: {
| title: '企业微信',
| type: 30,
| source: 'wechat_enterprise',
| img: 'https://s1.ax1x.com/2022/05/22/OzMrzn.png'
| }
| }
|
| // ========== INFRA 模块 ==========
| /**
| * 代码生成模板类型
| */
| export const InfraCodegenTemplateTypeEnum = {
| CRUD: 1, // 基础 CRUD
| TREE: 2, // 树形 CRUD
| SUB: 3 // 主子表 CRUD
| }
|
| /**
| * 任务状态的枚举
| */
| export const InfraJobStatusEnum = {
| INIT: 0, // 初始化中
| NORMAL: 1, // 运行中
| STOP: 2 // 暂停运行
| }
|
| /**
| * API 异常数据的处理状态
| */
| export const InfraApiErrorLogProcessStatusEnum = {
| INIT: 0, // 未处理
| DONE: 1, // 已处理
| IGNORE: 2 // 已忽略
| }
|
| // ========== PAY 模块 ==========
| /**
| * 支付渠道枚举
| */
| export const PayChannelEnum = {
| WX_PUB: {
| code: 'wx_pub',
| name: '微信 JSAPI 支付'
| },
| WX_LITE: {
| code: 'wx_lite',
| name: '微信小程序支付'
| },
| WX_APP: {
| code: 'wx_app',
| name: '微信 APP 支付'
| },
| WX_NATIVE: {
| code: 'wx_native',
| name: '微信 Native 支付'
| },
| WX_WAP: {
| code: 'wx_wap',
| name: '微信 WAP 网站支付'
| },
| WX_BAR: {
| code: 'wx_bar',
| name: '微信条码支付'
| },
| ALIPAY_PC: {
| code: 'alipay_pc',
| name: '支付宝 PC 网站支付'
| },
| ALIPAY_WAP: {
| code: 'alipay_wap',
| name: '支付宝 WAP 网站支付'
| },
| ALIPAY_APP: {
| code: 'alipay_app',
| name: '支付宝 APP 支付'
| },
| ALIPAY_QR: {
| code: 'alipay_qr',
| name: '支付宝扫码支付'
| },
| ALIPAY_BAR: {
| code: 'alipay_bar',
| name: '支付宝条码支付'
| },
| WALLET: {
| code: 'wallet',
| name: '钱包支付'
| },
| MOCK: {
| code: 'mock',
| name: '模拟支付'
| }
| }
|
| /**
| * 支付的展示模式每局
| */
| export const PayDisplayModeEnum = {
| URL: {
| mode: 'url'
| },
| IFRAME: {
| mode: 'iframe'
| },
| FORM: {
| mode: 'form'
| },
| QR_CODE: {
| mode: 'qr_code'
| },
| APP: {
| mode: 'app'
| }
| }
|
| /**
| * 支付类型枚举
| */
| export const PayType = {
| WECHAT: 'WECHAT',
| ALIPAY: 'ALIPAY',
| MOCK: 'MOCK'
| }
|
| /**
| * 支付订单状态枚举
| */
| export const PayOrderStatusEnum = {
| WAITING: {
| status: 0,
| name: '未支付'
| },
| SUCCESS: {
| status: 10,
| name: '已支付'
| },
| CLOSED: {
| status: 20,
| name: '未支付'
| }
| }
|
| // ========== MALL - 商品模块 ==========
| /**
| * 商品 SPU 状态
| */
| export const ProductSpuStatusEnum = {
| RECYCLE: {
| status: -1,
| name: '回收站'
| },
| DISABLE: {
| status: 0,
| name: '下架'
| },
| ENABLE: {
| status: 1,
| name: '上架'
| }
| }
|
| // ========== MALL - 营销模块 ==========
| /**
| * 优惠劵模板的有限期类型的枚举
| */
| export const CouponTemplateValidityTypeEnum = {
| DATE: {
| type: 1,
| name: '固定日期可用'
| },
| TERM: {
| type: 2,
| name: '领取之后可用'
| }
| }
|
| /**
| * 优惠劵模板的领取方式的枚举
| */
| export const CouponTemplateTakeTypeEnum = {
| USER: {
| type: 1,
| name: '直接领取'
| },
| ADMIN: {
| type: 2,
| name: '指定发放'
| },
| REGISTER: {
| type: 3,
| name: '新人券'
| }
| }
|
| /**
| * 营销的商品范围枚举
| */
| export const PromotionProductScopeEnum = {
| ALL: {
| scope: 1,
| name: '通用劵'
| },
| SPU: {
| scope: 2,
| name: '商品劵'
| },
| CATEGORY: {
| scope: 3,
| name: '品类劵'
| }
| }
|
| /**
| * 营销的条件类型枚举
| */
| export const PromotionConditionTypeEnum = {
| PRICE: {
| type: 10,
| name: '满 N 元'
| },
| COUNT: {
| type: 20,
| name: '满 N 件'
| }
| }
|
| /**
| * 优惠类型枚举
| */
| export const PromotionDiscountTypeEnum = {
| PRICE: {
| type: 1,
| name: '满减'
| },
| PERCENT: {
| type: 2,
| name: '折扣'
| }
| }
|
| // ========== MALL - 交易模块 ==========
| /**
| * 分销关系绑定模式枚举
| */
| export const BrokerageBindModeEnum = {
| ANYTIME: {
| mode: 1,
| name: '首次绑定'
| },
| REGISTER: {
| mode: 2,
| name: '注册绑定'
| },
| OVERRIDE: {
| mode: 3,
| name: '覆盖绑定'
| }
| }
| /**
| * 分佣模式枚举
| */
| export const BrokerageEnabledConditionEnum = {
| ALL: {
| condition: 1,
| name: '人人分销'
| },
| ADMIN: {
| condition: 2,
| name: '指定分销'
| }
| }
| /**
| * 佣金记录业务类型枚举
| */
| export const BrokerageRecordBizTypeEnum = {
| ORDER: {
| type: 1,
| name: '获得推广佣金'
| },
| WITHDRAW: {
| type: 2,
| name: '提现申请'
| }
| }
| /**
| * 佣金提现状态枚举
| */
| export const BrokerageWithdrawStatusEnum = {
| AUDITING: {
| status: 0,
| name: '审核中'
| },
| AUDIT_SUCCESS: {
| status: 10,
| name: '审核通过'
| },
| AUDIT_FAIL: {
| status: 20,
| name: '审核不通过'
| },
| WITHDRAW_SUCCESS: {
| status: 11,
| name: '提现成功'
| },
| WITHDRAW_FAIL: {
| status: 21,
| name: '提现失败'
| }
| }
| /**
| * 佣金提现类型枚举
| */
| export const BrokerageWithdrawTypeEnum = {
| WALLET: {
| type: 1,
| name: '钱包'
| },
| BANK: {
| type: 2,
| name: '银行卡'
| },
| WECHAT: {
| type: 3,
| name: '微信'
| },
| ALIPAY: {
| type: 4,
| name: '支付宝'
| }
| }
|
| /**
| * 配送方式枚举
| */
| export const DeliveryTypeEnum = {
| EXPRESS: {
| type: 1,
| name: '快递发货'
| },
| PICK_UP: {
| type: 2,
| name: '到店自提'
| }
| }
| /**
| * 交易订单 - 状态
| */
| export const TradeOrderStatusEnum = {
| UNPAID: {
| status: 0,
| name: '待支付'
| },
| UNDELIVERED: {
| status: 10,
| name: '待发货'
| },
| DELIVERED: {
| status: 20,
| name: '已发货'
| },
| COMPLETED: {
| status: 30,
| name: '已完成'
| },
| CANCELED: {
| status: 40,
| name: '已取消'
| }
| }
|
| // ========== ERP - 企业资源计划 ==========
|
| export const ErpBizType = {
| PURCHASE_ORDER: 10,
| PURCHASE_IN: 11,
| PURCHASE_RETURN: 12,
| SALE_ORDER: 20,
| SALE_OUT: 21,
| SALE_RETURN: 22
| }
|
|