forked from kidgrow-microservices-platform

dougang
2021-04-15 246e5ba690ca4d284bfbac80157d70267e831824
kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/keaigao/AdvisoryDoctor_form.html
@@ -37,13 +37,12 @@
                </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>
@@ -60,7 +59,7 @@
            <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>
@@ -165,7 +164,6 @@
        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;
@@ -204,7 +202,7 @@
            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');
@@ -220,7 +218,7 @@
                            }, "POST");
                        });
                    } else {
                        layer.msg(data.msg, {
                        layer.msg("未找到对应的用户信息,请确认后填写", {
                            icon: 2,
                            time: 3000
                        });
@@ -263,6 +261,15 @@
            //将部门名称赋值
            $('#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");
          }
        });
        //获取科室
@@ -334,12 +341,18 @@
          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) {
@@ -357,8 +370,8 @@
            }
        }, 'get');
          form.render();
        }
    });
</script>