From c9686962d78c018a89c5be7023b4ef74960e5d5b Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <xltys1995>
Date: 星期六, 03 四月 2021 14:54:54 +0800
Subject: [PATCH] #

---
 src/main/java/zy/cloud/wms/system/controller/ResourceController.java |   19 ++++++++++++++-----
 src/main/webapp/views/resource/resource.html                         |    2 +-
 src/main/webapp/static/js/custOrder/custOrder.js                     |   36 +++++++-----------------------------
 3 files changed, 22 insertions(+), 35 deletions(-)

diff --git a/src/main/java/zy/cloud/wms/system/controller/ResourceController.java b/src/main/java/zy/cloud/wms/system/controller/ResourceController.java
index abea96a..cbf37f8 100644
--- a/src/main/java/zy/cloud/wms/system/controller/ResourceController.java
+++ b/src/main/java/zy/cloud/wms/system/controller/ResourceController.java
@@ -105,13 +105,22 @@
         return R.ok();
     }
 
+//    @RequestMapping(value = "/resource/delete/auth")
+//    @ManagerAuth(memo = "鑿滃崟鍒犻櫎")
+//    public R delete(Integer[] ids){
+//        if (Cools.isEmpty(ids)){
+//            return R.error();
+//        }
+//        resourceService.deleteBatchIds(Arrays.asList(ids));
+//        return R.ok();
+//    }
+
     @RequestMapping(value = "/resource/delete/auth")
-    @ManagerAuth(memo = "鑿滃崟鍒犻櫎")
-    public R delete(Integer[] ids){
-        if (Cools.isEmpty(ids)){
-            return R.error();
+    @ManagerAuth
+    public R delete(@RequestParam(value="ids[]") Long[] ids){
+        for (Long id : ids){
+            resourceService.deleteById(id);
         }
-        resourceService.deleteBatchIds(Arrays.asList(ids));
         return R.ok();
     }
 
diff --git a/src/main/webapp/static/js/custOrder/custOrder.js b/src/main/webapp/static/js/custOrder/custOrder.js
index 131ae19..4227d59 100644
--- a/src/main/webapp/static/js/custOrder/custOrder.js
+++ b/src/main/webapp/static/js/custOrder/custOrder.js
@@ -39,21 +39,22 @@
         cols: [[
             {type: 'checkbox'}
 //            ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80}
-            ,{field: 'number', align: 'center',title: '鍗曞彿'}
+            ,{field: 'number', align: 'center', merge: true, title: '鍗曞彿'}
 
-            ,{field: 'btypeId', align: 'center',title: '瀹㈡埛缂栧彿'}
+            ,{field: 'btypeId', align: 'center', merge: ['number'], title: '瀹㈡埛缂栧彿'}
             ,{field: 'etypeId', align: 'center',title: '缁忔墜浜虹紪鍙�', hide: true}
+            ,{field: 'billDate', align: 'center',merge: ['number'],title: '鍗曟嵁鏃ユ湡'}
             ,{field: 'userCode', align: 'center',title: '鍟嗗搧缂栧彿'}
             ,{field: 'qty', align: 'center',title: '鍟嗗搧鏁伴噺'}
             ,{field: 'price', align: 'center',title: '鍟嗗搧鍗曚环', hide: true}
             ,{field: 'comment', align: 'center',title: '鍟嗗搧澶囨敞', hide: true}
             ,{field: 'status$', align: 'center',title: '鐘舵��', templet: '#statusTpl', width: 100}
-            ,{field: 'billDate', align: 'center',title: '鍗曟嵁鏃ユ湡'}
+
             // ,{field: 'createTime$', align: 'center',title: '娣诲姞鏃堕棿'}
             ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿', hide: true}
             // ,{field: 'memo', align: 'center',title: '澶囨敞'}
 
-            ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width: 120}
+            ,{fixed: 'right', title:'鎿嶄綔', align: 'center', merge: ['number'], toolbar: '#operate', width: 120}
         ]],
         request: {
             pageName: 'curr',
@@ -75,16 +76,9 @@
                 top.location.href = baseUrl+"/";
             }
             pageCurr=curr;
-            tableX.merges('custOrder', [1, 11]);
+            // tableX.merges('custOrder', [1, 11]);
+            tableMerge.render(this);
             limit();
-            form.on('checkbox(tableCheckbox)', function (data) {
-                var _index = $(data.elem).attr('table-index')||0;
-                if(data.elem.checked){
-                    res.data[_index][data.value] = 'Y';
-                }else{
-                    res.data[_index][data.value] = 'N';
-                }
-            });
         }
     });
 
@@ -515,22 +509,6 @@
         page: {
             curr: pageCurr
         },
-        // done: function (res, curr, count) {
-        //     if (res.code === 403) {
-        //         top.location.href = baseUrl+"/";
-        //     }
-        //     pageCurr=curr;
-        //     if (res.data.length === 0 && count !== 0) {
-        //         tableIns.reload({
-        //             where: searchData,
-        //             page: {
-        //                 curr: pageCurr-1
-        //             }
-        //         });
-        //         pageCurr -= 1;
-        //     }
-        //     limit(child);
-        // }
     });
 }
 
diff --git a/src/main/webapp/views/resource/resource.html b/src/main/webapp/views/resource/resource.html
index 858dc94..7afe989 100644
--- a/src/main/webapp/views/resource/resource.html
+++ b/src/main/webapp/views/resource/resource.html
@@ -57,7 +57,7 @@
                 <div class="layui-form-item">
                     <label class="layui-form-label layui-form-required">鑿滃崟缂栫爜</label>
                     <div class="layui-input-block">
-                        <input name="name" placeholder="璇疯緭鍏ヨ彍鍗曠紪鐮�" class="layui-input" lay-vertype="tips" lay-verify="required" required="">
+                        <input name="code" placeholder="璇疯緭鍏ヨ彍鍗曠紪鐮�" class="layui-input" lay-vertype="tips" lay-verify="required" required="">
                     </div>
                 </div>
 

--
Gitblit v1.9.1