| | |
| | | <input type="checkbox" value={{d.id}} lay-text="正常|禁用" lay-skin="switch" lay-filter="switchStatus"> |
| | | {{# } }} |
| | | </script> |
| | | <script type="text/html" id="switchStoreMaster"> |
| | | {{# if(d.storeMaster === 1) { }} |
| | | <input type="checkbox" value={{d.id}} lay-text="是|否" checked lay-skin="switch" lay-filter="switchStoreMaster"> |
| | | {{# } else { }} |
| | | <input type="checkbox" value={{d.id}} lay-text="是|否" lay-skin="switch" lay-filter="switchStoreMaster"> |
| | | {{# } }} |
| | | </script> |
| | | <script type="text/html" id="switchDirector"> |
| | | {{# if(d.director === 1) { }} |
| | | <input type="checkbox" value={{d.id}} lay-text="是|否" checked lay-skin="switch" lay-filter="switchDirector"> |
| | | {{# } else { }} |
| | | <input type="checkbox" value={{d.id}} lay-text="是|否" lay-skin="switch" lay-filter="switchDirector"> |
| | | {{# } }} |
| | | </script> |
| | | <style> |
| | | .layui-form-onswitch { |
| | | background-color: #5FB878 !important; |
| | |
| | | }); |
| | | } |
| | | |
| | | function changeIdentityYes(type, id) { |
| | | febs.get(ctx + 'admin/mallMember/changeIdentityYes/' + type + "/" + id, null, function () { |
| | | febs.alert.success('设置成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | function changeIdentityNo(type, id) { |
| | | febs.get(ctx + 'admin/mallMember/changeIdentityNo/' + type + "/" + id, null, function () { |
| | | febs.alert.success('设置成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | |
| | | function resetPwd(id, type) { |
| | | febs.post(ctx + 'admin/mallMember/resetPwdNew/' + type + "/"+ id, null, function () { |
| | | febs.alert.success('重置成功'); |
| | |
| | | {field: 'inviteId', title: '邀请码', minWidth: 100,align:'left'}, |
| | | {field: 'referrerName', title: '推荐人', minWidth: 100,align:'left'}, |
| | | {field: 'levelName', title: '会员类型', minWidth: 100,align:'left'}, |
| | | {field: 'storeMaster', title: '店长', templet:'#switchStoreMaster', minWidth: 100}, |
| | | {field: 'director', title: '董事', templet:'#switchDirector', minWidth: 100}, |
| | | {field: 'accountType', title: '账号类型', |
| | | templet: function (d) { |
| | | if (d.accountType === 2) { |
| | |
| | | closeAccount(data.value); |
| | | } |
| | | }) |
| | | |
| | | form.on('switch(switchStoreMaster)', function (data) { |
| | | if (data.elem.checked) { |
| | | changeIdentityYes(2, data.value); |
| | | } else { |
| | | changeIdentityNo(2, data.value); |
| | | } |
| | | }) |
| | | |
| | | form.on('switch(switchDirector)', function (data) { |
| | | if (data.elem.checked) { |
| | | changeIdentityYes(1, data.value); |
| | | } else { |
| | | changeIdentityNo(1, data.value); |
| | | } |
| | | }) |
| | | }) |
| | | </script> |