123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- /**
- * 初始化子女就学详情对话框
- */
- 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 + "/admin/education_school/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: ['<i class="fa fa-save"></i> 提交', '<i class="fa fa-eraser"></i> 关闭'],
- 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 + "/admin/education_school/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 + "/admin/education_school/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 '<form id="checkForm">\n' +
- ' <div class="form-group" style="margin: 10px;">\n' +
- ' <label for="checkState" class="control-label">审核状态</label>\n' +
- ' <select class="form-control" id="checkStateModel" >\n' +
- ' <option value="">请选择</option>\n' +
- ' <option value="3">审核通过</option>\n' +
- ' <option value="2">审核驳回</option>\n' +
- ' </select>\n' +
- ' </div>\n' +
- ' <div class="form-group" style="margin: 10px;">\n' +
- ' <label for="checkMsg" class="control-label" >审核意见</label>\n' +
- ' <textarea class="form-control" id="checkMsg" rows="6"></textarea>\n' +
- ' </div>\n' +
- ' </form>';
- }
- $(function () {
- Feng.initValidatorTip("educationSchoolForm", EducationSchoolInfoDlg.validateFields);
- //批量加载字典表数据
- var arr = [
- {"name": "companyStreet", "code": "street"},
- {"name": "houseStreet", "code": "street"},
- {"name": "talentArrange", "code": "talent_arrange"},
- {"name": "cRelation", "code": "education_relation"},
- {"name": "nowGrade", "code": "education_grade"},
- {"name": "project", "code": "education_project"},
- {"name": "applySchool", "code": "education_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());
- });
|