integralCommon.js 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. /**
  2. * 显示审核日志
  3. */
  4. IntegralInfo.showLog = function (id) {
  5. layer.open({
  6. type: 1,
  7. title: "日志",
  8. fixed: false,
  9. content: '<table id="' + id + '"></table>',
  10. area: ['80%', '80%'],
  11. maxmin: true,
  12. success: function (layero, index) {
  13. Feng.getCheckLog(id, {"type": CONFIG.project_integral_apply, "mainId": id, "typeFileId": "", "active": 1})
  14. }
  15. });
  16. }
  17. /**
  18. * 查询表单提交参数对象
  19. * @returns {{}}
  20. */
  21. IntegralInfo.formParams = function () {
  22. var queryData = {};
  23. queryData['name'] = $("#name").val();
  24. queryData['card_number'] = $("#card_number").val();
  25. queryData['sex'] = $("#sex").val();
  26. queryData['nation'] = $("#nation").val();
  27. queryData['nationality'] = $("#nationality").val();
  28. queryData['province'] = $("#province").val();
  29. queryData['politics'] = $("#politics").val();
  30. queryData['enterprise_id'] = $("#enterprise_id").val();
  31. queryData['industry_field'] = $("#industry_field").val();
  32. queryData['source'] = $("#source").val();
  33. queryData['city'] = $("#city").val();
  34. queryData['import_way'] = $("#import_way").val();
  35. queryData['highest_degree'] = $("#highest_degree").val();
  36. queryData['major'] = $("#major").val();
  37. queryData['title'] = $("#title").val();
  38. queryData['study_abroad'] = $("#study_abroad").val();
  39. queryData['phone'] = $("#phone").val();
  40. queryData['email'] = $("#email").val();
  41. queryData['breakFaith'] = $("#breakFaith").val();
  42. queryData['talent_type'] = $("#talent_type").val();
  43. queryData['talent_arrange'] = $("#talent_arrange").val();
  44. queryData['street'] = $("#street").val();
  45. if ($("#talent_condition").val() == null || $("#talent_condition").val() == '' || $("#talent_condition").val() == "null") {
  46. queryData['talent_condition'] = "";
  47. } else {
  48. queryData['talent_condition'] = $("#talent_condition").val();
  49. }
  50. queryData['identifyMonth'] = $("#identifyMonth").val();
  51. queryData['checkState'] = $("#checkState").val();
  52. queryData['isPublic'] = $("#isPublic").val();
  53. queryData['active'] = $("#active").val()
  54. queryData['apply_year'] = $("#apply_year").val();
  55. queryData['isEffect'] = $("#isEffect").val();
  56. return queryData;
  57. }
  58. /**
  59. * 查询人才认定申报列表
  60. */
  61. IntegralInfo.search = function () {
  62. IntegralInfo.table.refresh({query: IntegralInfo.formParams()});
  63. };
  64. /**
  65. * 重置
  66. */
  67. IntegralInfo.reset = function () {
  68. $("#name").val("");
  69. $("#card_number").val("");
  70. $("#sex").val("");
  71. $("#nation").val("");
  72. $("#nationality").val("");
  73. $("#province").val("");
  74. $("#politics").val("");
  75. $("#enterprise_id").val("").trigger("chosen:updated");
  76. $("#industry_field").val("");
  77. $("#source").val("");
  78. $("#fromCity").val("");
  79. $("#import_way").val("");
  80. $("#highest_degree").val("");
  81. $("#major").val("");
  82. $("#title").val("");
  83. $("#study_abroad").val("");
  84. $("#phone").val("");
  85. $("#email").val("");
  86. $("#breakFaith").val("");
  87. $("#talent_type").val("");
  88. $("#talent_arrange").val("");
  89. $("#street").val("");
  90. $("#talent_condition").val("").trigger("chosen:updated");
  91. $("#checkState").val("");
  92. $("#identifyMonth").val("");
  93. $("#isPublic").val("");
  94. $("#active").val("")
  95. $("#apply_year").val("");
  96. $("#isEffect").val("");
  97. }
  98. /**
  99. * 显示导出模态框
  100. */
  101. IntegralInfo.showExportModal = function () {
  102. $("#exportForm")[0].reset();
  103. $("#commonExportModal").modal("show");
  104. }
  105. /**
  106. * 导出提交
  107. */
  108. IntegralInfo.export = function (process) {
  109. var names = '';
  110. var values = '';
  111. var commonExport = "";
  112. $("#field_info li input").each(function (index) {
  113. if ($(this).is(":checked")) {
  114. values = values + $(this).val() + ",";
  115. names = names + $(this).next().text() + ",";
  116. }
  117. });
  118. var queryData = IntegralInfo.formParams();
  119. var process = parseInt($("#process").val());
  120. switch (process) {
  121. case 1:
  122. commonExport = "fstVerifyListExport";
  123. break;
  124. case 2:
  125. commonExport = "reVerifyListExport";
  126. break;
  127. case 3:
  128. commonExport = "preListExport";
  129. break;
  130. }
  131. $("#commonExportModal").modal('hide');
  132. var params = $("#exportForm").serialize();
  133. var url = "/admin/integralVerify/" + commonExport + "?" + params;
  134. window.location.href = url;
  135. }
  136. /**
  137. * 页面初始化
  138. */
  139. IntegralInfo.init = function () {
  140. //批量加载字典表数据
  141. var arr = [
  142. {"name": "nation", "code": "nation"}];
  143. Feng.findChildDictBatch(JSON.stringify(arr));
  144. $("#enterprise_id").val("");
  145. $("#enterprise_id").trigger('chosen:updated');
  146. }
  147. /**
  148. * 下载附件
  149. */
  150. IntegralInfo.download = function () {
  151. if (this.check()) {
  152. window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/common/api/downloadZip?type=1&id=" + IntegralInfo.seItem.id));
  153. }
  154. }
  155. /**
  156. * 批量下载头像
  157. */
  158. IntegralInfo.downloadPhoto = function () {
  159. var selected = $('#' + this.id).bootstrapTable('getSelections');
  160. if (selected.length == 0) {
  161. Feng.info("请先选中表格中的某一记录!");
  162. return false;
  163. }
  164. var ids = "";
  165. for (let i = 0; i < selected.length; i++) {
  166. ids = ids + selected[i].id + ",";
  167. }
  168. window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/api/commonDownload/downloadPhotos?type=1&ids=" + ids));
  169. }
  170. /**
  171. * 全选
  172. */
  173. IntegralInfo.checkAll = function () {
  174. $("#field_info input").each(function () {
  175. this.checked = true;
  176. })
  177. }
  178. /**
  179. * 反选
  180. */
  181. IntegralInfo.unCheckAll = function () {
  182. $("#field_info input").each(function () {
  183. if (this.checked) {
  184. this.checked = false;
  185. } else {
  186. this.checked = true;
  187. }
  188. })
  189. }