diff --git a/WebRoot/view/tb/zbdc/base.html b/WebRoot/view/tb/zbdc/base.html index 6642a470..9102885f 100644 --- a/WebRoot/view/tb/zbdc/base.html +++ b/WebRoot/view/tb/zbdc/base.html @@ -68,7 +68,7 @@
- 单位类型 + 单位类型
@@ -185,7 +185,7 @@
-
+
@@ -216,16 +216,26 @@ var form = layui.form; var $ = layui.jquery; + var isXX = true; + $.ajax({ type: "GET", async: false, url: "/QingLong/zbdc/getSchoolBase", - success: function (res) { + success: function (res) { - $("#org_name").html(res.org_name); + $("#org_name").html(res.bureau_name); $("#org_type").html(res.school_type_name); - if(res.hasOwnProperty('xx_student_count')){ + if (res.school_type_name == "小学") { + isXX = true; + $("#xx_type").show(); + } else { + isXX = false; + $("#xx_type").hide(); + } + + if (res.hasOwnProperty('xx_student_count')) { $("input[name='xx_student_count']").val(res.xx_student_count); $("input[name='cz_student_count']").val(res.cz_student_count); $("input[name='gz_student_count']").val(res.gz_student_count); @@ -234,13 +244,20 @@ $("input[name='gz_class_count']").val(res.gz_class_count); $("input[name='xx_teacher_count']").val(res.xx_teacher_count); $("input[name='cz_teacher_count']").val(res.cz_teacher_count); - $("input[name='gz_teacher_count']").val(res.gz_teacher_count); + $("input[name='gz_teacher_count']").val(res.gz_teacher_count); + if(res.xiaoxue_type_id != 0){ + $("input[name='xiaoxue_type_id'][value='" + res.xiaoxue_type_id + "']").prop("checked", true); + } + form.render('radio'); + } } }); form.on('submit(save)', function (data) { - console.log(data.field); + if (!isXX) { + data.field.xiaoxue_type_id = 0; + } $.ajax({ url: '/QingLong/zbdc/saveSchool', data: data.field,