From ecb064d243bcc5eabefe96612f387e40cc4719d8 Mon Sep 17 00:00:00 2001
From: 16639036659 <577530412@qq.com>
Date: 星期三, 19 六月 2024 13:14:11 +0800
Subject: [PATCH] 查询隐患列表,时间倒序排列

---
 src/main/resources/templates/tr/TBSpecialCheckScoreAndDangerLog/add.html |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/templates/tr/TBSpecialCheckScoreAndDangerLog/add.html b/src/main/resources/templates/tr/TBSpecialCheckScoreAndDangerLog/add.html
index 25f77f0..bc6c318 100644
--- a/src/main/resources/templates/tr/TBSpecialCheckScoreAndDangerLog/add.html
+++ b/src/main/resources/templates/tr/TBSpecialCheckScoreAndDangerLog/add.html
@@ -7,6 +7,8 @@
 <body class="white-bg">
 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
     <form class="form-horizontal m" id="form-job-add">
+        <input class="form-control" th:value="${id.split(',')[0]}" type="hidden" name="checkScoreId" id="checkScoreId" required>
+        <input class="form-control" th:value="${id.split(',')[1]}" type="hidden" name="checkItemId" id="checkItemId" required>
         <div class="form-group">
             <label class="col-sm-3 control-label is-required">关联隐患:</label>
             <div class="col-sm-8">
@@ -32,7 +34,7 @@
             <div class="col-sm-8">
                 <div class="input-group date">
                     <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
-                    <input name="checkDate" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
+                    <input name="checkDate" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text" required>
                 </div>
             </div>
         </div>
@@ -57,8 +59,13 @@
 <th:block th:include="include :: footer"/>
 <th:block th:include="include :: datetimepicker-js"/>
 <script type="text/javascript">
+    var prefix = ctx + "tr/TBSpecialCheckScoreAndDangerLog";
+    var now = new Date();
+    var hour = now.getHours(); //获取当前小时数(0-23)
+    var minute = now.getMinutes(); //获取当前分钟数(0-59)
+    var second = now.getSeconds(); //获取当前秒数(0-59)
     $("input[name='checkDate']").datetimepicker({
-        format: "yyyy-mm-dd",
+        format: "yyyy-mm-dd" + ' ' + hour.toString().padStart(2, '0') + ':' + minute.toString().padStart(2, '0') + ':' + second.toString().padStart(2, '0'),
         minView: "month",
         autoclose: true
     });

--
Gitblit v1.9.2