Administrator
2025-04-27 e16ac98e0d1049d18c508799d64f11d942c74920
src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html
@@ -16,24 +16,17 @@
                                    <div class="layui-inline">
                                        <label class="layui-form-label layui-form-label-sm">手机号码</label>
                                        <div class="layui-input-inline">
                                            <input type="text" placeholder="手机号码" name="account" autocomplete="off" class="layui-input">
                                            <input type="text" placeholder="手机号码" name="phone" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label layui-form-label-sm">会员类型</label>
                                        <label class="layui-form-label layui-form-label-sm">核销员</label>
                                        <div class="layui-input-inline">
                                            <select name="level">
                                            <select name="checkOrder">
                                                <option value="">请选择</option>
                                                <option value="ZERO_LEVEL">普通用户</option>
                                                <option value="FIRST_LEVEL">城市合伙人</option>
                                                <option value="0">否</option>
                                                <option value="1">是</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label layui-form-label-sm">会员生日</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="birthday" id="febs-member-benefits-list-birthday-start" lay-verify="date"
                                                   placeholder="MM-dd" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                </div>
@@ -98,6 +91,14 @@
    {{# } }}
</script>
<script type="text/html" id="checkOrderSwitch">
    {{# if(d.checkOrder === 1) { }}
    <input type="checkbox" value={{d.id}} lay-text="是|否" checked lay-skin="switch" lay-filter="checkOrderSwitch">
    {{# } else { }}
    <input type="checkbox" value={{d.id}} lay-text="是|否" lay-skin="switch" lay-filter="checkOrderSwitch">
    {{# } }}
</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">
@@ -112,10 +113,14 @@
</style>
<script type="text/html" id="toolbar">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="updateReferer">修改推荐人</button>
        <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="updateVipLevel">修改会员等级</button>
        <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="addCoupon">优惠券派送</button>
<!--        <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="updateReferer">修改推荐人</button>-->
<!--        <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="updateVipLevel">修改会员等级</button>-->
<!--        <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="addCoupon">优惠券派送</button>-->
    </div>
</script>
<script type="text/html" id="memberOption">
<!--    <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="user:update" lay-event="memberOut">注销</button>-->
</script>
<!-- 表格操作栏 end -->
<script data-th-inline="none" type="text/javascript">
@@ -249,6 +254,14 @@
            });
        }
        form.on('switch(checkOrderSwitch)', function (data) {
            if (data.elem.checked) {
                checkOrder(data.value);
            } else {
                checkOrder(data.value);
            }
        })
        form.on('switch(isSalesmanSwitch)', function (data) {
            if (data.elem.checked) {
                upSale(data.value);
@@ -267,6 +280,13 @@
        function doctorStateChange(id) {
            febs.get(ctx + 'admin/mallMember/doctorStateChange/' + id, null, function () {
                febs.alert.success('操作成功');
                $query.click();
            });
        }
        function checkOrder(id) {
            febs.get(ctx + 'admin/mallMember/checkOrder/' + id, null, function () {
                febs.alert.success('操作成功');
                $query.click();
            });
@@ -307,51 +327,13 @@
                defaultToolbar:[],
                cols: [[
                    {type: 'checkbox'},
                    {type: 'numbers', title: '', width: 80},
                    // {title: '操作', toolbar: '#memberOption', minWidth: 200, align: 'center'},
                    {field: 'phone', title: '手机号码', minWidth: 150,align:'left'},
                    {field: 'name', title: '用户昵称', minWidth: 100,align:'left'},
                    {field: 'birthday', title: '会员生日', minWidth: 100,align:'left'},
                    {field: 'inviteId', title: '邀请码', minWidth: 100,align:'left'},
                    {field: 'balance', title: '余额', minWidth: 100,align:'left'},
                    // {field: 'score', title: '赠送积分', minWidth: 100,align:'left'},
                    {field: 'prizeScore', title: '积分', minWidth: 100,align:'left'},
                    // {field: 'commission', title: '佣金', minWidth: 100,align:'left'},
                    {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: '账号类型',
                    //     templet: function (d) {
                    //         if (d.accountType === 2) {
                    //             return '<span style="color:red;">测试账号</span>'
                    //         } else if (d.accountType === 1) {
                    //             return '<span style="color:green;">正常账号</span>'
                    //         }else{
                    //             return ''
                    //         }
                    //     }, minWidth: 100,align:'center'},
                    // {field: 'leaderState', title: '是否是团长',
                    //     templet: function (d) {
                    //         if (d.leaderState === 1) {
                    //             return '<span style="color:green;">团长</span>'
                    //         }else if (d.leaderState === 3) {
                    //             return '<span">申请中</span>'
                    //         }else if (d.leaderState === 4) {
                    //             return '<span">普通用户(取消团长资格)</span>'
                    //         }else{
                    //             return '<span">普通用户</span>'
                    //         }
                    //     }, minWidth: 100,align:'center'},
                    // {field: 'accountStatus', title: '账号状态', templet: '#switchStatus', minWidth: 100,align:'center'},
                    {field: 'checkOrder', title: '核销员', templet: '#checkOrderSwitch', minWidth: 100,align:'center'},
                    {field: 'createdTime', title: '注册时间', minWidth: 180,align:'center'},
                    {title: '操作',
                        templet: function (d) {
                            return  ''
                                +'<button class="layui-btn layui-btn-normal layui-btn-xs febs-bg-red" lay-event="memberOut" shiro:hasPermission="user:update">注销</button>'
                                // + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="addLeader" shiro:hasPermission="user:update">设置为团长</button>'
                        },minWidth: 200,align:'center'}
                ]]
            });
        }
@@ -500,10 +482,8 @@
        function getQueryParams() {
            return {
                name: $searchForm.find('input[name="name"]').val().trim(),
                account: $searchForm.find('input[name="account"]').val().trim(),
                level: $searchForm.find("select[name='level']").val(),
                birthdayQuery: $searchForm.find("input[name='birthday']").val(),
                // level: $searchForm.find("select[name='level']").val(),
                phone: $searchForm.find('input[name="phone"]').val().trim(),
                checkOrder: $searchForm.find("select[name='checkOrder']").val(),
            };
        }