| | |
| | | <input type="checkbox" value={{d.id}} lay-text="是|否" lay-skin="switch" lay-filter="switchPartner"> |
| | | {{# } }} |
| | | </script> |
| | | <script type="text/html" id="switchAccountStatus"> |
| | | {{# if(d.accountStatus === 1) { }} |
| | | <input type="checkbox" value={{d.id}} lay-text="正常|禁用" checked lay-skin="switch" lay-filter="switchAccountStatus"> |
| | | {{# } else { }} |
| | | <input type="checkbox" value={{d.id}} lay-text="正常|禁用" lay-skin="switch" lay-filter="switchAccountStatus"> |
| | | {{# } }} |
| | | </script> |
| | | <script data-th-inline="none" type="text/javascript"> |
| | | layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () { |
| | | var $ = layui.jquery, |
| | |
| | | {field: 'usdtBalance', title: '额度', minWidth: 100,totalRow: '{{= parseInt(d.usdtBalance) }}'}, |
| | | {field: 'inviteId', title: '邀请码', minWidth: 100}, |
| | | {field: 'refererId', title: '上级邀请码', minWidth: 100}, |
| | | {field: 'accountStatus', title: '状态', templet:'#switchAccountStatus', minWidth: 120}, |
| | | {field: 'nodeType', title: '节点', templet:'#switchPartner', minWidth: 120}, |
| | | {field: 'createTime', title: '创建时间', minWidth: 180}, |
| | | ]] |
| | |
| | | }; |
| | | } |
| | | |
| | | form.on('switch(switchAccountStatus)', function (data) { |
| | | if (data.elem.checked) { |
| | | changeAccountStatus(data.value); |
| | | } else { |
| | | changeAccountStatus(data.value); |
| | | } |
| | | }) |
| | | |
| | | function changeAccountStatus(id) { |
| | | febs.get(ctx + 'member/accountStatus/'+ id, null, function () { |
| | | febs.alert.success('设置成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | |
| | | form.on('switch(switchPartner)', function (data) { |
| | | if (data.elem.checked) { |
| | | changeIdentityYes(4, data.value); |