From b00eeab31bd13ba34a03301aa441b0751d6a93e4 Mon Sep 17 00:00:00 2001
From: dubin <bindu_bean@163.com>
Date: 星期五, 19 十二月 2025 17:00:51 +0800
Subject: [PATCH] 第六排成品可以放第七排原材料
---
src/main/webapp/views/index.html | 87 +++++++++++++++++++++++++++++++++++++++++--
1 files changed, 83 insertions(+), 4 deletions(-)
diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index 2b60f24..eb700fb 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -12,6 +12,8 @@
<script type="text/javascript" src="../static/js/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../static/js/common.js"></script>
<script type="text/javascript" src="../static/layuiadmin/layui/layui.js"></script>
+ <link rel="stylesheet" href="../static/css/layx.min.css" type="text/css" />
+ <script type="text/javascript" src="../static/js/tools/layx.min.js"></script>
<style>
.layui-layout-admin .layui-footer {
box-sizing: border-box;
@@ -45,6 +47,27 @@
.layui-side-menu .layui-nav {
margin-top: 110px;
}
+ /* 寮圭獥鏍峰紡 */
+ .popup {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0,0,0,0.5);
+ display: none;
+ justify-content: center;
+ align-items: center;
+ z-index: 9999;
+ }
+
+ .popup-content {
+ background-color: #fff;
+ padding: 20px;
+ border-radius: 5px;
+ box-shadow: 0px 0px 20px rgba(0,0,0,0.3);
+ text-align: center;
+ }
</style>
</head>
<body class="layui-layout-body">
@@ -74,7 +97,9 @@
<!--</li>-->
</ul>
<ul id="cool-header-right" class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
-
+ <li class="layui-nav-item" lay-unselect id="licenseShow" style="display: none;user-select: none;">
+ <div style="color: red;">浠撳偍绯荤粺璁稿彲鏈夋晥鏈燂細<span id="licenseDays">29</span>澶�</div>
+ </li>
<li class="layui-nav-item layui-hide-xs" lay-unselect>
<a href="javascript:;" layadmin-event="theme">
<i class="layui-icon layui-icon-theme"></i>
@@ -109,7 +134,7 @@
<div class="layui-side-scroll">
<div class="layui-logo" lay-href="home/console.html">
<img src="../static/image/logo.png" style="display: inline-block; width: 90%;height: auto">
- <span style="margin-top: 0; letter-spacing: 10px">涓壃绔嬪簱</span>
+<!-- <span style="margin-top: 0; letter-spacing: 10px">涓壃绔嬪簱</span>-->
</div>
<ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
@@ -153,9 +178,42 @@
<div class="layadmin-body-shade" layadmin-event="shade"></div>
</div>
</div>
-
+ <!-- 寮圭獥鍐呭 -->
+ <div class="popup" id="popup">
+ <div class="popup-content">
+ <h2 style="font-size: 28px;margin-bottom: 10px;">璁稿彲璇佸嵆灏嗚繃鏈�</h2>
+ <div id="popup-text" style="font-size: 28px;color: red"></div>
+ <button style="background-color: #007bff;color: #fff;border: none;padding: 10px 20px;border-radius: 5px;cursor: pointer;font-size: 16px;" onclick="hidePopup()">鍏抽棴</button>
+ </div>
+ </div>
<script>
- layui.config({
+
+ // 鏄剧ず寮圭獥
+ function showPopup(res) {
+ console.log(res)
+ document.getElementById('popup').style.display = 'block';
+ // 鑾峰彇寮瑰嚭绐楀彛鍐呭鐨勫鍣ㄥ厓绱�
+ var popupText = document.getElementById('popup-text');
+ // 鍋囪鍚庡彴杩斿洖鐨勫瓧绗︿覆涓� responseString
+ if (res!==""){
+ // 鑾峰彇褰撳墠鏃ユ湡
+ const currentDate = new Date();
+ // 鍒涘缓鏂版棩鏈熷璞″苟娣诲姞澶╂暟
+ const newDate = new Date();
+ newDate.setDate(currentDate.getDate() + res + 1);
+ // 灏嗗瓧绗︿覆璁剧疆涓哄脊绐楀唴瀹圭殑鏂囨湰
+ popupText.textContent = "璁稿彲璇佸皢浜�" + new Intl.DateTimeFormat('zh-CN').format(newDate) + "杩囨湡锛屽墿浣欐湁鏁堟湡:" + res + "澶╋紒";
+ }else {
+ document.getElementById('popup').style.display = 'none';
+ }
+ }
+
+ // 闅愯棌寮圭獥
+ function hidePopup() {
+ document.getElementById('popup').style.display = 'none';
+ }
+
+ layui.config({
base: '../static/layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index' //涓诲叆鍙fā鍧�
@@ -233,6 +291,27 @@
}
});
}
+ $.ajax({
+ url: baseUrl + "/license/getLicenseDays",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'POST',
+ success: function (res) {
+ if (res.code == 200) {
+ let days = res.data
+ if (days <= 30) {
+ $("#licenseShow").show()
+ $("#licenseDays").html(days)
+ }
+
+ if (days <= 15) {
+ showPopup(days)
+ }
+ }else {
+ top.location.href = baseUrl + "/login";
+ }
+ }
+ });
+
});
</script>
</body>
--
Gitblit v1.9.1