From 2a865ce08ad71501542b0a512d7868e5a6622df4 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期三, 17 一月 2024 08:55:31 +0800
Subject: [PATCH] # 配置属性修改

---
 src/main/webapp/static/js/pla/plaDetl.js                       |    8 ++++----
 src/main/webapp/static/js/configType/configType.js             |   33 +++++++++++++++++++++------------
 src/main/java/com/zy/asrs/controller/ConfigTypeController.java |   10 +++++++++-
 src/main/webapp/views/configType/configType.html               |    2 +-
 4 files changed, 35 insertions(+), 18 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/ConfigTypeController.java b/src/main/java/com/zy/asrs/controller/ConfigTypeController.java
index 543c7b2..02c7cc1 100644
--- a/src/main/java/com/zy/asrs/controller/ConfigTypeController.java
+++ b/src/main/java/com/zy/asrs/controller/ConfigTypeController.java
@@ -46,7 +46,7 @@
 
     @RequestMapping(value = "/configType/add/auth")
     @ManagerAuth
-    public R list(ConfigType configType){
+    public R add(ConfigType configType){
         if (Cools.isEmpty(configType)){
             return R.error();
         }
@@ -56,6 +56,14 @@
 
     }
 
+    @RequestMapping(value = "/configType/delete/auth")
+    @ManagerAuth
+    public R delete(Long id){
+        configTypeService.deleteById(id);
+        return R.ok();
+
+    }
+
     @RequestMapping(value = "/configTypeQuery/auth")
     @ManagerAuth
     public R query(String condition) {
diff --git a/src/main/webapp/static/js/configType/configType.js b/src/main/webapp/static/js/configType/configType.js
index 234ddc0..fc3a2d6 100644
--- a/src/main/webapp/static/js/configType/configType.js
+++ b/src/main/webapp/static/js/configType/configType.js
@@ -173,7 +173,7 @@
     });
 
     // 鐩戝惉琛屽伐鍏蜂簨浠�
-    table.on('tool(role)', function(obj){
+    table.on('tool(configType)', function(obj){
         var data = obj.data;
         switch (obj.event) {
             // 璇︽儏
@@ -246,17 +246,26 @@
                    });
                 }
                 break;
-            case 'power':
-                roleId = data.id;
-                layer.open({
-                    type: 2,
-                    title: data.name + ' 鏉冮檺鍒嗛厤',
-                    maxmin: true,
-                    area: [top.detailWidth/2, '85%'],
-                    shadeClose: false,
-                    content: 'role_power_detail.html',
-                    success: function(layero, index){
-                    }
+            case 'delete':
+                id = data.id;
+                layer.confirm('纭畾鍒犻櫎鍚�', function(){
+                    $.ajax({
+                        url: baseUrl+"/configType/delete/auth",
+                        headers: {'token': localStorage.getItem('token')},
+                        data: {id: id},
+                        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;
         }
diff --git a/src/main/webapp/static/js/pla/plaDetl.js b/src/main/webapp/static/js/pla/plaDetl.js
index a977fc5..92a6405 100644
--- a/src/main/webapp/static/js/pla/plaDetl.js
+++ b/src/main/webapp/static/js/pla/plaDetl.js
@@ -11,7 +11,7 @@
     var cols = [
         {field: 'id', title: 'id', align: 'center',hide:true}
         ,{type: 'checkbox'}
-        ,{field: 'pakinTime$', title: '鍏ュ簱鏃堕棿', align: 'center'}
+        ,{field: 'pakinTime$', title: '鍏ュ簱鏃堕棿', align: 'center' , sort:true}
         ,{field: 'owner', align: 'center',title: '涓讳綋',edit:true}
         ,{field: 'type', align: 'center',title: '鐗╄祫绫诲埆',hide:true,edit:true}
         ,{field: 'proOrderNo', align: 'center',title: '鐢熶骇璁㈠崟缂栧彿',hide:true,edit:true}
@@ -19,9 +19,9 @@
         ,{field: 'line', align: 'center',title: '鐢熶骇绾�',hide:true,edit:true}
         ,{field: 'matnr', align: 'center',title: '瀛樿揣缂栫爜',hide:true,edit:true}
         ,{field: 'brand', align: 'center',title: '鐗屽彿',edit:true}
-        ,{field: 'batch', align: 'center',title: '鎵瑰彿',edit:true}
-        ,{field: 'packageNo', align: 'center',title: '鍖呰鍙�',edit:true}
-        ,{field: 'proDate', align: 'center',title: '鐢熶骇鏃ユ湡',edit:true}
+        ,{field: 'batch', align: 'center',title: '鎵瑰彿',edit:true, width: 150, sort:true}
+        ,{field: 'packageNo', align: 'center',title: '鍖呰鍙�',edit:true, sort:true}
+        ,{field: 'proDate', align: 'center',title: '鐢熶骇鏃ユ湡',edit:true, width: 100}
         ,{field: 'weight', align: 'center',title: '閲嶉噺KG',edit:true}
         ,{field: 'packageType', align: 'center',title: '鍖呰绫诲瀷',edit:true}
         ,{field: 'zpalletType', align: 'center',title: '鎵樼洏绫诲瀷',edit:true}
diff --git a/src/main/webapp/views/configType/configType.html b/src/main/webapp/views/configType/configType.html
index c4723d9..fd6ba50 100644
--- a/src/main/webapp/views/configType/configType.html
+++ b/src/main/webapp/views/configType/configType.html
@@ -42,7 +42,7 @@
 </script>
 
 <script type="text/html" id="operate">
-    <a class="layui-btn layui-btn-xs layui-btn-warm" lay-event="power">鍒犻櫎</a>
+    <a class="layui-btn layui-btn-xs layui-btn-warm" lay-event="delete">鍒犻櫎</a>
     <a class="layui-btn layui-btn-xs btn-edit" lay-event="edit">缂栬緫</a>
 </script>
 

--
Gitblit v1.9.1