/** 规格 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}`; }