chenshilong il y a 7 ans
Parent
commit
7d0ed0e216

+ 4 - 7
public/scHintBox.html

@@ -7,7 +7,7 @@
         3、有三个按钮的多分支选择询问框。
         4、输入文本值对话框。
 ----------------------------------------------------------------------------------------------------------------------->
-<div class="modal fade" id="hintBox_form" data-backdrop="static">
+<div class="modal fade" id="hintBox_form" data-backdrop="static" style="z-index: 9999">
     <div class="modal-dialog" role="document">
         <div class="modal-content">
             <div class="modal-header">
@@ -25,7 +25,7 @@
                 </div>
             </div>
 
-            <div class="modal-footer" style="justify-content: right">
+            <div class="modal-footer" style="justify-content: center">
                 <button type="button" class="btn btn-primary" data-dismiss="modal" id="hintBox_btn_yes">是</button>
                 <button type="button" class="btn btn-primary" data-dismiss="modal" id="hintBox_btn_no">否</button>
                 <button type="button" class="btn btn-secondary" data-dismiss="modal" id="hintBox_btn_cancel">取消</button>
@@ -36,7 +36,6 @@
 
 <script>
     const hintBox = {
-        test: false,
         value: null,
         btnType: {yes: 1, yesNo: 2, yesNoCancel: 3},
         init: function (){
@@ -57,8 +56,7 @@
             );
             $('#hintBox_btn_cancel').click(
                 function () {
-                    if (!hintBox.test)
-                        $.bootstrapLoading.end();
+                    $.bootstrapLoading.end();
                     return;
                 }
             );
@@ -136,8 +134,7 @@
     };
 
     $('#hintBox_form').on('hide.bs.modal', function() {
-        if (!hintBox.test)
-            $.bootstrapLoading.end();
+        $.bootstrapLoading.end();
         return;
     });
 </script>

+ 5 - 0
public/web/commonAlert.js

@@ -13,3 +13,8 @@ window.alert = function(str) {
     $('#commonAlert').modal('show');
 };
 
+
+!function loadHintBox(){
+    $("body").append('<div id = "hintBox_container"></div>');
+    $("#hintBox_container").load("../../public/scHintBox.html");
+}();

+ 59 - 0
test/public/test_Box.html

@@ -0,0 +1,59 @@
+<!--<!DOCTYPE html>-->
+<html>
+<head>
+    <meta charset="UTF-8">
+    <script src="../../lib/jquery/jquery-3.2.1.min.js"></script>
+    <link rel="stylesheet" href="../../lib/bootstrap/css/bootstrap.min.css">
+    <script src="../../lib/bootstrap/bootstrap.min.js"></script>
+    <script src="../../public/web/PerfectLoad.js"></script>
+</head>
+
+<body>
+    <button id = "btnA">按钮A</button>
+    <button id = "btnB">按钮B</button>
+    <button id = "btnC">按钮C</button>
+    <button id = "btnD">按钮D</button>
+
+    <script>
+        !function loadHintBox(){
+            $("body").append('<div id = "hintBox_container"></div>');
+            $("#hintBox_container").load("../../public/scHintBox.html");
+        }();
+
+        $(document).ready(function(){
+            function cbYes() {alert('你点击了yes按键');};
+            function cbNo() {alert('你点击了no按键');}
+
+            $("#btnA").click(function(){
+                let s = hintBox.font('5');
+                hintBox.infoBox('系统提示', `该行已被第 ${s} 行引用,不允许删除!`, 1);
+            });
+
+            $("#btnB").click(function(){
+                hintBox.infoBox('操作确认', '确定要删除当前节点吗?', 2, cbYes, cbNo);
+            });
+
+            $("#btnC").click(function(){
+                hintBox.infoBox('多分支选择', '三个按钮是否继续?', 3, cbYes, cbNo);
+            });
+
+            $("#btnD").click(function(){
+                hintBox.valueBox('请输入新名称222:', '我的模板1xxxx', function () {
+                    let newName = hintBox.value;
+
+                    if (newName == '') {
+                        hintBox.error('名称不能为空!');
+                        return false;
+                    };
+
+                    if (newName == '111') {
+                        hintBox.error(`“${newName}” 已存在,请重新输入!`);
+                        return false;
+                    };
+                });
+            });
+        });
+    </script>
+</body>
+</html>
+

+ 0 - 7
web/building_saas/main/html/main.html

@@ -1301,13 +1301,6 @@
            // autoFlashHeight();
         </script>
 
-        <script>
-            !function loadHintBox(){
-                $("body").append('<div id = "hintBox_container"></div>');
-                $("#hintBox_container").load("../../../../public/scHintBox.html");
-            }();
-        </script>
-
         <SCRIPT type="text/javascript">
             <!--
 //            var zNodes =[

+ 5 - 5
web/building_saas/main/js/views/tender_price_view.js

@@ -379,10 +379,10 @@ $(function () {
         tender_obj.showTenderData();
     });
 
-    $('#cleanTender').on('click', function () {
-        projectObj.project.calcProgram.clearTenders();
-        tender_obj.initPageContent();
-        tender_obj.showTenderData();
-    });
+    // $('#cleanTender').on('click', function () {
+    //     projectObj.project.calcProgram.clearTenders();
+    //     tender_obj.initPageContent();
+    //     tender_obj.showTenderData();
+    // });
 
 });