| | |
| | | <option value="1">通过</option> |
| | | <option value="2">不通过</option> |
| | | <option value="3">申请中</option> |
| | | <option value="4">取消</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | table.on('tool(leaderTable)', function (obj) { |
| | | var data = obj.data, |
| | | layEvent = obj.event; |
| | | if (layEvent === 'leaderGoodsUpdate') { |
| | | febs.modal.open('编辑', 'modules/leader/leaderGoodsUpdate/' + data.id, { |
| | | btn: ['提交', '取消'], |
| | | area:['100%','100%'], |
| | | yes: function (index, layero) { |
| | | $('#febs-leaderGoods-update').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | } |
| | | if (layEvent === 'leaderUpdate') { |
| | | febs.modal.open('编辑', 'modules/leader/leaderUpdate/' + data.id, { |
| | | btn: ['提交', '取消'], |
| | |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | } |
| | | if (layEvent === 'leaderCancel') { |
| | | febs.modal.confirm('取消', '确认取消该团长?', function () { |
| | | leaderCancel(data.id); |
| | | }); |
| | | } |
| | | if (layEvent === 'seeImgThumb') { |
| | |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | function leaderCancel(id) { |
| | | febs.get(ctx + 'admin/leader/leaderCancel/' + id, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | |
| | | // 查询按钮 |
| | | $query.on('click', function () { |
| | |
| | | return '<span style="color:red;">拒绝</span>' |
| | | }else if (d.state === 3) { |
| | | return '<span style="color:blue;">待审核</span>' |
| | | }else if (d.state === 4) { |
| | | return '<span style="color:blue;">已取消</span>' |
| | | }else{ |
| | | return '' |
| | | } |
| | |
| | | if (d.state === 3) { |
| | | return '' |
| | | + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="leaderUpdate" shiro:hasPermission="user:update">审核</button>' |
| | | }else if(d.state === 1) { |
| | | return '' |
| | | + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="leaderCancel" shiro:hasPermission="user:update">取消</button>' |
| | | // + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="leaderGoodsUpdate" shiro:hasPermission="user:update">团长商品设置</button>' |
| | | }else{ |
| | | return ''; |
| | | } |