From 4c2ff59bf0ef68c2896614d0f44a94cddd62704f Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期三, 01 六月 2022 16:51:49 +0800
Subject: [PATCH] #
---
src/main/webapp/views/wrkMastLog/wrkDetlLog.html | 4 ++--
src/main/webapp/static/js/common.js | 15 +++++++++++++--
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index 31ad23d..8cbf20d 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -14,7 +14,7 @@
// layer.close(loadIndex);
// 鏃堕棿 ==>> 瀛楃涓�
-function dateToStr(date) {
+function dateToStr(date, millisecond) {
var time = new Date(date);
var y = time.getFullYear();
var M = time.getMonth() + 1;
@@ -27,7 +27,18 @@
m = m < 10 ? ("0" + m) : m;
var s = time.getSeconds();
s = s < 10 ? ("0" + s) : s;
- return y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s;
+ if (!millisecond) {
+ return y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s;
+ } else {
+ var p = time.getMilliseconds();
+ if (p < 10) {
+ p = "00" + p;
+ }
+ if (p < 100) {
+ p = "0" + p;
+ }
+ return y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s + "," + p;
+ }
}
// 瀛楃涓� ===>> 鏃堕棿
diff --git a/src/main/webapp/views/wrkMastLog/wrkDetlLog.html b/src/main/webapp/views/wrkMastLog/wrkDetlLog.html
index 2b8cee5..b565548 100644
--- a/src/main/webapp/views/wrkMastLog/wrkDetlLog.html
+++ b/src/main/webapp/views/wrkMastLog/wrkDetlLog.html
@@ -51,13 +51,13 @@
var form = layui.form;
$('#wrkNo').val(parent.wrkNo);
- $('#ioTime').val(top.dateToStrM(parent.ioTime));
+ $('#ioTime').val(top.dateToStr(parent.ioTime, true));
// 鏁版嵁娓叉煋
tableIns1 = table.render({
elem: '#wrkDetlLogByMast',
headers: {token: localStorage.getItem('token')},
url: baseUrl+'/wrkDetlLogByMast/list/auth',
- where: {wrk_no: parent.wrkNo,ioTime: top.dateToStrM(parent.ioTime)},
+ where: {wrk_no: parent.wrkNo,ioTime: top.dateToStr(parent.ioTime, true)},
page: true,
limit: 16,
limits: [16, 30, 50, 100, 200, 500],
--
Gitblit v1.9.1