From d837263f2438ed70a256912ac0b329c5ae0eea14 Mon Sep 17 00:00:00 2001
From: 赵士淞 <zhaoss@yhzhg.cn>
Date: Mon, 09 Jan 2023 05:04:58 +0000
Subject: [PATCH] 工资管理
---
eladmin-web-master/src/components/Crud/crud.js | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/eladmin-web-master/src/components/Crud/crud.js b/eladmin-web-master/src/components/Crud/crud.js
index 23f6fe4..146cfc8 100644
--- a/eladmin-web-master/src/components/Crud/crud.js
+++ b/eladmin-web-master/src/components/Crud/crud.js
@@ -531,6 +531,20 @@
})
},
/**
+ * 年月格式化
+ * @param {Object} timestamp 时间戳
+ */
+ toMonth(timestamp) {
+ if (timestamp == null) {
+ return
+ } else {
+ const system = new Date(timestamp)
+ const year = system.getFullYear()
+ const month = system.getMonth() + 1 < 10 ? '0' + (system.getMonth() + 1) : system.getMonth() + 1
+ return year + '-' + month
+ }
+ },
+ /**
* 日期格式化
* @param {Object} timestamp 时间戳
*/
--
Gitblit v1.9.3