talentcheckproperties.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /**
  2. * 主管部门审核配置管理初始化
  3. */
  4. var Talentcheckproperties = {
  5. id: "TalentcheckpropertiesTable", //表格id
  6. seItem: null, //选中的条目
  7. table: null,
  8. layerIndex: -1
  9. };
  10. /**
  11. * 初始化表格的列
  12. */
  13. Talentcheckproperties.initColumn = function () {
  14. return [
  15. {field: 'selectItem', radio: true},
  16. {title: '人才标签', field: 'name', visible: true, align: 'center', valign: 'middle'},
  17. {title: '企业名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle'},
  18. {title: '审核单位', field: 'companyName', visible: true, align: 'center', valign: 'middle'},
  19. {title: '备注', field: 'description', visible: true, align: 'center', valign: 'middle'},
  20. ];
  21. };
  22. /**
  23. * 检查是否选中
  24. */
  25. Talentcheckproperties.check = function () {
  26. var selected = $('#' + this.id).bootstrapTable('getSelections');
  27. if(selected.length == 0){
  28. Feng.info("请先选中表格中的某一记录!");
  29. return false;
  30. }else{
  31. Talentcheckproperties.seItem = selected[0];
  32. return true;
  33. }
  34. };
  35. /**
  36. * 点击添加主管部门审核配置
  37. */
  38. Talentcheckproperties.openAddTalentcheckproperties = function () {
  39. var index = layer.open({
  40. type: 2,
  41. title: '添加主管部门审核配置',
  42. area: ['800px', '420px'], //宽高
  43. fix: false, //不固定
  44. maxmin: true,
  45. content: Feng.ctxPath + '/talentcheckproperties/talentcheckproperties_add'
  46. });
  47. this.layerIndex = index;
  48. };
  49. /**
  50. * 打开查看主管部门审核配置详情
  51. */
  52. Talentcheckproperties.openTalentcheckpropertiesDetail = function () {
  53. if (this.check()) {
  54. var index = layer.open({
  55. type: 2,
  56. title: '主管部门审核配置详情',
  57. area: ['800px', '420px'], //宽高
  58. fix: false, //不固定
  59. maxmin: true,
  60. content: Feng.ctxPath + '/talentcheckproperties/talentcheckproperties_update/' + Talentcheckproperties.seItem.id
  61. });
  62. this.layerIndex = index;
  63. }
  64. };
  65. /**
  66. * 删除主管部门审核配置
  67. */
  68. Talentcheckproperties.delete = function () {
  69. if (this.check()) {
  70. var ajax = new $ax(Feng.ctxPath + "/talentcheckproperties/delete", function (data) {
  71. Feng.success("删除成功!");
  72. Talentcheckproperties.table.refresh();
  73. }, function (data) {
  74. Feng.error("删除失败!" + data.responseJSON.message + "!");
  75. });
  76. ajax.set("talentcheckpropertiesId",this.seItem.id);
  77. ajax.start();
  78. }
  79. };
  80. /**
  81. * 查询主管部门审核配置列表
  82. */
  83. Talentcheckproperties.search = function () {
  84. var queryData = {};
  85. queryData['condition'] = $("#condition").val();
  86. Talentcheckproperties.table.refresh({query: queryData});
  87. };
  88. $(function () {
  89. var defaultColunms = Talentcheckproperties.initColumn();
  90. var table = new BSTable(Talentcheckproperties.id, "/talentcheckproperties/list", defaultColunms);
  91. table.setPaginationType("server");
  92. Talentcheckproperties.table = table.init();
  93. });