30 lines
777 B
Go
30 lines
777 B
Go
|
|
package stock
|
|||
|
|
|
|||
|
|
// InventoryDetailStatus 库存盘点明细状态枚举
|
|||
|
|
type InventoryDetailStatus int
|
|||
|
|
|
|||
|
|
const (
|
|||
|
|
InventoryDetailStatusPending InventoryDetailStatus = 1 // 待盘点(创建时默认)
|
|||
|
|
InventoryDetailStatusCompleted InventoryDetailStatus = 2 // 已完成(Excel导入后)
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
// GetAllInventoryDetailStatuses 获取所有明细状态
|
|||
|
|
func GetAllInventoryDetailStatuses() []InventoryDetailStatus {
|
|||
|
|
return []InventoryDetailStatus{
|
|||
|
|
InventoryDetailStatusPending,
|
|||
|
|
InventoryDetailStatusCompleted,
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// String 获取明细状态字符串表示
|
|||
|
|
func (i InventoryDetailStatus) String() string {
|
|||
|
|
switch i {
|
|||
|
|
case InventoryDetailStatusPending:
|
|||
|
|
return "待盘点"
|
|||
|
|
case InventoryDetailStatusCompleted:
|
|||
|
|
return "已完成"
|
|||
|
|
default:
|
|||
|
|
return "未知"
|
|||
|
|
}
|
|||
|
|
}
|