var Enterprise = { id: "table", //表格id seItem: null, //选中的条目 table: null, layerIndex: -1 }; Enterprise.initColumn = function () { var type = $("#type").val(); var isShow = true; if (type == 2) { isShow = false; } ; return [ {field: 'selectItem', radio: true}, {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, {title: '账号', field: 'username', visible: true, align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'}, {title: '机构名称', field: 'name', visible: true, align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'}, {title: '统一社会信用代码', field: 'idCard', visible: true, align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'}, {title: '产业领域', field: 'industryFieldNewName', visible: isShow, align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'}, {title: '机构类型', field: 'type', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip', formatter: function (value, row, index) { if (value == 1) { return "晋江市现代产业体系人才"; } if (value == 2) { return "集成电路优秀人才"; } } }, {title: '单位标签', field: 'enterpriseTagName', visible: isShow, align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'}, {title: '法人代表', field: 'legal', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'}, {title: '单位电话', field: 'ephone', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'}, {title: '人才联络员', field: 'agentName', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'}, {title: '人才联络员电话', field: 'agentPhone', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'}, {title: '审核状态', field: 'checkState', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip', formatter: function (value, row, index) { if (value == null || value == '') { return ""; } else if (value == 1) { return "未审核"; } else if (value == 2) { return "审核驳回"; } else if (value == 3) { return "审核通过"; } else if (value == 4) { return "重新提交"; } else if (value == 5) { return "初审驳回"; } else if (value == 6) { return "初审通过"; } }, cellStyle: function (value, row, index) { if (value == null || value === '') { return {css: {}}; } else if (value === 1) { return {css: {"background-color": "LightGrey"}}; } else if (value === 3) { return {css: {'background-color': 'LightGreen'}}; } else if (value === 2) { return {css: {"background-color": "Orange"}}; } else if (value === 4) { return {css: {'background-color': 'LightGrey'}}; } else if (value === 5) { return {css: {'background-color': 'Orange'}}; } else if (value === 6) { return {css: {"background-color": "LightBlue"}}; } else { return {css: {}}; } } }, {title: '账号状态', field: 'active', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip', formatter: function (value, row, index) { if (value == null || value == '') { return ""; } else if (value == 1) { return "账号有效"; } else if (value == 2) { return "拉黑/冻结"; } }, cellStyle: function (value, row, index) { if (value == null || value === '') { return {css: {}}; } else if (value === 1) { return {css: {'background-color': 'LightGreen'}}; } else if (value === 2) { return {css: {"background-color": "Orange"}}; } else { return {css: {}}; } } }, {title: '注册时间', field: 'createTime', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'}, {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "80px", formatter: function (value, row, index) { return "" + "日志" + ""; } } ]; }; Enterprise.formParam = function () { var queryData = {}; queryData['name'] = $("#name").val(); queryData['idCard'] = $("#idCard").val(); queryData['legal'] = $("#legal").val(); queryData['ephone'] = $("#ephone").val(); queryData['agentName'] = $("#agentName").val(); queryData['agentPhone'] = $("#agentPhone").val(); queryData['checkState'] = $("#checkState").val(); queryData['active'] = $("#active").val(); queryData['street'] = $("#street").val(); queryData['special'] = $("#special").val(); queryData['agencyType'] = $("#agencyType").val(); queryData['industryFieldNew'] = $("#industryFieldNew").val(); queryData['industryFieldOld'] = $("#industryFieldOld").val(); queryData['enterpriseTag'] = $("#enterpriseTag").val(); queryData['enterpriseType'] = $("#enterpriseType").val(); return queryData; } Enterprise.search = function () { Enterprise.table.refresh({"query": Enterprise.formParam()}); }; Enterprise.reset = function () { $("#name").val(""); $("#idCard").val(""); $("#legal").val(""); $("#ephone").val(""); $("#agentName").val(""); $("#agentPhone").val(""); $("#checkState").val(""); $("#active").val(""); $("#street").val(""); $("#special").val(""); $("#agencyType").val(""); $("#industryFieldNew").val(""); $("#industryFieldOld").val(""); $("#enterpriseTag").val(""); $("#enterpriseType").val(""); }; Enterprise.gotoEnterpriseDetailPage = function () { if (!Enterprise.check()) { return; } var index = layer.open({ type: 2, title: '查看详情', area: ['830px', '450px'], //宽高 fix: false, //不固定 maxmin: true, content: Feng.ctxPath + '/admin/enterprise/gotoEnterpriseDetailPage?id=' + Enterprise.seItem.id, btn: [' 审核', ' 关闭'], btnAlign: 'c', yes: function (index, layero) { Enterprise.doExamine(); } }); layer.full(index); Enterprise.layerIndex = index; }; Enterprise.delEnterprise = function () { if (!Enterprise.check()) { return; } Feng.confirm( "确定删除吗?", function () { var ajax = new $ax(Feng.ctxPath + "/admin/enterprise/delEnterprise?id=" + Enterprise.seItem.id, function (data) { Feng.info(data.msg); if (data.code == 200) { Enterprise.table.refresh(); } }, function (data) { Feng.error("操作失败!"); }); ajax.set(null); ajax.start(); } ); }; Enterprise.setActive = function () { if (!Enterprise.check()) { return; } var index = layer.open({ type: 2, title: '设置冻结', area: ['830px', '500px'], //宽高 fix: false, //不固定 maxmin: true, content: Feng.ctxPath + '/admin/enterprise/gotoActivePage?id=' + Enterprise.seItem.id, btn: [' 提交', ' 取消'], btnAlign: 'c', yes: function (index, layero) { //按钮【按钮一】的回调 var iframeWin = window[layero.find('iframe')[0]['name']]; iframeWin.EpActive.addSubmit(); } }); // layer.full(index); Enterprise.layerIndex = index; }; Enterprise.doExamine = function () { if (!Enterprise.check()) { return; } var inCheckList = [1, 4, 6]; if (Enterprise.seItem.checkState == null || inCheckList.indexOf(Enterprise.seItem.checkState) == -1) { Feng.info("不在审核范围内!"); return; } var index = layer.open({ type: 2, title: '审核', area: ['830px', '500px'], //宽高 fix: false, //不固定 maxmin: true, shade: 0, content: Feng.ctxPath + '/admin/enterprise/gotoExaminePage?id=' + Enterprise.seItem.id, btn: [' 提交', ' 保存', ' 取消'], btnAlign: 'c', yes: function (index, layero) { //按钮【按钮一】的回调 layer.confirm("确认提交审核结果?", function () { var iframeWin = window[layero.find('iframe')[0]['name']]; iframeWin.EpExam.submitToCheck(); }) }, btn2: function (index, layero) { var iframeWin = window[layero.find('iframe')[0]['name']]; iframeWin.EpExam.addSubmit(); return false; } }); // layer.full(index); }; /** * 修改驳回的字段及附件 */ Enterprise.updateFieldsAndFiles = function () { if (this.check()) { var id = Enterprise.seItem.id; var ajax = new $ax("/admin/enterprise/findFieldsAndFiles?id=" + id, function (data) { if (data.code == 200) { layer.open({ type: 1, id: "fieldCheckModalForm", title: '修改', area: ['800px', '450px'], //宽高 fix: false, //不固定 shade: 0, maxmin: true, content: Enterprise.creatFieldCheckModal(), btn: [' 提交', ' 关闭'], btnAlign: 'c', zIndex: layer.zIndex, success: function (layero, index) { var fileList = data.files; var fieldList = data.fields; var html_field = ''; var html_file = ''; for (var key in fieldList) { html_field = html_field + '