constant.js
1.31 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
// TODO: add test
// const invoiceStatus = {
// 20: ['未开票', 'UNOPEN'],
// 30: ['已开票', 'OPNED'],
// 40: ['退货待处理', 'REJECT_UNHANDLED'],
// 50: ['退货已处理', 'REJECT_HANDLED'],
// 90: ['已作废', 'CANCELLED'],
// };
// _.forEach(invoiceStatus, (value, key) => {
// InvoiceStatusId2CNName[key] = value[0];
// InvoiceStatusName2Id[value[1]] = key;
// });
//发票状态 20、未开票 30、已开票 40、退货待处理 50、退货已处理 90、已作废
/**
* id => CNName 用于数据显示
*/
const InvoiceStatusId2CNName = {
20: '未开票',
30: '已开票',
40: '退货待处理',
50: '退货已处理',
90: '已作废',
};
/**
* name => id 做为枚举常量
*/
const InvoiceStatusName2Id = {
UNOPEN: 20,
OPNED: 30,
REJECT_UNHANDLED: 40,
REJECT_HANDLED: 50,
CANCELLED: 90,
};
//发票类型 1:纸质票 2:电子票
/**
* id => CNName 用于数据显示
*/
const InvoiceTypeId2CNName = {
1: '纸质票',
2: '电子票',
};
/**
* name => id 做为枚举常量
*/
const InvoiceTypeName2Id = {
PAPER: 1,
ELECTRONIC: 2,
};
/**
* logisticsSwitch '1 需要物流 2 不需要物流'
*/
const LogisticsTypeName2Id = {
NO: 2,
YES: 1,
};
export { InvoiceStatusId2CNName, InvoiceStatusName2Id, InvoiceTypeId2CNName, InvoiceTypeName2Id, LogisticsTypeName2Id };