examine_center.js 20 KB

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