From 920a4ebef6f4f70f097ee9d10c05a5481e2d43ab Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期六, 16 十二月 2023 16:56:22 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/nodeLoc/nodeLoc.js |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/main/webapp/static/js/nodeLoc/nodeLoc.js b/src/main/webapp/static/js/nodeLoc/nodeLoc.js
index d144f92..bc795a3 100644
--- a/src/main/webapp/static/js/nodeLoc/nodeLoc.js
+++ b/src/main/webapp/static/js/nodeLoc/nodeLoc.js
@@ -8,6 +8,7 @@
     ];
     cols.push.apply(cols, matCols);
     cols.push(
+
         {fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150}
     )
     return cols;
@@ -62,6 +63,7 @@
             {field: 'parentName', align: 'center',title: '搴撳尯', hide: false},
             {field: 'createBy$', align: 'center',title: '鍒涘缓浜�', hide: false},
             {field: 'createTime$', align: 'center',title: '鍒涘缓鏃堕棿', hide: false},
+            // {field: 'status', align: 'center',title: '搴撲綅鍐荤粨', templet: '#stockFreezeTpl'},
             {field: 'type$', align: 'center',title: '绫诲瀷', templet: '#tagTpl', hide: false}
         ]],
         request: {
@@ -83,6 +85,7 @@
             if (res.code === 403) {
                 top.location.href = baseUrl+"/";
             }
+            tableData = table.cache.mat;
             pageCurr=curr;
             limit();
             form.on('checkbox(tableCheckbox)', function (data) {
@@ -381,6 +384,20 @@
         elem: '#updateTime\\$',
         type: 'datetime'
     });
+    //搴撲綅鍐荤粨
+    form.on('switch(stockFreezeSwitch)', function (obj) {
+        let index  = obj.othis.parents('tr').attr("data-index");
+        console.log(index);
+        let data = tableData[index];
+        data[this.stockFreeze] = obj.elem.checked?1:0;
+        http.post(baseUrl + "/node/updateStatus", {
+            name: data.name,
+            status: data[this.stockFreeze]
+        }, function (res) {
+            layer.msg(res.msg, {icon: 1});
+            tableIns.reload();
+        });
+    })
 
 
 });

--
Gitblit v1.9.1