| | |
| | | |
| | | <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"> |
| | |
| | | 2: {title: '待使用', color: 'orange'}, |
| | | 3: {title: '已使用', color: 'green'}, |
| | | 4: {title: '售后', color: 'red'}, |
| | | 5: {title: '已评价', color: 'black'}, |
| | | 6: {title: '删除', color: 'black'}, |
| | | 7: {title: '已失效', color: 'black'}, |
| | | }[d.state]; |
| | | }} |
| | | <span class="layui-badge febs-bg-{{state.color}}">{{ state.title }}</span> |
| | |
| | | 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(); |
| | |
| | | toolbar:"#orderActivityToolbar", |
| | | defaultToolbar:[], |
| | | cols: [[ |
| | | {type: 'checkbox'}, |
| | | {type: 'numbers', title: '', width: 80}, |
| | | {title: '操作', toolbar: '#orderActivityOption', minWidth: 200, align: 'center'}, |
| | | {field: 'name', title: '名称', minWidth: 100,align:'center'}, |
| | |
| | | ]] |
| | | }); |
| | | } |
| | | |
| | | 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 () { |