|
@@ -106,8 +106,12 @@ Enterprise.formParam = function () {
|
|
|
queryData['checkState'] = $("#checkState").val();
|
|
|
queryData['active'] = $("#active").val();
|
|
|
queryData['street'] = $("#street").val();
|
|
|
- queryData['enterpriseTag'] = $("#enterpriseTag").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;
|
|
|
}
|
|
|
|
|
@@ -125,8 +129,12 @@ Enterprise.reset = function () {
|
|
|
$("#checkState").val("");
|
|
|
$("#active").val("");
|
|
|
$("#street").val("");
|
|
|
- $("#talentType").val("");
|
|
|
- $("#industryField").val("");
|
|
|
+ $("#special").val("");
|
|
|
+ $("#agencyType").val("");
|
|
|
+ $("#industryFieldNew").val("");
|
|
|
+ $("#industryFieldOld").val("");
|
|
|
+ $("#enterpriseTag").val("");
|
|
|
+ $("#enterpriseType").val("");
|
|
|
};
|
|
|
|
|
|
Enterprise.gotoEnterpriseDetailPage = function () {
|
|
@@ -183,6 +191,7 @@ Enterprise.doExamine = function () {
|
|
|
area: ['830px', '500px'], //宽高
|
|
|
fix: false, //不固定
|
|
|
maxmin: true,
|
|
|
+ shade: 0,
|
|
|
content: Feng.ctxPath + '/admin/enterprise/gotoExaminePage?id=' + Enterprise.seItem.id,
|
|
|
btn: ['<i class="fa fa-check"></i> 提交', '<i class="fa fa-eraser"></i> 取消'],
|
|
|
btnAlign: 'c',
|
|
@@ -195,6 +204,115 @@ Enterprise.doExamine = function () {
|
|
|
// 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: ['<i class="fa fa-save"></i> 提交', '<i class="fa fa-eraser"></i> 关闭'],
|
|
|
+ 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 + '<li><input type="checkbox" ' + (fieldList[key].checked ? "checked" : "") + ' value="' + fieldList[key].field + '"><span>' + fieldList[key].name + '</span></li>';
|
|
|
+ }
|
|
|
+ for (var key in fileList) {
|
|
|
+ html_file = html_file + '<li style="width: 100%"><input type="checkbox" ' + (fileList[key].checked ? "checked" : "") + ' value="' + fileList[key].field + '"><span>' + fileList[key].name + '</span></li>';
|
|
|
+ }
|
|
|
+ $("#field_info").empty().append("<ul>" + html_field + "</ul>");
|
|
|
+ $("#field_file").empty().append("<ul>" + html_file + "</ul>");
|
|
|
+ },
|
|
|
+ yes: function (index, layero) {
|
|
|
+ Enterprise.submitFieldsAndFiles(index, id);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ Feng.error(data.msg);
|
|
|
+ }
|
|
|
+ }, function (data) {
|
|
|
+ Feng.error("查询失败!" + data.responseJSON.message + "!");
|
|
|
+ });
|
|
|
+ ajax.start();
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+/**
|
|
|
+ * 修改提交
|
|
|
+ * @param index
|
|
|
+ * @param id
|
|
|
+ */
|
|
|
+Enterprise.submitFieldsAndFiles = function (index, id) {
|
|
|
+ var fields = '';
|
|
|
+ var files = '';
|
|
|
+ $("#field_info li input").each(function (index) {
|
|
|
+ if ($(this).is(":checked")) {
|
|
|
+ fields = fields + $(this).val() + ",";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $("#field_file li input").each(function (index) {
|
|
|
+ if ($(this).is(":checked")) {
|
|
|
+ files = files + $(this).val() + ",";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (fields == '' && files == '') {
|
|
|
+ Feng.info("请选择可修改的字段或附件!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var ajax = new $ax("/admin/enterprise/updateFieldsAndFiles", function (data) {
|
|
|
+ if (data.code == 200) {
|
|
|
+ layer.close(index);
|
|
|
+ Feng.success(data.msg);
|
|
|
+ } else {
|
|
|
+ Feng.error(data.msg);
|
|
|
+ }
|
|
|
+ }, function (data) {
|
|
|
+ Feng.error("修改失败!" + data.responseJSON.message + "!");
|
|
|
+ });
|
|
|
+ ajax.setData({"id": id, "fields": fields, "files": files})
|
|
|
+ ajax.start();
|
|
|
+};
|
|
|
+Enterprise.creatFieldCheckModal = function () {
|
|
|
+ return '<form id="fieldCheckModalForm">\n' +
|
|
|
+ ' <div class="form-group" style="margin: 10px;">\n' +
|
|
|
+ ' <div >\n' +
|
|
|
+ ' <label for="checkMsg" class="control-label">可修改字段</label>\n' +
|
|
|
+ ' <div id="field_info">\n' +
|
|
|
+ ' </div>\n' +
|
|
|
+ ' <label for="checkMsg" class="control-label">可修改附件</label>\n' +
|
|
|
+ ' <div id="field_file">\n' +
|
|
|
+ ' </div>\n' +
|
|
|
+ ' <div class="form-group" style="text-align: center">\n' +
|
|
|
+ ' <button type="button" class="btn btn-primary" onclick="Enterprise.checkAll()">全选</button>\n' +
|
|
|
+ ' <button type="button" class="btn btn-success" onclick="Enterprise.unCheckAll()">反选</button>\n' +
|
|
|
+ ' </div>\n' +
|
|
|
+ ' </div>\n' +
|
|
|
+ ' </div>\n' +
|
|
|
+ ' </form>';
|
|
|
+};
|
|
|
+Enterprise.checkAll = function () {
|
|
|
+ $("#fieldCheckModalForm input[type=checkbox]").prop("checked", true);
|
|
|
+};
|
|
|
+Enterprise.unCheckAll = function () {
|
|
|
+ $("#fieldCheckModalForm input[type=checkbox]").removeAttr("checked");
|
|
|
+};
|
|
|
+
|
|
|
Enterprise.delEnterprise = function () {
|
|
|
if (!Enterprise.check()) {
|
|
|
return;
|
|
@@ -250,10 +368,15 @@ Enterprise.doExport = function () {
|
|
|
var checkState = $("#checkState").val();
|
|
|
var active = $("#active").val();
|
|
|
var street = $("#street").val();
|
|
|
- var talentType = $("#talentType").val();
|
|
|
- var industryField = $("#industryField").val();
|
|
|
+ var special = $("#special").val();
|
|
|
+ var agencyType = $("#agencyType").val();
|
|
|
+ var industryFieldNew = $("#industryFieldNew").val();
|
|
|
+ var industryFieldOld = $("#industryFieldOld").val();
|
|
|
+ var enterpriseTag = $("#enterpriseTag").val();
|
|
|
+ var enterpriseType = $("#enterpriseType").val();
|
|
|
var arr = {"name": name, "idCard": idCard, "legal": legal, "ephone": ephone, "agentName": agentName,
|
|
|
- "agentPhone": agentPhone, "checkState": checkState, "active": active, "street": street, "talentType": talentType, "industryField": industryField};
|
|
|
+ "agentPhone": agentPhone, "checkState": checkState, "active": active, "street": street,
|
|
|
+ "special": special, "agencyType": agencyType, "industryFieldNew": industryFieldNew, "industryFieldOld": industryFieldOld, "enterpriseTag": enterpriseTag, "enterpriseType": enterpriseType};
|
|
|
window.location.href = Feng.setUrlParam(Feng.ctxPath + "/admin/enterprise/export", arr);
|
|
|
}
|
|
|
|
|
@@ -304,6 +427,68 @@ Enterprise.showLog = function (id) {
|
|
|
Feng.getCheckLog(id, {"type": 10, "enterpriseId": id, "typeFileId": "", "active": 1})
|
|
|
}
|
|
|
});
|
|
|
+};
|
|
|
+Enterprise.onSpecialChange = function () {
|
|
|
+ var special = $("#special").val();
|
|
|
+ var arr = [];
|
|
|
+ $("#enterpriseTag").html("");
|
|
|
+ switch (special) {
|
|
|
+ case "0":
|
|
|
+ $("#agencyType").parents(".hiddenElement").css("display", "block");
|
|
|
+ $("#industryFieldNew").parents(".hiddenElement").css("display", "block");
|
|
|
+ $("#industryFieldOld").parents(".hiddenElement").css("display", "block");
|
|
|
+ $("#enterpriseType").parents(".hiddenElement").css("display", "block");
|
|
|
+ var arr = [
|
|
|
+ {"name": "agencyType", "code": "agency_type"},
|
|
|
+ {"name": "industryFieldNew", "code": "industry_field"},
|
|
|
+ ];
|
|
|
+ Feng.findChildDictBatch(JSON.stringify(arr));
|
|
|
+ break;
|
|
|
+ case "1":
|
|
|
+ $("#agencyType").val("").parents(".hiddenElement").css("display", "none");
|
|
|
+ $("#industryFieldNew").val("").parents(".hiddenElement").css("display", "none");
|
|
|
+ $("#industryFieldOld").val("").parents(".hiddenElement").css("display", "none");
|
|
|
+ $("#enterpriseType").val("").parents(".hiddenElement").css("display", "none");
|
|
|
+ var arr = [
|
|
|
+ {"name": "enterpriseTag", "code": "institution_tag"}
|
|
|
+ ];
|
|
|
+ Feng.findChildDictBatch(JSON.stringify(arr));
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ $("#agencyType").val("").parents(".hiddenElement").css("display", "none");
|
|
|
+ $("#industryFieldNew").val("").parents(".hiddenElement").css("display", "none");
|
|
|
+ $("#industryFieldOld").val("").parents(".hiddenElement").css("display", "none");
|
|
|
+ $("#enterpriseType").val("").parents(".hiddenElement").css("display", "none");
|
|
|
+ var arr = [
|
|
|
+ {"name": "enterpriseTag", "code": "organization_tag"}
|
|
|
+ ];
|
|
|
+ Feng.findChildDictBatch(JSON.stringify(arr));
|
|
|
+ break;
|
|
|
+ }
|
|
|
+};
|
|
|
+Enterprise.onAgencyTypeChange = function () {
|
|
|
+ var agencyType = $("#agencyType").val();
|
|
|
+ if (agencyType == 1) {
|
|
|
+ var arr = [
|
|
|
+ {"name": "enterpriseTag", "code": "enterprise_tag"},
|
|
|
+ {"name": "enterpriseType", "code": "enterprise_type"}
|
|
|
+ ];
|
|
|
+ Feng.findChildDictBatch(JSON.stringify(arr));
|
|
|
+ } else {
|
|
|
+ $("#enterpriseTag").val("");
|
|
|
+ $("#enterpriseType").val("");
|
|
|
+ $("#enterpriseTag").html("");
|
|
|
+ $("#enterpriseType").html("");
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+Enterprise.onIndustryFieldNewChange = function () {
|
|
|
+ var industryNew = $("#industryFieldNew").val();
|
|
|
+ var arr = [
|
|
|
+ {"name": "industryFieldOld", "code": industryNew + "_field"}
|
|
|
+ ];
|
|
|
+ Feng.findChildDictBatch(JSON.stringify(arr));
|
|
|
}
|
|
|
|
|
|
$(function () {
|
|
@@ -312,10 +497,17 @@ $(function () {
|
|
|
table.setPaginationType("server");
|
|
|
Enterprise.table = table.init();
|
|
|
var arr = [
|
|
|
- {"name": "street", "code": "street"},
|
|
|
- {"name": "enterpriseTag", "code": "enterprise_tag"},
|
|
|
- {"name": "industryFieldNew", "code": "industry_field"},
|
|
|
- {"name": "enterpriseType", "code": "enterprise_type"}];
|
|
|
+ {"name": "street", "code": "street"}
|
|
|
+ ];
|
|
|
+ if ($("#special").val() != "") {
|
|
|
+ Enterprise.onSpecialChange();
|
|
|
+ if ($("#agencyType").val() != "") {
|
|
|
+ Enterprise.onAgencyTypeChange();
|
|
|
+ }
|
|
|
+ if ($("#industryFieldNew").val() != "") {
|
|
|
+ Enterprise.onIndustryFieldNewChange();
|
|
|
+ }
|
|
|
+ }
|
|
|
Feng.findChildDictBatch(JSON.stringify(arr));
|
|
|
// Feng.addAjaxSelect({
|
|
|
// "id": "street",
|