/**
* 表格初始化
*/
var DirectlyIdentify = {
id: "directlyIdentifyTable", //表格id
seItem: null, //选中的条目
table: null,
layerIndex: -1
};
/**
* 初始化表格的列
*/
DirectlyIdentify.initColumn = function () {
return [
{field: 'selectItem', radio: true},
{title: '人才层次', field: 'talentLevel', visible: true, align: 'center', valign: 'middle'},
{title: '人才类别', field: 'type', visible: true, align: 'center', valign: 'middle',
formatter: function (value, row, index) {
if (value == 1) {
return "晋江市现代产业体系人才";
}
if (value == 2) {
return "集成电路优秀人才";
}
}
},
{title: '名称', field: 'name', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip'},
{title: '有效期', field: 'activeYear', visible: true, align: 'center', valign: 'middle'},
{title: '是否启用', field: 'active', visible: true, align: 'center', valign: 'middle',
formatter: function (value, row, index) {
if (value == 1) {
return "";
}
if (value == 2) {
return "";
}
}
},
{title: '审核单位', field: 'companyNames', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip'},
{title: '备注', field: 'description', visible: true, align: 'center', valign: 'middle'},
];
};
//模板下载
DirectlyIdentify.download_enterprise_template = function () {
window.location.href = Feng.ctxPath + "/static/downloadFile/directly_identify_enterprise_template.xlsx";
}
DirectlyIdentify.enterprise_import = function () {
$("#enterprise-import-form")[0].reset();
$("#enterpriseImportModal").modal("show");
}
DirectlyIdentify.enterpriseImportSubmit = function () {
$("#enterprise-import-form")[0].submit();
}
$(function () {
var defaultColunms = DirectlyIdentify.initColumn();
var table = new BSTable(DirectlyIdentify.id, "/admin/directly_identify/list", defaultColunms);
table.setPaginationType("server");
DirectlyIdentify.table = table.init();
//下拉框数据动态加载
Feng.addAjaxSelect({
"id": "talentLevel",
"displayCode": "code",
"displayName": "name",
"type": "GET",
"url": "/admin/dict/findChildDictByCode?code=talent_arrange"
});
});