95 lines
2.0 KiB
JavaScript
95 lines
2.0 KiB
JavaScript
// 视图
|
|
export const views = {
|
|
}
|
|
|
|
// 单价状态
|
|
export const PriceStatus = {
|
|
WAIT_SUBMIT: "1", // 未提交
|
|
WAIT_VERIFY: "2", // 待审核
|
|
PASS: "3", // 已通过
|
|
REJECT: "4", // 未通过
|
|
// 允许编辑
|
|
canEdit(status) {
|
|
return [this.WAIT_SUBMIT, this.REJECT].includes(status);
|
|
},
|
|
// 允许提交
|
|
canSubmit(status) {
|
|
return [this.WAIT_SUBMIT].includes(status);
|
|
},
|
|
// 允许取消提交
|
|
canCancel(status) {
|
|
return [this.WAIT_VERIFY].includes(status);
|
|
},
|
|
// 允许审核
|
|
canVerify(status) {
|
|
return [this.WAIT_VERIFY].includes(status);
|
|
},
|
|
// 允许禁用
|
|
canDisable(status) {
|
|
return [this.PASS].includes(status);
|
|
},
|
|
// 允许启用
|
|
canEnable(status) {
|
|
return [this.PASS].includes(status);
|
|
},
|
|
}
|
|
|
|
// 工资模式
|
|
export const IncomeMode = {
|
|
SCORE: "1", // 计分
|
|
COUNT: "2", // 计量
|
|
}
|
|
|
|
// 报表状态
|
|
export const ReportStatus = {
|
|
WAIT_SUBMIT: "1", // 未提交
|
|
WAIT_VERIFY: "2", // 待审核
|
|
PASS: "3", // 已通过
|
|
REJECT: "4", // 未通过
|
|
// 允许编辑
|
|
canEdit(status) {
|
|
return [this.WAIT_SUBMIT, this.REJECT].includes(status);
|
|
},
|
|
// 允许提交
|
|
canSubmit(status) {
|
|
return [this.WAIT_SUBMIT].includes(status);
|
|
},
|
|
// 允许取消提交
|
|
canCancel(status) {
|
|
return [this.WAIT_VERIFY].includes(status);
|
|
},
|
|
// 允许审核
|
|
canVerify(status) {
|
|
return [this.WAIT_VERIFY].includes(status);
|
|
},
|
|
// 允许删除
|
|
canDel(status) {
|
|
return [this.WAIT_SUBMIT].includes(status);
|
|
},
|
|
// 是否已审核过的状态
|
|
isVerified(status) {
|
|
return [this.PASS, this.REJECT].includes(status);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 生产订单ERP业务状态
|
|
*/
|
|
export const ProdOrderErpStatus = {
|
|
PLAN: "1", // 计划
|
|
PLAN_CONFIRM: "2", // 计划确认
|
|
ISSUED: "3", // 下达
|
|
START_WORK: "4", // 开工
|
|
END_WORK: "5", // 完工
|
|
CLOSED: "6", // 结案
|
|
FINISHED: "7", // 结算
|
|
}
|
|
|
|
/**
|
|
* 报表工序类型
|
|
*/
|
|
export const ReportPriceType = {
|
|
PUBLIC: "1", // 公共工序
|
|
BILL: "2", // 订单工序
|
|
}
|