Quellcode durchsuchen

商品冻结/解冻修复

huangzhiguo vor 2 Jahren
Ursprung
Commit
7cdbd185e9
1 geänderte Dateien mit 37 neuen und 44 gelöschten Zeilen
  1. 37 44
      src/main/webapp/WEB-INF/views/modules/product-new/productList.jsp

+ 37 - 44
src/main/webapp/WEB-INF/views/modules/product-new/productList.jsp

@@ -746,49 +746,8 @@
         $("#searchForm").submit();
         return false;
     }
-
     // preferredFlag条件搜索
-    $(document).ready(function () {
-        $("body").on("change", "input[name=preferredBox]", function () {
-            var preferredFlag = 0;
-            for (var i = 0; i < $("input[name=preferredBox]").length; i++) {
-                if ($("input[name=preferredBox]").eq(i).attr('checked')) {
-                    preferredFlag += $("input[name=preferredBox]").eq(i).val() * 1;
-                }
-            }
-            $("#preferredFlag").val(preferredFlag);
-        });
-        var bigType = $("#bigType option:selected").val();
-        var smallType = $("#smallType option:selected").val();
-        var tinyType = $("#tinyType option:selected").val();
-        loadBigType();
-        $("#bigType").val(bigType);
-        $("#bigType").prev().find(".select2-chosen").text($("#bigType option:selected").text());
-        loadSmallType();
-        $("#smallType").val(smallType);
-        $("#smallType").prev().find(".select2-chosen").text($("#smallType option:selected").text());
-        setTimeout(function () {
-            loadTinyType();
-            $("#tinyType").val(tinyType);
-            $("#tinyType").prev().find(".select2-chosen").text($("#tinyType option:selected").text());
-        }, 500)
-
-        $('.check-grey-btn').on('click', function () {
-            $('.tips-popup-reason').hide();
-        });
-
-        $('.close-btn1').on('click', function () {
-            $('.tips-popup-reason').hide();
-        });
-
-        $('.tips-cfm-directly').on('click', function () {
-            if ($('.tips-cfm-btn').hasClass('tips-cfm-directly')) {
-                $('.tips-popup').hide();
-            } else {
-                $('#form').submit();
-            }
-        })
-
+    $(function () {
         $('.check-cfm-btn').on('click', function (e) {
             var textareaVal = $('#refuse-reason').val();
             if (!textareaVal.trim()) {
@@ -810,10 +769,21 @@
                 }
             })
         })
-    });
+        $('.check-grey-btn').on('click', function () {
+            $('.tips-popup-reason').hide();
+        });
 
+        $('.close-btn1').on('click', function () {
+            $('.tips-popup-reason').hide();
+        });
 
-    $(function () {
+        $('.tips-cfm-directly').on('click', function () {
+            if ($('.tips-cfm-btn').hasClass('tips-cfm-directly')) {
+                $('.tips-popup').hide();
+            } else {
+                $('#form').submit();
+            }
+        })
         console.log("初始话开始----------------------》");
         var searchValidFlag = $("#searchValidFlag").val();
         console.log("searchValidFlag-------->" + searchValidFlag);
@@ -844,6 +814,29 @@
             $(".validCheck").attr("checked", null);
             $("#validCheck").attr("checked", 'checked');
         }
+        $("body").on("change", "input[name=preferredBox]", function () {
+            var preferredFlag = 0;
+            for (var i = 0; i < $("input[name=preferredBox]").length; i++) {
+                if ($("input[name=preferredBox]").eq(i).attr('checked')) {
+                    preferredFlag += $("input[name=preferredBox]").eq(i).val() * 1;
+                }
+            }
+            $("#preferredFlag").val(preferredFlag);
+        });
+        var bigType = $("#bigType option:selected").val();
+        var smallType = $("#smallType option:selected").val();
+        var tinyType = $("#tinyType option:selected").val();
+        loadBigType();
+        $("#bigType").val(bigType);
+        $("#bigType").prev().find(".select2-chosen").text($("#bigType option:selected").text());
+        loadSmallType();
+        $("#smallType").val(smallType);
+        $("#smallType").prev().find(".select2-chosen").text($("#smallType option:selected").text());
+        setTimeout(function () {
+            loadTinyType();
+            $("#tinyType").val(tinyType);
+            $("#tinyType").prev().find(".select2-chosen").text($("#tinyType option:selected").text());
+        }, 500)
     })
 
     function dateFormat(fmt, date) {