| | |
| | | <input type="checkbox" value={{d.id}} lay-text="是|否" lay-skin="switch" lay-filter="isSalesmanSwitch"> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/html" id="isDoctorSwitch"> |
| | | {{# if(d.doctorState === 1) { }} |
| | | <input type="checkbox" value={{d.id}} lay-text="是|否" checked lay-skin="switch" lay-filter="isDoctorSwitch"> |
| | | {{# } else { }} |
| | | <input type="checkbox" value={{d.id}} lay-text="是|否" lay-skin="switch" lay-filter="isDoctorSwitch"> |
| | | {{# } }} |
| | | </script> |
| | | <style> |
| | | .layui-form-onswitch { |
| | | background-color: #5FB878 !important; |
| | |
| | | } |
| | | }) |
| | | |
| | | form.on('switch(isDoctorSwitch)', function (data) { |
| | | if (data.elem.checked) { |
| | | doctorStateChange(data.value); |
| | | } else { |
| | | doctorStateChange(data.value); |
| | | } |
| | | }) |
| | | |
| | | function doctorStateChange(id) { |
| | | febs.get(ctx + 'admin/mallMember/doctorStateChange/' + id, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | |
| | | function upSale(id) { |
| | | febs.get(ctx + 'admin/mallMember/upSale/' + id, null, function () { |
| | | febs.alert.success('操作成功'); |
| | |
| | | {field: 'referrerName', title: '推荐人', minWidth: 100,align:'left'}, |
| | | {field: 'levelName', title: '会员等级', minWidth: 100,align:'left'}, |
| | | // {field: 'referrerName', title: '推荐人', minWidth: 100,align:'left'}, |
| | | {field: 'doctorState', title: '医生设置', templet: '#isDoctorSwitch', minWidth: 100,align:'center'}, |
| | | {field: 'isSalesman', title: '推销员设置', templet: '#isSalesmanSwitch', minWidth: 100,align:'center'}, |
| | | // {field: 'director', title: '总监', templet:'#switchDirector', minWidth: 100}, |
| | | // {field: 'accountType', title: '账号类型', |