123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- /**
- * 表格初始化
- */
- 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 "<button type=\"button\" style=\"line-height: 1.3\" class=\"btn btn-primary btn-xs\">启用</button>";
- }
- if (value == 2) {
- return "<button type=\"button\" style=\"line-height: 1.3\" class=\"btn btn-warning btn-xs\">停用</button>";
- }
- }
- },
- {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"
- });
- });
|