talentInfo_base.js 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  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. var type = $("#type").val();
  15. var superpriv = $("#superpriv").val();
  16. var process = $("#process").val();
  17. var isShow = true;
  18. var isShowVerifyDept = false;
  19. if (type == 2) {
  20. isShow = false;
  21. }
  22. isShowVerifyDept = process == 4 && superpriv ? true : false;
  23. return [
  24. {field: 'selectItem', checkbox: true},
  25. {title: '申报年度', field: 'apply_year', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
  26. {title: '企业名称', field: 'enterprise_name', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
  27. {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
  28. formatter: function (value, row, index) {
  29. if (row.sex == 1) {
  30. return value + '<span style="color:#6495ED">【男】</span>';
  31. }
  32. if (row.sex == 2) {
  33. return value + '<span style="color:#FF82AB">【女】</span>';
  34. }
  35. }
  36. },
  37. {title: '单位标签', field: 'enterprise_tag', visible: isShow, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
  38. {title: '证件号码', field: 'card_number', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
  39. {title: '认定层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "80px"},
  40. {title: '认定条件', field: 'talentConditionName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "150px"},
  41. {title: '审核部门', field: 'verifyDepts', visible: isShowVerifyDept, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "150px",
  42. formatter: function (value, row, index) {
  43. var html = "";
  44. for (var i in value) {
  45. let checkState = "";
  46. if (value[i].active == 1) {
  47. if (value[i].checkState == 9) {
  48. checkState = "<span style='color:#ff0000;'>审核驳回</span>";
  49. }
  50. if (value[i].checkState == 12) {
  51. checkState = "<span style='color:green;'>审核通过</span>";
  52. }
  53. } else {
  54. checkState = "<span style='color:gray;'>待审核</span>";
  55. }
  56. html += "<p style='margin:0 auto;'>" + value[i].name + "(" + checkState + ")</p>"
  57. }
  58. return html
  59. }
  60. },
  61. {title: '首次提交时间', field: 'first_submit_time', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
  62. {title: '最新提交时间', field: 'new_submit_time', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
  63. {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
  64. formatter: function (value, row, index) {
  65. if (typeof row.deptCheckState != "undefined") {
  66. if ((row.deptActive == 0 && row.realState == 10) || !row.deptActive) {
  67. if (row.resubmit) {
  68. return "<span class='label label-success'>待部门并审(重新提交)</span>";
  69. } else {
  70. return "<span class='label label-success'>待部门并审(首次提交)</span>";
  71. }
  72. }
  73. if (row.deptActive == 1 && row.newState == 12) {
  74. return "<span class='label label-primary'>部门并审通过</span>";
  75. }
  76. if (row.deptActive == 1 && row.newState == 9) {
  77. return "<span class='label label-danger'>部门并审驳回</span>";
  78. }
  79. } else {
  80. if (value == 2) {
  81. if (row.lastState == 4) {
  82. return "<span class='label label-success'>待审核(重新提交)</span>"
  83. }
  84. if (row.realState == 6) {
  85. return "<span class='label label-danger'>复审驳回</span>"
  86. }
  87. return "<span class='label label-success'>待审核</span>"
  88. }
  89. if (value == 3) {
  90. return "<span class='label label-success'>待复审</span>"
  91. }
  92. if (value == 5) {
  93. return "<span class='label label-success'>复审通过</span>"
  94. }
  95. if (value == 10) {
  96. if (process == 3) {
  97. if (row.pass_dept_check == 1) {
  98. return "<span class='label label-success'>初审通过(待复审)</span>"
  99. }
  100. return "<span class='label label-success'>初审通过(待部门并审)</span>"
  101. }
  102. if (process == 4) {
  103. if (row.resubmit) {
  104. return "<span class='label label-success'>待部门并审(重新提交)</span>";
  105. } else {
  106. return "<span class='label label-success'>待部门并审(首次提交)</span>";
  107. }
  108. }
  109. if (row.resubmit) {
  110. return "<span class='label label-success'>待复审(重新提交)</span>";
  111. } else {
  112. return "<span class='label label-success'>待复审(首次提交)</span>";
  113. }
  114. }
  115. if (value == 8) {
  116. if (row.realState == 11) {
  117. return "<span class='label label-danger'>初审驳回</span>"
  118. } else {
  119. return "<span class='label label-success'>保存未提交</span>"
  120. }
  121. }
  122. if (value == 9) {
  123. if (row.realState == 13) {
  124. if (process == 3) {
  125. return "<span class='label label-danger'>待初审(部门并审驳回)</span>";
  126. }
  127. return "<span class='label label-danger'>部门并审驳回</span>";
  128. } else if (row.realState == 15) {
  129. if (process == 3) {
  130. return "<span class='label label-danger'>待初审(复审驳回)</span>";
  131. }
  132. return "<span class='label label-danger'>复审驳回</span>";
  133. } else {
  134. if (row.lastState == 11) {
  135. return "<span class='label label-success'>待初审(重新提交)</span>"
  136. }
  137. return "<span class='label label-success'>待初审(首次提交)</span>"
  138. }
  139. }
  140. if (value == -2) {
  141. return "<span class='label label-danger'>初审不通过</span>"
  142. }
  143. if (value == 16) {
  144. return "<span class='label label-danger'>复审不通过</span>"
  145. }
  146. if (value == -1 || value == 7) {
  147. return "<span class='label label-danger'>审核不通过</span>"
  148. }
  149. if (value == 4) {
  150. if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 1) {
  151. return "<span class='label label-success'>上级驳回</span>"
  152. } else {
  153. return "<span class='label label-success'>待审核</span>"
  154. }
  155. }
  156. if (value == 11) {
  157. if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 3) {
  158. return "<span class='label label-success'>上级驳回</span>"
  159. } else {
  160. return "<span class='label label-success'>待审核</span>"
  161. }
  162. }
  163. if (value == 12) {
  164. if (process == 4) {
  165. return "<span class='label label-success'>部门并审通过</span>";
  166. }
  167. if (process == 3) {
  168. return "<span class='label label-success'>待复审(部门并审通过)</span>";
  169. }
  170. if (row.resubmit) {
  171. return "<span class='label label-success'>待复审(重新提交)</span>";
  172. } else {
  173. return "<span class='label label-success'>待复审(首次提交)</span>";
  174. }
  175. }
  176. if (value == 13) {
  177. if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 4) {
  178. return "<span class='label label-danger'>上级驳回</span>"
  179. } else {
  180. return "<span class='label label-success'>待审核</span>"
  181. }
  182. }
  183. if (value == 14) {
  184. return "<span class='label label-primary'>复审通过</span>"
  185. }
  186. if (value == 15) {
  187. if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 5) {
  188. return "<span class='label label-success'>上级驳回</span>"
  189. } else {
  190. return "<span class='label label-success'>待审核</span>"
  191. }
  192. }
  193. }
  194. }
  195. },
  196. {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "80px",
  197. formatter: function (value, row, index) {
  198. return "<span class='label label-success' onclick=\"TalentInfo.showLog('" + value + "')\" >" +
  199. "<i class=\"fa fa-book\"></i>日志" +
  200. "</span>";
  201. }
  202. }
  203. ];
  204. };
  205. /**
  206. * 检查是否选中
  207. */
  208. TalentInfo.check = function () {
  209. var selected = $('#' + this.id).bootstrapTable('getSelections');
  210. if (selected.length != 1) {
  211. Feng.info("请先选中表格中的某一记录!");
  212. return false;
  213. } else {
  214. TalentInfo.seItem = selected[0];
  215. return true;
  216. }
  217. };
  218. TalentInfo.openCheckTalentInfo = function () {
  219. var title = $("#title").val();
  220. var process = $("#process").val();
  221. if (this.check()) {
  222. var index = layer.open({
  223. type: 2,
  224. title: '人才认定' + " - " + title,
  225. area: ['800px', '420px'], //宽高
  226. fix: false, //不固定
  227. maxmin: true,
  228. shade: 0,
  229. content: '/admin/talent/common_check/id/' + TalentInfo.seItem.id + '/process/' + process,
  230. 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;关闭'],
  231. btnAlign: 'c',
  232. btn1: function (index, layero) {
  233. var obj = layero.find("iframe")[0].contentWindow;
  234. obj.TalentInfoInfoDlg.showFirstCheckModal();
  235. }, btn2: function (index, layero) {
  236. var obj = layero.find("iframe")[0].contentWindow;
  237. obj.TalentInfoInfoDlg.submitCheck();
  238. return false;
  239. }
  240. });
  241. layer.full(index);
  242. TalentInfo.layerIndex = index;
  243. }
  244. }
  245. /**
  246. * 打开查看人才认定-初级审核详情
  247. */
  248. TalentInfo.openTalentInfoDetail = function () {
  249. if (this.check()) {
  250. var index = layer.open({
  251. type: 2,
  252. title: '人才认定申报详情',
  253. area: ['800px', '420px'], //宽高
  254. fix: false, //不固定
  255. maxmin: true,
  256. content: Feng.ctxPath + '/talentInfo/talentInfo_toDetail/' + TalentInfo.seItem.id + '/1'
  257. });
  258. layer.full(index);
  259. TalentInfo.layerIndex = index;
  260. }
  261. };
  262. /**
  263. * 修改驳回的字段及附件
  264. */
  265. TalentInfo.updateFieldsAndFiles = function () {
  266. if (this.check()) {
  267. var ajax = new $ax("/admin/talent/findFieldsAndFiles?id=" + TalentInfo.seItem.id, function (data) {
  268. if (data.code == 200) {
  269. layer.open({
  270. type: 1,
  271. id: "neewFieldFormModel",
  272. title: '修改',
  273. area: ['800px', '450px'], //宽高
  274. fix: false, //不固定
  275. shade: 0,
  276. maxmin: true,
  277. content: TalentInfo.creatFieldCheckModal(),
  278. btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  279. btnAlign: 'c',
  280. zIndex: layer.zIndex,
  281. success: function (layero, index) {
  282. var html1 = '';
  283. if (typeof data.fieldList != "undefined" && data.fieldList.length > 0) {
  284. for (var key in data.fieldList) {
  285. html1 += '<li style="float:left;margin:0 10px 10px 0;"><input type="checkbox" value="' + data.fieldList[key]["key"] + '"><span>' + data.fieldList[key]["value"] + '</span></li>';
  286. }
  287. }
  288. var html2 = '';
  289. for (var key in data.fileList) {
  290. html2 = html2 + '<ul><li style="width: 100%"><input type="checkbox" value="' + data.fileList[key].id + '"><span>' + data.fileList[key].name + '</span></li></ul>';
  291. }
  292. $("#firstCheckForm #field_info ul").css("overflow", "hidden").html(html1);
  293. $("#field_file").css("overflow", "hidden").empty().append(html2);
  294. //$("#field_file").empty().append(html);
  295. if (data.select.fields != null && data.select.fields != '') {
  296. $("#firstCheckForm #field_info li input").each(function () {
  297. if (data.select.fields.indexOf($(this).val()) != -1) {
  298. this.checked = true;
  299. }
  300. });
  301. }
  302. if (data.select.files != null && data.select.files != '') {
  303. $("#field_file input").each(function () {
  304. if (data.select.files.indexOf($(this).val()) != -1) {
  305. this.checked = true;
  306. }
  307. });
  308. }
  309. },
  310. yes: function (index, layero) {
  311. TalentInfo.submitFieldsAndFiles(index, data.id);
  312. }
  313. });
  314. } else {
  315. Feng.error(data.msg);
  316. }
  317. }, function (data) {
  318. Feng.error("查询失败!" + data.responseJSON.message + "!");
  319. });
  320. ajax.start();
  321. }
  322. }
  323. /**
  324. * 修改提交
  325. * @param index
  326. * @param id
  327. */
  328. TalentInfo.submitFieldsAndFiles = function (index, id) {
  329. var fields = '';
  330. var files = '';
  331. $("#firstCheckForm #field_info li input").each(function (index) {
  332. if ($(this).is(":checked")) {
  333. fields = fields + $(this).val() + ",";
  334. }
  335. });
  336. $("#field_file li input").each(function (index) {
  337. if ($(this).is(":checked")) {
  338. files = files + $(this).val() + ",";
  339. }
  340. });
  341. if (fields == '' && files == '') {
  342. Feng.info("请选择可修改的字段或附件!");
  343. return;
  344. }
  345. var ajax = new $ax("/admin/talent/updateFieldsAndFiles", function (data) {
  346. if (data.code == 200) {
  347. layer.close(index);
  348. Feng.success(data.msg);
  349. } else {
  350. Feng.error(data.msg);
  351. }
  352. }, function (data) {
  353. Feng.error("修改失败!" + data.responseJSON.message + "!");
  354. });
  355. ajax.setData({"id": id, "fields": fields, "files": files})
  356. ajax.start();
  357. }
  358. /**
  359. * 审核不通过
  360. */
  361. TalentInfo.setNotPass = function () {
  362. var selecteds = $('#' + this.id).bootstrapTable('getSelections');
  363. if (selecteds.length == 0) {
  364. Feng.info("请选择需要设置审核不通过的行");
  365. return;
  366. }
  367. var ids = "";
  368. for (var key in selecteds) {
  369. ids = ids + selecteds[key].id + ",";
  370. }
  371. ids = ids.substring(0, ids.length - 1);
  372. layer.open({
  373. type: 1,
  374. id: "notPassModal",
  375. title: '修改',
  376. area: ['800px', '450px'], //宽高
  377. fix: false, //不固定
  378. shade: 0,
  379. maxmin: true,
  380. content: '<form id="checkNotPass">\n' +
  381. ' <div class="form-group" style="margin: 10px;">\n' +
  382. ' <label for="checkMsgNotPass" class="control-label" >审核不通过原因</label>\n' +
  383. ' <textarea class="form-control" id="checkMsgNotPass" placeholder="此功能适用于未在申报提交截止时间内提交的数据" rows="6"></textarea>\n' +
  384. ' </div>\n' +
  385. ' </form>',
  386. btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  387. btnAlign: 'c',
  388. zIndex: layer.zIndex,
  389. yes: function (index, layero) {
  390. var checkMsg = $("#checkMsgNotPass").val();
  391. if (Feng.isEmptyStr(checkMsg)) {
  392. Feng.info("请填写审核不通过原因");
  393. return;
  394. }
  395. var operation = function () {
  396. var ajax = new $ax("/admin/talent/cancel_verify", function (data) {
  397. if (data.code == 200) {
  398. Feng.success(data.msg);
  399. TalentInfo.table.refresh();
  400. layer.close(index);
  401. } else {
  402. Feng.error(data.msg);
  403. }
  404. }, function (data) {
  405. Feng.error("设置审核不通过失败!" + data.responseJSON.message + "!");
  406. });
  407. ajax.set("ids", ids);
  408. ajax.set("msg", checkMsg);
  409. ajax.start();
  410. }
  411. Feng.confirm("一旦提交无法修改,确定设置所选数据为审核不通过?", operation);
  412. }
  413. });
  414. }
  415. TalentInfo.creatFieldCheckModal = function () {
  416. return '<form id="firstCheckForm">\n' +
  417. ' <div class="form-group" style="margin: 10px;">\n' +
  418. ' <div >\n' +
  419. ' <label for="checkMsg" class="control-label">可修改字段</label>\n' +
  420. ' <div id="field_info">\n' +
  421. ' <ul>\n' +
  422. ' <li style="width:10%"><input type="checkbox" value="name"><span>姓名</span></li>\n' +
  423. ' <li style="width:10%"><input type="checkbox" value="sex"><span>性别</span></li>\n' +
  424. ' <li style="width:10%"><input type="checkbox" value="birthday"><span>出生日期</span></li>\n' +
  425. ' <li style="width:10%"><input type="checkbox" value="nationality"><span>国籍/地区</span></li>\n' +
  426. ' <li style="width:10%"><input type="checkbox" value="provinceCode" onchange="TalentInfo.fieldCheckd(this)"><span>籍贯省</span></li>\n' +
  427. ' <li style="width:10%"><input type="checkbox" value="cityCode" onchange="TalentInfo.fieldCheckd(this)"><span>籍贯市</span></li>\n' +
  428. ' <li style="width:10%"><input type="checkbox" value="countyCode"><span>籍贯县</span></li>\n' +
  429. ' <li style="width:10%"><input type="checkbox" value="nation"><span>民族</span></li>\n' +
  430. ' <li style="width:10%"><input type="checkbox" value="politics"><span>政治面貌</span></li>\n' +
  431. ' <li style="width:10%"><input type="checkbox" value="cardType"><span>证件类型</span></li>\n' +
  432. ' <li style="width:10%"><input type="checkbox" value="idCard"><span>证件号码</span></li>\n' +
  433. ' <li style="width:20.5%"><input type="checkbox" value="firstInJJTime"><span>首次来晋工作时间</span></li>\n' +
  434. ' <li style="width:10%"><input type="checkbox" value="source" onchange="TalentInfo.sourceCheckd(this)"><span>申报来源</span></li>\n' +
  435. ' <li style="width:20.5%"><input type="checkbox" value="ourCitySource"><span>公布入选来源</span></li>\n' +
  436. ' <li style="width:20.5%"><input type="checkbox" value="fromCity"><span>入选来源县市</span></li>\n' +
  437. ' <li style="width:20.5%"><input type="checkbox" value="qzBatch"><span>入选名单的文件号及批次</span></li>\n' +
  438. ' <li style="width:31%"><input type="checkbox" value="certificateStartTime"><span>泉州高层次人才证书发证日期</span></li>\n' +
  439. ' <li style="width:31%"><input type="checkbox" value="qzgccrcActiveTime"><span>泉州高层次人才证书的有效期</span></li>\n' +
  440. ' <li style="width:10%"><input type="checkbox" id="talentArrangeCheckBox" value="talentArrange" onchange="TalentInfo.fieldCheckd(this)"><span>人才层次</span></li>\n' +
  441. ' <li style="width:10%"><input type="checkbox" value="identifyCondition"><span>认定条件</span></li>\n' +
  442. ' <li style="width:20.5%"><input type="checkbox" value="identifyConditionName"><span>认定条件名称</span></li>\n' +
  443. ' <li style="width:20.5%"><input type="checkbox" value="identifyGetTime"><span>认定条件证书取得时间</span></li>\n' +
  444. ' <li style="width:10%"><input type="checkbox" value="talentType"><span>人才标签</span></li>\n' +
  445. ' <li style="width:31%"><input type="checkbox" value="letterTime"><span>首次来晋行政介绍信时间</span></li>\n' +
  446. ' <li style="width:10%"><input type="checkbox" value="introductionMode"><span>引进方式</span></li>\n' +
  447. ' <li style="width:20.5%"><input type="checkbox" value="entryTime"><span>本单位入职时间</span></li>\n' +
  448. ' <li style="width:10%"><input type="checkbox" value="post"><span>职务</span></li>\n' +
  449. ' <li style="width:20.5%"><input type="checkbox" value="startTime"><span>工作合同开始时间</span></li>\n' +
  450. ' <li style="width:20.5%"><input type="checkbox" value="endTime"><span>工作合同结束时间</span></li>\n' +
  451. ' <li style="width:20.5%"><input type="checkbox" value="lastYearWages"><span>上一年度年薪</span></li>\n' +
  452. ' <li style="width:10%"><input type="checkbox" value="highEducation"><span>最高学历</span></li>\n' +
  453. ' <li style="width:10%"><input type="checkbox" value="graduateSchool"><span>毕业院校</span></li>\n' +
  454. ' <li style="width:10%"><input type="checkbox" value="major"><span>专业</span></li>\n' +
  455. ' <li style="width:10%"><input type="checkbox" value="title"><span>职称</span></li>\n' +
  456. ' <li style="width:20.5%"><input type="checkbox" value="professionalQualifications"><span>国家职业资格</span></li>\n' +
  457. ' <li style="width:20.5%"><input type="checkbox" value="studyAbroad"><span>是否有留学经历</span></li>\n' +
  458. ' <li style="width:10%"><input type="checkbox" value="phone"><span>手机号码</span></li>\n' +
  459. ' <li style="width:10%"><input type="checkbox" value="email"><span>电子邮箱</span></li>\n' +
  460. ' <li style="width:10%"><input type="checkbox" value="bank"><span>开户银行</span></li>\n' +
  461. ' <li style="width:20.5%"><input type="checkbox" value="bankNetwork"><span>开户银行网点</span></li>\n' +
  462. ' <li style="width:10%"><input type="checkbox" value="bankNumber"><span>银行行号</span></li>\n' +
  463. ' <li style="width:10%"><input type="checkbox" value="bankAccount"><span>银行账号</span></li>\n' +
  464. ' <li style="width:31%"><input type="checkbox" value="breakFaith"><span>曾被相关主管部门列为失信个人</span></li>\n' +
  465. ' <li style="width:20.5%"><input type="checkbox" value="educationAndResume"><span>教育背景及工作简历</span></li>\n' +
  466. ' <li style="width:20.5%"><input type="checkbox" value="mainHonours"><span>主要业绩及取得的荣誉</span></li>\n' +
  467. ' </ul>\n' +
  468. ' </div>\n' +
  469. ' <label for="checkMsg" class="control-label">可修改附件</label>\n' +
  470. ' <div id="field_file">\n' +
  471. ' </div>\n' +
  472. ' <div class="form-group" style="text-align: center">\n' +
  473. ' <button type="button" class="btn btn-primary" onclick="TalentInfo.checkAll()">全选</button>\n' +
  474. ' <button type="button" class="btn btn-success" onclick="TalentInfo.unCheckAll()">反选</button>\n' +
  475. ' </div>\n' +
  476. ' </div>\n' +
  477. ' </div>\n' +
  478. ' </form>';
  479. }
  480. TalentInfo.fieldCheckd = function (context) {
  481. if ($(context).get(0).checked) {
  482. $(context).parent().next().children()[0].checked = true;
  483. $(context).parent().next().children().eq(0).trigger("change");
  484. }
  485. }
  486. TalentInfo.sourceCheckd = function (context) {
  487. if ($(context).get(0).checked) {
  488. $("#talentArrangeCheckBox").attr("checked", true);
  489. $("#talentArrangeCheckBox").trigger("change");
  490. }
  491. }
  492. TalentInfo.getPhones = function () {
  493. var process = $("#process").val();
  494. var ajax = new $ax("/admin/talent/getPhones/process/" + process, function (data) {
  495. if (data.code == 200) {
  496. layer.open({
  497. type: 1,
  498. title: "手机号码",
  499. area: ['830px', '300px'], //宽高
  500. fix: false, //不固定
  501. maxmin: true,
  502. content: "<span style='word-break:break-all'>" + data.obj + "</span>"
  503. });
  504. } else {
  505. Feng.info(data.msg);
  506. }
  507. }, function (data) {
  508. Feng.error("操作失败!");
  509. });
  510. ajax.setData(TalentInfo.formParams());
  511. ajax.start();
  512. }
  513. TalentInfo.getEnterprisePhones = function () {
  514. var process = $("#process").val();
  515. var ajax = new $ax("/admin/talent/getEnterprisePhones/process/" + process, function (data) {
  516. if (data.code == 200) {
  517. layer.open({
  518. type: 1,
  519. title: "手机号码",
  520. area: ['830px', '300px'], //宽高
  521. fix: false, //不固定
  522. maxmin: true,
  523. content: "<span style='word-break:break-all'>" + data.obj + "</span>"
  524. });
  525. } else {
  526. Feng.info(data.msg);
  527. }
  528. }, function (data) {
  529. Feng.error("操作失败!");
  530. });
  531. ajax.setData(TalentInfo.formParams());
  532. ajax.start();
  533. }
  534. $(function () {
  535. var defaultColunms = TalentInfo.initColumn();
  536. var process = $("#process").val();
  537. var table = new BSTable(TalentInfo.id, "/admin/talent/base_verify_list/process/" + process, defaultColunms);
  538. table.setPaginationType("server");
  539. table.setSingleSelect(false);
  540. table.setOnDblClickRow(function () {
  541. TalentInfo.openCheckTalentInfo();
  542. });
  543. TalentInfo.table = table.init();
  544. TalentInfo.init();
  545. // var defaultColunms = TalentInfo.initColumn();
  546. // var table = new KDTable(TalentInfo.id, "/talentInfo/list/1", defaultColunms);
  547. // table.setPaginationType("server");
  548. // TalentInfo.table = table.init();
  549. });