|  |  |  | 
|---|
|  |  |  | <input type="checkbox" value={{d.id}} lay-text="是|否" lay-skin="switch" lay-filter="switchPartner"> | 
|---|
|  |  |  | {{# } }} | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  | <script type="text/html" id="switchInsideWith"> | 
|---|
|  |  |  | {{# if(d.insideWith === 1) { }} | 
|---|
|  |  |  | <input type="checkbox" value={{d.id}} lay-text="是|否" checked lay-skin="switch" lay-filter="switchInsideWith"> | 
|---|
|  |  |  | {{# } else { }} | 
|---|
|  |  |  | <input type="checkbox" value={{d.id}} lay-text="是|否" lay-skin="switch" lay-filter="switchInsideWith"> | 
|---|
|  |  |  | {{# } }} | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  | <style> | 
|---|
|  |  |  | .layui-form-onswitch { | 
|---|
|  |  |  | background-color: #5FB878 !important; | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | function insideWithYes(id) { | 
|---|
|  |  |  | febs.get(ctx + 'admin/mallMember/insideWithYes/' + id, null, function () { | 
|---|
|  |  |  | febs.alert.success('操作成功'); | 
|---|
|  |  |  | $query.click(); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function insideWithNo(id) { | 
|---|
|  |  |  | febs.get(ctx + 'admin/mallMember/insideWithNo/' + id, null, function () { | 
|---|
|  |  |  | febs.alert.success('操作成功'); | 
|---|
|  |  |  | $query.click(); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function closeAccount(id) { | 
|---|
|  |  |  | febs.get(ctx + 'admin/mallMember/closeAccount/' + id, null, function () { | 
|---|
|  |  |  | febs.alert.success('禁用成功'); | 
|---|
|  |  |  | 
|---|
|  |  |  | {field: 'voucherAmount', title: '凭证现金', minWidth: 100,align:'left',totalRow: '{{= parseInt(d.voucherAmount) }}'}, | 
|---|
|  |  |  | {field: 'referrerName', title: '推荐人', minWidth: 100,align:'left'}, | 
|---|
|  |  |  | {field: 'levelName', title: '会员类型', minWidth: 100,align:'left'}, | 
|---|
|  |  |  | {field: 'storeMaster', title: '线下服务中心', templet:'#switchStoreMaster', minWidth: 120,align:'left'}, | 
|---|
|  |  |  | {field: 'director', title: '代理商', templet:'#switchDirector', minWidth: 120,align:'left' }, | 
|---|
|  |  |  | {field: 'creater', title: '联创', templet:'#switchCreate', minWidth: 120,align:'left' }, | 
|---|
|  |  |  | {field: 'partner', title: '合伙人', templet:'#switchPartner', minWidth: 120,align:'left' }, | 
|---|
|  |  |  | {field: 'storeMaster', title: '线下服务中心', templet:'#switchStoreMaster', minWidth: 120,align:'left',hide:toolbarMallmember}, | 
|---|
|  |  |  | {field: 'director', title: '代理商', templet:'#switchDirector', minWidth: 120,align:'left' ,hide:toolbarMallmember}, | 
|---|
|  |  |  | {field: 'creater', title: '联创', templet:'#switchCreate', minWidth: 120,align:'left' ,hide:toolbarMallmember}, | 
|---|
|  |  |  | {field: 'partner', title: '合伙人', templet:'#switchPartner', minWidth: 120,align:'left' ,hide:toolbarMallmember}, | 
|---|
|  |  |  | {field: 'insideWith', title: '是否内转', templet:'#switchInsideWith', minWidth: 120,align:'left' ,hide:toolbarMallmember}, | 
|---|
|  |  |  | {field: 'accountType', title: '账号类型', | 
|---|
|  |  |  | templet: function (d) { | 
|---|
|  |  |  | if (d.accountType === 2) { | 
|---|
|  |  |  | 
|---|
|  |  |  | return '' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, minWidth: 100,align:'left'}, | 
|---|
|  |  |  | {field: 'accountStatus', title: '账号状态', templet: '#switchStatus', minWidth: 100,align:'left'}, | 
|---|
|  |  |  | {field: 'accountStatus', title: '账号状态', templet: '#switchStatus', minWidth: 100,align:'left',hide:toolbarMallmember}, | 
|---|
|  |  |  | {field: 'createdTime', title: '注册时间', minWidth: 180,align:'left'}, | 
|---|
|  |  |  | // {title: '操作', | 
|---|
|  |  |  | //     templet: function (d) { | 
|---|
|  |  |  | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | form.on('switch(switchInsideWith)', function (data) { | 
|---|
|  |  |  | if (data.elem.checked) { | 
|---|
|  |  |  | insideWithYes(data.value); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | insideWithNo(data.value); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | form.on('switch(switchStatus)', function (data) { | 
|---|
|  |  |  | if (data.elem.checked) { | 
|---|
|  |  |  | openAccount(data.value); | 
|---|