From 8027634ef66360e745df4f496d4bc4cf227d59c7 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Fri, 23 May 2025 13:28:34 +0800
Subject: [PATCH] feat(mall): 新增自提点功能

---
 src/main/resources/templates/febs/views/modules/leader/leaderList.html |   34 +++++++++++++++++++++++++++++++---
 1 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/src/main/resources/templates/febs/views/modules/leader/leaderList.html b/src/main/resources/templates/febs/views/modules/leader/leaderList.html
index 819e847..ae25871 100644
--- a/src/main/resources/templates/febs/views/modules/leader/leaderList.html
+++ b/src/main/resources/templates/febs/views/modules/leader/leaderList.html
@@ -1,4 +1,4 @@
-<div class="layui-fluid layui-anim febs-anim" id="febs-leader" lay-title="团长列表">
+<div class="layui-fluid layui-anim febs-anim" id="febs-leader" lay-title="自提点列表">
     <div class="layui-row febs-container">
         <div class="layui-col-md12">
             <div class="layui-card">
@@ -76,6 +76,11 @@
     <input type="checkbox" value={{d.id}} lay-text="开启|关闭" lay-skin="switch" lay-filter="profitSwitch">
     {{# } }}
 </script>
+<script type="text/html" id="leaderToolbar">
+    <div class="layui-btn-container">
+        <button class="layui-btn layui-btn-normal layui-btn-xs" type="button" shiro:hasPermission="addLeader:add" lay-event="leaderAdd">新增自提点</button>
+    </div>
+</script>
 <!-- 表格操作栏 end -->
 <script data-th-inline="none" type="text/javascript">
     // 引入组件并初始化
@@ -94,7 +99,7 @@
         form.render();
 
         // 表格初始化
-        initTable();
+        initLeaderTable();
 
         // 初始化表格操作栏各个按钮功能
         table.on('tool(leaderTable)', function (obj) {
@@ -158,6 +163,25 @@
             }
         });
 
+        table.on('toolbar(leaderTable)', function(obj){
+            var data = obj.data,
+                layEvent = obj.event;
+
+            if (layEvent === 'leaderAdd') {
+                febs.modal.open( '新增', 'modules/leader/addLeader/', {
+                    btn: ['提交', '取消'],
+                    area:['100%','100%'],
+                    yes: function (index, layero) {
+                        $('#user-addLeader').find('#submit').trigger('click');
+                    },
+                    btn2: function () {
+                        layer.closeAll();
+                    }
+                });
+            }
+
+        });
+
         function leaderCancel(id) {
             febs.get(ctx + 'admin/leader/leaderCancel/' + id, null, function () {
                 febs.alert.success('操作成功');
@@ -179,11 +203,13 @@
         });
 
 
-        function initTable() {
+        function initLeaderTable() {
             tableIns = febs.table.init({
                 elem: $view.find('table'),
                 id: 'leaderTable',
                 url: ctx + 'admin/leader/leaderList',
+                toolbar:"#leaderToolbar",
+                defaultToolbar:[],
                 cols: [[
                     {field: 'name', title: '姓名', minWidth: 150,align:'left'},
                     {field: 'phone', title: '电话', minWidth: 150,align:'left'},
@@ -231,6 +257,8 @@
             });
         }
 
+
+
         form.on('switch(onlineStateSwitch)', function (data) {
             if (data.elem.checked) {
                 startOnline(data.value);

--
Gitblit v1.9.1