diff --git a/src/common/basic.js b/src/common/basic.js index 3a7f4b54..8d1fb95d 100644 --- a/src/common/basic.js +++ b/src/common/basic.js @@ -878,6 +878,67 @@ 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 self.indexOf(item) === index); + return arr.filter((item, index, self) => self.indexOf(item) === index); } \ No newline at end of file diff --git a/src/pages/fg/coms/comReceiptPopup.vue b/src/pages/fg/coms/comReceiptPopup.vue index f6ad6dfd..d741e041 100644 --- a/src/pages/fg/coms/comReceiptPopup.vue +++ b/src/pages/fg/coms/comReceiptPopup.vue @@ -29,7 +29,21 @@ - + + 计划日期: + + {{planDate}} + + + + + + + + + 物料代码: @@ -45,17 +59,7 @@ - - - - 批次: - - - - - - +