From ce2737fb8d1aebbb33a12c86043be02ea632f91c Mon Sep 17 00:00:00 2001 From: KKSU <15274802129@163.com> Date: Tue, 08 Apr 2025 16:13:16 +0800 Subject: [PATCH] refactor(mall): 优化医生绑定接口参数校验 --- src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html | 31 ++++++++++++++++++++++++++++--- 1 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html b/src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html index 2c07876..5b28852 100644 --- a/src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html +++ b/src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html @@ -33,7 +33,7 @@ <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="yyyy-MM-dd" autocomplete="off" class="layui-input"> + placeholder="MM-dd" autocomplete="off" class="layui-input"> </div> </div> </div> @@ -97,6 +97,14 @@ <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; @@ -128,7 +136,8 @@ form.render(); laydate.render({ - elem: '#febs-member-benefits-list-birthday-start' + elem: '#febs-member-benefits-list-birthday-start', + format:'MM-dd' }); // 表格初始化 @@ -248,6 +257,21 @@ } }) + 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('操作成功'); @@ -294,6 +318,7 @@ {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: '账号类型', @@ -477,7 +502,7 @@ name: $searchForm.find('input[name="name"]').val().trim(), account: $searchForm.find('input[name="account"]').val().trim(), level: $searchForm.find("select[name='level']").val(), - birthday: $searchForm.find("input[name='birthday']").val(), + birthdayQuery: $searchForm.find("input[name='birthday']").val(), // level: $searchForm.find("select[name='level']").val(), }; } -- Gitblit v1.9.1