From fc06a66b6ec47ae489f1cba3340b273054093c37 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期四, 11 十二月 2025 09:56:46 +0800
Subject: [PATCH] 添加修改按钮

---
 src/main/webapp/static/js/pla/plaDetl.js |   34 +++++++++++++++++++++++++++++++++-
 1 files changed, 33 insertions(+), 1 deletions(-)

diff --git a/src/main/webapp/static/js/pla/plaDetl.js b/src/main/webapp/static/js/pla/plaDetl.js
index c95b607..5d0f8a7 100644
--- a/src/main/webapp/static/js/pla/plaDetl.js
+++ b/src/main/webapp/static/js/pla/plaDetl.js
@@ -29,6 +29,7 @@
         ,{field: 'vadf2', align: 'center',title: '鍒嗚В娈碉紝%', hide:true,edit:true}
         ,{field: 'yellowness', align: 'center',title: '榛勫害',edit:true}
         ,{field: 'opacity', align: 'center',title: '涓嶉�忔槑搴︼紝%',edit:true}
+        ,{field: 'lactideContent', align: 'center',title: '涓欎氦閰惈閲忥紝%',edit:true}
         ,{field: 'l', align: 'center',title: 'L*', hide:true,edit:true}
         ,{field: 'a', align: 'center',title: 'a*', hide:true,edit:true}
         ,{field: 'b', align: 'center',title: 'b*', hide:true,edit:true}
@@ -153,7 +154,7 @@
         },
         //height: 'full',
         limit: 500,
-        limits: [16, 50, 100, 200, 500,],
+        limits: [16, 50, 100, 200, 500,2000,5000,10000],
         even: true,
         toolbar: '#toolbar',
         cellMinWidth: 50,
@@ -367,6 +368,33 @@
                     layer.confirm('纭畾淇敼'+(data.length===1?'姝�':data.length)+'鏉℃暟鎹悧', function(){
                         $.ajax({
                             url: baseUrl+"/pla/update/auth",
+                            headers: {'token': localStorage.getItem('token')},
+                            data: JSON.stringify(data),
+                            contentType:'application/json;charset=UTF-8',
+                            method: 'POST',
+                            traditional:true,
+                            success: function (res) {
+                                if (res.code === 200){
+                                    layer.closeAll();
+                                    tableReload(false);
+                                } else if (res.code === 403){
+                                    top.location.href = baseUrl+"/";
+                                } else {
+                                    layer.msg(res.msg)
+                                }
+                            }
+                        })
+                    });
+                }
+                break;
+            case 'updateDataByAdmin':
+                var data = checkStatus.data;
+                if (data.length === 0){
+                    layer.msg('璇烽�夋嫨鏁版嵁');
+                } else {
+                    layer.confirm('纭畾淇敼'+(data.length===1?'姝�':data.length)+'鏉℃暟鎹悧', function(){
+                        $.ajax({
+                            url: baseUrl+"/pla/updateByAdmin/auth",
                             headers: {'token': localStorage.getItem('token')},
                             data: JSON.stringify(data),
                             contentType:'application/json;charset=UTF-8',
@@ -853,6 +881,10 @@
 
                 var iframe = window['layui-layer-iframe' + index];
                 iframe.child(dataSave)
+            },
+            end: function() {
+                // 鉁� 瀛愰〉闈㈠叧闂椂鍒锋柊琛ㄦ牸
+                tableReload(false); // 鎴栨牴鎹疄闄呮儏鍐典紶 true/false
             }
         });
     })

--
Gitblit v1.9.1