| | |
| | | |
| | | <script type="text/html" id="orderActivityOption"> |
| | | <!-- <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="orderActivity:info" lay-event="orderActivity">详情</button>--> |
| | | <button class="layui-btn layui-btn-danger layui-btn-sm" type="button" shiro:hasPermission="orderActivity:info" lay-event="groupDelete">删除</button> |
| | | <button class="layui-btn layui-btn-danger layui-btn-sm" type="button" shiro:hasPermission="orderActivity:info" lay-event="orderActivityDel">删除</button> |
| | | <!-- <button class="layui-btn layui-btn-danger layui-btn-sm" type="button" shiro:hasPermission="orderActivity:returnOrder" lay-event="returnOrder">售后退款</button>--> |
| | | </script> |
| | | <script type="text/html" id="orderStateOption"> |
| | |
| | | table.on('tool(orderActivityTable)', function (obj) { |
| | | var data = obj.data, |
| | | layEvent = obj.event; |
| | | if (layEvent === 'groupDelete') { |
| | | if (layEvent === 'orderActivityDel') { |
| | | febs.modal.confirm('删除', '确认删除?', function () { |
| | | groupDelete(data.id); |
| | | orderActivityDel(data.id); |
| | | }); |
| | | } |
| | | if (layEvent === 'groupInfo') { |
| | |
| | | }); |
| | | } |
| | | }); |
| | | function groupDelete(id) { |
| | | function orderActivityDel(id) { |
| | | febs.get(ctx + 'admin/happyActivity/activityOrderDel/' + id, null, function (data) { |
| | | febs.alert.success(data.message); |
| | | $query.click(); |
| | |
| | | ]] |
| | | }); |
| | | } |
| | | |
| | | form.on('switch(hotStateSwitch)', function (data) { |
| | | if (data.elem.checked) { |
| | | groupState(data.value,1); |
| | | } else { |
| | | groupState(data.value,1); |
| | | } |
| | | }) |
| | | |
| | | form.on('switch(groupStatusSwitch)', function (data) { |
| | | if (data.elem.checked) { |
| | | groupState(data.value,2); |
| | | } else { |
| | | groupState(data.value,2); |
| | | } |
| | | }) |
| | | function groupState(id,type) { |
| | | febs.get(ctx + 'admin/happyActivity/groupState/' + id+'/' + type, null, function (data) { |
| | | febs.alert.success(data.message); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | // 查询按钮 |
| | | $query.on('click', function () { |