From a1cc1415299b02beea40606581512ab4ebfccb2c Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 04 六月 2025 09:30:48 +0800
Subject: [PATCH] 三升排产按钮添加加载动画

---
 WebTM/views/生产管理/三升排产/JIT_DayPlanPlatForm.html |   41 +++++++++++++++++++++++++++++++++++------
 1 files changed, 35 insertions(+), 6 deletions(-)

diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\270\211\345\215\207\346\216\222\344\272\247/JIT_DayPlanPlatForm.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\270\211\345\215\207\346\216\222\344\272\247/JIT_DayPlanPlatForm.html"
index f4432b5..975afdb 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\270\211\345\215\207\346\216\222\344\272\247/JIT_DayPlanPlatForm.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\270\211\345\215\207\346\216\222\344\272\247/JIT_DayPlanPlatForm.html"
@@ -591,8 +591,21 @@
                     layer.confirm('浣犵‘瀹氳鎵ц鎿嶄綔鍚楋紝璇峰厛纭繚鎺掍骇鏁版嵁宸蹭繚瀛橈紵', {
                         btn: ['纭畾', '鍙栨秷'] //鎸夐挳
                         , btn1: function (index, layero) {
-                            get_btnReady(data);
-                            layer.close(index);
+                            // 1. 鑾峰彇鈥滅‘瀹氣�濇寜閽苟娣诲姞鍔犺浇鍔ㄧ敾
+                            var confirmBtn = $(layero).find('.layui-layer-btn0'); // 纭畾鎸夐挳
+                            confirmBtn.html('<i class="layui-icon layui-icon-loading layui-anim layui-anim-rotate"></i> 澶勭悊涓�...');
+                            confirmBtn.prop('disabled', true);
+                            if (data.length <= 0) {
+                                layer.msg("璇烽�夋嫨鏁版嵁")
+                                layer.close(index);
+                            } else {
+                                setTimeout(function () {
+                                    get_btnReady(data);
+                                    layer.close(index);
+                                }, 5); // 寤惰繜鎵ц纭繚鎸夐挳鍥炬爣娓叉煋瀹�
+                            }
+                            
+                            
                         }
                     })
                     break;
@@ -3606,13 +3619,21 @@
             layer.confirm('浣犵‘瀹氳鎵ц浼樺厛绾ф搷浣滃悧锛�', {
                 btn: ['纭畾', '鍙栨秷'] //鎸夐挳
                 , btn1: function (index, layero) {
+                    // 1. 鑾峰彇鈥滅‘瀹氣�濇寜閽苟娣诲姞鍔犺浇鍔ㄧ敾
+                    var confirmBtn = $(layero).find('.layui-layer-btn0'); // 纭畾鎸夐挳
+                    confirmBtn.html('<i class="layui-icon layui-icon-loading layui-anim layui-anim-rotate"></i> 澶勭悊涓�...');
+                    confirmBtn.prop('disabled', true);
                     var data = table.cache["mainTable"];
                     for (var i = 0; i < data.length; i++) {
                         data[i]["浼樺厛绾�"] = ((i + 1) * 5);
                     }
                     option.data = data;
-                    table.render(option);
-                    layer.close(index);
+                    setTimeout(function () {
+                        table.reload('mainTable', { data: data });
+                        layer.close(index);
+                    }, 5); // 寤惰繜鎵ц纭繚鎸夐挳鍥炬爣娓叉煋瀹�
+                    
+                    
                 }
             })
         }
@@ -3622,6 +3643,10 @@
             layer.confirm('浣犵‘瀹氳鎵ц鎺掑簭鎿嶄綔鍚楋紵', {
                 btn: ['纭畾', '鍙栨秷'] //鎸夐挳
                 , btn1: function (index, layero) {
+                    // 1. 鑾峰彇鈥滅‘瀹氣�濇寜閽苟娣诲姞鍔犺浇鍔ㄧ敾
+                    var confirmBtn = $(layero).find('.layui-layer-btn0'); // 纭畾鎸夐挳
+                    confirmBtn.html('<i class="layui-icon layui-icon-loading layui-anim layui-anim-rotate"></i> 澶勭悊涓�...');
+                    confirmBtn.prop('disabled', true);
                     if (option.data.length != 0) {
                         for (var i = 0; i < option.data.length - 1; i++) {
                             for (var j = 0; j < option.data.length - i - 1; j++) {
@@ -3652,12 +3677,16 @@
                                 }
                             }
                         }
-                        table.render(option);
+                        setTimeout(function () {
+                            table.reload('mainTable', { data: option.data });
+                            layer.close(index);
+                        }, 5); // 寤惰繜鎵ц纭繚鎸夐挳鍥炬爣娓叉煋瀹�
                     }
                     else {
                         return layer.msg("鏃犳暟鎹�!")
+                        layer.close(index);
                     }
-                    layer.close(index);
+                    
                 }
             })
             

--
Gitblit v1.9.1