You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

78 line
3.1 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2021-05-10 11:32
  5. * 描 述:教科研经费审批人
  6. */
  7. var acceptClick;
  8. var keyValue = request('keyValue');
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. $('.lr-form-wrap').lrscroll();
  14. page.bind();
  15. page.initData();
  16. },
  17. bind: function () {
  18. $('#lr_form_tabs').lrFormTab();
  19. $('#lr_form_tabs ul li').eq(0).trigger('click');
  20. $('#ExaminerState').lrRadioCheckbox({
  21. type: 'radio',
  22. code: 'EnableStatus',
  23. });
  24. $('#FundDepartment').lrDataSourceSelect({ code: 'classdata',value: 'id',text: 'name' });
  25. $('#StaffCategory').lrDataItemSelect({ code: 'EmpSort' });
  26. $('#CompileCategory').lrDataItemSelect({ code: 'CompilationCategory' });
  27. $('#FundExaminer').jfGrid({
  28. headData: [
  29. {
  30. label: '工号', name: 'ExaminerNumber', width:100, align: 'left' },
  31. {
  32. label: '姓名', name: 'ExaminerName', width:100, align: 'left' },
  33. {
  34. label: '身份证件号', name: 'ExaminerIDnumber', width:100, align: 'left' },
  35. {
  36. label: '所属部门', name: 'ExaminerIDnumber', width:100, align: 'left' },
  37. {
  38. label: '编制类别', name: 'CompileCategory', width:100, align: 'left' },
  39. {
  40. label: '教职工类别', name: 'StaffCategory', width:100, align: 'left' },
  41. ],
  42. isEdit: true,
  43. height: 400
  44. });
  45. },
  46. initData: function () {
  47. if (!!keyValue) {
  48. $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/FundExaminer/GetFormData?keyValue=' + keyValue, function (data) {
  49. for (var id in data) {
  50. if (!!data[id].length && data[id].length > 0) {
  51. $('#' + id ).jfGridSet('refreshdata', data[id]);
  52. }
  53. else {
  54. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  55. }
  56. }
  57. });
  58. }
  59. }
  60. };
  61. // 保存数据
  62. acceptClick = function (callBack) {
  63. if (!$('body').lrValidform()) {
  64. return false;
  65. }
  66. var postData = {
  67. strEntity: JSON.stringify($('body').lrGetFormData())
  68. };
  69. $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/FundExaminer/SaveForm?keyValue=' + keyValue, postData, function (res) {
  70. // 保存成功后才回调
  71. if (!!callBack) {
  72. callBack();
  73. }
  74. });
  75. };
  76. page.init();
  77. }