From aa861e83f2a7a5f99ed30d448c129c2032b71af6 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 09 May 2023 09:39:58 +0800
Subject: [PATCH] 微信支付

---
 src/main/resources/templates/febs/views/modules/product/categoryList.html |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/templates/febs/views/modules/product/categoryList.html b/src/main/resources/templates/febs/views/modules/product/categoryList.html
index 82e37f1..15b7872 100644
--- a/src/main/resources/templates/febs/views/modules/product/categoryList.html
+++ b/src/main/resources/templates/febs/views/modules/product/categoryList.html
@@ -8,6 +8,7 @@
                             <div class="layui-col-md10">
                                 <div class="layui-form-item">
                                     <div class="layui-inline">
+                                        <label class="layui-form-label">名称:</label>
                                         <div class="layui-input-inline">
                                             <input type="text" placeholder="名称" name="name" autocomplete="off" class="layui-input">
                                         </div>
@@ -28,6 +29,16 @@
                         </div>
                     </form>
                     <table lay-filter="userTable" lay-data="{id: 'userTable'}"></table>
+                    <style type="text/css">
+                        .layui-table-cell{
+                            text-align:center;
+                            height: auto;
+                            white-space: normal;
+                        }
+                        .layui-table img{
+                            max-width:100px
+                        }
+                    </style>
                 </div>
             </div>
         </div>
@@ -78,8 +89,34 @@
                     }
                 });
             }
+            if (layEvent === 'delCategary') {
+                febs.modal.confirm('删除', '确认删除?', function () {
+                    delCategary(data.id);
+                });
+            }
+            if (layEvent === 'seeImges') {
+                var t = $view.find('#seeImges'+data.id+'');
+                //页面层
+                layer.open({
+                    type: 1,
+                    title: "图片",
+                    skin: 'layui-layer-rim', //加上边框
+                    area: ['80%', '80%'], //宽高
+                    shadeClose: true, //开启遮罩关闭
+                    end: function (index, layero) {
+                        return false;
+                    },
+                    content: '<div style="text-align:center"><img src="' + $(t).attr('src') + '" /></div>'
+                });
+            }
         });
 
+        function delCategary(id) {
+            febs.get(ctx + 'admin/goodsCategory/delCategary/' + id, null, function () {
+                febs.alert.success('操作成功');
+                $query.click();
+            });
+        }
 
         // 查询按钮
         $query.on('click', function () {
@@ -114,9 +151,14 @@
                 cols: [[
                     {field: 'name', title: '名称', minWidth: 150,align:'left'},
                     {field: 'parentName', title: '父级名称', minWidth: 150,align:'left'},
+                    {field: 'image', title: '图片',
+                        templet: function (d) {
+                            return '<a lay-event="seeImges"><img id="seeImges'+d.id+'" src="'+d.image+'" alt=""></a>';
+                        }, minWidth: 100,align:'center'},
                     {title: '操作',
                         templet: function (d) {
                             return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="see" shiro:hasPermission="user:update">编辑</button>'
+                            +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="delCategary" shiro:hasPermission="user:update">删除</button>'
                         },minWidth: 300,align:'center'}
                 ]]
             });

--
Gitblit v1.9.1