talentBasicChange.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. /**
  2. * 人才基础信息变更管理初始化
  3. */
  4. var TalentBasicChange = {
  5. id: "TalentBasicChangeTable", //表格id
  6. seItem: null, //选中的条目
  7. table: null,
  8. layerIndex: -1
  9. };
  10. /**
  11. * 初始化表格的列
  12. */
  13. TalentBasicChange.initColumn = function () {
  14. return [
  15. {field: 'selectItem', radio: true},
  16. {title: '申报单位', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle', width: "100px", 'class': 'uitd_showTip'},
  17. {title: '原姓名', field: 'oldName', visible: true, align: 'center', valign: 'middle', width: "100px", 'class': 'uitd_showTip'},
  18. // {title: '原出生日期', field: 'oldBirthday', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
  19. {title: '原国籍', field: 'oldNationalityName', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
  20. {title: '原民族', field: 'oldNationName', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
  21. {title: '原政治面貌', field: 'oldPoliticsName', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
  22. //{title: '原证件类型', field: 'oldCardTypName', visible: true, align: 'center', valign: 'middle', width: "80px", 'class': 'uitd_showTip'},
  23. {title: '原证件号码', field: 'oldIdCard', visible: true, align: 'center', valign: 'middle', width: "150px", 'class': 'uitd_showTip'},
  24. {title: '原劳动合同时间', field: 'oldContractTime', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
  25. {title: '现姓名', field: 'newName', visible: true, align: 'center', valign: 'middle', width: "100px", 'class': 'uitd_showTip'},
  26. // {title: '现出生日期', field: 'newBirthday', visible: true, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
  27. {title: '现国籍', field: 'newNationalityName', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
  28. {title: '现民族', field: 'newNationName', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
  29. {title: '现政治面貌', field: 'newPoliticsName', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
  30. //{title: '现证件类型', field: 'newCardTypName', visible: true, align: 'center', valign: 'middle', width: "80px", 'class': 'uitd_showTip'},
  31. {title: '现证件号码', field: 'newIdCard', visible: true, align: 'center', valign: 'middle', width: "150px", 'class': 'uitd_showTip'},
  32. {title: '现劳动合同时间', field: 'newContractTime', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
  33. {title: '首次提交时间', field: 'firstSubmitTime', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
  34. {title: '最新提交时间', field: 'newSubmitTime', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
  35. {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', width: "80px",
  36. formatter: function (value, row, index) {
  37. if (value == -1) {
  38. return '<span class=\'label\'>待提交</span>';
  39. }
  40. if (value == 1) {
  41. return '<span class=\'label label-success\'>待审核</span>';
  42. }
  43. if (value == 2) {
  44. return '<span class=\'label label-danger\'>已驳回</span>';
  45. }
  46. if (value == 3) {
  47. return '<span class=\'label label-primary\'>已通过</span>';
  48. }
  49. if (value == 9) {
  50. return '<span class=\'label label-success\'>重新提交</span>';
  51. }
  52. }
  53. },
  54. {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "80px",
  55. formatter: function (value, row, index) {
  56. return "<span class='label label-success' onclick=\"Feng.getCheckLogModel('" + value + "','" + CONFIG.project_basicchange + "')\" >" +
  57. "<i class=\"fa fa-book\"></i>日志" +
  58. "</span>";
  59. }
  60. }
  61. ];
  62. };
  63. /**
  64. * 检查是否选中
  65. */
  66. TalentBasicChange.check = function () {
  67. var selected = $('#' + this.id).bootstrapTable('getSelections');
  68. if (selected.length == 0) {
  69. Feng.info("请先选中表格中的某一记录!");
  70. return false;
  71. } else {
  72. TalentBasicChange.seItem = selected[0];
  73. return true;
  74. }
  75. };
  76. /**
  77. * 打开查看人才基础信息变更详情
  78. */
  79. TalentBasicChange.openTalentBasicChangeDetail = function () {
  80. if (this.check()) {
  81. var index = layer.open({
  82. type: 2,
  83. title: '人才基础信息变更审核',
  84. area: ['800px', '420px'], //宽高
  85. fix: false, //不固定
  86. maxmin: true,
  87. content: Feng.ctxPath + '/admin/talentBasicChange/check/id/' + TalentBasicChange.seItem.id,
  88. btn: ['<i class="fa fa-eye"></i>&nbsp;&nbsp;审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
  89. btnAlign: 'c',
  90. yes: function (index, layero) {
  91. var obj = layero.find("iframe")[0].contentWindow;
  92. obj.TalentBasicChangeInfoDlg.showCheckModal();
  93. }
  94. });
  95. TalentBasicChange.layerIndex = index;
  96. layer.full(index);
  97. }
  98. };
  99. TalentBasicChange.export = function () {
  100. var queryData = TalentBasicChange.formParams();
  101. var url = Feng.setUrlParam(Feng.ctxPath + "/admin/talentBasicChange/export", queryData);
  102. window.location.href = url;
  103. }
  104. TalentBasicChange.formParams = function () {
  105. var queryData = {};
  106. queryData['enterpriseName'] = $("#enterpriseName").val();
  107. queryData['oldName'] = $("#oldName").val();
  108. queryData['oldCardType'] = $("#oldCardType").val();
  109. queryData['oldIdCard'] = $("#oldIdCard").val();
  110. queryData['newName'] = $("#newName").val();
  111. queryData['newCardType'] = $("#newCardType").val();
  112. queryData['newIdCard'] = $("#newIdCard").val();
  113. queryData['checkState'] = $("#checkState").val();
  114. return queryData;
  115. }
  116. /**
  117. * 查询人才基础信息变更列表
  118. */
  119. TalentBasicChange.search = function () {
  120. TalentBasicChange.table.refresh({query: TalentBasicChange.formParams()});
  121. };
  122. TalentBasicChange.reset = function () {
  123. $("#enterpriseName").val("");
  124. $("#oldName").val("");
  125. $("#oldCardType").val("");
  126. $("#oldIdCard").val("");
  127. $("#newName").val("");
  128. $("#newCardType").val("");
  129. $("#newIdCard").val("");
  130. $("#checkState").val("");
  131. }
  132. $(function () {
  133. var defaultColunms = TalentBasicChange.initColumn();
  134. var table = new BSTable(TalentBasicChange.id, "/admin/talentBasicChange/list", defaultColunms);
  135. table.setPaginationType("server");
  136. TalentBasicChange.table = table.init();
  137. var arr = [
  138. {"name": "oldCardType", "code": "un_cardType"},
  139. {"name": "newCardType", "code": "un_cardType"}
  140. ];
  141. Feng.findChildDictBatch(JSON.stringify(arr));
  142. });