xiaoyong931011
2023-04-12 a19e7b6b1088b2860d41c1bbe640c156cdad3dfc
src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html
@@ -89,6 +89,27 @@
    <input type="checkbox" value={{d.id}} lay-text="是|否" lay-skin="switch" lay-filter="switchDirector">
    {{# } }}
</script>
<script type="text/html" id="switchCreate">
    {{# if(d.creater === 1) { }}
    <input type="checkbox" value={{d.id}} lay-text="是|否" checked lay-skin="switch" lay-filter="switchCreate">
    {{# } else { }}
    <input type="checkbox" value={{d.id}} lay-text="是|否" lay-skin="switch" lay-filter="switchCreate">
    {{# } }}
</script>
<script type="text/html" id="switchPartner">
    {{# if(d.partner === 1) { }}
    <input type="checkbox" value={{d.id}} lay-text="是|否" checked lay-skin="switch" lay-filter="switchPartner">
    {{# } else { }}
    <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;
@@ -103,6 +124,7 @@
        <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="resetPwd:update" lay-event="resetPwd">重置登录密码</button>
        <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="resetPwd:update" lay-event="resetPayPwd">重置支付密码</button>
        <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="agentLevelSet:update" lay-event="agentLevel">设置代理等级</button>
        <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="voucherUpdate:update" lay-event="voucherUpdate">拨付绿色凭证</button>
    </div>
</script>
<!-- 表格操作栏 end -->
@@ -177,6 +199,18 @@
            }
        });
        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('禁用成功');
@@ -239,12 +273,17 @@
                    {field: 'inviteId', title: '邀请码', minWidth: 100,align:'left'},
                    {field: 'balance', title: '余额', minWidth: 100,align:'left',totalRow: '{{= parseInt(d.balance) }}'},
                    {field: 'prizeScore', title: '现金积分', minWidth: 100,align:'left',totalRow: '{{= parseInt(d.prizeScore) }}'},
                    {field: 'star', title: '贡献点', minWidth: 100,align:'left',totalRow: '{{= parseInt(d.prizeScore) }}'},
                    {field: 'totalScore', title: '补贴额度', minWidth: 100,align:'left',totalRow: '{{= parseInt(d.prizeScore) }}'},
                    {field: 'star', title: '贡献点', minWidth: 100,align:'left',totalRow: '{{= parseInt(d.star) }}'},
                    {field: 'totalScore', title: '补贴额度', minWidth: 100,align:'left',totalRow: '{{= parseInt(d.totalScore) }}'},
                    {field: 'voucherCnt', title: '绿色凭证', minWidth: 100,align:'left',totalRow: '{{= parseInt(d.voucherCnt) }}'},
                    {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: '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) {
@@ -255,7 +294,7 @@
                                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) {
@@ -338,6 +377,19 @@
                systemPay("修改余额", checkData[0].id, 1);
            }
            if (layEvent === 'voucherUpdate') {
                var checkData = table.checkStatus('userTable').data;
                if (checkData.length <= 0) {
                    febs.alert.warn('请选择需要的用户');
                    return;
                }
                if (checkData.length > 1) {
                    febs.alert.warn('请选择一个用户');
                    return;
                }
                voucherUpdate("拨付绿色凭证", checkData[0].id, 1);
            }
            if (layEvent === 'score') {
                var checkData = table.checkStatus('userTable').data;
                if (checkData.length <= 0) {
@@ -386,6 +438,18 @@
            }
        });
        function voucherUpdate(text, id, type) {
            febs.modal.open(text, 'modules/mallMember/voucherUpdate/' + type +'/'+ id, {
                btn: ['提交', '取消'],
                yes: function (index, layero) {
                    $('#voucher-update').find('#submit').trigger('click');
                },
                btn2: function () {
                    layer.closeAll();
                }
            });
        }
        function systemPay(text, id, type) {
            febs.modal.open('text', 'modules/mallMember/mallSystemPay/' + type +'/'+ id, {
                btn: ['提交', '取消'],
@@ -408,6 +472,14 @@
            };
        }
        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);
@@ -431,5 +503,21 @@
                changeIdentityNo(1, data.value);
            }
        })
        form.on('switch(switchCreate)', function (data) {
            if (data.elem.checked) {
                changeIdentityYes(3, data.value);
            } else {
                changeIdentityNo(3, data.value);
            }
        })
        form.on('switch(switchPartner)', function (data) {
            if (data.elem.checked) {
                changeIdentityYes(4, data.value);
            } else {
                changeIdentityNo(4, data.value);
            }
        })
    })
</script>