/** * 初始化子女就学详情对话框 */ var EducationSchoolInfoDlg = { educationSchoolInfoData : {}, }; /** * 关闭此对话框 */ EducationSchoolInfoDlg.close = function() { parent.layer.close(window.parent.EducationSchool.layerIndex); } /** * 项目选择变更 * @param content */ EducationSchoolInfoDlg.projectChange = function(content){ var project = $(content).val(); if(Feng.isEmptyStr(project)){ $("#applySchool").parent().css("display","none"); } if(project == CONFIG.education_school){ $("#applySchool").parent().css("display","block"); } if(project == CONFIG.education_score){ $("#applySchool").parent().css("display","none"); } } /** * 显示审核 */ EducationSchoolInfoDlg.showCheckModal = function(){ var ajax = new $ax(Feng.ctxPath + "/educationSchool/validateIsCheck", function (data) { if(data.code==200){ layer.open({ type: 1, id:"neewFieldFormModel", title: '审核', area: ['800px', '450px'], //宽高 fix: false, //不固定 shade:0, maxmin: true, content: EducationSchoolInfoDlg.creatFieldCheckModal(), btn: ['  提交' ,'  关闭'], btnAlign: 'c', zIndex: layer.zIndex, success:function(layero, index){ layer.setTop(layero); $("#checkStateModel").val(data.obj.checkState); $("#checkMsg").val(data.obj.checkMsg); }, yes: function (index, layero) { EducationSchoolInfoDlg.check(index); } }); }else{ Feng.error(data.msg); } }, function (data) { Feng.error("校验失败!" + data.responseJSON.message + "!"); }); ajax.setData({"id":$("#id").val()}) ajax.start(); } /** * 审核 * @param index */ EducationSchoolInfoDlg.check = function(index){ var checkState = $("#checkStateModel").val(); var checkMsg = $("#checkMsg").val(); if(checkState==null||checkState==''){ Feng.info("请选择审核状态"); return ; } if(checkMsg == null || checkMsg == ''){ Feng.info("请填写审核意见"); return ; } var ajax = new $ax(Feng.ctxPath + "/educationSchool/check", function (data) { if(data.code==200){ layer.close(index); Feng.success(data.msg); }else{ Feng.error(data.msg); } locked = false; }, function (data) { Feng.error("审核失败!" + data.responseJSON.message + "!"); locked = false; }); ajax.setData({"id":$("#id").val(),"checkState":checkState,"checkMsg":checkMsg}); ajax.start(); } /** * 提交审核 */ EducationSchoolInfoDlg.submitCheck = function(){ var checkState = $("#checkState").val(); if(checkState != 1 && checkState != 9){ Feng.info("不在审核范围内"); return ; } var operation = function(){ var ajax = new $ax(Feng.ctxPath + "/educationSchool/submitCheck", function (data) { if(data.code==200){ Feng.success(data.msg); window.parent.EducationSchool.table.refresh(); EducationSchoolInfoDlg.close(); }else{ Feng.error(data.msg); } }, function (data) { Feng.error("提交审核失败!" + data.responseJSON.message + "!"); }); ajax.setData({"id":$("#id").val()}); ajax.start(); } Feng.confirm("一旦提交无法修改,是否审核完毕且无误?", operation); } /** * */ EducationSchoolInfoDlg.creatFieldCheckModal = function(){ return '
\n' + '
\n' + ' \n' + ' \n' + '
\n' + '
\n' + ' \n' + ' \n' + '
\n' + '
'; } $(function() { Feng.initValidatorTip("educationSchoolForm",EducationSchoolInfoDlg.validateFields); //批量加载字典表数据 var arr = [ {"name":"companyStreet","code":"un_street"}, {"name":"houseStreet","code":"un_street"}, {"name":"talentArrange","code":"un_talentLevel"}, {"name":"cRelation","code":"un_education_relation"}, {"name":"nowGrade","code":"un_grade"}, {"name":"project","code":"un_educationSchool_project"}, {"name":"applySchool","code":"un_school_pool"}]; Feng.findChildDictBatch(JSON.stringify(arr)); $("#applySchool").on('chosen:ready', function(e, params) { $(".chosen-container-single .chosen-single").css("padding","4px 0px 0px 4px"); }); $("#applySchool").chosen({ search_contains:true,    //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配 disable_search: false, width:"100%", enable_split_word_search: true }); $("select").each(function () { $(this).val($(this).attr("value")).trigger("change").trigger("chosen:updated"); }); var id = $("#id").val(); Feng.getCheckLog("logTable",{"type":CONFIG.project_school,"mainId":id,"typeFileId":"","active":1}) Feng.showMiniFileModal(CONFIG.project_school,$("#type").val(),$("#id").val()); });