| | |
| | | <option value="true">正常</option> |
| | | <option value="false">试用</option> |
| | | </select>  |
| | | <input name="hospitalName-seach" id="hospitalName-seach" placeholder="请输入医院名称" type="text" |
| | | <input name="hospitalName" id="hospitalName-seach" placeholder="请输入医院名称" type="text" |
| | | class="layui-input search-input" maxlength="50" autocomplete="off" />  |
| | | </div> |
| | | <button id="app-btn-search" class="layui-btn icon-btn permissions" layt="abc" |
| | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label" >登录密码</label> |
| | | <div class="layui-input-block"> |
| | | <input name="password" type="text" lay-verify="required" class="layui-input" maxlength="15" lay-verify="required" required/> |
| | | <input name="password" type="password" lay-verify="required" class="layui-input" maxlength="15" lay-verify="required|phone" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label" >确认密码</label> |
| | | <div class="layui-input-block"> |
| | | <input name="passwordSure" type="text" lay-verify="required|confirmPass" class="layui-input" maxlength="15"/> |
| | | <input name="passwordSure" type="password" lay-verify="required|confirmPass" class="layui-input" maxlength="15"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </blockquote> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label" >角色</label> |
| | | <div class="layui-input-block"> |
| | | <select name="roleId" xm-select="roleId" lay-verify="required"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item model-form-footer"> |
| | |
| | | |
| | | |
| | | <script> |
| | | layui.use(['form', 'table', 'laydate', 'util', 'config', 'upload', 'admin', 'autocomplete'], function () { |
| | | layui.use(['form', 'table', 'laydate', 'util', 'config', 'upload', 'admin', 'autocomplete','formSelects'], function () { |
| | | var form = layui.form; |
| | | var table = layui.table; |
| | | var config = layui.config; |
| | |
| | | var admin = layui.admin; |
| | | var upload = layui.upload; |
| | | var autocomplete = layui.autocomplete; |
| | | var formSelects = layui.formSelects; |
| | | var $ = layui.jquery; |
| | | form.verify({ confirmPass: function (value) { if ($('input[name=password]').val() !== value) return '两次密码输入不一致!'; } }); |
| | | |
| | |
| | | { width: 300, align: 'center', toolbar: '#doctor-table-bar', title: '操作' }, |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | permissionsInput(); |
| | | permissionsInput(res,config); |
| | | } |
| | | }); |
| | | |
| | |
| | | $("#hospitalId").val(""); |
| | | } |
| | | var doctorState = $('#doctorState').val(); |
| | | var hospitalName = $("#hospitalId").val(); |
| | | var hospitalName = $("#hospitalName-seach").val(); |
| | | var doctorTel = $('#doctorTel').val(); |
| | | var doctorName = $('#doctorName').val(); |
| | | table.reload('app-table', { where: { doctorState: doctorState, hospitalId: hospitalName, doctorTel: doctorTel, doctorName: doctorName } }); |
| | | table.reload('app-table', { where: { doctorState: doctorState, hospitalName: hospitalName, doctorTel: doctorTel, doctorName: doctorName } }); |
| | | }); |
| | | |
| | | //获取角色 |
| | | var get_role=function(){ |
| | | admin.req('api-user/findByMap?tenant_id=hospital',{}, function (data) { |
| | | layer.closeAll('loading'); |
| | | if (0 == data.code) { |
| | | // 渲染多选下拉框 |
| | | var roleSelectData = new Array(); |
| | | for (var i = 0; i < data.data.length; i++) { |
| | | roleSelectData.push({name: data.data[i].name, value: data.data[i].id}); |
| | | } |
| | | formSelects.data('roleId', 'local', {arr: roleSelectData}); |
| | | |
| | | // 回显user数据 |
| | | var user = admin.getTempData('t_user'); |
| | | $('#user-form').attr('method', 'POST'); |
| | | if (user) { |
| | | form.val('user-form', user); |
| | | $('#user-form').attr('method', 'POST'); |
| | | var rds = new Array(); |
| | | for (var i = 0; i < user.roles.length; i++) { |
| | | rds.push(user.roles[i].id); |
| | | } |
| | | formSelects.value('roleId', rds); |
| | | } |
| | | } else { |
| | | layer.msg('获取角色失败', {icon: 2, time: 500}); |
| | | } |
| | | }, 'GET'); |
| | | } |
| | | |
| | | // 显示新增弹窗 |
| | | var showEditModel_add = function () { |
| | | layer.open({ |
| | |
| | | getZhiCheng(); |
| | | //获取销售代表 |
| | | getXiaoShouDaiBiao(); |
| | | //获取角色 |
| | | get_role(); |
| | | var upload = layui.upload; |
| | | //执行实例 |
| | | upload.render({ |
| | |
| | | form.on('submit(user-form-submit)', function (data) { |
| | | layer.load(2); |
| | | data.field.hospitalId = parseInt(data.field.hospitalId); |
| | | if(data.field.roleId!=null&&data.field.roleId!=""){ |
| | | data.field.roles=data.field.roleId.split(','); |
| | | } |
| | | data.field.roleId=null; |
| | | admin.req('api-user/sysdoctor', JSON.stringify(data.field), function (data) { |
| | | layer.closeAll('loading'); |
| | | if (data.code == 0) { |