diff --git a/src/common/basic.js b/src/common/basic.js index 929a572e..fdfbd74e 100644 --- a/src/common/basic.js +++ b/src/common/basic.js @@ -871,6 +871,61 @@ export function getBatch8() { return year + month + day; } +/** + * 获取前几天和后几天的日期 2024-07-07 + */ +export function lastThreeDays(grapDay) { + let dates = []; + for (let i = grapDay; i >= 0; i--) { + // 创建新的Date对象,并减去i天 + let date = new Date(); + date.setDate(date.getDate() - i); + // 将格式化的日期字符串添加到数组中 + dates.push(formatDate(date)); + } + + for (let i = 0; i + + 计划日期: + + {{ planDate }} + + + + + + + 物料代码: @@ -36,15 +47,7 @@ - - - 批次: - - - - -