新增模块

This commit is contained in:
2026-10-18 15:27:02 +08:00
parent 5b7d1e8f64
commit f2e6d2b3f1
228 changed files with 46089 additions and 11 deletions
+31
View File
@@ -0,0 +1,31 @@
/** 规格 5.5 产能与采购 mock */
export const capacity = {
pressLine: { model: "BL95 冲压机组", loadRate: 0.78, absorbableIncrementUnits: 500 },
mold: { model: "BL95 冲压模具", inStock: true },
brazingFurnace: { scheduleHasSlot: true },
purchase: [
{ material: "316L 钢卷", itemCode: "1010020011", source: "供应商确认现货", leadDays: 5 },
{ material: "304 钢卷", itemCode: "1010010007", source: "库存充足", leadDays: 0 },
],
productionCycleDays: 7,
tip: "316L 钢卷建议立即发起采购以保留缓冲",
provenance: "规格 5.5",
};
/** 系统当前日期:距交期天数等按此实时复算 */
export function todayIso(): string {
return formatIso(new Date());
}
/** 自今日起 n 天后的 ISO 日期(内置需求样本的交期按此生成,保证样本口径稳定) */
export function isoAfterDays(days: number): string {
const d = new Date();
d.setDate(d.getDate() + days);
return formatIso(d);
}
function formatIso(d: Date): string {
const mm = `${d.getMonth() + 1}`.padStart(2, "0");
const dd = `${d.getDate()}`.padStart(2, "0");
return `${d.getFullYear()}-${mm}-${dd}`;
}