| | |
| | | table.on('tool(userTable)', function (obj) { |
| | | var data = obj.data, |
| | | layEvent = obj.event; |
| | | if (layEvent === 'close') { |
| | | febs.modal.confirm('禁用', '确认禁用该账号?', function () { |
| | | closeAccount(data.id); |
| | | }); |
| | | } |
| | | if (layEvent === 'open') { |
| | | febs.modal.confirm('开启', '确认开启该账号?', function () { |
| | | openAccount(data.id); |
| | | }); |
| | | } |
| | | |
| | | if (layEvent === 'see') { |
| | | febs.modal.open('编辑', 'modules/product/categoryUpdate/' + data.id, { |
| | | btn: ['提交', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#user-add').find('#submit').trigger('click'); |
| | | $('#categary-update').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | |
| | | }); |
| | | } |
| | | }); |
| | | function closeAccount(id) { |
| | | febs.get(ctx + 'admin/mallMember/closeAccount/' + id, null, function () { |
| | | febs.alert.success('禁用成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | function openAccount(id) { |
| | | febs.get(ctx + 'admin/mallMember/openAccount/' + id, null, function () { |
| | | febs.alert.success('开启成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | |
| | | |
| | | // 查询按钮 |
| | |
| | | febs.modal.open('新增', 'modules/product/categoryAdd/', { |
| | | btn: ['提交', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#user-add').find('#submit').trigger('click'); |
| | | $('#categary-add').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |