| | |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar"> |
| | | <button id="doctor-btn-add" class="layui-btn icon-btn"><i class="layui-icon"></i>添加</button> |
| | | <button id="doctor-btn-add" class="layui-btn icon-btn" value="sysdoctor-edit"><i |
| | | class="layui-icon"></i>添加</button> |
| | | <select placeholder="选择一个应用" id="doctorState" lay-filter="role_clients"> |
| | | <option value="">-请选择-</option> |
| | | <option value="true">正常</option> |
| | |
| | | </select> |
| | | <input id="doctorTel" class="layui-input search-input" type="text" placeholder="按手机号..." />  |
| | | <input id="doctorName" class="layui-input search-input" type="text" placeholder="按医生..." />  |
| | | <button id="app-btn-search" class="layui-btn icon-btn"><i class="layui-icon"></i>搜索</button> |
| | | <button id="app-btn-search" class="layui-btn icon-btn" value="sysdoctor-list"><i |
| | | class="layui-icon"></i>搜索</button> |
| | | </div> |
| | | |
| | | <!-- 数据表格 --> |
| | |
| | | |
| | | <script type="text/html" id="doctor-table-bar"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看详情</a> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="reset">重置密码</a> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-xs" lay-event="del">删除</a> |
| | | <button class="layui-btn layui-btn-primary layui-btn-xs" value="users-edit" lay-event="reset">重置密码</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-xs" value="sysdoctor-edit" lay-event="edit">修改</button> |
| | | <button class="layui-btn layui-btn-xs" value="sysdoctor-del" lay-event="del">删除</button> |
| | | <!-- <a class="layui-btn layui-btn-xs" lay-event="enable">停用</a> --> |
| | | </script> |
| | | |
| | |
| | | <script type="text/html" id="doctor-tpl-state"> |
| | | <input type="checkbox" lay-filter="doctor-tpl-state" value="{{d.id}}" lay-skin="switch" lay-text="正常|已停用" |
| | | {{d.enabled==true?'checked':''}}/> |
| | | <input class="radioChecked" type="hidden" value="sysdoctor-enable" /> |
| | | </script> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="app-model"> |
| | |
| | | var user = ""; |
| | | //职称 |
| | | var doctorRank = ""; |
| | | var test = $(".layui-btn"); |
| | | |
| | | var permissions = admin.getTempData("permissions"); |
| | | test.each(function () { |
| | | var item = $(this) |
| | | if (permissions.indexOf(item.val()) != -1) { |
| | | item.show(); |
| | | } else { |
| | | item.hide(); |
| | | } |
| | | }) |
| | | |
| | | // 获取应用列表 |
| | | // layer.load(2); |
| | | admin.req('api-user/syshospital/findAllByMap', JSON.stringify({ is_del: 0 }), function (data) { |
| | |
| | | } |
| | | //往下拉菜单里添加元素 |
| | | $('#hospitalName-seach').append(new Option(item.hospitalName, item.id, false, selected)); |
| | | // $('#hospitalId').append(new Option(item.hospitalName, item.id, false, selected)); |
| | | form.render('select', 'app-form'); |
| | | }) |
| | | form.render(); |
| | |
| | | page: true, |
| | | cols: [[ |
| | | { type: 'numbers' }, |
| | | { field: 'hospitalName', width: 180, sort: true, title: '医院名称' }, |
| | | { field: 'doctorName', width: 200, sort: true, title: '医生姓名' }, |
| | | { field: 'doctorRank', width: 180, sort: true, title: '职称' }, |
| | | { field: 'username', width: 300, sort: true, title: '登录帐号' }, |
| | | { field: 'doctorTel', width: 300, sort: true, title: '联系方式' }, |
| | | { field: 'hospitalName', width: 180, title: '医院名称' }, |
| | | { field: 'doctorName', width: 200, title: '医生姓名' }, |
| | | { field: 'doctorRank', width: 180, title: '职称' }, |
| | | { field: 'username', width: 300, title: '登录帐号' }, |
| | | { field: 'doctorTel', width: 300, title: '联系方式' }, |
| | | { |
| | | field: 'doctorState', width: 300, sort: true, title: '状态', templet: function (d) { |
| | | field: 'doctorState', width: 300, title: '状态', templet: function (d) { |
| | | return d.doctorState ? "正式" : "试用" |
| | | } |
| | | }, |
| | | { |
| | | field: 'isAnswer', width: 300, sort: true, title: '医答', templet: function (d) { |
| | | field: 'isAnswer', width: 300, title: '医答', templet: function (d) { |
| | | return d.isAnswer ? "是" : "否" |
| | | } |
| | | }, |
| | | { |
| | | field: 'isSigning', width: 300, sort: true, title: '签约', templet: function (d) { |
| | | field: 'isSigning', width: 300, title: '签约', templet: function (d) { |
| | | return d.isSigning ? "是" : "否" |
| | | } |
| | | }, |
| | | { field: 'enabled', width: 250, align: 'center', templet: '#doctor-tpl-state', sort: true, title: '状态' }, |
| | | { field: 'createTime', width: 250, sort: true, title: '时间', templet: "<div>{{layui.util.toDateString(d.createTime, 'yyyy年MM月dd日 HH:mm:ss')}}</div>" }, |
| | | { field: 'serverUserName', width: 100, sort: true, title: '销售代表' }, |
| | | { width: 200, width: 300, align: 'center', toolbar: '#doctor-table-bar', sort: true, title: '操作' }, |
| | | ]] |
| | | { field: 'enabled', width: 250, align: 'center', templet: '#doctor-tpl-state', title: '状态' }, |
| | | { field: 'createTime', width: 250, title: '时间', templet: "<div>{{layui.util.toDateString(d.createTime, 'yyyy年MM月dd日 HH:mm:ss')}}</div>" }, |
| | | { field: 'serverUserName', width: 100, title: '销售代表' }, |
| | | { width: 200, width: 300, align: 'center', toolbar: '#doctor-table-bar', title: '操作' }, |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | $(".layui-btn-xs").each(function () { |
| | | var item = $(this) |
| | | |
| | | if (permissions.indexOf(item.val()) != -1) { |
| | | item.show(); |
| | | } else { |
| | | item.hide(); |
| | | } |
| | | }) |
| | | //layui-unselect layui-form-switch layui-form-onswitch <input class="radioChecked" value="sysdoctor-enable" /> |
| | | $(".radioChecked").each(function () { |
| | | var item = $(this) |
| | | if (permissions.indexOf(item.val()) != -1) { |
| | | $(".layui-unselect").show(); |
| | | } else { |
| | | $(".layui-unselect").hide(); |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | |
| | | // 工具条点击事件 |
| | |
| | | } |
| | | }, 'get'); |
| | | } |
| | | |
| | | }); |
| | | </script> |