Files
assets/consts/stock/inventory_count_scope.go
2026-03-18 10:18:03 +08:00

42 lines
1.2 KiB
Go

package stock
// InventoryCountScope 库存盘点范围枚举
type InventoryCountScope int
const (
InventoryCountScopeWarehouse InventoryCountScope = 1 // 按仓库盘点
InventoryCountScopeZone InventoryCountScope = 2 // 按库区盘点
InventoryCountScopeLocation InventoryCountScope = 3 // 按库位盘点
InventoryCountScopeSku InventoryCountScope = 4 // 按SKU盘点
InventoryCountScopeAsset InventoryCountScope = 5 // 按资产盘点
)
// GetAllInventoryCountScopes 获取所有盘点范围
func GetAllInventoryCountScopes() []InventoryCountScope {
return []InventoryCountScope{
InventoryCountScopeWarehouse,
InventoryCountScopeZone,
InventoryCountScopeLocation,
InventoryCountScopeSku,
InventoryCountScopeAsset,
}
}
// String 获取盘点范围字符串表示
func (i InventoryCountScope) String() string {
switch i {
case InventoryCountScopeWarehouse:
return "按仓库盘点"
case InventoryCountScopeZone:
return "按库区盘点"
case InventoryCountScopeLocation:
return "按库位盘点"
case InventoryCountScopeSku:
return "按SKU盘点"
case InventoryCountScopeAsset:
return "按资产盘点"
default:
return "未知"
}
}