| | |
| | | }); |
| | | // 回显user数据 |
| | | var doctor = admin.getTempData('t_doctor'); |
| | | if (doctor.roles) { |
| | | if (doctor!=null&&doctor.roles) { |
| | | formSelects.value('roleId', doctor.roles); |
| | | } |
| | | |
| | |
| | | // 表单提交事件 |
| | | form.on('submit(user-form-submit)', function (data) { |
| | | layer.load(2); |
| | | debugger |
| | | data.field.hospitalId = $("#hospitalId").val(); |
| | | if (data.field.roleId != null && data.field.roleId != "") { |
| | | data.field.roles = data.field.roleId.split(','); |
| | |
| | | //职称添加数据 |
| | | var getZhiCheng = function () { |
| | | admin.req('api-user/sysdictionaries/findAll', JSON.stringify({ |
| | | dictionariesClassId: "1248150699682988034" |
| | | dictionariesClassId: "DOCTOR_RANK" |
| | | }), function (data) { |
| | | layer.closeAll('loading'); |
| | | if (0 === data.code) { |
| | |
| | | $("#doctorTel-add").blur(function () { |
| | | $("#username").val($("#doctorTel-add").val()) |
| | | var doctorTel_add = $("#doctorTel-add").val(); |
| | | debugger |
| | | if (!validatorTel(doctorTel_add)) { |
| | | layer.msg("请输入正确的手机号"); |
| | | } |
| | |
| | | form.on('select(doctorType)', function (data) { |
| | | var doctor = admin.getTempData('t_doctor'); |
| | | var doctorType = $('#doctorType').val(); |
| | | if (doctor == null) { |
| | | if (doctorType != 2) { |
| | | $(".account").show(); |
| | | $("#password_div").show(); |
| | | $("#passwordSure_div").show(); |
| | | $("#roleId_div").show() |
| | | }else{ |
| | | $(".account").hide(); |
| | | $("#roleId_div").hide() |
| | | } |
| | | } else { |
| | | if (doctor.doctorType == 2 && doctorType == 2) { |
| | | $(".account").hide(); |
| | | $("#roleId_div").hide() |
| | |
| | | $(".account").hide(); |
| | | $("#roleId_div").hide() |
| | | } |
| | | |
| | | } |
| | | }) |
| | | //数据的回显 |
| | | var doctor = admin.getTempData('t_doctor'); |