From 875570e93e6f0546e573103af303cabfb9ec650c Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 18 Oct 2023 14:41:34 +0800
Subject: [PATCH] 一个商品领取一张卷,
---
src/main/resources/templates/febs/views/modules/chat/groupList.html | 36 +++++++++++++++++++++++++++++++++---
1 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/src/main/resources/templates/febs/views/modules/chat/groupList.html b/src/main/resources/templates/febs/views/modules/chat/groupList.html
index 39f11bd..1542b0a 100644
--- a/src/main/resources/templates/febs/views/modules/chat/groupList.html
+++ b/src/main/resources/templates/febs/views/modules/chat/groupList.html
@@ -49,6 +49,13 @@
<input type="checkbox" value={{d.id}} lay-text="是|否" lay-skin="switch" lay-filter="switchUseRobot">
{{# } }}
</script>
+<script type="text/html" id="switchAutoSend">
+ {{# if(d.autoSend === 1) { }}
+ <input type="checkbox" value={{d.id}} lay-text="是|否" checked lay-skin="switch" lay-filter="switchAutoSend">
+ {{# } else { }}
+ <input type="checkbox" value={{d.id}} lay-text="是|否" lay-skin="switch" lay-filter="switchAutoSend">
+ {{# } }}
+</script>
<script type="text/html" id="isModelType">
{{# if(d.modelType === 1) { }}
<span>简单模式</span>
@@ -77,6 +84,9 @@
tableIns;
form.render();
+ let currPageGroup = 1;//首先默认值为1,防止出错
+ //获取当前页
+ currPageGroup = $view.find(".layui-laypage-em").next().html();
// 表格初始化
initTable();
@@ -107,7 +117,7 @@
$reset.on('click', function () {
$searchForm[0].reset();
sortObject.type = 'null';
- tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
+ tableIns.reload({where: getQueryParams(), page: {curr: currPageGroup}, initSort: sortObject});
});
// 获取查询参数
@@ -131,6 +141,7 @@
{field: 'amountMax', title: '下限', minWidth: 100,align:'center'},
{field: 'redBagCnt', title: '红包个数', minWidth: 100,align:'center'},
{field: 'useRobot', title: '使用机器人', templet: '#switchUseRobot', minWidth: 80,align:'center'},
+ {field: 'autoSend', title: '自动发红包', templet: '#switchAutoSend', minWidth: 180,align:'center'},
{templet:"#isModelType", title: '模式', minWidth: 150,align:'center'},
{field: 'createTime', title: '创建时间', minWidth: 180,align:'center'},
{title: '操作',
@@ -138,6 +149,25 @@
return '<button class="layui-btn layui-btn-normal layui-btn-xs layui-btn-success" lay-event="editGroup" shiro:hasPermission="editGroup:info">编辑</button>'
},minWidth: 150,align:'center'}
]]
+ });
+ }
+ form.on('switch(switchAutoSend)', function (data) {
+ if (data.elem.checked) {
+ openSwitchAutoSend(data.value);
+ } else {
+ closeSwitchAutoSend(data.value);
+ }
+ })
+ function openSwitchAutoSend(id) {
+ febs.get(ctx + 'admin/chat/openSwitchAutoSend/' + id, null, function () {
+ febs.alert.success('操作成功');
+ $reset.click();
+ });
+ }
+ function closeSwitchAutoSend(id) {
+ febs.get(ctx + 'admin/chat/closeSwitchAutoSend/' + id, null, function () {
+ febs.alert.success('操作成功');
+ $reset.click();
});
}
form.on('switch(switchUseRobot)', function (data) {
@@ -150,13 +180,13 @@
function openSwitchUseRobot(id) {
febs.get(ctx + 'admin/chat/openSwitchUseRobot/' + id, null, function () {
febs.alert.success('操作成功');
- $query.click();
+ $reset.click();
});
}
function closeSwitchUseRobot(id) {
febs.get(ctx + 'admin/chat/closeSwitchUseRobot/' + id, null, function () {
febs.alert.success('操作成功');
- $query.click();
+ $reset.click();
});
}
--
Gitblit v1.9.1