| | |
| | | <form id="app-form-add" lay-filter="app-form-add" class="layui-form model-form"> |
| | | <input name="id" type="hidden"/> |
| | | <div style="display:flex"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">开通服务</label> |
| | | <label class="layui-form-label">服务类型</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <select id="service" name="service" lay-filter="service" placeholder="请选择服务" |
| | | lay-verify="required" required> |
| | | <option value="1">图文</option> |
| | | <option value="2">电话</option> |
| | | <option value="3">图文/电话</option> |
| | | <option value="3" selected>图文/电话</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 80px;">客服渠道</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <input name="price" id="channel" lay-verify="required" required placeholder="客服渠道地址" class="layui-input" maxlength="50"/> |
| | | <input name="price" id="channel" placeholder="客服渠道地址" class="layui-input" maxlength="50"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | var form = layui.form; |
| | | var config = layui.config; |
| | | var layer = layui.layer; |
| | | var util = layui.util; |
| | | var admin = layui.admin; |
| | | var autocomplete = layui.autocomplete; |
| | | var formSelects = layui.formSelects; |
| | |
| | | if($("#bindPhone").val() != "" && $("#bindPhone").val() != null){ |
| | | admin.req('api-opration/advisorydoctor/querUserByPhone', JSON.stringify(data.field), function (data1) { |
| | | layer.closeAll('loading'); |
| | | if (data1.code == 0) { |
| | | if (data1.code == 0 && data1.data != null) { |
| | | layer.confirm('确定要将该医生绑定到昵称:' + data1.data.nickName + "吗?", function (i) { |
| | | admin.req('api-opration/advisorydoctor', JSON.stringify(data.field), function (data) { |
| | | layer.closeAll('loading'); |
| | |
| | | }, "POST"); |
| | | }); |
| | | } else { |
| | | layer.msg(data.msg, { |
| | | layer.msg("未找到对应的用户信息,请确认后填写", { |
| | | icon: 2, |
| | | time: 3000 |
| | | }); |
| | |
| | | //将部门名称赋值 |
| | | $('#departmentName').val($(this)[0].innerHTML); |
| | | getDoctor( $("#hospitalId").val(), $("#departmentId").val()); |
| | | }); |
| | | |
| | | form.on('select(service)', function () { |
| | | var type = $("#service").val(); |
| | | if(type == 1){ |
| | | $("#price").attr("readonly","readonly"); |
| | | }else{ |
| | | $("#price").removeAttr("readonly"); |
| | | } |
| | | }); |
| | | |
| | | //获取科室 |
| | |
| | | getdepartment(adisoryDoctor.hospitalId,adisoryDoctor.deptId); |
| | | |
| | | form.val('app-form-add', adisoryDoctor); |
| | | |
| | | $("#price").val(adisoryDoctor.price / 100); |
| | | $("#doctorName").val(adisoryDoctor.doctorName); |
| | | $("#bindPhone").attr("Readonly",true); |
| | | if(adisoryDoctor.service == 1){ |
| | | $("#price").attr("readonly","readonly"); |
| | | }else{ |
| | | $("#price").removeAttr("readonly"); |
| | | } |
| | | form.render(); |
| | | |
| | | admin.req('api-opration/appointment/queryByAdvisoryId/'+$("#id").val(), { |
| | | |
| | | admin.req('api-opration/appointment/queryByAdvisoryId/'+$("#id").val(), { |
| | | }, function (data) { |
| | | layer.closeAll('loading'); |
| | | if (0 === data.code) { |
| | |
| | | } |
| | | }, 'get'); |
| | | |
| | | |
| | | form.render(); |
| | | } |
| | | }); |
| | | |
| | | </script> |