feat(G1,P16A,P16B): 收口主数据核心与节假日日历增强
这个提交包含在:
@@ -119,6 +119,58 @@ export function mapApiErrorMessage(
|
||||
if (details?.verification === "disabled") {
|
||||
return "当前环境未开启发票验真。";
|
||||
}
|
||||
if (details?.code === "duplicate") {
|
||||
return "编码已存在,请更换后重试。";
|
||||
}
|
||||
|
||||
if (details?.legalEntityId === "not_found") {
|
||||
return "所选法体不存在。";
|
||||
}
|
||||
|
||||
if (details?.legalEntityId === "archived") {
|
||||
return "所选法体已归档,无法继续使用。";
|
||||
}
|
||||
|
||||
if (details?.ownerEmployeeId === "not_found") {
|
||||
return "负责人不存在或已停用。";
|
||||
}
|
||||
|
||||
if (details?.parentId === "not_found") {
|
||||
return "上级成本中心不存在。";
|
||||
}
|
||||
|
||||
if (details?.parentId === "archived") {
|
||||
return "上级成本中心已归档,无法继续使用。";
|
||||
}
|
||||
|
||||
if (details?.parentId === "self_not_allowed") {
|
||||
return "上级成本中心不能选择自身。";
|
||||
}
|
||||
|
||||
if (details?.parentId === "cycle_not_allowed") {
|
||||
return "上级成本中心不能形成循环层级。";
|
||||
}
|
||||
|
||||
if (details?.parentId === "cross_legal_entity_not_allowed") {
|
||||
return "上级成本中心必须与当前法体一致。";
|
||||
}
|
||||
|
||||
if (details?.legalEntity === "has_cost_centers") {
|
||||
return "当前法体下仍存在未归档的成本中心,无法归档。";
|
||||
}
|
||||
|
||||
if (details?.costCenter === "has_children") {
|
||||
return "当前成本中心存在下级节点,无法归档。";
|
||||
}
|
||||
|
||||
if (details?.holidayCalendar === "bound_as_default") {
|
||||
return `当前日历仍被法体 ${details?.legalEntityCode ?? ""} 作为默认日历引用,无法归档。`;
|
||||
}
|
||||
|
||||
if (details?.date === "duplicate") {
|
||||
return "同一日历内不允许存在重复日期。";
|
||||
}
|
||||
|
||||
|
||||
if (details?.verification === "already_pending") {
|
||||
return "已有验真任务正在处理中,请稍后查看结果。";
|
||||
@@ -148,6 +200,10 @@ export function mapApiErrorMessage(
|
||||
return "请假开始/结束日期与半天时段不合法。";
|
||||
}
|
||||
|
||||
if (details?.leave === "non_working_range") {
|
||||
return "所选时间段均为非工作日,无需请假。";
|
||||
}
|
||||
|
||||
if (details?.leave === "missing_reserve_ledger") {
|
||||
return "请假冻结账本状态异常,请联系管理员处理。";
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户