forked from kidgrow-microservices-platform

zhaoxiaohao
2021-02-06 01d42cce4abdbd5d232d241b1b6b662314cf3999
kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/hospital_form_base.html
@@ -40,7 +40,8 @@
                <div class="layui-input-block">
                    <input name="departmentName" id="departmentName" placeholder="科室名称" type="text" class="layui-input"
                        maxlength="20" lay-verify="required" required style="width: 175px;" />
                    &emsp;</div>
                    &emsp;
                </div>
            </div>
            <div class="layui-col-sm3">
                <label class="layui-form-label">科室电话</label>
@@ -51,7 +52,27 @@
            <div class="layui-col-sm3">
                <label class="layui-form-label">科室联系人</label>
                <div class="layui-input-block">
                    <input name="departmentLink" id="departmentLink" type="text" class="layui-input" maxlength="20" style="width: 200px;" />
                    <input name="departmentLink" id="departmentLink" type="text" class="layui-input" maxlength="20"
                        style="width: 200px;" />
                </div>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-row">
            <div class="layui-col-sm6">
                <label class="layui-form-label">是否筛查科室</label>
                <div class="layui-input-block">
                    <input type="radio" name="isScreen" value="1" title="是">
                    <input type="radio" name="isScreen" value="0" title="否" >
                    &emsp;
                </div>
            </div>
            <div class="layui-col-sm6">
                <label class="layui-form-label">是否新筛查</label>
                <div class="layui-input-block">
                    <input type="radio" name="isNewScreenclient" value="1" title="是">
                    <input type="radio" name="isNewScreenclient" value="0" title="否" >
                </div>
            </div>
        </div>
@@ -94,12 +115,14 @@
                <div class="layui-col-sm4">
                    <select lay-verify="required" required id="hospitalProvince" placeholder="省份"
                        lay-filter="hospitalProvince" style="width: 400px;">
                    </select></div>
                    </select>
                </div>
                <div class="layui-col-sm4">
                    <select id="hospitalCity" lay-verify="required" required placeholder="市" lay-filter="hospitalCity"
                        style="width: 350px;">
                        <option value="">选择市</option>
                    </select></div>
                    </select>
                </div>
                <div class="layui-col-sm4">
                    <select id="hospitalArea" lay-verify="required" required placeholder="区县" lay-filter="hospitalArea"
                        style="width: 350px;">
@@ -249,8 +272,8 @@
                    if (data.data.length > 0) {
                        $.each(data.data, function (index, item) {
                            //往下拉菜单里添加元素
                                $('#saleUserName').append(new Option(item.nickname, item.id,
                                    false, (!strUtil.isEmpty(selectVal) && selectVal == item.id)));
                            $('#saleUserName').append(new Option(item.nickname, item.id,
                                false, (!strUtil.isEmpty(selectVal) && selectVal == item.id)));
                        });
                        if (hosIdForEdit == "") {
@@ -278,12 +301,12 @@
        var hosIdForEdit = "";
        var departmentId = "";
        //当前登录人员的id
        var selectVal="";
        var selectVal = "";
        if (edithospitalData != null) {
            hosIdForEdit = edithospitalData.hospitalId;
            departmentId = edithospitalData.departmentId;
        }
        else{
        else {
            //先拿到当前登录用户的信息
            var nowUser = config.getUser();
            if (!strUtil.isEmpty(nowUser)) {
@@ -343,7 +366,10 @@
                    "#hospitalCity option:selected").text() : "";
                data.field.hospitalArea = $("#hospitalArea option:selected").text() != "选择区县" ? $(
                    "#hospitalArea option:selected").text() : "";
                let isScreen = data.field.isScreen
                let isNewScreenclient = data.field.isNewScreenclient
                delete data.field.isScreen
                delete data.field.isNewScreenclient
                admin.req('api-user/syshospital', JSON.stringify(data.field), function (data) {
                    if (data.code === 0) {
                        //存储科室数据
@@ -362,8 +388,10 @@
                            accountsCount: $("#accountsCount").val(),
                            departmentTel: $("#departmentTel").val(),
                            departmentLink: $("#departmentLink").val(),
                            isScreen,
                            isNewScreenclient,
                        };
                        admin.req('api-user/sysdepartment/'+data.data.id, JSON.stringify(departmentData),
                        admin.req('api-user/sysdepartment/' + data.data.id, JSON.stringify(departmentData),
                            function (data) {
                                layer.closeAll('loading');
                                if (data.code == 0) {
@@ -489,7 +517,10 @@
                                        $('#saleUserName').val(departData[0].saleUserId);
                                        $('#departmentLink').val(departData[0].departmentLink);
                                        $('#departmentTel').val(departData[0].departmentTel);
                                        $("input[name=isScreen][value=1]").attr("checked", departData[0].isScreen == 1 ? true : false);
                                        $("input[name=isScreen][value=0]").attr("checked", departData[0].isScreen == null || departData[0].isScreen==0 ? true : false);
                                        $("input[name=isNewScreenclient][value=1]").attr("checked", departData[0].isNewScreenclient == 1 ? true : false);
                                        $("input[name=isNewScreenclient][value=0]").attr("checked", departData[0].isNewScreenclient == null || departData[0].isNewScreenclient==0? true : false);
                                        if (hosIdForEdit != "") {
                                            $("#serverUserTel").val(departData[0]
                                                .serverUserTel);