53 lines
1.6 KiB
JavaScript
53 lines
1.6 KiB
JavaScript
// 统一常量配置:其他收入/支出分类,禁止在业务中硬编码
|
|
export const INCOME_CATEGORIES = [
|
|
{ key: 'sale_income', label: '销售收入' },
|
|
{ key: 'operation_income', label: '经营所得' },
|
|
{ key: 'interest_income', label: '利息收入' },
|
|
{ key: 'investment_income', label: '投资收入' },
|
|
{ key: 'other_income', label: '其它收入' }
|
|
]
|
|
|
|
export const EXPENSE_CATEGORIES = [
|
|
{ key: 'operation_expense', label: '经营支出' },
|
|
{ key: 'office_supplies', label: '办公用品' },
|
|
{ key: 'rent', label: '房租' },
|
|
{ key: 'interest_expense', label: '利息支出' },
|
|
{ key: 'other_expense', label: '其它支出' }
|
|
]
|
|
|
|
// 路由常量(集中管理页面路径,避免在业务中硬编码)
|
|
export const ROUTES = {
|
|
home: '/pages/index/index',
|
|
productList: '/pages/product/list',
|
|
productForm: '/pages/product/form',
|
|
productSelect: '/pages/product/select',
|
|
productSettings: '/pages/product/settings',
|
|
orderCreate: '/pages/order/create',
|
|
detail: '/pages/detail/index',
|
|
my: '/pages/my/index',
|
|
myAbout: '/pages/my/about',
|
|
myVip: '/pages/my/vip',
|
|
report: '/pages/report/index',
|
|
customerSelect: '/pages/customer/select',
|
|
supplierSelect: '/pages/supplier/select',
|
|
accountSelect: '/pages/account/select'
|
|
}
|
|
|
|
|
|
// 本地存储键:统一管理,避免在业务中散落硬编码
|
|
export const STORAGE_KEYS = {
|
|
VIP_IS_VIP: 'USER_VIP_IS_VIP',
|
|
VIP_START: 'USER_VIP_START',
|
|
VIP_END: 'USER_VIP_END'
|
|
}
|
|
|
|
|
|
// KPI 标签常量,避免页面硬编码
|
|
export const KPI_LABELS = {
|
|
todaySales: '今日销售额',
|
|
monthSales: '本月销售额',
|
|
monthProfit: '本月利润',
|
|
stockCount: '库存量'
|
|
}
|
|
|