examine_center.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. /**
  2. * 人才认定申报管理初始化
  3. */
  4. var TalentInfo = {
  5. id: "TalentInfoTable", //表格id
  6. seItem: null, //选中的条目
  7. table: null,
  8. layerIndex: -1
  9. };
  10. /**
  11. * 初始化表格的列
  12. */
  13. TalentInfo.initColumn = function () {
  14. return [
  15. {field: 'selectItem', checkbox: true},
  16. {title: '申报年度', field: 'apply_year', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
  17. {title: '医院名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
  18. {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
  19. formatter: function (value, row, index) {
  20. if (row.sex == 1) {
  21. return value + '<span style="color:#6495ED">【男】</span>';
  22. }
  23. if (row.sex == 2) {
  24. return value + '<span style="color:#FF82AB">【女】</span>';
  25. }
  26. }
  27. },
  28. {title: '证件号码', field: 'card_number', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
  29. {title: '认定层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "80px"},
  30. {title: '认定条件', field: 'talentConditionName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "150px"},
  31. {title: '首次提交时间', field: 'first_submit_time', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
  32. {title: '最新提交时间', field: 'new_submit_time', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
  33. {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
  34. formatter: function (value, row, index) {
  35. console.log(value, row.real_state, row.last_state)
  36. if (typeof row.deptCheckState != "undefined") {
  37. if ((row.deptActive == 0 && row.real_state == 10) || !row.deptActive) {
  38. if (row.resubmit) {
  39. return "<span class='label label-success'>待部门并审(重新提交)</span>";
  40. } else {
  41. return "<span class='label label-success'>待部门并审(首次提交)</span>";
  42. }
  43. }
  44. if (row.deptActive == 1 && row.newState == 12) {
  45. return "<span class='label label-primary'>部门并审通过</span>";
  46. }
  47. if (row.deptActive == 1 && row.newState == 9) {
  48. return "<span class='label label-danger'>部门并审驳回</span>";
  49. }
  50. } else {
  51. if (value == 1) {
  52. if (row.real_state == 4) {
  53. return "<span class='label label-danger'>审核驳回</span>"
  54. }
  55. if (row.real_state == 11) {
  56. return "<span class='label label-danger'>初审驳回</span>"
  57. }
  58. }
  59. if (value == 2) {
  60. if (row.last_state == 4) {
  61. return "<span class='label label-success'>待审核(重新提交)</span>"
  62. }
  63. if (row.real_state == 6) {
  64. return "<span class='label label-danger'>复审驳回</span>"
  65. }
  66. return "<span class='label label-success'>待审核</span>"
  67. }
  68. if (value == 3) {
  69. return "<span class='label label-success'>待初审</span>"
  70. }
  71. if (value == 5) {
  72. return "<span class='label label-success'>复审通过</span>"
  73. }
  74. if (value == 10) {
  75. return "<span class='label label-success'>待上级审核</span>";
  76. }
  77. if (value == 8) {
  78. if (row.real_state == 11) {
  79. return "<span class='label label-danger'>初审驳回</span>"
  80. } else {
  81. return "<span class='label label-success'>保存未提交</span>"
  82. }
  83. }
  84. if (value == 9) {
  85. if (row.real_state == 13) {
  86. return "<span class='label label-danger'>部门并审驳回</span>";
  87. } else if (row.real_state == 15) {
  88. return "<span class='label label-danger'>复审驳回</span>";
  89. } else {
  90. return "<span class='label label-success'>待初审</span>"
  91. }
  92. }
  93. if (value == -2) {
  94. return "<span class='label label-danger'>初审不通过</span>"
  95. }
  96. if (value == 16) {
  97. return "<span class='label label-danger'>复审不通过</span>"
  98. }
  99. if (value == -1 || value == 7) {
  100. return "<span class='label label-danger'>审核不通过</span>"
  101. }
  102. if (value == 4) {
  103. if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 1) {
  104. return "<span class='label label-success'>上级驳回</span>"
  105. } else {
  106. return "<span class='label label-success'>待审核</span>"
  107. }
  108. }
  109. if (value == 11) {
  110. if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 3) {
  111. return "<span class='label label-success'>上级驳回</span>"
  112. } else {
  113. return "<span class='label label-success'>待审核</span>"
  114. }
  115. }
  116. if (value == 12) {
  117. return "<span class='label label-success'>待复审</span>";
  118. }
  119. if (value == 13) {
  120. if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 4) {
  121. return "<span class='label label-danger'>上级驳回</span>"
  122. } else {
  123. return "<span class='label label-success'>待审核</span>"
  124. }
  125. }
  126. if (value == 14) {
  127. return "<span class='label label-primary'>复审通过</span>"
  128. }
  129. if (value == 15) {
  130. if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 5) {
  131. return "<span class='label label-success'>上级驳回</span>"
  132. } else {
  133. return "<span class='label label-success'>待审核</span>"
  134. }
  135. }
  136. }
  137. }
  138. },
  139. {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "80px",
  140. formatter: function (value, row, index) {
  141. return "<span class='label label-success' onclick=\"TalentInfo.showLog('" + value + "')\" >" +
  142. "<i class=\"fa fa-book\"></i>日志" +
  143. "</span>";
  144. }
  145. }
  146. ];
  147. };
  148. /**
  149. * 检查是否选中
  150. */
  151. TalentInfo.check = function () {
  152. var selected = $('#' + this.id).bootstrapTable('getSelections');
  153. if (selected.length != 1) {
  154. Feng.info("请先选中表格中的某一记录!");
  155. return false;
  156. } else {
  157. TalentInfo.seItem = selected[0];
  158. return true;
  159. }
  160. };
  161. TalentInfo.openCheckTalentInfo = function () {
  162. if (this.check()) {
  163. var index = layer.open({
  164. type: 2,
  165. title: '优秀人才审核',
  166. area: ['800px', '420px'], //宽高
  167. fix: false, //不固定
  168. maxmin: true,
  169. shade: 0,
  170. content: '/enterprise/talent/examinePage/id/' + TalentInfo.seItem.id,
  171. btn: ['<i class="fa fa-eye"></i>&nbsp;&nbsp;保存未提交', '<i class="fa fa-save"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  172. btnAlign: 'c',
  173. btn1: function (index, layero) {
  174. var obj = layero.find("iframe")[0].contentWindow;
  175. obj.TalentInfoInfoDlg.showFirstCheckModal();
  176. }, btn2: function (index, layero) {
  177. var obj = layero.find("iframe")[0].contentWindow;
  178. obj.TalentInfoInfoDlg.submitCheck();
  179. return false;
  180. }
  181. });
  182. layer.full(index);
  183. TalentInfo.layerIndex = index;
  184. }
  185. }
  186. TalentInfo.creatFieldCheckModal = function () {
  187. return '<form id="firstCheckForm">\n' +
  188. ' <div class="form-group" style="margin: 10px;">\n' +
  189. ' <div >\n' +
  190. ' <label for="checkMsg" class="control-label">可修改字段</label>\n' +
  191. ' <div id="field_info">\n' +
  192. ' <ul>\n' +
  193. ' <li style="width:10%"><input type="checkbox" value="name"><span>姓名</span></li>\n' +
  194. ' <li style="width:10%"><input type="checkbox" value="sex"><span>性别</span></li>\n' +
  195. ' <li style="width:10%"><input type="checkbox" value="birthday"><span>出生日期</span></li>\n' +
  196. ' <li style="width:10%"><input type="checkbox" value="nationality"><span>国籍/地区</span></li>\n' +
  197. ' <li style="width:10%"><input type="checkbox" value="provinceCode" onchange="TalentInfo.fieldCheckd(this)"><span>籍贯省</span></li>\n' +
  198. ' <li style="width:10%"><input type="checkbox" value="cityCode" onchange="TalentInfo.fieldCheckd(this)"><span>籍贯市</span></li>\n' +
  199. ' <li style="width:10%"><input type="checkbox" value="countyCode"><span>籍贯县</span></li>\n' +
  200. ' <li style="width:10%"><input type="checkbox" value="nation"><span>民族</span></li>\n' +
  201. ' <li style="width:10%"><input type="checkbox" value="politics"><span>政治面貌</span></li>\n' +
  202. ' <li style="width:10%"><input type="checkbox" value="cardType"><span>证件类型</span></li>\n' +
  203. ' <li style="width:10%"><input type="checkbox" value="idCard"><span>证件号码</span></li>\n' +
  204. ' <li style="width:20.5%"><input type="checkbox" value="firstInJJTime"><span>首次来晋工作时间</span></li>\n' +
  205. ' <li style="width:10%"><input type="checkbox" value="source" onchange="TalentInfo.sourceCheckd(this)"><span>申报来源</span></li>\n' +
  206. ' <li style="width:20.5%"><input type="checkbox" value="ourCitySource"><span>公布入选来源</span></li>\n' +
  207. ' <li style="width:20.5%"><input type="checkbox" value="fromCity"><span>入选来源县市</span></li>\n' +
  208. ' <li style="width:20.5%"><input type="checkbox" value="qzBatch"><span>入选名单的文件号及批次</span></li>\n' +
  209. ' <li style="width:31%"><input type="checkbox" value="certificateStartTime"><span>泉州高层次人才证书发证日期</span></li>\n' +
  210. ' <li style="width:31%"><input type="checkbox" value="qzgccrcActiveTime"><span>泉州高层次人才证书的有效期</span></li>\n' +
  211. ' <li style="width:10%"><input type="checkbox" id="talentArrangeCheckBox" value="talentArrange" onchange="TalentInfo.fieldCheckd(this)"><span>人才层次</span></li>\n' +
  212. ' <li style="width:10%"><input type="checkbox" value="identifyCondition"><span>认定条件</span></li>\n' +
  213. ' <li style="width:20.5%"><input type="checkbox" value="identifyConditionName"><span>认定条件名称</span></li>\n' +
  214. ' <li style="width:20.5%"><input type="checkbox" value="identifyGetTime"><span>认定条件证书取得时间</span></li>\n' +
  215. ' <li style="width:10%"><input type="checkbox" value="talentType"><span>人才标签</span></li>\n' +
  216. ' <li style="width:31%"><input type="checkbox" value="letterTime"><span>首次来晋行政介绍信时间</span></li>\n' +
  217. ' <li style="width:10%"><input type="checkbox" value="introductionMode"><span>引进方式</span></li>\n' +
  218. ' <li style="width:20.5%"><input type="checkbox" value="entryTime"><span>本单位入职时间</span></li>\n' +
  219. ' <li style="width:10%"><input type="checkbox" value="post"><span>职务</span></li>\n' +
  220. ' <li style="width:20.5%"><input type="checkbox" value="startTime"><span>工作合同开始时间</span></li>\n' +
  221. ' <li style="width:20.5%"><input type="checkbox" value="endTime"><span>工作合同结束时间</span></li>\n' +
  222. ' <li style="width:20.5%"><input type="checkbox" value="lastYearWages"><span>上一年度年薪</span></li>\n' +
  223. ' <li style="width:10%"><input type="checkbox" value="highEducation"><span>最高学历</span></li>\n' +
  224. ' <li style="width:10%"><input type="checkbox" value="graduateSchool"><span>毕业院校</span></li>\n' +
  225. ' <li style="width:10%"><input type="checkbox" value="major"><span>专业</span></li>\n' +
  226. ' <li style="width:10%"><input type="checkbox" value="title"><span>职称</span></li>\n' +
  227. ' <li style="width:20.5%"><input type="checkbox" value="professionalQualifications"><span>国家职业资格</span></li>\n' +
  228. ' <li style="width:20.5%"><input type="checkbox" value="studyAbroad"><span>是否有留学经历</span></li>\n' +
  229. ' <li style="width:10%"><input type="checkbox" value="phone"><span>手机号码</span></li>\n' +
  230. ' <li style="width:10%"><input type="checkbox" value="email"><span>电子邮箱</span></li>\n' +
  231. ' <li style="width:10%"><input type="checkbox" value="bank"><span>开户银行</span></li>\n' +
  232. ' <li style="width:20.5%"><input type="checkbox" value="bankNetwork"><span>开户银行网点</span></li>\n' +
  233. ' <li style="width:10%"><input type="checkbox" value="bankNumber"><span>银行行号</span></li>\n' +
  234. ' <li style="width:10%"><input type="checkbox" value="bankAccount"><span>银行账号</span></li>\n' +
  235. ' <li style="width:31%"><input type="checkbox" value="breakFaith"><span>曾被相关主管部门列为失信个人</span></li>\n' +
  236. ' <li style="width:20.5%"><input type="checkbox" value="educationAndResume"><span>教育背景及工作简历</span></li>\n' +
  237. ' <li style="width:20.5%"><input type="checkbox" value="mainHonours"><span>主要业绩及取得的荣誉</span></li>\n' +
  238. ' </ul>\n' +
  239. ' </div>\n' +
  240. ' <label for="checkMsg" class="control-label">可修改附件</label>\n' +
  241. ' <div id="field_file">\n' +
  242. ' </div>\n' +
  243. ' <div class="form-group" style="text-align: center">\n' +
  244. ' <button type="button" class="btn btn-primary" onclick="TalentInfo.checkAll()">全选</button>\n' +
  245. ' <button type="button" class="btn btn-success" onclick="TalentInfo.unCheckAll()">反选</button>\n' +
  246. ' </div>\n' +
  247. ' </div>\n' +
  248. ' </div>\n' +
  249. ' </form>';
  250. }
  251. TalentInfo.fieldCheckd = function (context) {
  252. if ($(context).get(0).checked) {
  253. $(context).parent().next().children()[0].checked = true;
  254. $(context).parent().next().children().eq(0).trigger("change");
  255. }
  256. }
  257. TalentInfo.sourceCheckd = function (context) {
  258. if ($(context).get(0).checked) {
  259. $("#talentArrangeCheckBox").attr("checked", true);
  260. $("#talentArrangeCheckBox").trigger("change");
  261. }
  262. }
  263. $(function () {
  264. var defaultColunms = TalentInfo.initColumn();
  265. var process = $("#process").val();
  266. var table = new BSTable(TalentInfo.id, "/enterprise/talent/examineList", defaultColunms);
  267. table.setPaginationType("server");
  268. table.setSingleSelect(false);
  269. table.setOnDblClickRow(function () {
  270. TalentInfo.openCheckTalentInfo();
  271. });
  272. TalentInfo.table = table.init();
  273. TalentInfo.init();
  274. // var defaultColunms = TalentInfo.initColumn();
  275. // var table = new KDTable(TalentInfo.id, "/talentInfo/list/1", defaultColunms);
  276. // table.setPaginationType("server");
  277. // TalentInfo.table = table.init();
  278. });