From d3844ee25fbb06b656b5521978f083695d194b07 Mon Sep 17 00:00:00 2001 From: Administrator <15274802129@163.com> Date: Tue, 29 Apr 2025 09:56:11 +0800 Subject: [PATCH] feat(mall): 添加门票核销功能 --- src/main/resources/templates/febs/views/modules/vip/vipConfig-list.html | 40 ++++++++++++++++++++++++++++++---------- 1 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/main/resources/templates/febs/views/modules/vip/vipConfig-list.html b/src/main/resources/templates/febs/views/modules/vip/vipConfig-list.html index 9c73002..76c8edc 100644 --- a/src/main/resources/templates/febs/views/modules/vip/vipConfig-list.html +++ b/src/main/resources/templates/febs/views/modules/vip/vipConfig-list.html @@ -40,6 +40,25 @@ <a lay-event="edit" shiro:hasPermission="vipConfig:update"><i class="layui-icon febs-edit-area febs-blue"></i></a> </script> + +<script type="text/html" id="validTypeFormat"> + {{# if(d.validType == "day") { }} + <span>日</span> + {{# } else if(d.validType == "month") { }} + <span>月</span> + {{# } else { }} + <span>年</span> + {{# } }} +</script> + + +<script type="text/html" id="typeFormat"> + {{# if(d.validType == "day") { }} + <span>指定商品</span> + {{# } else { }} + <span>周期内消费指定金额</span> + {{# } }} +</script> <!-- 表格操作栏 end --> <script data-th-inline="none" type="text/javascript"> // 引入组件并初始化 @@ -66,7 +85,7 @@ var data = obj.data, layEvent = obj.event; if (layEvent === 'benefitsUpdate') { - febs.modal.open('编辑', 'modules/vip/config/editBenefits/' + data.id, { + febs.modal.open('编辑', 'modules/vip/config/levelEdit/' + data.id, { btn: ['提交', '取消'], yes: function (index, layero) { $('#febs-vipConfig-edit').find('#submit').trigger('click'); @@ -76,15 +95,15 @@ } }); } - if (layEvent === 'delBenefits') { + if (layEvent === 'delVipConfig') { febs.modal.confirm('删除', '确认删除?', function () { - delBenefits(data.id); + delVipConfig(data.id); }); } }); - function delBenefits(id) { - febs.get(ctx + 'admin/vip/benefits/delBenefits/' + id, null, function () { + function delVipConfig(id) { + febs.get(ctx + 'admin/vip/config/del/' + id, null, function () { febs.alert.success('操作成功'); $query.click(); }); @@ -123,19 +142,20 @@ cols: [[ {field: 'name', title: '会员名称', minWidth: 120, align: 'center'}, { - field: 'icon', title: '主图', + field: 'thumb', title: '主图', templet: function (d) { - return ''; + return '<a lay-event="seeImgThumb"><img id="seeImgThumb'+d.id+'" src="'+d.thumb+'" alt=""></a>'; }, minWidth: 150, align: 'center' }, {field: 'level', title: '等级', minWidth: 120, align: 'center'}, - {field: 'validType', title: '有效类型', minWidth: 120, align: 'center'}, - {field: 'type', title: '成为会员条件', minWidth: 120, align: 'center'}, + {field: 'validTime', title: '有效时长', minWidth: 120, align: 'center'}, + {templet:"#validTypeFormat",title: '有效类型', minWidth: 120, align: 'center'}, + {templet:"#typeFormat", title: '成为会员条件', minWidth: 120, align: 'center'}, { title: '操作', templet: function (d) { return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="benefitsUpdate" shiro:hasPermission="user:update">编辑</button>' - + '<button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delBenefits" shiro:hasPermission="user:update">删除</button>' + + '<button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delVipConfig" shiro:hasPermission="user:update">删除</button>' }, minWidth: 300, align: 'center' } ]] -- Gitblit v1.9.1