project-manager-ui/src/utils/enums.js

41 lines
697 B
JavaScript
Raw Normal View History

2025-01-22 09:26:34 +08:00
export const OrderStatus = {
PROPOSED: "1", // 拟定
RELEASED: "2", // 已发布
FINISHED: "3", // 完工
// 允许编辑
canEdit() {
return [this.PROPOSED, this.RELEASED];
},
// 允许发布
canRelease() {
return [this.PROPOSED];
},
// 允许完工
canFinished() {
return [this.RELEASED];
},
// 允许删除
canDel() {
return [this.PROPOSED];
},
// 允许上报
canAddStore() {
return [this.RELEASED];
}
}
export const StoreStatus = {
WAIT_STORE: "1", //待入库
STORED: "2", // 已入库
// 允许删除
canDel() {
return [this.WAIT_STORE];
},
// 允许入库
canStockIn() {
return [this.WAIT_STORE];
}
}