From 0a3994b8a4e5d89639a0348f28754fc595d4d0e9 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 17 Oct 2022 17:26:18 +0800
Subject: [PATCH] 相同投入品合并,优化显示

---
 src/utils/dateUtils.js |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/utils/dateUtils.js b/src/utils/dateUtils.js
index 44f67e2..66730b4 100644
--- a/src/utils/dateUtils.js
+++ b/src/utils/dateUtils.js
@@ -55,7 +55,13 @@
 function getSpecifyDayDate (day) {
     const timeCount = new Date().getTime() - day * 24 * 60 * 60 * 1000
     const date = new Date(timeCount)
-    return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} 00:00:00`
+    var month = ""
+    if (date.getMonth()+1<10){
+        month = "0"+(date.getMonth()+1)
+    }else {
+        month = date.getMonth() + 1
+    }
+    return `${date.getFullYear()}-${month}-${date.getDate()} 00:00:00`
 }
 
 /**
@@ -66,7 +72,7 @@
     const date = new Date()
     const year = date.getFullYear()
     const month = date.getMonth() + 1
-    const strDate = date.getDate() - 1
+    const strDate = date.getDate()
     return `${year}-${month}-${strDate} 23:59:59`
 }
 

--
Gitblit v1.9.3