提交 | 用户 | 时间
|
820397
|
1 |
/** |
H |
2 |
* Created by iailab |
|
3 |
* |
|
4 |
* 枚举类 |
|
5 |
*/ |
|
6 |
|
|
7 |
// ========== COMMON 模块 ========== |
|
8 |
// 全局通用状态枚举 |
|
9 |
export const CommonStatusEnum = { |
|
10 |
ENABLE: 0, // 开启 |
|
11 |
DISABLE: 1 // 禁用 |
|
12 |
} |
|
13 |
|
|
14 |
// 全局用户类型枚举 |
|
15 |
export const UserTypeEnum = { |
|
16 |
MEMBER: 1, // 会员 |
|
17 |
ADMIN: 2 // 管理员 |
|
18 |
} |
|
19 |
|
|
20 |
// ========== SYSTEM 模块 ========== |
|
21 |
/** |
|
22 |
* 菜单的类型枚举 |
|
23 |
*/ |
|
24 |
export const SystemMenuTypeEnum = { |
|
25 |
DIR: 1, // 目录 |
|
26 |
MENU: 2, // 菜单 |
|
27 |
BUTTON: 3 // 按钮 |
|
28 |
} |
|
29 |
|
|
30 |
/** |
39248b
|
31 |
* 应用菜单的类型枚举 |
H |
32 |
*/ |
|
33 |
export const SystemAppMenuTypeEnum = { |
|
34 |
DIR: 1, // 应用 |
|
35 |
MENU: 2, // 菜单 |
|
36 |
BUTTON: 3 // 按钮 |
|
37 |
} |
|
38 |
|
|
39 |
/** |
820397
|
40 |
* 角色的类型枚举 |
H |
41 |
*/ |
|
42 |
export const SystemRoleTypeEnum = { |
|
43 |
SYSTEM: 1, // 内置角色 |
|
44 |
CUSTOM: 2 // 自定义角色 |
|
45 |
} |
|
46 |
|
|
47 |
/** |
|
48 |
* 数据权限的范围枚举 |
|
49 |
*/ |
|
50 |
export const SystemDataScopeEnum = { |
|
51 |
ALL: 1, // 全部数据权限 |
|
52 |
DEPT_CUSTOM: 2, // 指定部门数据权限 |
|
53 |
DEPT_ONLY: 3, // 部门数据权限 |
|
54 |
DEPT_AND_CHILD: 4, // 部门及以下数据权限 |
|
55 |
DEPT_SELF: 5 // 仅本人数据权限 |
|
56 |
} |
|
57 |
|
|
58 |
/** |
|
59 |
* 用户的社交平台的类型枚举 |
|
60 |
*/ |
|
61 |
export const SystemUserSocialTypeEnum = { |
|
62 |
DINGTALK: { |
|
63 |
title: '钉钉', |
|
64 |
type: 20, |
|
65 |
source: 'dingtalk', |
|
66 |
img: 'https://s1.ax1x.com/2022/05/22/OzMDRs.png' |
|
67 |
}, |
|
68 |
WECHAT_ENTERPRISE: { |
|
69 |
title: '企业微信', |
|
70 |
type: 30, |
|
71 |
source: 'wechat_enterprise', |
|
72 |
img: 'https://s1.ax1x.com/2022/05/22/OzMrzn.png' |
|
73 |
} |
|
74 |
} |
|
75 |
|
|
76 |
// ========== INFRA 模块 ========== |
|
77 |
/** |
|
78 |
* 代码生成模板类型 |
|
79 |
*/ |
|
80 |
export const InfraCodegenTemplateTypeEnum = { |
|
81 |
CRUD: 1, // 基础 CRUD |
|
82 |
TREE: 2, // 树形 CRUD |
|
83 |
SUB: 3 // 主子表 CRUD |
|
84 |
} |
|
85 |
|
|
86 |
/** |
|
87 |
* 任务状态的枚举 |
|
88 |
*/ |
|
89 |
export const InfraJobStatusEnum = { |
|
90 |
INIT: 0, // 初始化中 |
|
91 |
NORMAL: 1, // 运行中 |
|
92 |
STOP: 2 // 暂停运行 |
|
93 |
} |
|
94 |
|
|
95 |
/** |
|
96 |
* API 异常数据的处理状态 |
|
97 |
*/ |
|
98 |
export const InfraApiErrorLogProcessStatusEnum = { |
|
99 |
INIT: 0, // 未处理 |
|
100 |
DONE: 1, // 已处理 |
|
101 |
IGNORE: 2 // 已忽略 |
|
102 |
} |
|
103 |
|
|
104 |
// ========== PAY 模块 ========== |
|
105 |
/** |
|
106 |
* 支付渠道枚举 |
|
107 |
*/ |
|
108 |
export const PayChannelEnum = { |
|
109 |
WX_PUB: { |
|
110 |
code: 'wx_pub', |
|
111 |
name: '微信 JSAPI 支付' |
|
112 |
}, |
|
113 |
WX_LITE: { |
|
114 |
code: 'wx_lite', |
|
115 |
name: '微信小程序支付' |
|
116 |
}, |
|
117 |
WX_APP: { |
|
118 |
code: 'wx_app', |
|
119 |
name: '微信 APP 支付' |
|
120 |
}, |
|
121 |
WX_NATIVE: { |
|
122 |
code: 'wx_native', |
|
123 |
name: '微信 Native 支付' |
|
124 |
}, |
|
125 |
WX_WAP: { |
|
126 |
code: 'wx_wap', |
|
127 |
name: '微信 WAP 网站支付' |
|
128 |
}, |
|
129 |
WX_BAR: { |
|
130 |
code: 'wx_bar', |
|
131 |
name: '微信条码支付' |
|
132 |
}, |
|
133 |
ALIPAY_PC: { |
|
134 |
code: 'alipay_pc', |
|
135 |
name: '支付宝 PC 网站支付' |
|
136 |
}, |
|
137 |
ALIPAY_WAP: { |
|
138 |
code: 'alipay_wap', |
|
139 |
name: '支付宝 WAP 网站支付' |
|
140 |
}, |
|
141 |
ALIPAY_APP: { |
|
142 |
code: 'alipay_app', |
|
143 |
name: '支付宝 APP 支付' |
|
144 |
}, |
|
145 |
ALIPAY_QR: { |
|
146 |
code: 'alipay_qr', |
|
147 |
name: '支付宝扫码支付' |
|
148 |
}, |
|
149 |
ALIPAY_BAR: { |
|
150 |
code: 'alipay_bar', |
|
151 |
name: '支付宝条码支付' |
|
152 |
}, |
|
153 |
WALLET: { |
|
154 |
code: 'wallet', |
|
155 |
name: '钱包支付' |
|
156 |
}, |
|
157 |
MOCK: { |
|
158 |
code: 'mock', |
|
159 |
name: '模拟支付' |
|
160 |
} |
|
161 |
} |
|
162 |
|
|
163 |
/** |
|
164 |
* 支付的展示模式每局 |
|
165 |
*/ |
|
166 |
export const PayDisplayModeEnum = { |
|
167 |
URL: { |
|
168 |
mode: 'url' |
|
169 |
}, |
|
170 |
IFRAME: { |
|
171 |
mode: 'iframe' |
|
172 |
}, |
|
173 |
FORM: { |
|
174 |
mode: 'form' |
|
175 |
}, |
|
176 |
QR_CODE: { |
|
177 |
mode: 'qr_code' |
|
178 |
}, |
|
179 |
APP: { |
|
180 |
mode: 'app' |
|
181 |
} |
|
182 |
} |
|
183 |
|
|
184 |
/** |
|
185 |
* 支付类型枚举 |
|
186 |
*/ |
|
187 |
export const PayType = { |
|
188 |
WECHAT: 'WECHAT', |
|
189 |
ALIPAY: 'ALIPAY', |
|
190 |
MOCK: 'MOCK' |
|
191 |
} |
|
192 |
|
|
193 |
/** |
|
194 |
* 支付订单状态枚举 |
|
195 |
*/ |
|
196 |
export const PayOrderStatusEnum = { |
|
197 |
WAITING: { |
|
198 |
status: 0, |
|
199 |
name: '未支付' |
|
200 |
}, |
|
201 |
SUCCESS: { |
|
202 |
status: 10, |
|
203 |
name: '已支付' |
|
204 |
}, |
|
205 |
CLOSED: { |
|
206 |
status: 20, |
|
207 |
name: '未支付' |
|
208 |
} |
|
209 |
} |
|
210 |
|
|
211 |
// ========== MALL - 商品模块 ========== |
|
212 |
/** |
|
213 |
* 商品 SPU 状态 |
|
214 |
*/ |
|
215 |
export const ProductSpuStatusEnum = { |
|
216 |
RECYCLE: { |
|
217 |
status: -1, |
|
218 |
name: '回收站' |
|
219 |
}, |
|
220 |
DISABLE: { |
|
221 |
status: 0, |
|
222 |
name: '下架' |
|
223 |
}, |
|
224 |
ENABLE: { |
|
225 |
status: 1, |
|
226 |
name: '上架' |
|
227 |
} |
|
228 |
} |
|
229 |
|
|
230 |
// ========== MALL - 营销模块 ========== |
|
231 |
/** |
|
232 |
* 优惠劵模板的有限期类型的枚举 |
|
233 |
*/ |
|
234 |
export const CouponTemplateValidityTypeEnum = { |
|
235 |
DATE: { |
|
236 |
type: 1, |
|
237 |
name: '固定日期可用' |
|
238 |
}, |
|
239 |
TERM: { |
|
240 |
type: 2, |
|
241 |
name: '领取之后可用' |
|
242 |
} |
|
243 |
} |
|
244 |
|
|
245 |
/** |
|
246 |
* 优惠劵模板的领取方式的枚举 |
|
247 |
*/ |
|
248 |
export const CouponTemplateTakeTypeEnum = { |
|
249 |
USER: { |
|
250 |
type: 1, |
|
251 |
name: '直接领取' |
|
252 |
}, |
|
253 |
ADMIN: { |
|
254 |
type: 2, |
|
255 |
name: '指定发放' |
|
256 |
}, |
|
257 |
REGISTER: { |
|
258 |
type: 3, |
|
259 |
name: '新人券' |
|
260 |
} |
|
261 |
} |
|
262 |
|
|
263 |
/** |
|
264 |
* 营销的商品范围枚举 |
|
265 |
*/ |
|
266 |
export const PromotionProductScopeEnum = { |
|
267 |
ALL: { |
|
268 |
scope: 1, |
|
269 |
name: '通用劵' |
|
270 |
}, |
|
271 |
SPU: { |
|
272 |
scope: 2, |
|
273 |
name: '商品劵' |
|
274 |
}, |
|
275 |
CATEGORY: { |
|
276 |
scope: 3, |
|
277 |
name: '品类劵' |
|
278 |
} |
|
279 |
} |
|
280 |
|
|
281 |
/** |
|
282 |
* 营销的条件类型枚举 |
|
283 |
*/ |
|
284 |
export const PromotionConditionTypeEnum = { |
|
285 |
PRICE: { |
|
286 |
type: 10, |
|
287 |
name: '满 N 元' |
|
288 |
}, |
|
289 |
COUNT: { |
|
290 |
type: 20, |
|
291 |
name: '满 N 件' |
|
292 |
} |
|
293 |
} |
|
294 |
|
|
295 |
/** |
|
296 |
* 优惠类型枚举 |
|
297 |
*/ |
|
298 |
export const PromotionDiscountTypeEnum = { |
|
299 |
PRICE: { |
|
300 |
type: 1, |
|
301 |
name: '满减' |
|
302 |
}, |
|
303 |
PERCENT: { |
|
304 |
type: 2, |
|
305 |
name: '折扣' |
|
306 |
} |
|
307 |
} |
|
308 |
|
|
309 |
// ========== MALL - 交易模块 ========== |
|
310 |
/** |
|
311 |
* 分销关系绑定模式枚举 |
|
312 |
*/ |
|
313 |
export const BrokerageBindModeEnum = { |
|
314 |
ANYTIME: { |
|
315 |
mode: 1, |
|
316 |
name: '首次绑定' |
|
317 |
}, |
|
318 |
REGISTER: { |
|
319 |
mode: 2, |
|
320 |
name: '注册绑定' |
|
321 |
}, |
|
322 |
OVERRIDE: { |
|
323 |
mode: 3, |
|
324 |
name: '覆盖绑定' |
|
325 |
} |
|
326 |
} |
|
327 |
/** |
|
328 |
* 分佣模式枚举 |
|
329 |
*/ |
|
330 |
export const BrokerageEnabledConditionEnum = { |
|
331 |
ALL: { |
|
332 |
condition: 1, |
|
333 |
name: '人人分销' |
|
334 |
}, |
|
335 |
ADMIN: { |
|
336 |
condition: 2, |
|
337 |
name: '指定分销' |
|
338 |
} |
|
339 |
} |
|
340 |
/** |
|
341 |
* 佣金记录业务类型枚举 |
|
342 |
*/ |
|
343 |
export const BrokerageRecordBizTypeEnum = { |
|
344 |
ORDER: { |
|
345 |
type: 1, |
|
346 |
name: '获得推广佣金' |
|
347 |
}, |
|
348 |
WITHDRAW: { |
|
349 |
type: 2, |
|
350 |
name: '提现申请' |
|
351 |
} |
|
352 |
} |
|
353 |
/** |
|
354 |
* 佣金提现状态枚举 |
|
355 |
*/ |
|
356 |
export const BrokerageWithdrawStatusEnum = { |
|
357 |
AUDITING: { |
|
358 |
status: 0, |
|
359 |
name: '审核中' |
|
360 |
}, |
|
361 |
AUDIT_SUCCESS: { |
|
362 |
status: 10, |
|
363 |
name: '审核通过' |
|
364 |
}, |
|
365 |
AUDIT_FAIL: { |
|
366 |
status: 20, |
|
367 |
name: '审核不通过' |
|
368 |
}, |
|
369 |
WITHDRAW_SUCCESS: { |
|
370 |
status: 11, |
|
371 |
name: '提现成功' |
|
372 |
}, |
|
373 |
WITHDRAW_FAIL: { |
|
374 |
status: 21, |
|
375 |
name: '提现失败' |
|
376 |
} |
|
377 |
} |
|
378 |
/** |
|
379 |
* 佣金提现类型枚举 |
|
380 |
*/ |
|
381 |
export const BrokerageWithdrawTypeEnum = { |
|
382 |
WALLET: { |
|
383 |
type: 1, |
|
384 |
name: '钱包' |
|
385 |
}, |
|
386 |
BANK: { |
|
387 |
type: 2, |
|
388 |
name: '银行卡' |
|
389 |
}, |
|
390 |
WECHAT: { |
|
391 |
type: 3, |
|
392 |
name: '微信' |
|
393 |
}, |
|
394 |
ALIPAY: { |
|
395 |
type: 4, |
|
396 |
name: '支付宝' |
|
397 |
} |
|
398 |
} |
|
399 |
|
|
400 |
/** |
|
401 |
* 配送方式枚举 |
|
402 |
*/ |
|
403 |
export const DeliveryTypeEnum = { |
|
404 |
EXPRESS: { |
|
405 |
type: 1, |
|
406 |
name: '快递发货' |
|
407 |
}, |
|
408 |
PICK_UP: { |
|
409 |
type: 2, |
|
410 |
name: '到店自提' |
|
411 |
} |
|
412 |
} |
|
413 |
/** |
|
414 |
* 交易订单 - 状态 |
|
415 |
*/ |
|
416 |
export const TradeOrderStatusEnum = { |
|
417 |
UNPAID: { |
|
418 |
status: 0, |
|
419 |
name: '待支付' |
|
420 |
}, |
|
421 |
UNDELIVERED: { |
|
422 |
status: 10, |
|
423 |
name: '待发货' |
|
424 |
}, |
|
425 |
DELIVERED: { |
|
426 |
status: 20, |
|
427 |
name: '已发货' |
|
428 |
}, |
|
429 |
COMPLETED: { |
|
430 |
status: 30, |
|
431 |
name: '已完成' |
|
432 |
}, |
|
433 |
CANCELED: { |
|
434 |
status: 40, |
|
435 |
name: '已取消' |
|
436 |
} |
|
437 |
} |
|
438 |
|
|
439 |
// ========== ERP - 企业资源计划 ========== |
|
440 |
|
|
441 |
export const ErpBizType = { |
|
442 |
PURCHASE_ORDER: 10, |
|
443 |
PURCHASE_IN: 11, |
|
444 |
PURCHASE_RETURN: 12, |
|
445 |
SALE_ORDER: 20, |
|
446 |
SALE_OUT: 21, |
|
447 |
SALE_RETURN: 22 |
|
448 |
} |