From ad21ba9d38b278190204fc75861a8a98d293e246 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Mon, 22 Jul 2024 16:27:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A1=E5=88=92=E5=AE=8C?= =?UTF-8?q?=E5=B7=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/basic.js | 63 ++++++- src/pages/fg/coms/comReceiptPopup.vue | 235 +++++++++++++++++--------- src/pages/fg/receiptByPlan.vue | 42 +++-- 3 files changed, 243 insertions(+), 97 deletions(-) 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 @@ - - - - 批次: - - - - - - +