自动化立体仓库 - WMS系统
*
lsh
1 天以前 f1ba3b75abb658085e15b0ff37fa513be43a6733
*
1个文件已修改
29 ■■■■■ 已修改文件
src/main/webapp/views/index.html 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/index.html
@@ -5,7 +5,8 @@
  <title>徐工汉云 - 自动化立体仓库 - AS / RS</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="icon" type="image/x-icon" href="../static/image/favicon.ico" />
  <link rel="stylesheet" href="../static/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="../static/css/admin.css?v=318" media="all">
@@ -16,11 +17,13 @@
    .layui-logo img {
      width: 25px;
    }
    .layui-logo cite {
      font-size: 18px;
      font-weight: 400;
      /*margin-left: 5px;*/
    }
    /* 弹窗样式 */
    .popup {
        position: fixed;
@@ -29,7 +32,7 @@
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        display: none;
            display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
@@ -41,6 +44,10 @@
        border-radius: 5px;
        box-shadow: 0px 0px 20px rgba(0,0,0,0.3);
        text-align: center;
        }
        button:hover {
            background-color: #0069d9;
    }
  </style>
</head>
@@ -116,7 +123,10 @@
    <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>
        <p style="font-size: 26px;margin-bottom: 20px;margin-top: 20px;color: blue">请联系立库公司商务续约!!!</p>
        <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>
@@ -128,13 +138,11 @@
        var popupText = document.getElementById('popup-text');
        // 假设后台返回的字符串为 responseString
        if (res!=""){
            // 获取当前日期
            const currentDate = new Date();
            // 创建新日期对象并添加天数
            const newDate = new Date();
            newDate.setDate(currentDate.getDate() + res + 1);
            var responseString = "许可证即将过期,剩余有效期:" + res + "天!";
            // 将字符串设置为弹窗内容的文本
            popupText.textContent = "许可证将于" + new Intl.DateTimeFormat('zh-CN').format(newDate) + "过期,剩余有效期:" + res + "天!";
            popupText.textContent = responseString;
            //关闭设备
            // document.getElementById('popup').style.display = 'none';
        }else {
            document.getElementById('popup').style.display = 'none';
        }
@@ -153,6 +161,7 @@
<script type="text/javascript" src="../static/js/common.js"></script>
<script>
    f()
    function f() {
        $.ajax({
            url: baseUrl + "/license/getLicenseDays",
@@ -161,7 +170,7 @@
            success: function (res) {
                if (res.code == 200) {
                    let days = res.data
                    if (days <= 15) {
                    if (days <= 30) {
                        showPopup(res.data)
                    } else {
                        showPopup("");